Calculus3Introduction to Integration2 of 6
Introduction to Integration · 2

The Definite Integral

1

The definite integral as an area

When we write numbers at the bottom and top of the integral sign, like ∫abf(x) dx\int_{\lb{a}}^{\ub{b}} f(x)\,dx, we're finding the area between the curve y=f(x)y = f(x) and the x-axis, from x=ax = \lb{a} to x=bx = \ub{b}. The number a\lb{a} at the bottom is the lower bound, where the region starts, and b\ub{b} at the top is the upper bound, where it stops.

∫abf(x) dx\displaystyle\int_{\htmlClass{lc-violet}{a}}^{\htmlClass{lc-orange}{b}} f(x)\,dx
xx
yy
a\htmlClass{lc-violet}{a}
b\htmlClass{lc-orange}{b}
y=f(x)y = f(x)

To see why this gives the area, take a thin vertical rectangle at xx. Its height goes from the x-axis up to the curve, so it's f(x)\stp{f(x)}, and its width is a tiny change in xx, which we call dx\stp{dx}.

xx
yy
a\htmlClass{lc-violet}{a}
b\htmlClass{lc-orange}{b}
dx\htmlClass{lc-green}{dx}
f(x)\htmlClass{lc-green}{f(x)}
y=f(x)y = f(x)
area\displaystyle \text{area} =f(x)⋅dx\displaystyle = \stp{f(x)}\cdot\stp{dx} =f(x) dx\displaystyle = \stp{f(x)\,dx}

The integral symbol is a stretched-out S, which stands for sum. So ∫abf(x) dx\int_{\lb{a}}^{\ub{b}} f(x)\,dx adds up these thin rectangles from x=ax = \lb{a} to x=bx = \ub{b}, and together they fill the region under the curve.

An indefinite integral like ∫x2 dx\int x^2\,dx gave us a whole family of functions, x33+C\frac{x^3}{3} + C. But a definite integral like ∫13x2 dx\int_{\lb{1}}^{\ub{3}} x^2\,dx gives a single number, which is the area under y=x2y = x^2 from x=1x = \lb{1} to x=3x = \ub{3}.

A family of functions
∫x2 dx\displaystyle \int x^2\,dx =x33+C\displaystyle = \frac{x^3}{3} + C
A single number
∫13x2 dx\displaystyle \int_{\lb{1}}^{\ub{3}} x^2\,dx

When the region is a shape we know, like a triangle or a rectangle, geometry gives us the integral right away.

xx
yy
0\htmlClass{lc-violet}{0}
3\htmlClass{lc-orange}{3}
66
y=2xy = 2x
xx
yy
1\htmlClass{lc-violet}{1}
4\htmlClass{lc-orange}{4}
55
y=5y = 5
∫032x dx\displaystyle \int_{\lb{0}}^{\ub{3}} 2x\,dx =12⋅3⋅6\displaystyle = \frac12\cdot 3\cdot 6 =9\displaystyle = 9
∫145 dx\displaystyle \int_{\lb{1}}^{\ub{4}} 5\,dx =3⋅5\displaystyle = 3\cdot 5 =15\displaystyle = 15

Sometimes the shape is hiding in the formula, like in the second integral here.

Find ∫032x dx\int_{\lb{0}}^{\ub{3}} 2x\,dx and ∫−224−x2 dx\int_{\lb{-2}}^{\ub{2}} \sqrt{4 - x^2}\,dx from their areas
xx
yy
y=2xy = 2x
0\htmlClass{lc-violet}{0}
3\htmlClass{lc-orange}{3}
Text solution
The triangle under y=2xy = 2xThe base goes from 0\lb{0} to 3\ub{3}, and at x=3x = \ub{3} the height is 2⋅3=62\cdot 3 = 6, so the area is 12⋅3⋅6=9\frac12\cdot 3\cdot 6 = 9.
Find the curveSquaring both sides of y=4−x2y = \sqrt{4 - x^2} gives x2+y2=4x^2 + y^2 = 4, a circle centered at (0,0)(0, 0) with radius 22.
Take the top halfA square root is never negative, so y≥0y \ge 0 and the curve is only the top half. The bounds −2\lb{-2} and 2\ub{2} cover all of it.
∫−224−x2 dx\displaystyle \int_{\lb{-2}}^{\ub{2}}\sqrt{4-x^2}\,dx =12⋅π⋅22\displaystyle = \frac12\cdot\pi\cdot 2^2 =2π\displaystyle = 2\pi

So y=4−x2y = \sqrt{4 - x^2} is the top half of the circle x2+y2=4x^2 + y^2 = 4.

xx
yy
22
−2\htmlClass{lc-violet}{-2}
2\htmlClass{lc-orange}{2}
y=4−x2y = \sqrt{4 - x^2}
y=4−x2y2=4−x2x2+y2=4\displaystyle \begin{aligned} y &= \sqrt{4-x^2} \\ y^2 &= 4 - x^2 \\ x^2 + y^2 &= 4 \end{aligned}

For ∫13x2 dx\int_{\lb{1}}^{\ub{3}} x^2\,dx, though, the top edge is the parabola y=x2y = x^2. That region isn't a triangle, a rectangle or a circle, so none of our geometry formulas give its area.

xx
yy
1\htmlClass{lc-violet}{1}
3\htmlClass{lc-orange}{3}
y=x2y = x^2
2

When the graph is below the x-axis

An integral adds up thin strips of area f(x) dx\stp{f(x)\,dx}. But what happens when the graph is below the x-axis? Take the line y=x−2y = x - 2, which is below the axis for x<2x < 2. At x=1x = 1, the width dxdx is still positive, but the height is f(1)=1−2=−1\bw{f(1)} = 1 - 2 = \bw{-1}, so the strip's f(x) dxf(x)\,dx is negative.

xx
yy
dx\htmlClass{lc-pink}{dx}
f(1)=−1\htmlClass{lc-pink}{f(1) = -1}
22
y=x−2y = x - 2
f(1) dx\displaystyle \bw{f(1)\,dx} =−1⋅dx<0\displaystyle = \bw{-1\cdot dx} < 0

So every strip below the axis adds a negative value to the integral, and every strip above it adds a positive one. The integral gives what we call the signed area.

Signed area
∫abf(x) dx\displaystyle \int_{\lb{a}}^{\ub{b}} f(x)\,dx =(area above the x-axis)−(area below the x-axis)\displaystyle = \ab{(\text{area above the } x\text{-axis})} - \bw{(\text{area below the } x\text{-axis})}
∫abf(x) dx=(area above the x-axis)−(area below the x-axis)\displaystyle \begin{aligned} &\int_{\lb{a}}^{\ub{b}} f(x)\,dx \\ &= \ab{(\text{area above the } x\text{-axis})} \\ &\quad - \bw{(\text{area below the } x\text{-axis})} \end{aligned}

For the line from 0\lb{0} to 5\ub{5}, the region is a triangle below the axis and a triangle above it.

xx
yy
0\htmlClass{lc-violet}{0}
22
5\htmlClass{lc-orange}{5}
22
33
y=x−2y = x - 2
Find ∫05(x−2) dx\int_{\lb{0}}^{\ub{5}} (x-2)\,dx and ∫−22x3 dx\int_{\lb{-2}}^{\ub{2}} x^3\,dx
xx
yy
y=x−2y = x - 2
0\htmlClass{lc-violet}{0}
22
5\htmlClass{lc-orange}{5}
Text solution
Each triangle with its signThe triangle on [0,2][0, 2] has area 22, but it's below the axis. The one on [2,5][2, 5] is above.
∫02(x−2) dx\displaystyle \int_{\lb{0}}^{\ub{2}} (x-2)\,dx =−12⋅2⋅2\displaystyle = -\frac12\cdot 2\cdot 2 =−2\displaystyle = \bw{-2}
∫25(x−2) dx\displaystyle \int_{\lb{2}}^{\ub{5}} (x-2)\,dx =12⋅3⋅3\displaystyle = \frac12\cdot 3\cdot 3 =92\displaystyle = \ab{\frac92}
Add the signed areasThe shaded area is 2+92=1322 + \frac92 = \frac{13}{2}, but the integral counts the piece below as negative.
∫05(x−2) dx\displaystyle \int_{\lb{0}}^{\ub{5}} (x-2)\,dx =−2+92\displaystyle = \bw{-2} + \ab{\frac92} =52\displaystyle = \frac52

Signed areas can cancel even when there's plenty of shaded region. If we stop the line at x=4x = \ub{4}, the triangle above has area 2\ab{2}, the same as the one below, so the shaded area is 44 but the integral is 00.

∫04(x−2) dx\displaystyle \int_{\lb{0}}^{\ub{4}} (x-2)\,dx =−2+2\displaystyle = \bw{-2} + \ab{2} =0\displaystyle = 0

Can the shaded region grow while the integral decreases?

Accumulate signed area

Odd functions

Remember, an odd function satisfies f(−x)=−f(x)f(-x) = -f(x). For every point (x,y)(x, y) on its graph, (−x,−y)(-x, -y) is on the graph too.

Odd function
f(−x)\displaystyle f(-x) =−f(x)\displaystyle = -f(x)
(−x)3\displaystyle (-x)^3 =−x3\displaystyle = -x^3

For x3x^3 on [−2,2][-2, 2], turning the piece on [0,2][0, 2] halfway around the origin gives the piece on [−2,0][-2, 0], below the axis. The two pieces have the same area, so they cancel, and the integral is 00 without working out either area.

xx
yy
(x, y)(x,\,y)
(−x, −y)(-x,\,-y)
−2\htmlClass{lc-violet}{-2}
2\htmlClass{lc-orange}{2}
y=x3y = x^3
∫−22x3 dx\displaystyle \int_{\lb{-2}}^{\ub{2}} x^3\,dx =0\displaystyle = 0
3

Why an antiderivative gives the area

We still can't find the area under y=x2y = x^2 from x=1x = \lb{1} to x=3x = \ub{3}. To see how, let's look first at a line, where we already know the area. Under y=2xy = 2x, the region from 0\lb{0} to x\ub{x} is a right triangle with area x2\ab{x^2}. Notice that the derivative of that area is 2x\stp{2x}, the height of the line at x\ub{x}.

xx
yy
2x\htmlClass{lc-green}{2x}
0\htmlClass{lc-violet}{0}
x\htmlClass{lc-orange}{x}
y=2xy = 2x
12⋅x⋅2x\displaystyle \frac12\cdot x\cdot 2x =x2\displaystyle = \ab{x^2}
(x2)′\displaystyle (\ab{x^2})' =2x\displaystyle = \stp{2x}

That happens for any curve. Let A(x)\ab{A(x)} be the area under y=f(x)y = f(x) from 0\lb{0} to x\ub{x}. When we increase x\ub{x} by dx\stp{dx}, the region gains one thin strip of width dx\stp{dx} and height f(x)\stp{f(x)}, so the area grows at the rate f(x)\stp{f(x)}.

xx
yy
A(x)\htmlClass{lc-blue}{A(x)}
dx\htmlClass{lc-green}{dx}
f(x)\htmlClass{lc-green}{f(x)}
0\htmlClass{lc-violet}{0}
x\htmlClass{lc-orange}{x}
y=x2y = x^2
dA≈f(x) dx\displaystyle \stp{dA} \approx \stp{f(x)\,dx}
dAdx\displaystyle \frac{\stp{dA}}{dx} =f(x)\displaystyle = \stp{f(x)}

That means the area function A(x)\ab{A(x)} is an antiderivative of f(x)f(x). To get the area from 11 to 33, we take the area from 00 to 33 and remove the piece from 00 to 11.

xx
yy
A(1)\htmlClass{lc-violet}{A(1)}
00
1\htmlClass{lc-violet}{1}
3\htmlClass{lc-orange}{3}
y=x2y = x^2
Find ∫13x2 dx\int_{\lb{1}}^{\ub{3}} x^2\,dx using an antiderivative
xx
yy
y=x2y = x^2
1\htmlClass{lc-violet}{1}
3\htmlClass{lc-orange}{3}
Text solution
Why the strip is enoughThe curved corner on top of the strip fits inside a rectangle of width dxdx and height dfdf. Like in the product rule, dx⋅dfdx \cdot df goes to 00 much faster than dxdx, so the change in area is essentially f(x) dx\stp{f(x)\,dx}.
Find the area functionThe antiderivatives of x2x^2 are x33+C\frac{x^3}{3} + C, and the area from 00 to 00 is 00.
A(x)\displaystyle \ab{A(x)} =x33+C\displaystyle = \ab{\frac{x^3}{3}} + C
A(0)\displaystyle A(0) =0  →  C\displaystyle = 0 \;\to\; C =0\displaystyle = 0
Subtract the piece from 00 to 11The area from 11 to 33 is A(3)−A(1)\ub{A(3)} - \lb{A(1)}.
∫13x2 dx\displaystyle \int_{\lb{1}}^{\ub{3}} x^2\,dx =333−133\displaystyle = \ub{\frac{3^3}{3}} - \lb{\frac{1^3}{3}} =9−13\displaystyle = \ub{9} - \lb{\frac13} =263\displaystyle = \frac{26}{3}

We don't need to solve for CC every time. Any antiderivative FF of ff is A(x)+C\ab{A(x)} + C for some constant CC, and when we subtract, the CC cancels.

(F(b)+C)−(F(a)+C)\displaystyle \big(\ub{F(b)} + C\big) - \big(\lb{F(a)} + C\big) =F(b)−F(a)\displaystyle = \ub{F(b)} - \lb{F(a)}

This is the Fundamental Theorem of Calculus. To find the integral of f(x)f(x) from a\lb{a} to b\ub{b}, find any antiderivative FF of ff, plug in b\ub{b}, and subtract what we get at a\lb{a}. We write [F(x)]ab[F(x)]_{\lb{a}}^{\ub{b}} for F(b)−F(a)\ub{F(b)} - \lb{F(a)}.

∫abf(x) dx\displaystyle \int_{\lb{a}}^{\ub{b}} f(x)\,dx =[F(x)]ab\displaystyle = \Big[F(x)\Big]_{\lb{a}}^{\ub{b}} =F(b)−F(a)\displaystyle = \ub{F(b)} - \lb{F(a)}

It works below the x-axis too. There f(x) dx\stp{f(x)\,dx} is negative, so the area function decreases, and F(b)−F(a)\ub{F(b)} - \lb{F(a)} gives the signed area. For ∫05(x−2) dx\int_{\lb{0}}^{\ub{5}} (x - 2)\,dx, it gives the same 52\frac52 we found from the two triangles.

∫05(x−2) dx\displaystyle \int_{\lb{0}}^{\ub{5}} (x-2)\,dx =[x22−2x]05\displaystyle = \Big[\frac{x^2}{2} - 2x\Big]_{\lb{0}}^{\ub{5}} =(252−10)−0\displaystyle = \Big(\ub{\frac{25}{2} - 10}\Big) - \lb{0} =52\displaystyle = \frac52
4

Working with minus signs in F(b)−F(a)F(b) - F(a)

To evaluate ∫abf(x) dx\int_{\lb{a}}^{\ub{b}} f(x)\,dx, we find an antiderivative F(x)F(x) and compute F(b)−F(a)\ub{F(b)} - \lb{F(a)}. Here are the antiderivatives we'll use most.

xn→xn+1n+1\displaystyle x^n \to \frac{x^{n+1}}{n+1}
sin⁡x→−cos⁡x\displaystyle \sin x \to -\cos x
cos⁡x→sin⁡x\displaystyle \cos x \to \sin x
sec⁡2x→tan⁡x\displaystyle \sec^2 x \to \tan x
ex→ex\displaystyle e^x \to e^x
1x→ln⁡∣x∣\displaystyle \frac1x \to \ln|x|

The hard part is the minus signs. When F(a)\lb{F(a)} is negative, we're subtracting a negative number, and it's easy to lose a sign along the way. Let's evaluate two integrals and keep every sign.

xx
yy
0\htmlClass{lc-violet}{0}
π\htmlClass{lc-orange}{\pi}
y=sin⁡xy = \sin x
Evaluate ∫0πsin⁡x dx\int_{\lb{0}}^{\ub{\pi}} \sin x\,dx and ∫−12(x2−2x) dx\int_{\lb{-1}}^{\ub{2}} (x^2 - 2x)\,dx
∫0πsin⁡x dx\displaystyle \int_{\lb{0}}^{\ub{\pi}} \sin x\,dx =  ?\displaystyle = \;?
∫−12(x2−2x) dx\displaystyle \int_{\lb{-1}}^{\ub{2}} (x^2 - 2x)\,dx =  ?\displaystyle = \;?
Text solution
Keep the sign on −cos⁡0-\cos 0The derivative of cos⁡x\cos x is −sin⁡x-\sin x, so F(x)=−cos⁡xF(x) = -\cos x. Writing cos⁡0=1\cos 0 = 1 in place of −cos⁡0\lb{-\cos 0} would give 1−1=01 - 1 = 0, but sin⁡x>0\sin x > 0 on (0,π)(0, \pi), so the answer has to be positive.
∫0πsin⁡x dx\displaystyle \int_{\lb{0}}^{\ub{\pi}} \sin x\,dx =(−cos⁡π)−(−cos⁡0)\displaystyle = (\ub{-\cos\pi}) - (\lb{-\cos 0}) =1−(−1)\displaystyle = \ub{1} - (\lb{-1}) =2\displaystyle = 2
Plug in −1\lb{-1} carefullyWith F(x)=x33−x2F(x) = \frac{x^3}{3} - x^2, the odd power keeps its minus sign, (−1)3=−1(-1)^3 = -1, and the even power loses it, (−1)2=1(-1)^2 = 1.
F(2)\displaystyle \ub{F(2)} =83−4\displaystyle = \frac83 - 4 =−43\displaystyle = \ub{-\frac43}
F(−1)\displaystyle \lb{F(-1)} =−13−1\displaystyle = -\frac13 - 1 =−43\displaystyle = \lb{-\frac43}
Subtract all of F(−1)\lb{F(-1)}Subtracting −43\lb{-\frac43} adds 43\frac43.
∫−12(x2−2x) dx\displaystyle \int_{\lb{-1}}^{\ub{2}} (x^2 - 2x)\,dx =−43−(−43)\displaystyle = \ub{-\frac43} - \left(\lb{-\frac43}\right) =0\displaystyle = 0

That 00 doesn't mean there's no region. The curve crosses the x-axis at x=0x = 0, and F(0)=0F(0) = 0, so splitting the integral there shows a piece above the axis and a piece below it.

xx
yy
−1\htmlClass{lc-violet}{-1}
00
2\htmlClass{lc-orange}{2}
y=x2−2xy = x^2 - 2x
∫−10(x2−2x) dx=F(0)−F(−1)=0−(−43)=43\displaystyle \begin{aligned} \int_{\lb{-1}}^{\ub{0}} (x^2 - 2x)\,dx &= \ub{F(0)} - \lb{F(-1)} \\ &= \ub{0} - \left(\lb{-\frac43}\right) = \ab{\frac43} \end{aligned}
∫02(x2−2x) dx=F(2)−F(0)=−43−0=−43\displaystyle \begin{aligned} \int_{\lb{0}}^{\ub{2}} (x^2 - 2x)\,dx &= \ub{F(2)} - \lb{F(0)} \\ &= \ub{-\frac43} - \lb{0} = \bw{-\frac43} \end{aligned}

The two signed areas are the same size, so they cancel, even though the total area between the curve and the x-axis is 43+43=83\ab{\frac43} + \ab{\frac43} = \frac83.

5

Finding the actual area

We found that ∫−12(x2−2x) dx=0\int_{\lb{-1}}^{\ub{2}} (x^2 - 2x)\,dx = 0, but the region between the curve and the x-axis is clearly there. An area is a size, so every piece has to count as positive. How do we get the area itself?

Find the area between y=x2−2xy = x^2 - 2x and the x-axis from x=−1x = \lb{-1} to x=2x = \ub{2}
xx
yy
y=x2−2xy = x^2 - 2x
−1\htmlClass{lc-violet}{-1}
2\htmlClass{lc-orange}{2}
Text solution
Split where the curve crosses the x-axisThe root x=2x = 2 is the right endpoint, and x=0x = 0 is inside [−1,2][-1, 2], so we split at x=0x = 0.
x2−2x\displaystyle x^2 - 2x =x(x−2)\displaystyle = x(x-2) =0  →  x=0, x=2\displaystyle = 0 \;\to\; {x = 0,\ x = 2}
Count each piece as positiveThe piece on [−1,0][-1, 0] is above the axis. The piece on [0,2][0, 2] is below it, so its integral is negative, but its area is positive.
∫−10(x2−2x) dx\displaystyle \int_{\lb{-1}}^{\ub{0}} (x^2 - 2x)\,dx =43\displaystyle = \ab{\frac43}
∫02(x2−2x) dx\displaystyle \int_{\lb{0}}^{\ub{2}} (x^2 - 2x)\,dx =−43\displaystyle = \bw{-\frac43}
area\displaystyle \text{area} =43+43\displaystyle = \ab{\frac43} + \ab{\frac43} =83\displaystyle = \frac83

Counting the piece below the axis as positive is the same as reflecting it so it lies above. That turns y=x2−2xy = x^2 - 2x into y=∣x2−2x∣y = |x^2 - 2x|, so the area is the integral of ∣x2−2x∣|x^2 - 2x|.

xx
yy
−1\htmlClass{lc-violet}{-1}
00
43\htmlClass{lc-blue}{\dfrac{4}{3}}
43\htmlClass{lc-blue}{\dfrac{4}{3}}
2\htmlClass{lc-orange}{2}
y=∣x2−2x∣y = |x^2 - 2x|
area\displaystyle \text{area} =∫−12∣x2−2x∣ dx\displaystyle = \int_{\lb{-1}}^{\ub{2}} \left|x^2 - 2x\right|\,dx =83\displaystyle = \frac83
6

Rules for combining integrals

We can often find a new integral from ones we already know, without evaluating it from scratch. Every rule comes from F(b)−F(a)\ub{F(b)} - \lb{F(a)} or from the thin strips that make up the area.

Let's start with the bounds. When both bounds are the same number aa, the interval has width 00, so there's no area. Integrating backwards from bb to aa just changes the sign.

Same bounds
∫aaf(x) dx\displaystyle \int_{\lb{a}}^{\ub{a}} f(x)\,dx =F(a)−F(a)\displaystyle = \ub{F(a)} - \lb{F(a)} =0\displaystyle = 0
Reversed bounds
∫baf(x) dx\displaystyle \int_{\lb{b}}^{\ub{a}} f(x)\,dx =F(a)−F(b)\displaystyle = \ub{F(a)} - \lb{F(b)} =−(F(b)−F(a))\displaystyle = -\big(\ub{F(b)} - \lb{F(a)}\big) =−∫abf(x) dx\displaystyle = -\int_{\lb{a}}^{\ub{b}} f(x)\,dx

If we break a region from a\lb{a} to c\ub{c} into two pieces at a point bb, the whole area is the two pieces added together.

xx
yy
a\htmlClass{lc-violet}{a}
bb
c\htmlClass{lc-orange}{c}
y=f(x)y = f(x)
∫acf(x) dx=∫abf(x) dx+∫bcf(x) dx\displaystyle \begin{aligned} \int_{\lb{a}}^{\ub{c}} f(x)\,dx &= \int_{\lb{a}}^{\ub{b}} f(x)\,dx \\ &\quad + \int_{\lb{b}}^{\ub{c}} f(x)\,dx \end{aligned}

Multiplying f(x)f(x) by a constant kk makes every thin strip kk times as tall, so the area is multiplied by kk. Adding two functions stacks a strip of height g(x)\stp{g(x)} on top of a strip of height f(x)\stp{f(x)}, so the areas add.

Constant multiple
∫abk f(x) dx\displaystyle \int_{\lb{a}}^{\ub{b}} k\,f(x)\,dx =k∫abf(x) dx\displaystyle = k\int_{\lb{a}}^{\ub{b}} f(x)\,dx
Sum of functions
∫ab(f(x)+g(x)) dx\displaystyle \int_{\lb{a}}^{\ub{b}} \big(f(x) + g(x)\big)\,dx =∫abf(x) dx+∫abg(x) dx\displaystyle = \int_{\lb{a}}^{\ub{b}} f(x)\,dx + \int_{\lb{a}}^{\ub{b}} g(x)\,dx

And integrating a constant kk gives a single rectangle with height kk and width b−a\ub{b} - \lb{a}.

∫abk dx\displaystyle \int_{\lb{a}}^{\ub{b}} k\,dx =k(b−a)\displaystyle = k(\ub{b} - \lb{a})

Let's put these rules to work where we don't even have a formula for f(x)f(x), and then on a function defined in pieces.

Find ∫35f(x) dx\int_{\lb{3}}^{\ub{5}} f(x)\,dx, ∫532f(x) dx\int_{\lb{5}}^{\ub{3}} 2f(x)\,dx, ∫15(f(x)+4) dx\int_{\lb{1}}^{\ub{5}} (f(x) + 4)\,dx, and the integral of a piecewise function
xx
yy
y=f(x)y = f(x)
1\htmlClass{lc-violet}{1}
5\htmlClass{lc-orange}{5}
∫15f(x) dx=8\displaystyle\int_{\htmlClass{lc-violet}{1}}^{\htmlClass{lc-orange}{5}} f(x)\,dx = 8
∫13f(x) dx=3\displaystyle\int_{\htmlClass{lc-violet}{1}}^{\htmlClass{lc-orange}{3}} f(x)\,dx = 3
Text solution
Split at 33We're given ∫15f(x) dx=8\int_{\lb{1}}^{\ub{5}} f(x)\,dx = 8 and ∫13f(x) dx=3\int_{\lb{1}}^{\ub{3}} f(x)\,dx = 3. Taking the part from 11 to 33 away leaves the part from 33 to 55.
∫35f(x) dx\displaystyle \int_{\lb{3}}^{\ub{5}} f(x)\,dx =8−3\displaystyle = 8 - 3 =5\displaystyle = 5
Pull out the 22 and reverse the boundsGoing from 55 to 33 changes the sign of that 55.
∫532f(x) dx\displaystyle \int_{\lb{5}}^{\ub{3}} 2f(x)\,dx =2∫53f(x) dx\displaystyle = 2\int_{\lb{5}}^{\ub{3}} f(x)\,dx =2⋅(−5)\displaystyle = 2\cdot(-5) =−10\displaystyle = -10
Integrate the 44 over the intervalEvery strip is 44 taller, and the extra pieces make a rectangle of height 44 and width 5−1=4\ub{5} - \lb{1} = 4.
∫15(f(x)+4) dx\displaystyle \int_{\lb{1}}^{\ub{5}} \big(f(x) + 4\big)\,dx =8+4 (5−1)\displaystyle = 8 + 4\,(\ub{5} - \lb{1}) =8+16\displaystyle = 8 + \ab{16} =24\displaystyle = 24
Split the piecewise function at x=1x = 1The formula changes at x=1x = 1, so we integrate each formula on its own interval.
f(x)={3x2,x≤14−x,x>1\displaystyle f(x) = \begin{cases} 3x^2, & x \le 1 \\ 4 - x, & x > 1 \end{cases}
∫03f(x) dx\displaystyle \int_{\lb{0}}^{\ub{3}} f(x)\,dx =∫013x2 dx+∫13(4−x) dx\displaystyle = \int_{\lb{0}}^{\ub{1}} 3x^2\,dx + \int_{\lb{1}}^{\ub{3}} (4 - x)\,dx =1+4\displaystyle = 1 + 4 =5\displaystyle = 5

Don't just add 44 to the original 88. The 44 is added to the height of every strip from 1\lb{1} to 5\ub{5}, so it adds a whole rectangle of area 16\ab{16}, and the answer is 2424, not 1212.

xx
yy
1\htmlClass{lc-violet}{1}
5\htmlClass{lc-orange}{5}
44
y=f(x)+4y = f(x) + 4
y=f(x)y = f(x)
xx
1\htmlClass{lc-violet}{1}
5\htmlClass{lc-orange}{5}
44
16\htmlClass{lc-blue}{16}

Summary

Signed area
xx
yy
0\htmlClass{lc-violet}{0}
22
5\htmlClass{lc-orange}{5}
−2\htmlClass{lc-pink}{-2}
92\htmlClass{lc-blue}{\dfrac{9}{2}}
∫05(x−2) dx\displaystyle \int_{\lb{0}}^{\ub{5}} (x-2)\,dx =−2+92\displaystyle = \bw{-2} + \ab{\frac92} =52\displaystyle = \frac52

An integral counts area above the x-axis as positive and area below the x-axis as negative. On [0,5][0, 5], the line y=x−2y = x - 2 makes a triangle of area 2\bw{2} below the axis and a triangle of area 92\ab{\frac92} above it, so the integral is the difference, 52\frac52.

Semicircles from geometry
∫−rrr2−x2 dx\displaystyle \int_{\lb{-r}}^{\ub{r}}\sqrt{r^2 - x^2}\,dx =12πr2\displaystyle = \frac12\pi r^2

Squaring both sides of y=r2−x2y = \sqrt{r^2 - x^2} gives x2+y2=r2x^2 + y^2 = r^2, a circle centered at the origin with radius rr. Because the square root is never negative, y≥0y \ge 0, so the curve is the top half of the circle. Integrating from −r\lb{-r} to r\ub{r} covers the entire semicircle, so the integral is half the area of the circle, 12πr2\frac12\pi r^2.

The Fundamental Theorem of Calculus
∫abf(x) dx\displaystyle \int_{\lb{a}}^{\ub{b}} f(x)\,dx =F(b)−F(a)\displaystyle = \ub{F(b)} - \lb{F(a)}
[−cos⁡x]0π\displaystyle \Big[-\cos x\Big]_{\lb{0}}^{\ub{\pi}} =(−cos⁡π)−(−cos⁡0)\displaystyle = (\ub{-\cos\pi}) - (\lb{-\cos 0}) =2\displaystyle = 2

To evaluate ∫abf(x) dx\int_{\lb{a}}^{\ub{b}} f(x)\,dx, find any antiderivative FF of ff and compute F(b)−F(a)\ub{F(b)} - \lb{F(a)}. The constant +C+ C cancels when we subtract. Put parentheses around all of F(a)\lb{F(a)} so the minus sign applies to every term. When F(a)\lb{F(a)} is negative, subtracting it adds a positive number, like −(−1)=+1-(\lb{-1}) = +1.

Rules for combining integrals
∫baf(x) dx\displaystyle \int_{\lb{b}}^{\ub{a}} f(x)\,dx =−∫abf(x) dx\displaystyle = -\int_{\lb{a}}^{\ub{b}} f(x)\,dx
∫acf(x) dx=∫abf(x) dx+∫bcf(x) dx\displaystyle \begin{aligned} \int_{\lb{a}}^{\ub{c}} f(x)\,dx &= \int_{\lb{a}}^{\ub{b}} f(x)\,dx \\ &\quad + \int_{\lb{b}}^{\ub{c}} f(x)\,dx \end{aligned}
∫abk dx\displaystyle \int_{\lb{a}}^{\ub{b}} k\,dx =k(b−a)\displaystyle = k(\ub{b} - \lb{a})

Reversing the bounds changes the sign of the integral. We can also break an integral into two parts. Integrating from a\lb{a} to b\ub{b} and then from b\lb{b} to c\ub{c} gives the integral from a\lb{a} to c\ub{c}. Integrating a constant kk gives the area of a rectangle of height kk and width b−a\ub{b} - \lb{a}, so adding kk to f(x)f(x) adds k(b−a)k(\ub{b} - \lb{a}) to the integral, not kk.

Odd functions
f(−x)\displaystyle f(-x) =−f(x)\displaystyle = -f(x)
→  ∫−aaf(x) dx\displaystyle \to\; \int_{\lb{-a}}^{\ub{a}} f(x)\,dx =0\displaystyle = 0

A function is odd if f(−x)=−f(x)f(-x) = -f(x). On an interval from −a\lb{-a} to a\ub{a}, each piece on the left has a matching piece on the right with the opposite signed area, so the integral is 00.

Finding the actual area
∫−12(x2−2x) dx\displaystyle \int_{\lb{-1}}^{\ub{2}}(x^2 - 2x)\,dx =0\displaystyle = 0
area\displaystyle \text{area} =43+43\displaystyle = \ab{\frac43} + \ab{\frac43} =83\displaystyle = \frac83

An integral can be 00 even when a region has positive area, because the pieces above and below the x-axis cancel out. To find the actual area between a curve and the axis, set f(x)=0f(x) = 0 to find where the curve crosses the axis. Split the integral at those points, take the absolute value of each piece's integral, and add them up.

7

Practice

Give exact answers, using fractions or π\pi where needed, not decimals.

1
The graph of ff on [0,8][0, 8] is made of the line segment from (0,2)(0, 2) to (2,0)(2, 0), the lower half of the circle of radius 2 centered at (4,0)(4, 0), and the line segment from (6,0)(6, 0) to (8,2)(8, 2). Find (a) ∫08f(x) dx\displaystyle\int_0^8 f(x)\,dx and (b) ∫62f(x) dx\displaystyle\int_6^2 f(x)\,dx.
xx
yy
22
44
66
88
22
−2-2

An integral is a signed area. What sign does each region get, and what is the area of a half circle of radius 22?

If you got 4+2π4 + 2\pi Check the sign of the half circle. It lies below the x-axis, so its signed area is negative.

If you got −2π-2\pi The bounds run backwards from 66 down to 22, so ∫62f(x) dx=−∫26f(x) dx\int_6^2 f(x)\,dx = -\int_2^6 f(x)\,dx.

Reversing the bounds changes the sign of an integral. What is −∫26f(x) dx-\int_2^6 f(x)\,dx?

Find the signed area of each pieceThe two triangles lie above the x-axis, and the half circle lies below it, so its signed area is negative.
xx
yy
22
44
66
88
22
−2-2
2\htmlClass{lc-blue}{2}
−2π\htmlClass{lc-pink}{-2\pi}
2\htmlClass{lc-blue}{2}
∫02f(x) dx\displaystyle \int_{\lb{0}}^{\ub{2}} f(x)\,dx =12⋅2⋅2\displaystyle = \frac12\cdot 2\cdot 2 =2\displaystyle = \ab{2}
∫26f(x) dx\displaystyle \int_{\lb{2}}^{\ub{6}} f(x)\,dx =−12⋅π⋅22\displaystyle = -\frac12\cdot\pi\cdot 2^2 =−2π\displaystyle = \bw{-2\pi}
∫68f(x) dx\displaystyle \int_{\lb{6}}^{\ub{8}} f(x)\,dx =12⋅2⋅2\displaystyle = \frac12\cdot 2\cdot 2 =2\displaystyle = \ab{2}
Add the piecesAdd the signed areas to get the integral from 0\lb{0} to 8\ub{8}.
∫08f(x) dx\displaystyle \int_{\lb{0}}^{\ub{8}} f(x)\,dx =2−2π+2\displaystyle = \ab{2} - \bw{2\pi} + \ab{2} =4−2π\displaystyle = 4 - 2\pi
Reverse the boundsReversing the bounds changes the sign of the integral.
∫62f(x) dx\displaystyle \int_{\lb{6}}^{\ub{2}} f(x)\,dx =−∫26f(x) dx\displaystyle = -\int_{\lb{2}}^{\ub{6}} f(x)\,dx =−(−2π)\displaystyle = -(\bw{-2\pi}) =2π\displaystyle = 2\pi
2
Given ∫06f(x) dx=10\displaystyle\int_0^6 f(x)\,dx = 10 and ∫02f(x) dx=4\displaystyle\int_0^2 f(x)\,dx = 4, find (a) ∫26f(x) dx\displaystyle\int_2^6 f(x)\,dx and (b) ∫62(3f(x)+2) dx\displaystyle\int_6^2 \big(3f(x) + 2\big)\,dx.

The integral from 00 to 66 splits into the integral from 00 to 22 plus the integral from 22 to 66.

If you got −20-20 Check the integral of the constant 22. Integrating 22 from 22 to 66 gives 22 times the width of the interval, not just 22.

If you got 2626 The bounds run from 66 to 22, so the value is the negative of the integral from 22 to 66.

What is the width of the interval from 22 to 66? Use that to find ∫262 dx\displaystyle\int_2^6 2\,dx, then reverse the bounds.

Split the integralThe integral from 0\lb{0} to 6\ub{6} is the sum of the integrals from 0\lb{0} to 2\ub{2} and from 2\lb{2} to 6\ub{6}, so we subtract to find the missing piece.
∫26f(x) dx\displaystyle \int_{\lb{2}}^{\ub{6}} f(x)\,dx =∫06f(x) dx−∫02f(x) dx\displaystyle = \int_{\lb{0}}^{\ub{6}} f(x)\,dx - \int_{\lb{0}}^{\ub{2}} f(x)\,dx =10−4\displaystyle = 10 - 4 =6\displaystyle = 6
Integrate from 2 to 6Integrate the two terms separately, pull out the constant 33, and multiply the constant 22 by the interval's width, 6−2=4\ub{6} - \lb{2} = 4.
∫26(3f(x)+2) dx\displaystyle \int_{\lb{2}}^{\ub{6}} \big(3f(x) + 2\big)\,dx =3∫26f(x) dx+∫262 dx\displaystyle = 3\int_{\lb{2}}^{\ub{6}} f(x)\,dx + \int_{\lb{2}}^{\ub{6}} 2\,dx =3⋅6+2⋅4\displaystyle = 3\cdot 6 + 2\cdot 4 =26\displaystyle = 26
Reverse the boundsReversing the bounds puts a minus sign in front.
∫62(3f(x)+2) dx\displaystyle \int_{\lb{6}}^{\ub{2}} \big(3f(x) + 2\big)\,dx =−26\displaystyle = -26
3
Evaluate ∫14(2x−1x) dx\displaystyle\int_1^4 \Big(2x - \frac{1}{\sqrt{x}}\Big)\,dx.

Write 1x\frac{1}{\sqrt{x}} as a power of xx, then use the power rule.

Write 1x\frac{1}{\sqrt{x}} as x−12x^{-\frac12} so we can use the power rule to find an antiderivative F(x)F(x).
1x\displaystyle \frac{1}{\sqrt{x}} =x−12  →  x1212\displaystyle = x^{-\frac12} \;\to\; \frac{x^{\frac12}}{\frac12} =2x\displaystyle = 2\sqrt{x}
F(x)\displaystyle F(x) =x2−2x\displaystyle = x^2 - 2\sqrt{x}
Evaluate FF at the upper bound 4\ub{4} and at the lower bound 1\lb{1}.
F(4)\displaystyle \ub{F(4)} =16−4\displaystyle = 16 - 4 =12\displaystyle = \ub{12}
F(1)\displaystyle \lb{F(1)} =1−2\displaystyle = 1 - 2 =−1\displaystyle = \lb{-1}
Subtract F(1)\lb{F(1)} from F(4)\ub{F(4)}, keeping F(1)\lb{F(1)} in parentheses because it's negative.
∫14(2x−1x) dx\displaystyle \int_{\lb{1}}^{\ub{4}} \Big(2x - \frac{1}{\sqrt{x}}\Big)\,dx =F(4)−F(1)\displaystyle = \ub{F(4)} - \lb{F(1)} =12−(−1)\displaystyle = \ub{12} - (\lb{-1}) =13\displaystyle = 13
4
Find the area of the region between the graph of y=x2−4y = x^2 - 4 and the xx-axis for 0≤x≤30 \le x \le 3.

Where does the graph cross the x-axis between 00 and 33?

Find where the curve crosses the x-axisSet x2−4=0x^2 - 4 = 0 to find where the curve crosses the x-axis inside [0,3][0, 3].
x2−4\displaystyle x^2 - 4 =0  →  x=2(x≥0)\displaystyle = 0 \;\to\; {x = 2 \quad (x \ge 0)}
Integrate each pieceThe curve is below the x-axis on [0,2][0, 2] and above it on [2,3][2, 3].
∫02(x2−4) dx\displaystyle \int_{\lb{0}}^{\ub{2}} (x^2 - 4)\,dx =[x33−4x]02\displaystyle = \Big[\frac{x^3}{3} - 4x\Big]_{\lb{0}}^{\ub{2}} =83−8\displaystyle = \ub{\frac83 - 8} =−163\displaystyle = \bw{-\frac{16}{3}}
∫23(x2−4) dx\displaystyle \int_{\lb{2}}^{\ub{3}} (x^2 - 4)\,dx =(9−12)−(83−8)\displaystyle = (\ub{9 - 12}) - \Big(\lb{\frac83 - 8}\Big) =−3+163\displaystyle = \ub{-3} + \lb{\frac{16}{3}} =73\displaystyle = \ab{\frac73}
Add the positive areasThe region below the x-axis has area 163\ab{\frac{16}{3}}, and the region above has area 73\ab{\frac73}.
area\displaystyle \text{area} =163+73\displaystyle = \ab{\frac{16}{3}} + \ab{\frac73} =233\displaystyle = \frac{23}{3}
5
Find the value of k>0k > 0 for which ∫0k(2x−3) dx=0\displaystyle\int_0^k (2x - 3)\,dx = 0.

The integral is 00 when the area above the x-axis equals the area below the x-axis.

Find an antiderivative of 2x−32x - 3 and evaluate it from 0\lb{0} to k\ub{k}.
∫0k(2x−3) dx\displaystyle \int_{\lb{0}}^{\ub{k}} (2x - 3)\,dx =[x2−3x]0k\displaystyle = \Big[x^2 - 3x\Big]_{\lb{0}}^{\ub{k}} =k2−3k\displaystyle = \ub{k^2 - 3k}
Set the result equal to 00 and solve for k>0k > 0.
k2−3k\displaystyle k^2 - 3k =k(k−3)\displaystyle = k(k - 3) =0  →  k=3(k>0)\displaystyle = 0 \;\to\; {k = 3 \quad (k > 0)}
From 00 to 32\frac32, the triangle below the axis has area 94\bw{\frac94}, and from 32\frac32 to 33, the triangle above has area 94\ab{\frac94}, so the two signed areas cancel out.
∫032(2x−3) dx\displaystyle \int_{\lb{0}}^{\ub{\frac32}} (2x - 3)\,dx =−12⋅32⋅3\displaystyle = -\frac12\cdot\frac32\cdot 3 =−94\displaystyle = \bw{-\frac94}
∫323(2x−3) dx\displaystyle \int_{\lb{\frac32}}^{\ub{3}} (2x - 3)\,dx =12⋅32⋅3\displaystyle = \frac12\cdot\frac32\cdot 3 =94\displaystyle = \ab{\frac94}
6
Evaluate ∫−ππ(x3cos⁡x+2) dx\displaystyle\int_{-\pi}^{\pi} \big(x^3\cos x + 2\big)\,dx.

What happens when you replace xx with −x-x in x3cos⁡xx^3\cos x?

Check for an odd functionReplacing xx with −x-x gives the negative of the original function, so x3cos⁡xx^3\cos x is odd and its integral over [−π,π][-\pi, \pi] is 00.
(−x)3cos⁡(−x)\displaystyle (-x)^3\cos(-x) =−x3cos⁡x  →  ∫−ππx3cos⁡x dx=0\displaystyle = -x^3\cos x \;\to\; {\int_{\lb{-\pi}}^{\ub{\pi}} x^3\cos x\,dx = 0}
Integrate the constantMultiply the constant 22 by the interval's width, π−(−π)=2π\ub{\pi} - (\lb{-\pi}) = 2\pi, and add the two integrals.
∫−ππ2 dx\displaystyle \int_{\lb{-\pi}}^{\ub{\pi}} 2\,dx =2⋅(π−(−π))\displaystyle = 2\cdot\big(\ub{\pi} - (\lb{-\pi})\big) =4π\displaystyle = 4\pi
∫−ππ(x3cos⁡x+2) dx\displaystyle \int_{\lb{-\pi}}^{\ub{\pi}} \big(x^3\cos x + 2\big)\,dx =0+4π\displaystyle = 0 + 4\pi =4π\displaystyle = 4\pi
7
Evaluate ∫0π4tan⁡2x dx\displaystyle\int_0^{\frac{\pi}{4}} \tan^2 x\,dx. (Challenge)

Use the identity tan⁡2x+1=sec⁡2x\tan^2 x + 1 = \sec^2 x to rewrite tan⁡2x\tan^2 x in terms of a function whose antiderivative you know.

Rewrite using a trig identityWe don't have a basic rule for tan⁡2x\tan^2 x, but we know the antiderivative of sec⁡2x\sec^2 x, so we rewrite tan⁡2x\tan^2 x using tan⁡2x+1=sec⁡2x\tan^2 x + 1 = \sec^2 x.
tan⁡2x\displaystyle \tan^2 x =sec⁡2x−1\displaystyle = \sec^2 x - 1
Integrate and evaluateThe antiderivative of sec⁡2x\sec^2 x is tan⁡x\tan x, and the antiderivative of 11 is xx.
∫0π4(sec⁡2x−1) dx\displaystyle \int_{\lb{0}}^{\ub{\frac{\pi}{4}}} (\sec^2 x - 1)\,dx =[tan⁡x−x]0π4\displaystyle = \Big[\tan x - x\Big]_{\lb{0}}^{\ub{\frac{\pi}{4}}} =(1−π4)−(0−0)\displaystyle = \Big(\ub{1 - \frac{\pi}{4}}\Big) - (\lb{0 - 0}) =1−π4\displaystyle = 1 - \frac{\pi}{4}