Ran Wei/ Calculus/Module 10
中文
Calculus · Part III · Integrals

Module 10The Fundamental Theorem of Calculus

Connect the two halves of calculus. You will find functions from their derivatives, watch the area under a graph grow as its right end moves, prove that it grows at a rate equal to the height of the graph, evaluate integrals with antiderivatives instead of limits of sums, reverse the chain rule with substitution, and integrate with SymPy.

⏱ 255 minYou need: Modules 1 to 9, especially the chain rule (Module 5), the Mean Value Theorem and its consequences (Module 8) and the definite integral (Module 9)

In this module you will

  • Find antiderivatives with a table of basic ones, explain the constant C,C\mathclose{\text{,}} and solve initial value problems such as finding position from velocity
  • Read the area function A(x)=∫axf(t) dtA(x) = \int_a^x f(t)\,dt from a graph and from numbers, and say where it increases, decreases and is largest
  • State both parts of the Fundamental Theorem of Calculus with their hypotheses, prove them, and differentiate integrals whose limits vary
  • Evaluate definite integrals with antiderivatives, and use the net change theorem for displacement, distance travelled and accumulated amounts
  • Integrate by substitution, in indefinite and in definite integrals, changing the limits correctly
  • Integrate with SymPy, check an antiderivative by differentiating it, and explain answers that differ by a constant or use special functions
1

Antiderivatives

Module 4 started from a position and found a velocity: differentiate s(t)s(t) and you get v(t).v(t)\mathclose{\text{.}} Often the question runs the other way. A car’s speedometer records its velocity, and you want to know where the car is; a phone’s accelerometer measures acceleration, and the phone wants its velocity; a model says how fast a quantity changes, and you want the quantity itself. Each time you know a derivative and want the function it came from. This section and the next undo derivatives. The rest of the module shows that undoing a derivative is also the way to compute the areas of Module 9, and that this connection, the Fundamental Theorem of Calculus, joins the two halves of calculus into one subject.

Start with a guess. Which function has derivative 2x?2x\mathclose{\text{?}} You know one: x2,x^2\mathclose{\text{,}} since (x2)′=2x.\big(x^2\big)' = 2x\mathclose{\text{.}} But x2+1x^2 + 1 has derivative 2x2x too, and so do x2−7x^2 - 7 and x2+π:x^2 + \pi\mathclose{\text{:}} the derivative of a constant is 0, so adding a constant changes nothing.

Definition 10.1Antiderivative

Let ff be a function defined on an interval I.I\mathclose{\text{.}} A function FF is an antiderivative of ff on II if F′(x)=f(x)F'(x) = f(x) for every xx in I.I\mathclose{\text{.}} (At an endpoint of II that belongs to I,I\mathclose{\text{,}} F′F' means the one-sided derivative of Module 4.)

So x2x^2 is an antiderivative of 2x2x on R,\R\mathclose{\text{,}} sin⁡x\sin x is an antiderivative of cos⁡x,\cos x\mathclose{\text{,}} −cos⁡x-\cos x of sin⁡x,\sin x\mathclose{\text{,}} and exe^x of itself. By Module 6, ln⁡x\ln x is an antiderivative of 1/x1/x on (0,∞).(0, \infty)\mathclose{\text{.}}

Figure 10.1 shows the antiderivatives 13x3−x+C\tfrac13 x^3 - x + C of f(x)=x2−1f(x) = x^2 - 1 for five values of the constant C.C\mathclose{\text{.}} Adding a constant moves a graph up or down without tilting it, so at each xx all these curves have the same slope, f(x):f(x)\mathclose{\text{:}} their tangent lines there are parallel.

The antiderivatives tfrac13 x^3 - x + C of f(x) = x^2 - 1, for C = -2, -1, 0, 1, 2 from bottom to top. Each curve is the one below it shifted up by 1, so at every x they have the same slope: at x = 1.5 their tangent lines (orange) are parallel, with slope f(1.5) = 1.25. Exactly one of them passes through the point (0, 1): the blue one, with C = 1 (Section 10.2).
Figure 10.1

The antiderivatives 13x3−x+C\tfrac13 x^3 - x + C of f(x)=x2−1,f(x) = x^2 - 1\mathclose{\text{,}} for C=−2,−1,0,1,2C = -2, -1, 0, 1, 2 from bottom to top. Each curve is the one below it shifted up by 1, so at every xx they have the same slope: at x=1.5x = 1.5 their tangent lines (orange) are parallel, with slope f(1.5)=1.25.f(1.5) = 1.25\mathclose{\text{.}} Exactly one of them passes through the point (0,1):(0, 1)\mathclose{\text{:}} the blue one, with C=1C = 1 (Section 10.2).

Are there other antiderivatives, not of the form “one of them plus a constant”? No, as long as you stay on an interval.

Theorem 10.1The antiderivatives of a function

If FF is an antiderivative of ff on an interval I,I\mathclose{\text{,}} then the antiderivatives of ff on II are exactly the functions

F(x)+C,F(x) + C,

where CC is a constant.

Proof

For every constant C,C\mathclose{\text{,}} (F+C)′=F′+0=f(F + C)' = F' + 0 = f on I,I\mathclose{\text{,}} so F+CF + C is an antiderivative. Conversely, let GG be any antiderivative of ff on I,I\mathclose{\text{,}} and let H=G−F,H = G - F\mathclose{\text{,}} so that H′(x)=f(x)−f(x)=0H'(x) = f(x) - f(x) = 0 for every xx in I.I\mathclose{\text{.}} Module 8 proved that such a function is constant on an open interval (Theorem 8.5), and the same argument works on any interval. Take two numbers x1<x2x_1 < x_2 in I.I\mathclose{\text{.}} HH has a derivative at every point of [x1,x2][x_1, x_2] (a one-sided one at an endpoint of I),I\mathclose{\text{),}} so it is continuous on [x1,x2][x_1, x_2] by Theorem 4.1, whose proof works from one side too. By the Mean Value Theorem, H(x2)−H(x1)=H′(c)(x2−x1)=0H(x_2) - H(x_1) = H'(c)(x_2 - x_1) = 0 for some cc between x1x_1 and x2.x_2\mathclose{\text{.}} So HH takes the same value CC at every point of I:I\mathclose{\text{:}} G=F+C.G = F + C\mathclose{\text{.}}

∎

The function F(x)+C,F(x) + C\mathclose{\text{,}} with CC standing for any constant, is the general antiderivative of ff on I,I\mathclose{\text{,}} and CC is the constant of integration. The interval matters: the proof applies the Mean Value Theorem on [x1,x2],[x_1, x_2]\mathclose{\text{,}} so all of [x1,x2][x_1, x_2] must lie in I.I\mathclose{\text{.}} The function 1/x1/x is defined on (−∞,0)∪(0,∞),(-\infty, 0) \cup (0, \infty)\mathclose{\text{,}} which is not an interval. Module 6 showed that ddxln⁡∣x∣=1x\dfrac{d}{dx}\ln\abs{x} = \dfrac1x for every x≠0,x \ne 0\mathclose{\text{,}} so on each half the antiderivatives are ln⁡∣x∣+C.\ln\abs{x} + C\mathclose{\text{.}} But the function equal to ln⁡∣x∣\ln\abs{x} for x>0x > 0 and to ln⁡∣x∣+5\ln\abs{x} + 5 for x<0x < 0 also has derivative 1/x1/x at every x≠0,x \ne 0\mathclose{\text{,}} and it is not ln⁡∣x∣+C\ln\abs{x} + C for any single constant C:C\mathclose{\text{:}} the constant may differ from one interval to the other. And since 1/x1/x is not defined at 0, no antiderivative of it reaches across 0; Section 10.5 shows what that means for integrals.

A table of antiderivatives

Each rule of differentiation, read backwards, gives an antiderivative. In the table, the derivative of each entry in the middle column is the entry on its left; to get the general antiderivative, add C,C\mathclose{\text{,}} on each interval where the formula holds.

f(x)f(x) An antiderivative F(x)F(x) Where
xn,x^n\mathclose{\text{,}} n≠−1n \ne -1 xn+1n+1\dfrac{x^{n+1}}{n + 1} see below
1x\dfrac{1}{x} ln⁡∣x∣\ln\abs{x} x≠0x \ne 0
exe^x exe^x
ekx,e^{kx}\mathclose{\text{,}} k≠0k \ne 0 ekxk\dfrac{e^{kx}}{k}
ax,a^x\mathclose{\text{,}} a>0,a > 0\mathclose{\text{,}} a≠1a \ne 1 axln⁡a\dfrac{a^x}{\ln a}
sin⁡x\sin x −cos⁡x-\cos x
cos⁡x\cos x sin⁡x\sin x
sin⁡kx,\sin kx\mathclose{\text{,}} k≠0k \ne 0 −cos⁡kxk-\dfrac{\cos kx}{k}
cos⁡kx,\cos kx\mathclose{\text{,}} k≠0k \ne 0 sin⁡kxk\dfrac{\sin kx}{k}
sec⁡2x\sec^2 x tan⁡x\tan x cos⁡x≠0\cos x \ne 0
csc⁡2x\csc^2 x −cot⁡x-\cot x sin⁡x≠0\sin x \ne 0
sec⁡xtan⁡x\sec x\tan x sec⁡x\sec x cos⁡x≠0\cos x \ne 0
csc⁡xcot⁡x\csc x\cot x −csc⁡x-\csc x sin⁡x≠0\sin x \ne 0
11+x2\dfrac{1}{1 + x^2} arctan⁡x\arctan x
11−x2\dfrac{1}{\sqrt{1 - x^2}} arcsin⁡x\arcsin x −1<x<1-1 < x < 1
sinh⁡x\sinh x cosh⁡x\cosh x
cosh⁡x\cosh x sinh⁡x\sinh x

The first row, the power rule for antiderivatives, holds on (0,∞)(0, \infty) for every real n≠−1.n \ne -1\mathclose{\text{.}} When nn is an integer it holds for negative xx as well, and for n=0,1,2,…n = 0, 1, 2, \dots on all of R.\R\mathclose{\text{.}} In words: raise the power by 1 and divide by the new power. For n=−1n = -1 it would divide by 0; the second row takes its place. The rows with kk follow from the chain rule (Module 5): ddxekxk=kekxk=ekx.\dfrac{d}{dx}\dfrac{e^{kx}}{k} = \dfrac{k e^{kx}}{k} = e^{kx}\mathclose{\text{.}} The derivatives behind the other rows are those of Modules 4 to 6.

Two rules of Module 4 carry over. If FF and GG are antiderivatives of ff and gg on an interval, and cc is a constant, then cFcF is an antiderivative of cf,cf\mathclose{\text{,}} and F+GF + G of f+g,f + g\mathclose{\text{,}} because (cF+G)′=cF′+G′=cf+g.(cF + G)' = cF' + G' = cf + g\mathclose{\text{.}} So you can find antiderivatives term by term, keeping constant factors.

Example 10.1Antiderivatives from the table✓ Checked

Find the general antiderivative of each function.

  • (a) f(x)=6x2−4x+5f(x) = 6x^2 - 4x + 5
  • (b) g(x)=3x−2x2,g(x) = 3\sqrt{x} - \dfrac{2}{x^2}\mathclose{\text{,}} for x>0x > 0
  • (c) h(t)=4e2t−3cos⁡th(t) = 4e^{2t} - 3\cos t
  • (d) q(x)=(x+1)2x,q(x) = \dfrac{(x + 1)^2}{x}\mathclose{\text{,}} for x≠0x \ne 0

(a) Term by term, raising each power by 1 and dividing by the new power: 6⋅x33−4⋅x22+5x,6 \cdot \dfrac{x^3}{3} - 4 \cdot \dfrac{x^2}{2} + 5x\mathclose{\text{,}} so the general antiderivative is 2x3−2x2+5x+C.2x^3 - 2x^2 + 5x + C\mathclose{\text{.}}

(b) First write the terms as powers: g(x)=3x1/2−2x−2.g(x) = 3x^{1/2} - 2x^{-2}\mathclose{\text{.}} The power rule gives

3⋅x3/23/2−2⋅x−1−1=2x3/2+2x,3\cdot\frac{x^{3/2}}{3/2} - 2\cdot\frac{x^{-1}}{-1} = 2x^{3/2} + \frac{2}{x},

so the general antiderivative is 2x3/2+2x+C2x^{3/2} + \dfrac2x + C on (0,∞).(0, \infty)\mathclose{\text{.}}

(c) With k=2k = 2 in the table, 4⋅e2t2=2e2t;4\cdot\dfrac{e^{2t}}{2} = 2e^{2t}\mathclose{\text{;}} and −3cos⁡t-3\cos t gives −3sin⁡t.-3\sin t\mathclose{\text{.}} The answer is 2e2t−3sin⁡t+C.2e^{2t} - 3\sin t + C\mathclose{\text{.}}

(d) There is no rule for quotients, so expand and divide each term by xx first: x2+2x+1x=x+2+1x.\dfrac{x^2 + 2x + 1}{x} = x + 2 + \dfrac1x\mathclose{\text{.}} The general antiderivative is x22+2x+ln⁡∣x∣+C\dfrac{x^2}{2} + 2x + \ln\abs{x} + C on (0,∞),(0, \infty)\mathclose{\text{,}} and the same formula, with a constant that may differ, on (−∞,0).(-\infty, 0)\mathclose{\text{.}}

Check every answer by differentiating it. For (b): ddx(2x3/2+2x−1)=3x1/2−2x−2,\dfrac{d}{dx}\Big(2x^{3/2} + 2x^{-1}\Big) = 3x^{1/2} - 2x^{-2}\mathclose{\text{,}} which is g(x).g(x)\mathclose{\text{.}}

Tip

Differentiating is easier than undoing a derivative, so always check an antiderivative by differentiating it. It takes a few seconds and catches almost every slip.

Watch out

Three slips. (1) The power rule backwards raises the power and divides: an antiderivative of x3x^3 is 14x4,\tfrac14 x^4\mathclose{\text{,}} not 3x23x^2 (that is the derivative) and not x4x^4 (whose derivative is 4x3).4x^3\mathclose{\text{).}} (2) There is no product rule for antiderivatives: an antiderivative of xcos⁡xx\cos x is not 12x2sin⁡x,\tfrac12 x^2\sin x\mathclose{\text{,}} whose derivative is xsin⁡x+12x2cos⁡x.x\sin x + \tfrac12 x^2\cos x\mathclose{\text{.}} Module 11 integrates such products; Section 10.7 handles products in which one factor is the derivative of something inside the other. (3) “+ C+\,C” is part of the answer when you are asked for all antiderivatives, and on a domain made of several intervals, such as x≠0,x \ne 0\mathclose{\text{,}} the constant may differ on each.

2

Initial value problems

Figure 10.1 shows how to pick one antiderivative out of the family: ask for the one whose graph passes through a given point. Of the curves 13x3−x+C,\tfrac13 x^3 - x + C\mathclose{\text{,}} only the one with C=1C = 1 passes through (0,1).(0, 1)\mathclose{\text{.}}

Definition 10.2Initial value problem

An initial value problem asks for a function y=F(x)y = F(x) with

F′(x)=f(x) for every x in I,F(x0)=y0,\begin{aligned} &F'(x) = f(x) \text{ for every } x \text{ in } I, \\ &F(x_0) = y_0, \end{aligned}

where II is an interval, x0x_0 a point of II and y0y_0 a number. The equation F′=fF' = f is the simplest kind of differential equation, an equation for an unknown function that involves its derivative, and F(x0)=y0F(x_0) = y_0 is the initial condition.

If ff has an antiderivative GG on I,I\mathclose{\text{,}} the problem has exactly one solution. By Theorem 10.1 every solution has the form G+C;G + C\mathclose{\text{;}} the initial condition says G(x0)+C=y0,G(x_0) + C = y_0\mathclose{\text{,}} so C=y0−G(x0),C = y_0 - G(x_0)\mathclose{\text{,}} and the solution is

F(x)=G(x)−G(x0)+y0.F(x) = G(x) - G(x_0) + y_0.

To solve one: find the general antiderivative, put in the initial condition, and solve for C.C\mathclose{\text{.}} Module 13 studies differential equations in which the derivative depends on the unknown function as well, such as y′=ky.y' = ky\mathclose{\text{.}}

Example 10.2An initial value problem✓ Checked

Find the function FF with F′(x)=3x−2x2F'(x) = 3\sqrt x - \dfrac{2}{x^2} for x>0x > 0 and F(1)=5.F(1) = 5\mathclose{\text{.}}

By Example 10.1(b), the general antiderivative is F(x)=2x3/2+2x+C.F(x) = 2x^{3/2} + \dfrac2x + C\mathclose{\text{.}} The initial condition gives

F(1)=2+2+C=4+C=5,F(1) = 2 + 2 + C = 4 + C = 5,

so C=1C = 1 and

F(x)=2x3/2+2x+1,x>0.F(x) = 2x^{3/2} + \frac2x + 1, \qquad x > 0.

Check: F(1)=2+2+1=5,F(1) = 2 + 2 + 1 = 5\mathclose{\text{,}} and F′F' is the given function, as Example 10.1 showed.

Motion is the classic source of initial value problems: velocity is the derivative of position and acceleration the derivative of velocity (Module 4), so from the acceleration and two initial conditions you recover the whole motion.

Example 10.3The falling ball again✓ Checked

Module 1 took the distance fallen by a dropped ball, s(t)=4.9t2s(t) = 4.9t^2 metres, as given. Derive it. Measure distances downwards from the point of release. Near the Earth’s surface, with air resistance negligible, the ball’s acceleration is constant, a(t)=9.8a(t) = 9.8 m/s², and it is released from rest: v(0)=0v(0) = 0 and s(0)=0.s(0) = 0\mathclose{\text{.}}

  • (a) Find the velocity v(t)v(t) and the distance fallen s(t).s(t)\mathclose{\text{.}}
  • (b) A ball is thrown straight up at 14.7 m/s from 1.5 m above the ground. With heights yy measured upwards, find y(t).y(t)\mathclose{\text{.}}

(a) The velocity is an antiderivative of the acceleration: v(t)=9.8t+C1.v(t) = 9.8t + C_1\mathclose{\text{.}} The condition v(0)=0v(0) = 0 gives C1=0,C_1 = 0\mathclose{\text{,}} so v(t)=9.8t.v(t) = 9.8t\mathclose{\text{.}} The position is an antiderivative of the velocity: s(t)=4.9t2+C2,s(t) = 4.9t^2 + C_2\mathclose{\text{,}} and s(0)=0s(0) = 0 gives C2=0.C_2 = 0\mathclose{\text{.}} So

s(t)=4.9t2,s(t) = 4.9t^2,

the formula of Module 1, now derived from one physical fact: the acceleration is constant.

(b) Heights are measured upwards and gravity pulls down, so a(t)=−9.8.a(t) = -9.8\mathclose{\text{.}} Then v(t)=−9.8t+C1,v(t) = -9.8t + C_1\mathclose{\text{,}} and v(0)=14.7v(0) = 14.7 gives C1=14.7.C_1 = 14.7\mathclose{\text{.}} Next y(t)=−4.9t2+14.7t+C2,y(t) = -4.9t^2 + 14.7t + C_2\mathclose{\text{,}} and y(0)=1.5y(0) = 1.5 gives C2=1.5:C_2 = 1.5\mathclose{\text{:}}

y(t)=1.5+14.7t−4.9t2,y(t) = 1.5 + 14.7t - 4.9t^2,

the height that Exercise 4.7 differentiated. In general, an object with constant acceleration a,a\mathclose{\text{,}} initial velocity v0v_0 and initial position s0s_0 has position s(t)=s0+v0t+12at2.s(t) = s_0 + v_0 t + \tfrac12 a t^2\mathclose{\text{.}}

Watch out

Two slips with initial value problems. (1) Each antidifferentiation brings its own constant. In Example 10.3 the velocity needs C1,C_1\mathclose{\text{,}} fixed by v(0),v(0)\mathclose{\text{,}} and the position needs C2,C_2\mathclose{\text{,}} fixed by s(0);s(0)\mathclose{\text{;}} dropping C1C_1 loses the initial velocity. (2) CC is not always the initial value. If s′(t)=sin⁡ts'(t) = \sin t and s(0)=0,s(0) = 0\mathclose{\text{,}} then s(t)=−cos⁡t+Cs(t) = -\cos t + C and s(0)=−1+C=0,s(0) = -1 + C = 0\mathclose{\text{,}} so C=1C = 1 and s(t)=1−cos⁡t;s(t) = 1 - \cos t\mathclose{\text{;}} setting C=0C = 0 would give s(0)=−1.s(0) = -1\mathclose{\text{.}} Put the condition into the whole antiderivative, then solve for C.C\mathclose{\text{.}}

3

The area function

Module 9 defined the definite integral ∫abf(x) dx\int_a^b f(x)\,dx as the limit of the Riemann sums ∑f(xi∗) Δxi\sum f(x_i^*)\,\Delta x_i as the norm of the partition, the width of its widest subinterval, shrinks to 0; when ff is continuous on [a,b],[a, b]\mathclose{\text{,}} the limit exists, and ff is integrable. Where ff is positive, the integral is the area between its graph and the xx-axis; where ff is negative, that area counts as negative, so the integral is a signed area. This module uses these properties from Module 9:

  • ∫aaf(x) dx=0\displaystyle\int_a^a f(x)\,dx = 0 and ∫baf(x) dx=−∫abf(x) dx;\displaystyle\int_b^a f(x)\,dx = -\int_a^b f(x)\,dx\mathclose{\text{;}}
  • splitting: ∫acf(x) dx=∫abf(x) dx+∫bcf(x) dx,\displaystyle\int_a^c f(x)\,dx = \int_a^b f(x)\,dx + \int_b^c f(x)\,dx\mathclose{\text{,}} for a,a\mathclose{\text{,}} bb and cc in any order, when ff is integrable on a closed interval that contains all three;
  • linearity: ∫ab(cf(x)+g(x)) dx=c∫abf(x) dx+∫abg(x) dx;\displaystyle\int_a^b \big(c f(x) + g(x)\big)\,dx = c\int_a^b f(x)\,dx + \int_a^b g(x)\,dx\mathclose{\text{;}}
  • bounds: if a<ba < b and m≤f(x)≤Mm \le f(x) \le M for a≤x≤b,a \le x \le b\mathclose{\text{,}} then m(b−a)≤∫abf(x) dx≤M(b−a);m(b - a) \le \displaystyle\int_a^b f(x)\,dx \le M(b - a)\mathclose{\text{;}}
  • the Mean Value Theorem for integrals: if ff is continuous on [a,b],[a, b]\mathclose{\text{,}} where a<b,a < b\mathclose{\text{,}} there is a number cc in [a,b][a, b] with ∫abf(x) dx=f(c) (b−a).\displaystyle\int_a^b f(x)\,dx = f(c)\,(b - a)\mathclose{\text{.}}

Now keep the left end fixed and let the right end move.

Definition 10.3The area function

Let II be an interval, let ff be integrable on every closed interval inside II (as it is when ff is continuous on I),I\mathclose{\text{),}} and let aa be a point of I.I\mathclose{\text{.}} The area function of ff from aa is

A(x)=∫axf(t) dt,x in I.A(x) = \int_a^x f(t)\,dt, \qquad x \text{ in } I.

Read it as “A of x is the integral from a to x of f of t, d t”. It is also called the accumulation function: as xx moves right, A(x)A(x) accumulates the signed area under f.f\mathclose{\text{.}} For x<ax < a the integral runs backwards, A(x)=−∫xaf(t) dt.A(x) = -\int_x^a f(t)\,dt\mathclose{\text{.}} As in Module 9, the letter tt is a dummy variable: ∫axf(t) dt\int_a^x f(t)\,dt and ∫axf(s) ds\int_a^x f(s)\,ds are the same number, as a sum ∑i=1ni2\sum_{i=1}^n i^2 does not depend on the name i.i\mathclose{\text{.}} Writing ∫axf(x) dx\int_a^x f(x)\,dx would make xx mean two things at once, the right end and the variable that runs from aa to it, so the variable gets another name.

The function f of Example 10.4, made of straight pieces (top), and its area function A(x) = int0^x f(t),dt (bottom). The area from 0 to 5 is shaded, blue where f > 0 (it counts as positive) and orange where f < 0 (negative), so A(5) = 5 - 2.5 = 2.5. A rises while f is positive and falls while f is negative; it is largest at x = 3, where f changes sign. The dashed line, the tangent to the graph of A at x = 5, has slope f(5) = -1.
Figure 10.2

The function ff of Example 10.4, made of straight pieces (top), and its area function A(x)=∫0xf(t) dtA(x) = \int_0^x f(t)\,dt (bottom). The area from 0 to 5 is shaded, blue where f>0f > 0 (it counts as positive) and orange where f<0f < 0 (negative), so A(5)=5−2.5=2.5.A(5) = 5 - 2.5 = 2.5\mathclose{\text{.}} AA rises while ff is positive and falls while ff is negative; it is largest at x=3,x = 3\mathclose{\text{,}} where ff changes sign. The dashed line, the tangent to the graph of AA at x=5,x = 5\mathclose{\text{,}} has slope f(5)=−1.f(5) = -1\mathclose{\text{.}}

Example 10.4Reading an area function✓ Checked

Let ff be the function of Figure 10.2,

f(t)={2if 0≤t≤2,6−2tif 2<t≤4,t−6if 4<t≤6,f(t) = \begin{cases} 2 & \text{if } 0 \le t \le 2, \\ 6 - 2t & \text{if } 2 < t \le 4, \\ t - 6 & \text{if } 4 < t \le 6, \end{cases}

and let A(x)=∫0xf(t) dtA(x) = \int_0^x f(t)\,dt for 0≤x≤6.0 \le x \le 6\mathclose{\text{.}}

  • (a) Find A(x)A(x) for x=0,1,2,…,6.x = 0, 1, 2, \dots, 6\mathclose{\text{.}}
  • (b) Where is AA increasing, where is it decreasing, and where is it largest?
  • (c) Compare the slope of the graph of AA with the height of the graph of f.f\mathclose{\text{.}}

(a) The regions are rectangles, triangles and trapezoids. A(0)=0.A(0) = 0\mathclose{\text{.}} On [0,2],[0, 2]\mathclose{\text{,}} f=2,f = 2\mathclose{\text{,}} so A(1)=2A(1) = 2 and A(2)=4.A(2) = 4\mathclose{\text{.}} From 2 to 3, ff falls from 2 to 0: a triangle of area 12⋅1⋅2=1,\tfrac12 \cdot 1 \cdot 2 = 1\mathclose{\text{,}} so A(3)=5.A(3) = 5\mathclose{\text{.}} From 3 to 4, ff falls from 0 to −2:-2\mathclose{\text{:}} a triangle below the axis, of signed area −1,-1\mathclose{\text{,}} so A(4)=4.A(4) = 4\mathclose{\text{.}} From 4 to 5, ff rises from −2-2 to −1:-1\mathclose{\text{:}} a trapezoid below the axis, of signed area −2+12⋅1=−1.5,-\tfrac{2 + 1}{2} \cdot 1 = -1.5\mathclose{\text{,}} so A(5)=2.5.A(5) = 2.5\mathclose{\text{.}} From 5 to 6, a triangle of signed area −0.5:-0.5\mathclose{\text{:}} A(6)=2.A(6) = 2\mathclose{\text{.}} So, for x=0,1,…,6,x = 0, 1, \dots, 6\mathclose{\text{,}} A(x)A(x) is 0, 2, 4, 5, 4, 2.5 and 2.

(b) While xx moves through [0,3],[0, 3]\mathclose{\text{,}} f≥0,f \ge 0\mathclose{\text{,}} so each step adds area and AA increases, from 0 to 5. On [3,6],[3, 6]\mathclose{\text{,}} f≤0,f \le 0\mathclose{\text{,}} so each step takes area away and AA decreases, from 5 to 2. AA is largest at x=3,x = 3\mathclose{\text{,}} where ff changes from positive to negative: A(3)=5.A(3) = 5\mathclose{\text{.}}

(c) On [0,2],[0, 2]\mathclose{\text{,}} A(x)=2x:A(x) = 2x\mathclose{\text{:}} a line of slope 2, and the height of ff there is 2. At x=3x = 3 the graph of AA is flat at its top, and f(3)=0.f(3) = 0\mathclose{\text{.}} For 4≤x≤64 \le x \le 6 the region between 4 and xx is a trapezoid below the axis, with parallel sides 2 and 6−x6 - x and width x−4,x - 4\mathclose{\text{,}} so

A(x)=4−12 (2+(6−x))(x−4)=12x2−6x+20.\begin{aligned} A(x) &= 4 - \tfrac12\,\big(2 + (6 - x)\big)(x - 4) \\ &= \tfrac12 x^2 - 6x + 20. \end{aligned}

By the rules of Module 4, A′(x)=x−6,A'(x) = x - 6\mathclose{\text{,}} which is f(x)f(x) on that piece; at x=5,x = 5\mathclose{\text{,}} A′(5)=−1=f(5),A'(5) = -1 = f(5)\mathclose{\text{,}} the slope of the dashed tangent in Figure 10.2. Each time, the slope of AA at xx is the height of ff at x.x\mathclose{\text{.}} Section 10.4 proves that this always happens when ff is continuous.

Here is a second example, with numbers instead of shapes. Let f(t)=cos⁡tf(t) = \cos t and A(x)=∫0xcos⁡t dt.A(x) = \int_0^x \cos t\,dt\mathclose{\text{.}} No triangles help now. The values of AA in the table were computed numerically, as Riemann sums with very many rectangles would give them, and so were the forward differences of AA with step 0.001, the slopes of short secants of its graph:

xxA(x)A(x)A(x+0.001)−A(x)0.001\dfrac{A(x + 0.001) - A(x)}{0.001}cos⁡x\cos x
0.50.50.4794260.4794260.8773430.8773430.8775830.877583
110.8414710.8414710.5398810.5398810.5403020.540302
1.51.50.9974950.9974950.07023840.07023840.07073720.0707372
220.9092970.909297−0.416601-0.416601−0.416147-0.416147
330.1411200.141120−0.990063-0.990063−0.989992-0.989992

The slopes of AA agree with cos⁡x\cos x to about three decimal places, as forward differences with step 0.001 do (Module 4). And AA rises while cos⁡x>0,\cos x > 0\mathclose{\text{,}} up to x=π/2≈1.571,x = \pi/2 \approx 1.571\mathclose{\text{,}} and falls after it. You may also recognise the values of A:A\mathclose{\text{:}} sin⁡1≈0.841471\sin 1 \approx 0.841471 and sin⁡2≈0.909297.\sin 2 \approx 0.909297\mathclose{\text{.}} Both observations are the Fundamental Theorem at work.

The demonstration below draws both graphs for any function you choose.

Try it

Start with f(x)=sin⁡xf(x) = \sin x and a=0,a = 0\mathclose{\text{,}} and move xx with its slider, with the arrow keys, or by clicking either graph. The top graph shades the area from aa to x,x\mathclose{\text{,}} blue where it counts as positive and orange where it counts as negative; the bottom graph is A(x),A(x)\mathclose{\text{,}} computed numerically. Compare the purple height f(x)f(x) above with the purple tangent below: wherever you go, the readout shows that the slope of AA at xx equals f(x),f(x)\mathclose{\text{,}} and where ff changes sign, AA has a peak or a valley. Then move a:a\mathclose{\text{:}} the graph of AA moves up or down, it always passes through (a,0),(a, 0)\mathclose{\text{,}} and its slopes do not change (Section 10.4 explains why). Finally type sign(x), which jumps at 0, set a=−2a = -2 and move xx to 0: AA has a corner there.

Watch out

A(x)A(x) is an area, f(x)f(x) a height: different numbers. In Example 10.4, A(5)=2.5A(5) = 2.5 while f(5)=−1.f(5) = -1\mathclose{\text{.}} A function that is decreasing need not be negative: AA decreases on [3,6][3, 6] but stays positive, because the area lost after x=3x = 3 is less than the area gained before. The sign of ff tells you whether AA goes up or down, not whether AA is positive.

4

The Fundamental Theorem, Part 1

In both examples of Section 10.3, the slope of the area function at xx was the height of ff at x.x\mathclose{\text{.}} Here is why, in a picture. Move the right end from xx to x+h,x + h\mathclose{\text{,}} with h>0h > 0 small. The area grows by the thin strip between xx and x+hx + h (Figure 10.3), so by the splitting property

A(x+h)−A(x)=∫xx+hf(t) dt.A(x + h) - A(x) = \int_x^{x + h} f(t)\,dt.

The strip is nearly a rectangle of width hh and height f(x),f(x)\mathclose{\text{,}} so A(x+h)−A(x)≈f(x) h,A(x + h) - A(x) \approx f(x)\,h\mathclose{\text{,}} and the difference quotient of AA is close to f(x).f(x)\mathclose{\text{.}} The thinner the strip, the better the approximation: in the limit, A′(x)=f(x).A'(x) = f(x)\mathclose{\text{.}} The Mean Value Theorem for integrals turns this “≈\approx” into an exact statement.

The idea of the proof of Part 1. The value A(x) of the area function is the area of the light region from a to x. Moving the right end from x to x + h adds the dark strip, of area A(x + h) - A(x). The Mean Value Theorem for integrals gives a point c between x and x + h such that the rectangle of height f(c) (dashed) has exactly the strip's area. As h to 0, c is squeezed towards x, and f(c) approaches f(x).
Figure 10.3

The idea of the proof of Part 1. The value A(x)A(x) of the area function is the area of the light region from aa to x.x\mathclose{\text{.}} Moving the right end from xx to x+hx + h adds the dark strip, of area A(x+h)−A(x).A(x + h) - A(x)\mathclose{\text{.}} The Mean Value Theorem for integrals gives a point cc between xx and x+hx + h such that the rectangle of height f(c)f(c) (dashed) has exactly the strip’s area. As h→0,h \to 0\mathclose{\text{,}} cc is squeezed towards x,x\mathclose{\text{,}} and f(c)f(c) approaches f(x).f(x)\mathclose{\text{.}}

Theorem 10.2The Fundamental Theorem of Calculus, Part 1

Let ff be continuous on [a,b],[a, b]\mathclose{\text{,}} and let

A(x)=∫axf(t) dt,a≤x≤b.A(x) = \int_a^x f(t)\,dt, \qquad a \le x \le b.

Then AA is continuous on [a,b][a, b] and differentiable on (a,b),(a, b)\mathclose{\text{,}} with A′(x)=f(x)A'(x) = f(x) for every xx in (a,b),(a, b)\mathclose{\text{,}} and at the endpoints its one-sided derivatives are A+′(a)=f(a)A'_+(a) = f(a) and A−′(b)=f(b).A'_-(b) = f(b)\mathclose{\text{.}} So AA is an antiderivative of ff on [a,b].[a, b]\mathclose{\text{.}} In Leibniz’s notation,

ddx∫axf(t) dt=f(x).\frac{d}{dx}\int_a^x f(t)\,dt = f(x).

The last line reads “the derivative with respect to x of the integral from a to x of f of t, d t, is f of x”.

Proof

Let xx be in [a,b],[a, b]\mathclose{\text{,}} and let h≠0h \ne 0 with x+hx + h in [a,b].[a, b]\mathclose{\text{.}} By the splitting property,

A(x+h)−A(x)=∫ax+hf(t) dt−∫axf(t) dt=∫xx+hf(t) dt.\begin{aligned} &A(x + h) - A(x) \\ &\quad= \int_a^{x + h} f(t)\,dt - \int_a^x f(t)\,dt \\ &\quad= \int_x^{x + h} f(t)\,dt. \end{aligned}

If h>0,h > 0\mathclose{\text{,}} ff is continuous on [x,x+h],[x, x + h]\mathclose{\text{,}} so the Mean Value Theorem for integrals gives a number chc_h in [x,x+h][x, x + h] with ∫xx+hf(t) dt=f(ch) h.\int_x^{x + h} f(t)\,dt = f(c_h)\,h\mathclose{\text{.}} If h<0,h < 0\mathclose{\text{,}} it gives chc_h in [x+h,x][x + h, x] with ∫x+hxf(t) dt=f(ch) (−h),\int_{x + h}^x f(t)\,dt = f(c_h)\,(-h)\mathclose{\text{,}} and reversing the limits changes the sign, so again ∫xx+hf(t) dt=f(ch) h.\int_x^{x + h} f(t)\,dt = f(c_h)\,h\mathclose{\text{.}} Either way,

A(x+h)−A(x)h=f(ch),\frac{A(x + h) - A(x)}{h} = f(c_h),

where chc_h lies between xx and x+h.x + h\mathclose{\text{.}}

Continuity. ff is continuous on the closed interval [a,b],[a, b]\mathclose{\text{,}} so by the Extreme Value Theorem (Module 3) ∣f∣\abs{f} has a largest value MM there. Then ∣A(x+h)−A(x)∣=∣f(ch)∣ ∣h∣≤M∣h∣,\abs{A(x + h) - A(x)} = \abs{f(c_h)}\,\abs{h} \le M\abs{h}\mathclose{\text{,}} which tends to 0 as h→0.h \to 0\mathclose{\text{.}} So AA is continuous at xx (from one side when xx is aa or b).b\mathclose{\text{).}}

Derivative. Now let xx be in (a,b),(a, b)\mathclose{\text{,}} so that hh may have either sign. Since chc_h lies between xx and x+h,x + h\mathclose{\text{,}} ∣ch−x∣≤∣h∣.\abs{c_h - x} \le \abs{h}\mathclose{\text{.}} Let ε>0.\varepsilon > 0\mathclose{\text{.}} Because ff is continuous at x,x\mathclose{\text{,}} there is a δ>0\delta > 0 such that ∣f(c)−f(x)∣<ε\abs{f(c) - f(x)} < \varepsilon whenever cc is in [a,b][a, b] and ∣c−x∣<δ.\abs{c - x} < \delta\mathclose{\text{.}} For 0<∣h∣<δ0 < \abs{h} < \delta (with x+hx + h in [a,b],[a, b]\mathclose{\text{,}} as throughout), then, ∣ch−x∣<δ,\abs{c_h - x} < \delta\mathclose{\text{,}} so

∣A(x+h)−A(x)h−f(x)∣=∣f(ch)−f(x)∣<ε.\begin{aligned} \left\lvert \frac{A(x + h) - A(x)}{h} - f(x)\right\rvert &= \abs{f(c_h) - f(x)} \\ &< \varepsilon. \end{aligned}

By the definition of a limit, the difference quotient of AA tends to f(x)f(x) as h→0:h \to 0\mathclose{\text{:}} A′(x)=f(x).A'(x) = f(x)\mathclose{\text{.}} At x=ax = a and x=b,x = b\mathclose{\text{,}} where hh can have only one sign, the same argument shows that the one-sided derivatives of AA are f(a)f(a) and f(b).f(b)\mathclose{\text{.}}

∎

Every hypothesis was used. Continuity on [a,b][a, b] gave the Mean Value Theorem for integrals and the bound M;M\mathclose{\text{;}} continuity at xx made f(ch)f(c_h) approach f(x).f(x)\mathclose{\text{.}} Without continuity the conclusion can fail. Let f(t)=0f(t) = 0 for t<0t < 0 and f(t)=1f(t) = 1 for t≥0,t \ge 0\mathclose{\text{,}} a step that is integrable (its integrals are areas of rectangles) but not continuous at 0. Then A(x)=∫0xf(t) dtA(x) = \int_0^x f(t)\,dt is 0 for x≤0x \le 0 and xx for x≥0:x \ge 0\mathclose{\text{:}} its graph has a corner at 0, like the graph of ∣x∣\abs{x} in Section 4.4, and A′(0)A'(0) does not exist. In the demonstration of Section 10.3, sign(x) shows such a corner.

The starting point aa can be anywhere, with xx on either side of it. If ff is continuous on an open interval II and aa is a point of I,I\mathclose{\text{,}} then A(x)=∫axf(t) dtA(x) = \int_a^x f(t)\,dt has A′(x)=f(x)A'(x) = f(x) at every xx in I,I\mathclose{\text{,}} on either side of a.a\mathclose{\text{.}} Indeed, choose pp and qq in II with pp less than both aa and xx and qq greater than both; by the splitting property,

A(x)=∫pxf(t) dt−∫paf(t) dt,A(x) = \int_p^x f(t)\,dt - \int_p^a f(t)\,dt,

Part 1 on [p,q][p, q] differentiates the first term, and the second is a constant. The same formula shows what changing aa does: it changes AA by a constant, ∫paf(t) dt.\int_p^a f(t)\,dt\mathclose{\text{.}} Area functions from different starting points are antiderivatives that differ by constants, as Theorem 10.1 says they must; in the demonstration, moving aa moves the graph of AA up or down.

Key idea

Part 1 says that differentiation undoes integration: integrate ff from a fixed point to x,x\mathclose{\text{,}} differentiate with respect to x,x\mathclose{\text{,}} and you get ff back. In particular, every continuous function on an interval has an antiderivative there: ∫axf(t) dt\int_a^x f(t)\,dt is one.

That includes functions for which no formula built from the functions of Module 1’s catalogue gives an antiderivative. The function e−x2e^{-x^2} is continuous, so ∫0xe−t2 dt\int_0^x e^{-t^2}\,dt is an antiderivative of it, a perfectly good function with no simpler formula; it returns in Section 10.8 under a name of its own.

Integrals with variable limits

Part 1 differentiates an integral whose upper limit is xx itself. When a limit is a function of x,x\mathclose{\text{,}} the chain rule of Module 5 joins in.

Theorem 10.3Integrals with variable limits

Let ff be continuous on an open interval I,I\mathclose{\text{,}} let aa be in I,I\mathclose{\text{,}} and let uu and vv be differentiable functions whose values lie in I.I\mathclose{\text{.}} Then

ddx∫au(x)f(t) dt=f(u(x)) u′(x),ddx∫xaf(t) dt=−f(x)(x in I),\begin{aligned} \frac{d}{dx}\int_a^{u(x)} f(t)\,dt &= f\big(u(x)\big)\,u'(x), \\ \frac{d}{dx}\int_x^a f(t)\,dt &= -f(x) \quad (x \text{ in } I), \end{aligned}

and

ddx∫v(x)u(x)f(t) dt=f(u(x)) u′(x)−f(v(x)) v′(x).\begin{aligned} &\frac{d}{dx}\int_{v(x)}^{u(x)} f(t)\,dt \\ &\quad= f\big(u(x)\big)\,u'(x) - f\big(v(x)\big)\,v'(x). \end{aligned}
Proof

Let A(y)=∫ayf(t) dtA(y) = \int_a^y f(t)\,dt for yy in I;I\mathclose{\text{;}} by Part 1 in the form for open intervals given above, A′(y)=f(y).A'(y) = f(y)\mathclose{\text{.}} The first integral is A(u(x)),A\big(u(x)\big)\mathclose{\text{,}} and the chain rule gives its derivative A′(u(x)) u′(x)=f(u(x)) u′(x).A'\big(u(x)\big)\,u'(x) = f\big(u(x)\big)\,u'(x)\mathclose{\text{.}} The second is −A(x),-A(x)\mathclose{\text{,}} with derivative −f(x).-f(x)\mathclose{\text{.}} By the splitting property the third is A(u(x))−A(v(x)),A\big(u(x)\big) - A\big(v(x)\big)\mathclose{\text{,}} and the chain rule, used twice, gives the last formula.

∎
Example 10.5Derivatives of integrals✓ Checked

Find:

  • (a) ddx∫1x1+t3 dt,\dfrac{d}{dx}\displaystyle\int_1^x \sqrt{1 + t^3}\,dt\mathclose{\text{,}} for x>−1x > -1
  • (b) ddx∫0x2e−t2 dt\dfrac{d}{dx}\displaystyle\int_0^{x^2} e^{-t^2}\,dt
  • (c) ddx∫x2x1t dt,\dfrac{d}{dx}\displaystyle\int_x^{2x} \frac{1}{t}\,dt\mathclose{\text{,}} for x>0x > 0

(a) f(t)=1+t3f(t) = \sqrt{1 + t^3} is continuous on the open interval (−1,∞),(-1, \infty)\mathclose{\text{,}} which contains 1, so Part 1 applies: the derivative is 1+x3.\sqrt{1 + x^3}\mathclose{\text{.}} No antiderivative of 1+t3\sqrt{1 + t^3} is needed, which is fortunate: no formula built from the functions of Module 1’s catalogue gives one.

(b) The upper limit is u(x)=x2,u(x) = x^2\mathclose{\text{,}} with u′(x)=2x.u'(x) = 2x\mathclose{\text{.}} Put u(x)u(x) into the integrand and multiply by u′(x):u'(x)\mathclose{\text{:}}

ddx∫0x2e−t2 dt=e−(x2)2⋅2x=2x e−x4.\frac{d}{dx}\int_0^{x^2} e^{-t^2}\,dt = e^{-(x^2)^2}\cdot 2x = 2x\,e^{-x^4}.

(c) 1/t1/t is continuous on (0,∞),(0, \infty)\mathclose{\text{,}} and for x>0x > 0 both limits lie there. With u(x)=2xu(x) = 2x and v(x)=x,v(x) = x\mathclose{\text{,}}

ddx∫x2xdtt=12x⋅2−1x⋅1=0.\frac{d}{dx}\int_x^{2x} \frac{dt}{t} = \frac{1}{2x}\cdot 2 - \frac{1}{x}\cdot 1 = 0.

The derivative is 0 on the interval (0,∞),(0, \infty)\mathclose{\text{,}} so by Module 8 the integral has the same value for every x>0:x > 0\mathclose{\text{:}} the area under y=1/ty = 1/t from xx to 2x2x does not depend on x,x\mathclose{\text{,}} because as the region gets wider it gets lower in exactly the right proportion. Example 10.6 finds the value, ln⁡2.\ln 2\mathclose{\text{.}}

Watch out

Three slips. (1) Forgetting the chain rule: ddx∫0x2e−t2 dt\dfrac{d}{dx}\displaystyle\int_0^{x^2} e^{-t^2}\,dt is 2x e−x4,2x\,e^{-x^4}\mathclose{\text{,}} not e−x4e^{-x^4} and not e−x2.e^{-x^2}\mathclose{\text{.}} (2) Substituting the wrong letter: ddx∫axf(t) dt\dfrac{d}{dx}\displaystyle\int_a^x f(t)\,dt is f(x),f(x)\mathclose{\text{,}} a function of x,x\mathclose{\text{,}} not f(t).f(t)\mathclose{\text{.}} (3) An integral with two constant limits is a number, so its derivative is 0: ddx∫01e−t2 dt=0,\dfrac{d}{dx}\displaystyle\int_0^1 e^{-t^2}\,dt = 0\mathclose{\text{,}} not e−x2.e^{-x^2}\mathclose{\text{.}}

5

The Fundamental Theorem, Part 2

Part 1 says that integrating produces an antiderivative. Part 2 turns this round: to compute an integral, find any antiderivative.

Theorem 10.4The Fundamental Theorem of Calculus, Part 2

Let ff be continuous on [a,b],[a, b]\mathclose{\text{,}} and let FF be continuous on [a,b][a, b] with F′(x)=f(x)F'(x) = f(x) for every xx in (a,b);(a, b)\mathclose{\text{;}} for instance, FF can be any antiderivative of ff on an interval that contains [a,b].[a, b]\mathclose{\text{.}} Then

∫abf(x) dx=F(b)−F(a).\int_a^b f(x)\,dx = F(b) - F(a).

The difference F(b)−F(a)F(b) - F(a) is written [F(x)]ab,\big[F(x)\big]_a^b\mathclose{\text{,}} read “F of x evaluated from a to b”. Some books write F(x)∣ab.F(x)\big|_a^b\mathclose{\text{.}}

Proof

Let A(x)=∫axf(t) dtA(x) = \int_a^x f(t)\,dt for a≤x≤b.a \le x \le b\mathclose{\text{.}} By Part 1, AA is continuous on [a,b][a, b] and A′(x)=f(x)=F′(x)A'(x) = f(x) = F'(x) for every xx in (a,b).(a, b)\mathclose{\text{.}} Two functions with the same derivative on an open interval differ by a constant (Theorem 8.6), so F(x)−A(x)=CF(x) - A(x) = C for some constant CC and every xx in (a,b).(a, b)\mathclose{\text{.}} Both FF and AA are continuous at aa and at b,b\mathclose{\text{,}} so letting x→a+x \to a^+ and x→b−x \to b^- shows that F(a)−A(a)=CF(a) - A(a) = C and F(b)−A(b)=CF(b) - A(b) = C too. Therefore

F(b)−F(a)=(A(b)+C)−(A(a)+C)=A(b)−A(a)=∫abf(t) dt−0,\begin{aligned} F(b) - F(a) &= \big(A(b) + C\big) - \big(A(a) + C\big) \\ &= A(b) - A(a) \\ &= \int_a^b f(t)\,dt - 0, \end{aligned}

since A(a)=∫aaf(t) dt=0.A(a) = \int_a^a f(t)\,dt = 0\mathclose{\text{.}} The name of the variable of integration does not matter, so this is ∫abf(x) dx.\int_a^b f(x)\,dx\mathclose{\text{.}}

∎

So the constant of an antiderivative never matters in Part 2: (F(b)+C)−(F(a)+C)=F(b)−F(a).(F(b) + C) - (F(a) + C) = F(b) - F(a)\mathclose{\text{.}} Any antiderivative will do.

Example 10.6Integrals in two lines✓ Checked

Evaluate (a) ∫01x2 dx,\displaystyle\int_0^1 x^2\,dx\mathclose{\text{,}} (b) ∫0πsin⁡x dx,\displaystyle\int_0^\pi \sin x\,dx\mathclose{\text{,}} (c) ∫12dxx\displaystyle\int_1^2 \frac{dx}{x} and (d) ∫01dx1+x2.\displaystyle\int_0^1 \frac{dx}{1 + x^2}\mathclose{\text{.}}

For each, take an antiderivative from the table of Section 10.1, valid on the whole interval of integration, and subtract.

(a) ∫01x2 dx=[x33]01=13−0=13.\displaystyle\int_0^1 x^2\,dx = \Big[\frac{x^3}{3}\Big]_0^1 = \frac13 - 0 = \frac13.

(b) ∫0πsin⁡x dx=[−cos⁡x]0π=−cos⁡π−(−cos⁡0)=1+1=2.\displaystyle\int_0^\pi \sin x\,dx = \big[-\cos x\big]_0^\pi = -\cos\pi - (-\cos 0) = 1 + 1 = 2.

(c) ln⁡x\ln x is an antiderivative of 1/x1/x on (0,∞),(0, \infty)\mathclose{\text{,}} which contains [1,2]:[1, 2]\mathclose{\text{:}} ∫12dxx=ln⁡2−ln⁡1=ln⁡2≈0.6931.\displaystyle\int_1^2 \frac{dx}{x} = \ln 2 - \ln 1 = \ln 2 \approx 0.6931.

(d) ∫01dx1+x2=arctan⁡1−arctan⁡0=π4≈0.7854.\displaystyle\int_0^1 \frac{dx}{1 + x^2} = \arctan 1 - \arctan 0 = \frac{\pi}{4} \approx 0.7854.

So one arch of the sine curve encloses an area of exactly 2, and the area under y=1/(1+x2)y = 1/(1 + x^2) from 0 to 1 is π/4:\pi/4\mathclose{\text{:}} π\pi appears from a curve with no circle in sight. By Example 10.5(c), (c) is also the area under 1/t1/t from xx to 2x,2x\mathclose{\text{,}} for every x>0.x > 0\mathclose{\text{.}}

Watch out

(1) Part 2 needs ff continuous on the whole interval [a,b],[a, b]\mathclose{\text{,}} with an antiderivative valid on all of it. The “calculation” ∫−11dxx2=[−1x]−11=−1−1=−2\displaystyle\int_{-1}^1 \frac{dx}{x^2} = \Big[-\frac1x\Big]_{-1}^1 = -1 - 1 = -2 is wrong: a positive function cannot have a negative integral. The function 1/x21/x^2 is not continuous at 0, not even bounded near it, and −1/x-1/x is not an antiderivative on any interval containing 0; Module 12 shows that this area is in fact infinite. (2) The same goes for 1/x.1/x\mathclose{\text{.}} Its antiderivative ln⁡∣x∣\ln\abs{x} is valid on (0,∞)(0, \infty) and on (−∞,0),(-\infty, 0)\mathclose{\text{,}} so ∫12dxx=ln⁡2\int_1^2 \frac{dx}{x} = \ln 2 and ∫−2−1dxx=ln⁡1−ln⁡2=−ln⁡2;\int_{-2}^{-1} \frac{dx}{x} = \ln 1 - \ln 2 = -\ln 2\mathclose{\text{;}} but [ln⁡∣x∣]−12=ln⁡2\big[\ln\abs{x}\big]_{-1}^{2} = \ln 2 is not the value of ∫−12dxx.\int_{-1}^{2} \frac{dx}{x}\mathclose{\text{.}} That integral does not exist: 1/x1/x is unbounded near 0. (3) Subtract the whole of F(a),F(a)\mathclose{\text{,}} inside brackets: [x2−3x]12=(4−6)−(1−3)=0,\big[x^2 - 3x\big]_1^2 = (4 - 6) - (1 - 3) = 0\mathclose{\text{,}} not (4−6)−1−3=−6.(4 - 6) - 1 - 3 = -6\mathclose{\text{.}}

Why the theorem is remarkable

Compare Example 10.6 with the methods of Module 9. There, an integral such as ∫01x2 dx\int_0^1 x^2\,dx is the limit of Riemann sums: with nn rectangles and right endpoints the sum is (n+1)(2n+1)6n2,\dfrac{(n + 1)(2n + 1)}{6n^2}\mathclose{\text{,}} found with Module 9’s formula for 12+22+⋯+n2,1^2 + 2^2 + \dots + n^2\mathclose{\text{,}} and its limit as n→∞n \to \infty is 13.\tfrac13\mathclose{\text{.}} That needed a formula for a sum and then a limit, and it works only for the few functions whose sums have formulas. For sin⁡x\sin x on [0,π],[0, \pi]\mathclose{\text{,}} the midpoint sums MnM_n with nn rectangles, each of width π/n,\pi/n\mathclose{\text{,}} creep towards 2:

nnMnM_n
10102.008248412.00824841
1001002.000082252.00008225
100010002.000000822.00000082

while Part 2 gives exactly 2 in one line. Archimedes, in the 3rd century BC, found areas with the method of exhaustion, an ancestor of Riemann sums, using an ingenious argument for each shape. The Fundamental Theorem replaces all of that with one question: what function has this derivative? It turns the area problem of Module 1 into the problem of undoing a derivative, and it is why integration is a practical tool rather than a theory of limits. It also keeps a promise made in Section 1.1.

Key idea

Module 1 compared a car’s speedometer and odometer, and promised that the Fundamental Theorem of Calculus would show that each undoes the other. Here is the promise kept. Let s(t)s(t) be the odometer reading at time tt and v(t)=s′(t)v(t) = s'(t) the speedometer reading, a continuous function.

  • Part 2: add up the speedometer readings over a stretch of time, and you get the change in the odometer reading: ∫abv(t) dt=s(b)−s(a).\displaystyle\int_a^b v(t)\,dt = s(b) - s(a)\mathclose{\text{.}}
  • Part 1: ask how fast the accumulated total grows, and you get the speedometer reading back: ddt∫atv(u) du=v(t).\dfrac{d}{dt}\displaystyle\int_a^t v(u)\,du = v(t)\mathclose{\text{.}}

Integration and differentiation are inverse processes, and the tangent problem and the area problem of Module 1 are two sides of one problem.

Going deeperPart 2 straight from Riemann sums

Part 2 can also be proved without Part 1, from the definition of the integral, and the proof shows it holds whenever ff is integrable, continuous or not. Let FF be continuous on [a,b][a, b] with F′=fF' = f on (a,b),(a, b)\mathclose{\text{,}} and take any partition a=x0<x1<⋯<xn=b.a = x_0 < x_1 < \dots < x_n = b\mathclose{\text{.}} The sum

(F(x1)−F(x0))+(F(x2)−F(x1))+⋯+(F(xn)−F(xn−1))\begin{aligned} &\big(F(x_1) - F(x_0)\big) \\ &\quad+ \big(F(x_2) - F(x_1)\big) \\ &\quad+ \dots + \big(F(x_n) - F(x_{n-1})\big) \end{aligned}

telescopes to F(b)−F(a).F(b) - F(a)\mathclose{\text{.}} By the Mean Value Theorem (Module 8), each bracket is F′(ci) Δxi=f(ci) ΔxiF'(c_i)\,\Delta x_i = f(c_i)\,\Delta x_i for some cic_i in (xi−1,xi),(x_{i-1}, x_i)\mathclose{\text{,}} where Δxi=xi−xi−1.\Delta x_i = x_i - x_{i-1}\mathclose{\text{.}} So for every partition there is a Riemann sum of f,f\mathclose{\text{,}} with sample points ci,c_i\mathclose{\text{,}} whose value is exactly F(b)−F(a).F(b) - F(a)\mathclose{\text{.}} If ff is integrable, Riemann sums approach ∫abf(x) dx\int_a^b f(x)\,dx as the subintervals shrink, so the integral equals F(b)−F(a).F(b) - F(a)\mathclose{\text{.}}

6

Indefinite integrals and net change

Indefinite integrals

Part 2 makes antiderivatives the way to compute integrals, and that explains the notation used for them.

Definition 10.4Indefinite integral

The indefinite integral of f,f\mathclose{\text{,}} written ∫f(x) dx,\int f(x)\,dx\mathclose{\text{,}} is its general antiderivative on an interval:

∫f(x) dx=F(x)+C\int f(x)\,dx = F(x) + C

means that F′(x)=f(x)F'(x) = f(x) for every xx in the interval.

Read ∫f(x) dx\int f(x)\,dx as “the integral of f of x, d x”. A definite integral ∫abf(x) dx\int_a^b f(x)\,dx is a number; an indefinite integral ∫f(x) dx\int f(x)\,dx is a family of functions. Part 2 links them: ∫abf(x) dx=[∫f(x) dx]ab,\int_a^b f(x)\,dx = \Big[\int f(x)\,dx\Big]_a^b\mathclose{\text{,}} using any member of the family. To integrate ff is to find either. In this notation the table of Section 10.1 reads

∫xn dx=xn+1n+1+C(n≠−1),∫dxx=ln⁡∣x∣+C,∫cos⁡x dx=sin⁡x+C,\begin{aligned} \int x^n\,dx &= \frac{x^{n+1}}{n + 1} + C \quad (n \ne -1), \\ \int \frac{dx}{x} &= \ln\abs{x} + C, \\ \int \cos x\,dx &= \sin x + C, \end{aligned}

and so on, with the conditions of the table, and the rules for sums and constant multiples read ∫(cf(x)+g(x)) dx=c∫f(x) dx+∫g(x) dx.\int \big(c f(x) + g(x)\big)\,dx = c\int f(x)\,dx + \int g(x)\,dx\mathclose{\text{.}} The dxdx says which letter is the variable: ∫xt2 dx=12x2t2+C,\int x t^2\,dx = \tfrac12 x^2 t^2 + C\mathclose{\text{,}} while ∫xt2 dt=13xt3+C.\int x t^2\,dt = \tfrac13 x t^3 + C\mathclose{\text{.}}

Watch out

An indefinite integral is not a number, and a definite integral is not a family. ∫2x dx=x2+C,\int 2x\,dx = x^2 + C\mathclose{\text{,}} not x2x^2 alone, which is one antiderivative among many; and ∫012x dx=1,\int_0^1 2x\,dx = 1\mathclose{\text{,}} a number, with no CC and no xx left in it.

The net change theorem

Part 2 has a second reading. A function FF with a continuous derivative is an antiderivative of its own derivative, so Part 2 with f=F′f = F' gives:

Theorem 10.5The net change theorem

If F′F' is continuous on [a,b],[a, b]\mathclose{\text{,}} then

∫abF′(x) dx=F(b)−F(a).\int_a^b F'(x)\,dx = F(b) - F(a).

In words: the integral of a rate of change is the net change. If s(t)s(t) is a position, ∫abv(t) dt=s(b)−s(a)\int_a^b v(t)\,dt = s(b) - s(a) is the displacement, the change in position. If V(t)V(t) is the volume of water in a tank and water flows in at the rate r(t)=V′(t),r(t) = V'(t)\mathclose{\text{,}} then ∫abr(t) dt\int_a^b r(t)\,dt is the change in volume. If E(t)E(t) is the energy used up to time t,t\mathclose{\text{,}} its rate of change is the power P(t)=E′(t),P(t) = E'(t)\mathclose{\text{,}} and ∫abP(t) dt\int_a^b P(t)\,dt is the energy used between aa and b.b\mathclose{\text{.}} The units multiply: litres per minute times minutes gives litres; watts, which are joules per second, times seconds gives joules.

Example 10.7Displacement and distance✓ Checked

Module 4’s Example 4.10 followed a particle with velocity v(t)=3t2−12t+9v(t) = 3t^2 - 12t + 9 metres per second. Without using its position function, find (a) its displacement and (b) the distance it travels, over 0≤t≤4.0 \le t \le 4\mathclose{\text{.}}

(a) By the net change theorem, the displacement is

∫04(3t2−12t+9) dt=[t3−6t2+9t]04=64−96+36=4 m.\begin{aligned} &\int_0^4 (3t^2 - 12t + 9)\,dt \\ &\quad= \big[t^3 - 6t^2 + 9t\big]_0^4 \\ &\quad= 64 - 96 + 36 = 4 \text{ m}. \end{aligned}

(b) Distance counts every metre covered, forwards or backwards, so it is the integral of the speed ∣v(t)∣.\abs{v(t)}\mathclose{\text{.}} Factor: v(t)=3(t−1)(t−3),v(t) = 3(t - 1)(t - 3)\mathclose{\text{,}} which is positive for 0≤t<1,0 \le t < 1\mathclose{\text{,}} negative for 1<t<31 < t < 3 and positive for 3<t≤4.3 < t \le 4\mathclose{\text{.}} On each piece ∣v∣\abs{v} is vv or −v,-v\mathclose{\text{,}} so integrate piece by piece, with F(t)=t3−6t2+9t:F(t) = t^3 - 6t^2 + 9t\mathclose{\text{:}}

∫01v dt=F(1)−F(0)=4,∫13v dt=F(3)−F(1)=0−4=−4,∫34v dt=F(4)−F(3)=4−0=4.\begin{aligned} \int_0^1 v\,dt &= F(1) - F(0) = 4, \\ \int_1^3 v\,dt &= F(3) - F(1) = 0 - 4 = -4, \\ \int_3^4 v\,dt &= F(4) - F(3) = 4 - 0 = 4. \end{aligned}

The distance is 4+4+4=124 + 4 + 4 = 12 m: the particle goes 4 m forwards, 4 m back and 4 m forwards again, ending 4 m from where it started, as Module 4 found from s(t).s(t)\mathclose{\text{.}} Figure 10.4 shows the two integrals as areas.

Displacement and distance for the particle of Example 10.7. Left: the velocity v(t) = 3t^2 - 12t + 9; the signed areas 4, -4 and 4 add up to the displacement, 4 m. Right: the speed abs{v(t)}; its areas, all positive, add up to the distance travelled, 12 m.
Figure 10.4

Displacement and distance for the particle of Example 10.7. Left: the velocity v(t)=3t2−12t+9;v(t) = 3t^2 - 12t + 9\mathclose{\text{;}} the signed areas 4,4\mathclose{\text{,}} −4-4 and 44 add up to the displacement, 4 m. Right: the speed ∣v(t)∣;\abs{v(t)}\mathclose{\text{;}} its areas, all positive, add up to the distance travelled, 12 m.

Example 10.8Water in a tank✓ Checked

Suppose a tank holds 500 litres at time t=0,t = 0\mathclose{\text{,}} and water flows in at r(t)=40−4tr(t) = 40 - 4t litres per minute for 0≤t≤15,0 \le t \le 15\mathclose{\text{,}} where a negative rate means water flowing out. How much water is in the tank after 15 minutes? When is it fullest, and how full is it then?

The change in volume over the 15 minutes is

∫015(40−4t) dt=[40t−2t2]015=600−450=150 litres,\begin{aligned} \int_0^{15} (40 - 4t)\,dt &= \big[40t - 2t^2\big]_0^{15} \\ &= 600 - 450 = 150 \text{ litres}, \end{aligned}

so the tank holds 500+150=650500 + 150 = 650 litres at t=15.t = 15\mathclose{\text{.}} The volume increases while r(t)>0r(t) > 0 and decreases while r(t)<0;r(t) < 0\mathclose{\text{;}} r(t)=0r(t) = 0 at t=10,t = 10\mathclose{\text{,}} so the tank is fullest at t=10t = 10 minutes, with 500+[40t−2t2]010=500+400−200=700500 + \big[40t - 2t^2\big]_0^{10} = 500 + 400 - 200 = 700 litres. From t=10t = 10 to t=15t = 15 it loses 50 litres.

Example 10.9Energy from power✓ Checked

Suppose a GPU’s power draw during a one-minute task is P(t)=250+150sin⁡πt60P(t) = 250 + 150\sin\dfrac{\pi t}{60} watts, for 0≤t≤600 \le t \le 60 seconds. How much energy does it use, in joules and in kilowatt-hours (1 kWh is 3.6×1063.6 \times 10^6 J)? What is its average power over the minute?

The energy is the integral of the power. With k=π/60k = \pi/60 in the table, an antiderivative of sin⁡πt60\sin\dfrac{\pi t}{60} is −60πcos⁡πt60,-\dfrac{60}{\pi}\cos\dfrac{\pi t}{60}\mathclose{\text{,}} so

E=∫060P(t) dt=[250t−9000πcos⁡πt60]060=15000−9000π(cos⁡π−cos⁡0)=15000+18000π≈20729.6 J.\begin{aligned} E &= \int_0^{60} P(t)\,dt \\ &= \Big[250t - \frac{9000}{\pi}\cos\frac{\pi t}{60}\Big]_0^{60} \\ &= 15000 - \frac{9000}{\pi}(\cos\pi - \cos 0) \\ &= 15000 + \frac{18000}{\pi} \approx 20729.6 \text{ J}. \end{aligned}

That is about 20.7 kJ, or 20729.6/(3.6×106)≈0.0057620729.6/(3.6 \times 10^6) \approx 0.00576 kWh. The average power is the average value of PP (Module 9), E/60≈345.5E/60 \approx 345.5 W, between the lowest draw, 250 W, and the highest, 400 W.

Watch out

Displacement is not distance. ∫abv(t) dt\int_a^b v(t)\,dt adds forward and backward motion with opposite signs, so it can be small, or 0, while the object travels far. For the distance, integrate the speed ∣v(t)∣:\abs{v(t)}\mathclose{\text{:}} find where vv changes sign, split the interval there, and add the sizes of the pieces. And keep the units: the integral of a rate has the units of the rate times the units of time.

7

The substitution rule

The table of Section 10.1 handles sums of basic functions. It cannot handle ∫2xcos⁡(x2) dx:\int 2x\cos(x^2)\,dx\mathclose{\text{:}} the integrand is a product, and not of anything in the table. But you have seen it before, as a derivative. By the chain rule,

ddxsin⁡(x2)=cos⁡(x2)⋅2x,\frac{d}{dx}\sin(x^2) = \cos(x^2)\cdot 2x,

so ∫2xcos⁡(x2) dx=sin⁡(x2)+C.\int 2x\cos(x^2)\,dx = \sin(x^2) + C\mathclose{\text{.}} The integrand has the shape f(g(x)) g′(x):f\big(g(x)\big)\,g'(x)\mathclose{\text{:}} an outer function ff evaluated at an inner function g(x),g(x)\mathclose{\text{,}} times the derivative of the inner function. Whenever F′=f,F' = f\mathclose{\text{,}} the chain rule says that such an integrand is the derivative of F(g(x)).F\big(g(x)\big)\mathclose{\text{.}}

Leibniz’s notation makes the pattern mechanical. Name the inner function u=g(x).u = g(x)\mathclose{\text{.}} Its differential, defined in Section 7.2, is du=g′(x) dx.du = g'(x)\,dx\mathclose{\text{.}} Replace g(x)g(x) by uu and g′(x) dxg'(x)\,dx by du:du\mathclose{\text{:}}

∫cos⁡(x2)⋅2x dx=∫cos⁡u du=sin⁡u+C=sin⁡(x2)+C.\begin{aligned} \int \cos(x^2)\cdot 2x\,dx &= \int \cos u\,du \\ &= \sin u + C = \sin(x^2) + C. \end{aligned}
Theorem 10.6The substitution rule

Let gg be differentiable on an interval I,I\mathclose{\text{,}} and let FF be an antiderivative of ff on an open interval that contains every value of g.g\mathclose{\text{.}} Then

∫f(g(x)) g′(x) dx=F(g(x))+C\int f\big(g(x)\big)\,g'(x)\,dx = F\big(g(x)\big) + C

on I.I\mathclose{\text{.}} With u=g(x)u = g(x) and du=g′(x) dx,du = g'(x)\,dx\mathclose{\text{,}} this says ∫f(g(x)) g′(x) dx=∫f(u) du,\int f\big(g(x)\big)\,g'(x)\,dx = \int f(u)\,du\mathclose{\text{,}} with u=g(x)u = g(x) put back at the end.

Proof

By the chain rule, ddxF(g(x))=F′(g(x)) g′(x)=f(g(x)) g′(x)\dfrac{d}{dx}F\big(g(x)\big) = F'\big(g(x)\big)\,g'(x) = f\big(g(x)\big)\,g'(x) for every xx in I.I\mathclose{\text{.}} So F(g(x))F\big(g(x)\big) is an antiderivative of f(g(x)) g′(x)f\big(g(x)\big)\,g'(x) on I,I\mathclose{\text{,}} and Theorem 10.1 gives all the others.

∎
Key idea

To integrate by substitution:

  1. Choose u=g(x),u = g(x)\mathclose{\text{,}} an inner function whose derivative appears as a factor of the integrand, perhaps up to a constant factor.
  2. Compute du=g′(x) dx,du = g'(x)\,dx\mathclose{\text{,}} and solve for the part of the integrand it replaces (for example x dx=12 du).x\,dx = \tfrac12\,du\mathclose{\text{).}}
  3. Rewrite the whole integral in terms of u;u\mathclose{\text{;}} no xx may remain, not even in dx.dx\mathclose{\text{.}}
  4. Integrate in u,u\mathclose{\text{,}} then put u=g(x)u = g(x) back.
  5. Check by differentiating.
Example 10.10Four substitutions✓ Checked

Find:

  • (a) ∫2x(x2+1)3 dx\displaystyle\int 2x(x^2 + 1)^3\,dx
  • (b) ∫x2x3+1 dx,\displaystyle\int x^2\sqrt{x^3 + 1}\,dx\mathclose{\text{,}} for x>−1x > -1
  • (c) ∫ex1+ex dx\displaystyle\int \frac{e^x}{1 + e^x}\,dx
  • (d) ∫ln⁡xx dx,\displaystyle\int \frac{\ln x}{x}\,dx\mathclose{\text{,}} for x>0x > 0

(a) Let u=x2+1;u = x^2 + 1\mathclose{\text{;}} then du=2x dx,du = 2x\,dx\mathclose{\text{,}} exactly the remaining factor:

∫u3 du=u44+C=(x2+1)44+C.\int u^3\,du = \frac{u^4}{4} + C = \frac{(x^2 + 1)^4}{4} + C.

(b) Let u=x3+1,u = x^3 + 1\mathclose{\text{,}} so du=3x2 dxdu = 3x^2\,dx and x2 dx=13 du.x^2\,dx = \tfrac13\,du\mathclose{\text{.}} For x>−1,x > -1\mathclose{\text{,}} u>0,u > 0\mathclose{\text{,}} and

∫u⋅13 du=13⋅23u3/2+C=29(x3+1)3/2+C.\begin{aligned} \int \sqrt u\cdot\tfrac13\,du &= \frac13\cdot\frac23 u^{3/2} + C \\ &= \frac29 (x^3 + 1)^{3/2} + C. \end{aligned}

Check: ddx 29(x3+1)3/2=29⋅32(x3+1)1/2⋅3x2=x2x3+1.\dfrac{d}{dx}\,\dfrac29(x^3 + 1)^{3/2} = \dfrac29\cdot\dfrac32(x^3 + 1)^{1/2}\cdot 3x^2 = x^2\sqrt{x^3 + 1}\mathclose{\text{.}}

(c) Let u=1+ex,u = 1 + e^x\mathclose{\text{,}} so du=ex dx:du = e^x\,dx\mathclose{\text{:}}

∫duu=ln⁡∣u∣+C=ln⁡(1+ex)+C,\int \frac{du}{u} = \ln\abs{u} + C = \ln(1 + e^x) + C,

without absolute value bars, since 1+ex>0.1 + e^x > 0\mathclose{\text{.}}

(d) Let u=ln⁡x,u = \ln x\mathclose{\text{,}} so du=dxx:du = \dfrac{dx}{x}\mathclose{\text{:}}

∫u du=u22+C=(ln⁡x)22+C.\int u\,du = \frac{u^2}{2} + C = \frac{(\ln x)^2}{2} + C.

The next three need a second look: in the first the derivative of the inner function hides in a quotient, in the second a constant has to be arranged, and in the third some xx is left over.

Example 10.11Substitutions that need a second look✓ Checked

Find:

  • (a) ∫tan⁡x dx\displaystyle\int \tan x\,dx
  • (b) ∫dxa2+x2,\displaystyle\int \frac{dx}{a^2 + x^2}\mathclose{\text{,}} where a≠0a \ne 0 is a constant
  • (c) ∫xx−1 dx,\displaystyle\int x\sqrt{x - 1}\,dx\mathclose{\text{,}} for x>1x > 1

(a) Write tan⁡x=sin⁡xcos⁡x\tan x = \dfrac{\sin x}{\cos x} and let u=cos⁡x,u = \cos x\mathclose{\text{,}} so du=−sin⁡x dx:du = -\sin x\,dx\mathclose{\text{:}}

∫sin⁡xcos⁡x dx=−∫duu=−ln⁡∣u∣+C=−ln⁡∣cos⁡x∣+C,\begin{aligned} \int \frac{\sin x}{\cos x}\,dx &= -\int \frac{du}{u} = -\ln\abs{u} + C \\ &= -\ln\abs{\cos x} + C, \end{aligned}

on each interval where cos⁡x≠0.\cos x \ne 0\mathclose{\text{.}} Since −ln⁡∣cos⁡x∣=ln⁡1∣cos⁡x∣,-\ln\abs{\cos x} = \ln\dfrac{1}{\abs{\cos x}}\mathclose{\text{,}} the answer is also written ln⁡∣sec⁡x∣+C.\ln\abs{\sec x} + C\mathclose{\text{.}}

(b) Take a2a^2 out of the denominator, a2+x2=a2(1+(x/a)2),a^2 + x^2 = a^2\big(1 + (x/a)^2\big)\mathclose{\text{,}} and let u=x/a,u = x/a\mathclose{\text{,}} so du=dx/adu = dx/a and dx=a du:dx = a\,du\mathclose{\text{:}}

∫dxa2+x2=∫a dua2(1+u2)=1aarctan⁡u+C=1aarctan⁡xa+C.\begin{aligned} \int \frac{dx}{a^2 + x^2} &= \int \frac{a\,du}{a^2(1 + u^2)} \\ &= \frac1a \arctan u + C \\ &= \frac1a\arctan\frac{x}{a} + C. \end{aligned}

In the same way, for a constant a>0,a > 0\mathclose{\text{,}} ∫dxa2−x2=arcsin⁡xa+C\displaystyle\int \frac{dx}{\sqrt{a^2 - x^2}} = \arcsin\frac{x}{a} + C for −a<x<a;-a < x < a\mathclose{\text{;}} Exercise 10.6 does the case a=3.a = 3\mathclose{\text{.}}

(c) Let u=x−1,u = x - 1\mathclose{\text{,}} so du=dx.du = dx\mathclose{\text{.}} The factor xx is left over, but it can be written in terms of u:u\mathclose{\text{:}} x=u+1.x = u + 1\mathclose{\text{.}} Then

∫(u+1)u du=∫(u3/2+u1/2) du=25u5/2+23u3/2+C=25(x−1)5/2+23(x−1)3/2+C.\begin{aligned} \int (u + 1)\sqrt u\,du &= \int \big(u^{3/2} + u^{1/2}\big)\,du \\ &= \frac25 u^{5/2} + \frac23 u^{3/2} + C \\ &= \frac25 (x - 1)^{5/2} \\ &\qquad + \frac23 (x - 1)^{3/2} + C. \end{aligned}
Watch out

Three slips with substitution. (1) Forgetting du:du\mathclose{\text{:}} replacing cos⁡(x2)⋅2x dx\cos(x^2)\cdot 2x\,dx by “cos⁡u dx\cos u\,dx” leaves a dxdx in an integral in u,u\mathclose{\text{,}} which is meaningless; the 2x dx2x\,dx becomes du.du\mathclose{\text{.}} (2) Treating a leftover variable as a constant. With u=x2,u = x^2\mathclose{\text{,}} ∫cos⁡(x2) dx\int \cos(x^2)\,dx has no factor xx to go with dx,dx\mathclose{\text{,}} and dividing by 2x2x inside the integral, as if it were a constant, gives the wrong answer sin⁡(x2)2x.\dfrac{\sin(x^2)}{2x}\mathclose{\text{.}} Constant factors can be moved through an integral sign; variables cannot. (In fact no formula built from the functions of Module 1’s catalogue has derivative cos⁡(x2).)\cos(x^2)\mathclose{\text{.)}} (3) Leaving the answer in u,u\mathclose{\text{,}} or forgetting to check it.

Definite integrals

For a definite integral there are two ways to use a substitution. One is to find an antiderivative in x,x\mathclose{\text{,}} as above, and apply Part 2 with the original limits. The other is to change the limits along with the variable, and never return to x.x\mathclose{\text{.}} Figure 10.5 shows what the second way does: it changes the region but not its area.

Theorem 10.7Substitution in definite integrals

Let g′g' be continuous on [a,b],[a, b]\mathclose{\text{,}} and let ff be continuous on an interval JJ that contains g(x)g(x) for every xx in [a,b].[a, b]\mathclose{\text{.}} Then

∫abf(g(x)) g′(x) dx=∫g(a)g(b)f(u) du.\int_a^b f\big(g(x)\big)\,g'(x)\,dx = \int_{g(a)}^{g(b)} f(u)\,du.
Proof

If JJ contains an endpoint, extend ff past it with the value it has there; the extended function is continuous on an open interval that contains JJ and agrees with ff on J,J\mathclose{\text{,}} so neither side of the formula changes. So suppose JJ is open. By Part 1, ff has an antiderivative FF on J.J\mathclose{\text{.}} By Theorem 10.6, F(g(x))F\big(g(x)\big) is an antiderivative of f(g(x)) g′(x),f\big(g(x)\big)\,g'(x)\mathclose{\text{,}} which is continuous on [a,b];[a, b]\mathclose{\text{;}} so Part 2 gives the left side as F(g(b))−F(g(a)).F\big(g(b)\big) - F\big(g(a)\big)\mathclose{\text{.}} Part 2 on the interval between g(a)g(a) and g(b),g(b)\mathclose{\text{,}} which lies in J,J\mathclose{\text{,}} gives the right side as F(g(b))−F(g(a))F\big(g(b)\big) - F\big(g(a)\big) too. (When g(b)<g(a)g(b) < g(a) this uses the convention ∫pq=−∫qp,\int_p^q = -\int_q^p\mathclose{\text{,}} and when g(a)=g(b)g(a) = g(b) both sides are 0.)

∎
Example 10.12Changing the limits✓ Checked

Evaluate (a) ∫0π2xsin⁡(x2) dx,\displaystyle\int_0^{\sqrt\pi} 2x\sin(x^2)\,dx\mathclose{\text{,}} (b) ∫01x1+x2 dx\displaystyle\int_0^1 \frac{x}{1 + x^2}\,dx and (c) ∫0π/2sin⁡xcos⁡2x dx.\displaystyle\int_0^{\pi/2} \sin x\cos^2 x\,dx\mathclose{\text{.}}

(a) Let u=x2,u = x^2\mathclose{\text{,}} so du=2x dx.du = 2x\,dx\mathclose{\text{.}} When x=0,x = 0\mathclose{\text{,}} u=0;u = 0\mathclose{\text{;}} when x=π,x = \sqrt\pi\mathclose{\text{,}} u=π.u = \pi\mathclose{\text{.}} So

∫0π2xsin⁡(x2) dx=∫0πsin⁡u du=[−cos⁡u]0π=2,\begin{aligned} \int_0^{\sqrt\pi} 2x\sin(x^2)\,dx &= \int_0^\pi \sin u\,du \\ &= \big[-\cos u\big]_0^\pi = 2, \end{aligned}

the area of one arch of the sine curve (Example 10.6(b)).

(b) Let u=1+x2,u = 1 + x^2\mathclose{\text{,}} so du=2x dxdu = 2x\,dx and x dx=12 du;x\,dx = \tfrac12\,du\mathclose{\text{;}} x=0x = 0 gives u=1u = 1 and x=1x = 1 gives u=2:u = 2\mathclose{\text{:}}

∫01x dx1+x2=12∫12duu=12[ln⁡u]12=ln⁡22≈0.3466.\begin{aligned} \int_0^1 \frac{x\,dx}{1 + x^2} &= \frac12\int_1^2 \frac{du}{u} = \frac12\big[\ln u\big]_1^2 \\ &= \frac{\ln 2}{2} \approx 0.3466. \end{aligned}

The other way: an antiderivative in xx is 12ln⁡(1+x2),\tfrac12\ln(1 + x^2)\mathclose{\text{,}} and [12ln⁡(1+x2)]01=12ln⁡2−12ln⁡1,\big[\tfrac12\ln(1 + x^2)\big]_0^1 = \tfrac12\ln 2 - \tfrac12\ln 1\mathclose{\text{,}} the same.

(c) Let u=cos⁡x,u = \cos x\mathclose{\text{,}} so du=−sin⁡x dx;du = -\sin x\,dx\mathclose{\text{;}} x=0x = 0 gives u=1u = 1 and x=π/2x = \pi/2 gives u=0:u = 0\mathclose{\text{:}}

∫0π/2cos⁡2x sin⁡x dx=∫10u2 (−du)=∫01u2 du=13.\begin{aligned} \int_0^{\pi/2} \cos^2 x\,\sin x\,dx &= \int_1^0 u^2\,(-du) \\ &= \int_0^1 u^2\,du = \frac13. \end{aligned}

The new limits came out in reverse order, and the minus sign from dudu turned them round. Keep the limits where the substitution puts them: the value of uu at the lower xx-limit goes at the bottom of the integral sign, even when it is the larger number.

Substitution changes the region but not its area. Left: the region under y = 2xsin(x^2) from x = 0 to sqrtpi, tall and narrow. Right: the region under y = sin u from u = 0 to pi, low and wide. With u = x^2, Theorem 10.7 says that the two areas are equal, and Example 10.12(a) finds both to be 2. The two panels have the same scales.
Figure 10.5

Substitution changes the region but not its area. Left: the region under y=2xsin⁡(x2)y = 2x\sin(x^2) from x=0x = 0 to π,\sqrt\pi\mathclose{\text{,}} tall and narrow. Right: the region under y=sin⁡uy = \sin u from u=0u = 0 to π,\pi\mathclose{\text{,}} low and wide. With u=x2,u = x^2\mathclose{\text{,}} Theorem 10.7 says that the two areas are equal, and Example 10.12(a) finds both to be 2. The two panels have the same scales.

Watch out

The most common slip with definite integrals: changing the variable but not the limits. With u=x2+1,u = x^2 + 1\mathclose{\text{,}}

∫02x(x2+1)2 dx=12∫15u2 du=12⋅125−13=623.\begin{aligned} \int_0^2 x(x^2 + 1)^2\,dx &= \frac12\int_1^5 u^2\,du \\ &= \frac12\cdot\frac{125 - 1}{3} = \frac{62}{3}. \end{aligned}

Keeping the old limits gives 12∫02u2 du=43,\tfrac12\int_0^2 u^2\,du = \tfrac43\mathclose{\text{,}} which is wrong; so is using the uu-antiderivative 16u3\tfrac16 u^3 with the xx-limits 0 and 2. And dropping the factor 12\tfrac12 gives 1243.\tfrac{124}{3}\mathclose{\text{.}} Either change the limits, or return to xx before using the old ones.

Odd and even functions

Module 9 used symmetry to find integrals over intervals [−a,a]:[-a, a]\mathclose{\text{:}} for an even function the area to the left of the yy-axis is the mirror image of the area to its right, and for an odd function the two cancel. It proved this with Riemann sums (Section 9.6); for continuous functions, substitution gives a two-line proof.

Theorem 10.8Integrals of even and odd functions

Let ff be continuous on [−a,a],[-a, a]\mathclose{\text{,}} where a>0.a > 0\mathclose{\text{.}}

  • If ff is even, ∫−aaf(x) dx=2∫0af(x) dx.\displaystyle\int_{-a}^a f(x)\,dx = 2\int_0^a f(x)\,dx\mathclose{\text{.}}
  • If ff is odd, ∫−aaf(x) dx=0.\displaystyle\int_{-a}^a f(x)\,dx = 0\mathclose{\text{.}}
Proof

Split at 0: ∫−aaf(x) dx=∫−a0f(x) dx+∫0af(x) dx.\int_{-a}^a f(x)\,dx = \int_{-a}^0 f(x)\,dx + \int_0^a f(x)\,dx\mathclose{\text{.}} In the first integral substitute u=−x,u = -x\mathclose{\text{,}} so du=−dx;du = -dx\mathclose{\text{;}} x=−ax = -a gives u=au = a and x=0x = 0 gives u=0.u = 0\mathclose{\text{.}} By Theorem 10.7,

∫−a0f(x) dx=∫a0f(−u) (−du)=∫0af(−u) du.\begin{aligned} \int_{-a}^0 f(x)\,dx &= \int_a^0 f(-u)\,(-du) \\ &= \int_0^a f(-u)\,du. \end{aligned}

If ff is even, f(−u)=f(u),f(-u) = f(u)\mathclose{\text{,}} so this is ∫0af(u) du,\int_0^a f(u)\,du\mathclose{\text{,}} and the total is 2∫0af(x) dx.2\int_0^a f(x)\,dx\mathclose{\text{.}} If ff is odd, f(−u)=−f(u),f(-u) = -f(u)\mathclose{\text{,}} so it is −∫0af(u) du,-\int_0^a f(u)\,du\mathclose{\text{,}} and the total is 0.

∎
Example 10.13Symmetry saves work✓ Checked

Evaluate (a) ∫−11(x6+4x3−x+1) dx,\displaystyle\int_{-1}^1 (x^6 + 4x^3 - x + 1)\,dx\mathclose{\text{,}} (b) ∫−π/2π/2(x3+1)cos⁡x dx\displaystyle\int_{-\pi/2}^{\pi/2} (x^3 + 1)\cos x\,dx and (c) ∫−11tan⁡x1+x2 dx.\displaystyle\int_{-1}^1 \frac{\tan x}{1 + x^2}\,dx\mathclose{\text{.}}

(a) x6+1x^6 + 1 is even and 4x3−x4x^3 - x is odd, so

∫−11(x6+4x3−x+1) dx=2∫01(x6+1) dx+0=2(17+1)=167.\begin{aligned} &\int_{-1}^1 (x^6 + 4x^3 - x + 1)\,dx \\ &\quad= 2\int_0^1 (x^6 + 1)\,dx + 0 \\ &\quad= 2\Big(\frac17 + 1\Big) = \frac{16}{7}. \end{aligned}

(b) x3cos⁡xx^3\cos x is odd (an odd function times an even one) and cos⁡x\cos x is even, so the integral is 0+2∫0π/2cos⁡x dx=2[sin⁡x]0π/2=2.0 + 2\int_0^{\pi/2}\cos x\,dx = 2\big[\sin x\big]_0^{\pi/2} = 2\mathclose{\text{.}}

(c) tan⁡x\tan x is odd and 1+x21 + x^2 even, so their quotient is odd; it is continuous on [−1,1],[-1, 1]\mathclose{\text{,}} where cos⁡x≠0.\cos x \ne 0\mathclose{\text{.}} The integral is 0, and no antiderivative was needed.

Watch out

Both shortcuts need a symmetric interval and an integrable function. ∫−12x3 dx\int_{-1}^2 x^3\,dx is not 0: the interval is not symmetric, and the integral is 164−14=154.\tfrac{16}{4} - \tfrac14 = \tfrac{15}{4}\mathclose{\text{.}} And ∫−11dxx\int_{-1}^1 \frac{dx}{x} is not 0 “by symmetry”: 1/x1/x is odd but not defined at 0, and it is unbounded near it, so the integral does not exist in the sense of Module 9.

8

Integration with SymPy

SymPy integrates with sp.integrate. With a variable as its second argument it returns an antiderivative; with a tuple (x, a, b) it returns the definite integral from a to b.

Compute itIntegrals with SymPy
Python
import sympy as sp
x, t = sp.symbols('x t')
print(sp.integrate(x**2 - 1, x))                     # an antiderivative: no + C
print(sp.integrate(x**2, (x, 0, 1)))                 # a definite integral, exactly
print(sp.integrate(1/(1 + x**2), (x, 0, 1)))         # Example 10.6(d)
print(sp.integrate(2*x*sp.sin(x**2), (x, 0, sp.sqrt(sp.pi))))   # Example 10.12(a)
Output
x**3/3 - x
1/3
pi/4
2

SymPy leaves out the + C,+\,C\mathclose{\text{,}} and gives exact answers: pi/4, not 0.785. To check an antiderivative of your own, differentiate it and simplify the difference from the integrand; 0 means it is right:

Python
F = sp.Rational(2, 9)*(x**3 + 1)**sp.Rational(3, 2)   # Example 10.10(b)
print(sp.simplify(sp.diff(F, x) - x**2*sp.sqrt(x**3 + 1)))
Output
0

sp.Integral writes an integral down without evaluating it, and .doit() evaluates it. sp.diff applies Part 1 and the chain rule to integrals with variable limits, without finding any antiderivative:

Python
I = sp.Integral(sp.exp(-t**2), (t, 0, x**2))
print(sp.diff(I, x))                                 # Example 10.5(b)
print(sp.diff(sp.Integral(1/t, (t, x, 2*x)), x))     # Example 10.5(c)
print(sp.Integral(x**2, (x, 0, 1)).doit())
Output
2*x*exp(-x**4)
0
1/3

The middle answer is 0 for every x,x\mathclose{\text{,}} as Example 10.5(c) found. SymPy also knows the trap of Section 10.5:

Python
print(sp.integrate(1/x**2, (x, -1, 1)))
Output
oo

oo is SymPy’s ∞:\infty\mathclose{\text{:}} the area under 1/x21/x^2 from −1-1 to 1 is infinite, not −2.-2\mathclose{\text{.}}

Why SymPy’s answer may look different

Two correct antiderivatives of the same function can look quite different: by Theorem 10.1 they may differ by a constant, and like derivatives in Section 5.7, they may be written in different but equal forms.

Compute itAnswers that differ by a constant
Python
import sympy as sp
x = sp.symbols('x')
mine = (x**2 + 1)**4/4                               # Example 10.10(a), by substitution
theirs = sp.integrate(2*x*(x**2 + 1)**3, x)
print(theirs)
print(sp.expand(mine - theirs))
Output
x**8/4 + x**6 + 3*x**4/2 + x**2
1/4

SymPy expanded the integrand and integrated term by term, so its antiderivative has no constant term. Expanded, 14(x2+1)4\tfrac14(x^2 + 1)^4 is the same polynomial plus 14:\tfrac14\mathclose{\text{:}} the two answers differ by the constant 14,\tfrac14\mathclose{\text{,}} and both are right. Another integral can be done by substitution in two ways:

Python
print(sp.integrate(sp.sin(x)*sp.cos(x), x))
print(sp.simplify(sp.sin(x)**2/2 - (-sp.cos(x)**2/2)))
Output
sin(x)**2/2
1/2

With u=sin⁡x,u = \sin x\mathclose{\text{,}} ∫sin⁡xcos⁡x dx=12sin⁡2x+C,\int \sin x\cos x\,dx = \tfrac12\sin^2 x + C\mathclose{\text{,}} which is SymPy’s answer. With u=cos⁡xu = \cos x and du=−sin⁡x dx,du = -\sin x\,dx\mathclose{\text{,}} the same integral is −12cos⁡2x+C.-\tfrac12\cos^2 x + C\mathclose{\text{.}} Both are right: since sin⁡2x+cos⁡2x=1,\sin^2 x + \cos^2 x = 1\mathclose{\text{,}} they differ by 12.\tfrac12\mathclose{\text{.}} One more difference:

Python
print(sp.integrate(1/x, x))
print(sp.integrate(1/x, (x, -2, -1)))
Output
log(x)
-log(2)

SymPy writes ln⁡x,\ln x\mathclose{\text{,}} not ln⁡∣x∣.\ln\abs{x}\mathclose{\text{.}} That is an antiderivative of 1/x1/x for x>0;x > 0\mathclose{\text{;}} for negative xx SymPy’s log(x) is not a real number, because SymPy works with complex numbers. For real work on (−∞,0)(-\infty, 0) use ln⁡∣x∣.\ln\abs{x}\mathclose{\text{.}} Definite integrals still come out right: [ln⁡∣x∣]−2−1=ln⁡1−ln⁡2=−ln⁡2.\big[\ln\abs{x}\big]_{-2}^{-1} = \ln 1 - \ln 2 = -\ln 2\mathclose{\text{.}}

Watch out

Do not check your antiderivative by subtracting SymPy’s: two right answers may differ by a constant, as 14(x2+1)4\tfrac14(x^2 + 1)^4 and SymPy’s polynomial do, so the difference need not be 0. Differentiate your answer instead and compare it with the integrand, as in the first box: sp.simplify(sp.diff(F, x) - f) must give 0. A difference that comes out as a constant also means that both answers are right.

When no formula exists

Ask SymPy for an antiderivative of e−x2,e^{-x^2}\mathclose{\text{,}} and it answers with a function you have not met:

Compute itIntegrals with special functions
Python
import sympy as sp
x = sp.symbols('x')
print(sp.integrate(sp.exp(-x**2), x))
print(sp.diff(sp.erf(x), x))
I = sp.integrate(sp.exp(-x**2), (x, 0, 1))
print(I, sp.N(I))
Output
sqrt(pi)*erf(x)/2
2*exp(-x**2)/sqrt(pi)
sqrt(pi)*erf(1)/2 0.746824132812427

erf is the error function, defined as an area function:

erf⁡x=2π∫0xe−t2 dt.\operatorname{erf} x = \frac{2}{\sqrt\pi}\int_0^x e^{-t^2}\,dt.

By Part 1 its derivative is 2πe−x2,\dfrac{2}{\sqrt\pi}e^{-x^2}\mathclose{\text{,}} as the second line confirms, so π2erf⁡x\dfrac{\sqrt\pi}{2}\operatorname{erf} x is an antiderivative of e−x2:e^{-x^2}\mathclose{\text{:}} SymPy’s answer is Part 1 at work, with a name attached. Its values are computed numerically, as those of sin⁡x\sin x and ln⁡x\ln x are. A midpoint sum with a thousand rectangles agrees with SymPy’s value in its first seven digits:

Python
import numpy as np
n = 1000
mids = (np.arange(n) + 0.5)/n                        # midpoints of [0, 1] cut into n pieces
print(np.sum(np.exp(-mids**2))/n)
Output
0.7468241634690489

The sine integral Si⁡x=∫0xsin⁡tt dt\operatorname{Si} x = \int_0^x \frac{\sin t}{t}\,dt is another such function; at t=0t = 0 its integrand is given the value 1, its limit there (Module 2), so that it is continuous:

Python
print(sp.integrate(sp.sin(x)/x, x))
Output
Si(x)

No formula built from the functions of Module 1’s catalogue has derivative e−x2e^{-x^2} or sin⁡xx;\frac{\sin x}{x}\mathclose{\text{;}} this is a theorem, beyond this series, and Module 11 returns to such functions. The error function is central in probability and statistics, where e−x2e^{-x^2} is the shape of the normal distribution (Module 12). When SymPy answers with erf, Si or another special function, it has not failed: by Part 1, the integral is a perfectly good function, and SymPy has named it.

9

What you learned

  • An antiderivative of ff on an interval is a function FF with F′=f.F' = f\mathclose{\text{.}} On an interval, all antiderivatives are F+CF + C (Theorem 10.1, from Module 8’s theorem that equal derivatives mean a constant difference); on a domain made of several intervals, the constant may differ on each.
  • A table of basic antiderivatives follows from the rules of differentiation read backwards: xn+1n+1\dfrac{x^{n+1}}{n + 1} for xnx^n (n≠−1),n \ne -1\mathclose{\text{),}} ln⁡∣x∣\ln\abs{x} for 1x,\dfrac1x\mathclose{\text{,}} −cos⁡x-\cos x for sin⁡x,\sin x\mathclose{\text{,}} arctan⁡x\arctan x for 11+x2,\dfrac{1}{1 + x^2}\mathclose{\text{,}} and so on. Check every antiderivative by differentiating it.
  • An initial value problem F′=f,F' = f\mathclose{\text{,}} F(x0)=y0F(x_0) = y_0 has exactly one solution on an interval where ff is continuous; from a constant acceleration and two initial conditions come v(t)=v0+atv(t) = v_0 + at and s(t)=s0+v0t+12at2,s(t) = s_0 + v_0t + \tfrac12at^2\mathclose{\text{,}} the falling ball’s s=4.9t2s = 4.9t^2 among them.
  • The area function A(x)=∫axf(t) dtA(x) = \int_a^x f(t)\,dt accumulates signed area: it increases where f>0f > 0 and decreases where f<0.f < 0\mathclose{\text{.}}
  • Fundamental Theorem, Part 1: if ff is continuous on an interval that contains a,a\mathclose{\text{,}} then ddx∫axf(t) dt=f(x)\dfrac{d}{dx}\displaystyle\int_a^x f(t)\,dt = f(x) there (a one-sided derivative at an endpoint). So every continuous function on an interval has an antiderivative, and with the chain rule, ddx∫au(x)f(t) dt=f(u(x))u′(x).\dfrac{d}{dx}\displaystyle\int_a^{u(x)} f(t)\,dt = f\big(u(x)\big)u'(x)\mathclose{\text{.}}
  • Fundamental Theorem, Part 2: if ff is continuous on [a,b][a, b] and FF is an antiderivative of ff there, then ∫abf(x) dx=F(b)−F(a)=[F(x)]ab.\int_a^b f(x)\,dx = F(b) - F(a) = \big[F(x)\big]_a^b\mathclose{\text{.}} Limits of Riemann sums become two-line computations; the speedometer and the odometer undo each other.
  • The indefinite integral ∫f(x) dx=F(x)+C\int f(x)\,dx = F(x) + C is the general antiderivative. The net change theorem, ∫abF′(x) dx=F(b)−F(a):\int_a^b F'(x)\,dx = F(b) - F(a)\mathclose{\text{:}} the integral of a rate is the net change. Displacement is ∫v dt;\int v\,dt\mathclose{\text{;}} distance travelled is ∫∣v∣ dt.\int \abs{v}\,dt\mathclose{\text{.}}
  • Substitution reverses the chain rule: ∫f(g(x))g′(x) dx=∫f(u) du\int f\big(g(x)\big)g'(x)\,dx = \int f(u)\,du with u=g(x),u = g(x)\mathclose{\text{,}} du=g′(x) dx;du = g'(x)\,dx\mathclose{\text{;}} in a definite integral, change the limits to g(a)g(a) and g(b).g(b)\mathclose{\text{.}} Over [−a,a],[-a, a]\mathclose{\text{,}} even functions give twice the integral over [0,a][0, a] and odd functions give 0.
  • SymPy: sp.integrate(f, x) (no + C),+\,C\mathclose{\text{),}} sp.integrate(f, (x, a, b)), sp.Integral(...) and .doit(). Its answers may differ from yours by a constant, write ln⁡x\ln x for ln⁡∣x∣,\ln\abs{x}\mathclose{\text{,}} or use special functions such as erf⁡,\operatorname{erf}\mathclose{\text{,}} defined as area functions.
10

Exercises

Exercise 10.1★Antiderivatives

Find the general antiderivative of each function, and check your answer by differentiating it.

  • (a) f(x)=8x3−6x2+1f(x) = 8x^3 - 6x^2 + 1
  • (b) g(x)=1x3−4x,g(x) = \dfrac{1}{x^3} - \dfrac{4}{\sqrt x}\mathclose{\text{,}} for x>0x > 0
  • (c) h(t)=3e−t+2sin⁡3th(t) = 3e^{-t} + 2\sin 3t
  • (d) q(x)=(1+x)2x,q(x) = \dfrac{(1 + x)^2}{\sqrt x}\mathclose{\text{,}} for x>0x > 0
Show solution✓ Checked

(a) Term by term: 8⋅x44−6⋅x33+x=2x4−2x3+x,8\cdot\dfrac{x^4}{4} - 6\cdot\dfrac{x^3}{3} + x = 2x^4 - 2x^3 + x\mathclose{\text{,}} so the answer is 2x4−2x3+x+C.2x^4 - 2x^3 + x + C\mathclose{\text{.}} Check: 8x3−6x2+1.8x^3 - 6x^2 + 1\mathclose{\text{.}}

(b) As powers, g(x)=x−3−4x−1/2.g(x) = x^{-3} - 4x^{-1/2}\mathclose{\text{.}} The power rule gives

x−2−2−4⋅x1/21/2=−12x2−8x,\frac{x^{-2}}{-2} - 4\cdot\frac{x^{1/2}}{1/2} = -\frac{1}{2x^2} - 8\sqrt x,

so the answer is −12x2−8x+C.-\dfrac{1}{2x^2} - 8\sqrt x + C\mathclose{\text{.}} Check: ddx(−12x−2−8x1/2)=x−3−4x−1/2.\dfrac{d}{dx}\Big(-\tfrac12 x^{-2} - 8x^{1/2}\Big) = x^{-3} - 4x^{-1/2}\mathclose{\text{.}}

(c) With k=−1,k = -1\mathclose{\text{,}} an antiderivative of e−te^{-t} is e−t−1=−e−t;\dfrac{e^{-t}}{-1} = -e^{-t}\mathclose{\text{;}} with k=3,k = 3\mathclose{\text{,}} one of sin⁡3t\sin 3t is −cos⁡3t3.-\dfrac{\cos 3t}{3}\mathclose{\text{.}} The answer is −3e−t−23cos⁡3t+C.-3e^{-t} - \dfrac23\cos 3t + C\mathclose{\text{.}} Check: 3e−t+2sin⁡3t.3e^{-t} + 2\sin 3t\mathclose{\text{.}}

(d) Expand the numerator and divide each term by x=x1/2:\sqrt x = x^{1/2}\mathclose{\text{:}}

1+2x+x2x1/2=x−1/2+2x1/2+x3/2.\frac{1 + 2x + x^2}{x^{1/2}} = x^{-1/2} + 2x^{1/2} + x^{3/2}.

The answer is 2x1/2+43x3/2+25x5/2+C.2x^{1/2} + \dfrac43 x^{3/2} + \dfrac25 x^{5/2} + C\mathclose{\text{.}} The tempting shortcut of integrating the top and the bottom separately has no basis: there is no quotient rule for antiderivatives.

Exercise 10.2★Integrals by Part 2

Evaluate:

  • (a) ∫13(2x−1)2 dx\displaystyle\int_1^3 (2x - 1)^2\,dx
  • (b) ∫0π/3sec⁡2x dx\displaystyle\int_0^{\pi/3} \sec^2 x\,dx
  • (c) ∫14(x+1x) dx\displaystyle\int_1^4 \Big(\sqrt x + \frac{1}{\sqrt x}\Big)\,dx
  • (d) ∫01/2dx1−x2\displaystyle\int_0^{1/2} \frac{dx}{\sqrt{1 - x^2}}
Show solution✓ Checked

(a) Expand: (2x−1)2=4x2−4x+1,(2x - 1)^2 = 4x^2 - 4x + 1\mathclose{\text{,}} with antiderivative F(x)=43x3−2x2+x.F(x) = \tfrac43 x^3 - 2x^2 + x\mathclose{\text{.}} Then F(3)=36−18+3=21F(3) = 36 - 18 + 3 = 21 and F(1)=43−2+1=13,F(1) = \tfrac43 - 2 + 1 = \tfrac13\mathclose{\text{,}} so the integral is 21−13=623.21 - \tfrac13 = \tfrac{62}{3}\mathclose{\text{.}} (Substitution with u=2x−1u = 2x - 1 gives the same: 12∫15u2 du=12⋅1243=623.)\tfrac12\int_1^5 u^2\,du = \tfrac12\cdot\tfrac{124}{3} = \tfrac{62}{3}\mathclose{\text{.)}}

(b) tan⁡x\tan x is an antiderivative of sec⁡2x\sec^2 x on (−π/2,π/2),(-\pi/2, \pi/2)\mathclose{\text{,}} which contains [0,π/3]:[0, \pi/3]\mathclose{\text{:}} tan⁡π3−tan⁡0=3.\tan\dfrac{\pi}{3} - \tan 0 = \sqrt3\mathclose{\text{.}}

(c) As powers, x1/2+x−1/2,x^{1/2} + x^{-1/2}\mathclose{\text{,}} with antiderivative 23x3/2+2x1/2.\tfrac23 x^{3/2} + 2x^{1/2}\mathclose{\text{.}} At 4 it is 23⋅8+2⋅2=283;\tfrac23\cdot 8 + 2\cdot 2 = \tfrac{28}{3}\mathclose{\text{;}} at 1 it is 23+2=83.\tfrac23 + 2 = \tfrac83\mathclose{\text{.}} The integral is 283−83=203.\tfrac{28}{3} - \tfrac83 = \tfrac{20}{3}\mathclose{\text{.}}

(d) arcsin⁡x\arcsin x is an antiderivative on (−1,1),(-1, 1)\mathclose{\text{,}} which contains [0,12]:[0, \tfrac12]\mathclose{\text{:}} arcsin⁡12−arcsin⁡0=π6≈0.5236.\arcsin\tfrac12 - \arcsin 0 = \dfrac{\pi}{6} \approx 0.5236\mathclose{\text{.}}

Exercise 10.3★Derivatives of integrals

Find the derivative of each function.

  • (a) F(x)=∫2xln⁡(1+t2) dtF(x) = \displaystyle\int_2^x \ln(1 + t^2)\,dt
  • (b) G(x)=∫x51+t4 dtG(x) = \displaystyle\int_x^5 \sqrt{1 + t^4}\,dt
  • (c) H(x)=∫0sin⁡xet2 dtH(x) = \displaystyle\int_0^{\sin x} e^{t^2}\,dt
  • (d) K(x)=∫xx2t3 dt,K(x) = \displaystyle\int_x^{x^2} t^3\,dt\mathclose{\text{,}} in two ways: with Theorem 10.3, and by evaluating the integral first.
Show solution✓ Checked

(a) ln⁡(1+t2)\ln(1 + t^2) is continuous on R,\R\mathclose{\text{,}} so by Part 1, F′(x)=ln⁡(1+x2).F'(x) = \ln(1 + x^2)\mathclose{\text{.}}

(b) The variable is the lower limit: G(x)=−∫5x1+t4 dt,G(x) = -\int_5^x \sqrt{1 + t^4}\,dt\mathclose{\text{,}} so G′(x)=−1+x4.G'(x) = -\sqrt{1 + x^4}\mathclose{\text{.}}

(c) The upper limit is u(x)=sin⁡x,u(x) = \sin x\mathclose{\text{,}} with u′(x)=cos⁡x:u'(x) = \cos x\mathclose{\text{:}} H′(x)=esin⁡2xcos⁡x.H'(x) = e^{\sin^2 x}\cos x\mathclose{\text{.}}

(d) By Theorem 10.3 with u(x)=x2u(x) = x^2 and v(x)=x:v(x) = x\mathclose{\text{:}}

K′(x)=(x2)3⋅2x−x3⋅1=2x7−x3.\begin{aligned} K'(x) &= (x^2)^3\cdot 2x - x^3\cdot 1 \\ &= 2x^7 - x^3. \end{aligned}

Evaluating first, K(x)=[t44]xx2=x84−x44,K(x) = \Big[\dfrac{t^4}{4}\Big]_x^{x^2} = \dfrac{x^8}{4} - \dfrac{x^4}{4}\mathclose{\text{,}} so K′(x)=2x7−x3:K'(x) = 2x^7 - x^3\mathclose{\text{:}} the same.

Exercise 10.4★Displacement and distance

A cyclist rides along a straight road with velocity v(t)=2t−4v(t) = 2t - 4 metres per second for 0≤t≤5,0 \le t \le 5\mathclose{\text{,}} where a positive velocity means eastwards.

  • (a) Find the displacement over the 5 seconds.
  • (b) Find the distance travelled.
  • (c) Check both answers with areas of triangles.
Show solution✓ Checked

(a) The displacement is ∫05(2t−4) dt=[t2−4t]05=25−20=5\displaystyle\int_0^5 (2t - 4)\,dt = \big[t^2 - 4t\big]_0^5 = 25 - 20 = 5 m: the cyclist ends 5 m east of the start.

(b) v(t)<0v(t) < 0 for t<2t < 2 (riding west) and v(t)>0v(t) > 0 for t>2.t > 2\mathclose{\text{.}} With F(t)=t2−4t,F(t) = t^2 - 4t\mathclose{\text{,}} ∫02v dt=F(2)−F(0)=−4\int_0^2 v\,dt = F(2) - F(0) = -4 and ∫25v dt=F(5)−F(2)=5−(−4)=9.\int_2^5 v\,dt = F(5) - F(2) = 5 - (-4) = 9\mathclose{\text{.}} The distance is ∣−4∣+9=13\abs{-4} + 9 = 13 m: 4 m west, then 9 m east.

(c) The graph of vv is a line through (2,0).(2, 0)\mathclose{\text{.}} From 0 to 2 it bounds a triangle below the axis with base 2 and height 4, of area 4; from 2 to 5, a triangle above the axis with base 3 and height 6, of area 9. Signed, −4+9=5;-4 + 9 = 5\mathclose{\text{;}} unsigned, 4+9=13.4 + 9 = 13\mathclose{\text{.}}

Exercise 10.5★★A braking car

A car travelling at 30 m/s brakes with a constant deceleration of 6 m/s² (its acceleration is −6-6 m/s²) until it stops.

  • (a) Find its velocity v(t)v(t) and its position s(t),s(t)\mathclose{\text{,}} measured from the point where braking starts, tt seconds after braking starts.
  • (b) When does it stop, and how far does it travel while braking?
  • (c) How far would it travel if the deceleration were halved? And if, with deceleration 6 m/s², it started at 60 m/s?
Show solution✓ Checked

(a) vv is an antiderivative of a=−6:a = -6\mathclose{\text{:}} v(t)=−6t+C1,v(t) = -6t + C_1\mathclose{\text{,}} and v(0)=30v(0) = 30 gives v(t)=30−6t.v(t) = 30 - 6t\mathclose{\text{.}} Then s(t)=30t−3t2+C2,s(t) = 30t - 3t^2 + C_2\mathclose{\text{,}} and s(0)=0s(0) = 0 gives s(t)=30t−3t2.s(t) = 30t - 3t^2\mathclose{\text{.}} These hold until the car stops; after that it stays put.

(b) v(t)=0v(t) = 0 when t=5t = 5 s, and then s(5)=150−75=75s(5) = 150 - 75 = 75 m.

(c) With a=−3:a = -3\mathclose{\text{:}} v(t)=30−3tv(t) = 30 - 3t is 0 at t=10,t = 10\mathclose{\text{,}} and s(10)=300−150=150s(10) = 300 - 150 = 150 m, twice as far. In general, with initial speed v0v_0 and deceleration d,d\mathclose{\text{,}} the car stops at t=v0/dt = v_0/d after travelling

v0⋅v0d−d2(v0d)2=v022d.v_0\cdot\frac{v_0}{d} - \frac{d}{2}\Big(\frac{v_0}{d}\Big)^2 = \frac{v_0^2}{2d}.

So at 60 m/s with d=6,d = 6\mathclose{\text{,}} it travels 360012=300\dfrac{3600}{12} = 300 m: twice the speed means four times the braking distance, which is why speed matters so much on the road.

Exercise 10.6★★Substitution

Find:

  • (a) ∫x(3x2+1)4 dx\displaystyle\int x(3x^2 + 1)^4\,dx
  • (b) ∫sin⁡x2+cos⁡x dx\displaystyle\int \frac{\sin x}{2 + \cos x}\,dx
  • (c) ∫exx dx,\displaystyle\int \frac{e^{\sqrt x}}{\sqrt x}\,dx\mathclose{\text{,}} for x>0x > 0
  • (d) ∫dx9−x2,\displaystyle\int \frac{dx}{\sqrt{9 - x^2}}\mathclose{\text{,}} for −3<x<3-3 < x < 3
  • (e) ∫sin⁡xcos⁡x dx,\displaystyle\int \sin x\cos x\,dx\mathclose{\text{,}} once with u=sin⁡xu = \sin x and once with u=cos⁡x.u = \cos x\mathclose{\text{.}} Explain why the two answers look different.
Show solution✓ Checked

(a) u=3x2+1,u = 3x^2 + 1\mathclose{\text{,}} du=6x dx,du = 6x\,dx\mathclose{\text{,}} so x dx=16 du:x\,dx = \tfrac16\,du\mathclose{\text{:}}

16∫u4 du=u530+C=(3x2+1)530+C.\begin{aligned} \frac16\int u^4\,du &= \frac{u^5}{30} + C \\ &= \frac{(3x^2 + 1)^5}{30} + C. \end{aligned}

(b) u=2+cos⁡x,u = 2 + \cos x\mathclose{\text{,}} du=−sin⁡x dx:du = -\sin x\,dx\mathclose{\text{:}}

−∫duu=−ln⁡∣u∣+C=−ln⁡(2+cos⁡x)+C,\begin{aligned} -\int \frac{du}{u} &= -\ln\abs{u} + C \\ &= -\ln(2 + \cos x) + C, \end{aligned}

without absolute value bars, since 2+cos⁡x≥1.2 + \cos x \ge 1\mathclose{\text{.}}

(c) u=x,u = \sqrt x\mathclose{\text{,}} du=dx2x,du = \dfrac{dx}{2\sqrt x}\mathclose{\text{,}} so dxx=2 du:\dfrac{dx}{\sqrt x} = 2\,du\mathclose{\text{:}} 2∫eu du=2ex+C.\displaystyle 2\int e^u\,du = 2e^{\sqrt x} + C\mathclose{\text{.}}

(d) 9−x2=9(1−(x/3)2),9 - x^2 = 9\big(1 - (x/3)^2\big)\mathclose{\text{,}} and 9=3.\sqrt9 = 3\mathclose{\text{.}} Let u=x/3,u = x/3\mathclose{\text{,}} so dx=3 du:dx = 3\,du\mathclose{\text{:}}

∫3 du31−u2=arcsin⁡u+C=arcsin⁡x3+C.\begin{aligned} \int \frac{3\,du}{3\sqrt{1 - u^2}} &= \arcsin u + C \\ &= \arcsin\frac{x}{3} + C. \end{aligned}

(e) With u=sin⁡x,u = \sin x\mathclose{\text{,}} du=cos⁡x dx:du = \cos x\,dx\mathclose{\text{:}} ∫u du=12sin⁡2x+C.\int u\,du = \tfrac12\sin^2 x + C\mathclose{\text{.}} With u=cos⁡x,u = \cos x\mathclose{\text{,}} du=−sin⁡x dx:du = -\sin x\,dx\mathclose{\text{:}} −∫u du=−12cos⁡2x+C.-\int u\,du = -\tfrac12\cos^2 x + C\mathclose{\text{.}} Both are right. Their difference, 12sin⁡2x+12cos⁡2x=12,\tfrac12\sin^2 x + \tfrac12\cos^2 x = \tfrac12\mathclose{\text{,}} is a constant, and by Theorem 10.1 antiderivatives on an interval may differ by a constant: the “+ C+\,C” in each answer absorbs it.

Exercise 10.7★★Definite integrals by substitution
  • (a) Evaluate ∫01xe−x2 dx,\displaystyle\int_0^1 x e^{-x^2}\,dx\mathclose{\text{,}} exactly and to four decimal places.
  • (b) Evaluate ∫0π/4tan⁡xsec⁡2x dx.\displaystyle\int_0^{\pi/4} \tan x\sec^2 x\,dx\mathclose{\text{.}}
  • (c) Evaluate ∫03xx+1 dx.\displaystyle\int_0^3 \frac{x}{\sqrt{x + 1}}\,dx\mathclose{\text{.}}
  • (d) A student writes ∫02xx2+1 dx=12∫02duu.\displaystyle\int_0^2 \frac{x}{x^2 + 1}\,dx = \frac12\int_0^2 \frac{du}{u}\mathclose{\text{.}} Find the mistake, and the right value.
Show solution✓ Checked

(a) u=−x2,u = -x^2\mathclose{\text{,}} du=−2x dx,du = -2x\,dx\mathclose{\text{,}} so x dx=−12 du;x\,dx = -\tfrac12\,du\mathclose{\text{;}} x=0x = 0 gives u=0u = 0 and x=1x = 1 gives u=−1:u = -1\mathclose{\text{:}}

∫01xe−x2 dx=−12∫0−1eu du=12∫−10eu du=12(1−e−1)≈0.3161.\begin{aligned} \int_0^1 x e^{-x^2}\,dx &= -\frac12\int_0^{-1} e^u\,du \\ &= \frac12\int_{-1}^0 e^u\,du \\ &= \frac12\big(1 - e^{-1}\big) \approx 0.3161. \end{aligned}

(b) u=tan⁡x,u = \tan x\mathclose{\text{,}} du=sec⁡2x dx;du = \sec^2 x\,dx\mathclose{\text{;}} the limits become tan⁡0=0\tan 0 = 0 and tan⁡π4=1:\tan\dfrac{\pi}{4} = 1\mathclose{\text{:}} ∫01u du=12.\displaystyle\int_0^1 u\,du = \frac12\mathclose{\text{.}}

(c) u=x+1,u = x + 1\mathclose{\text{,}} du=dx,du = dx\mathclose{\text{,}} and the leftover xx is u−1;u - 1\mathclose{\text{;}} the limits become 1 and 4:

∫14u−1u du=∫14(u1/2−u−1/2) du=[23u3/2−2u1/2]14=(163−4)−(23−2)=83.\begin{aligned} &\int_1^4 \frac{u - 1}{\sqrt u}\,du \\ &\quad= \int_1^4 \big(u^{1/2} - u^{-1/2}\big)\,du \\ &\quad= \Big[\frac23 u^{3/2} - 2u^{1/2}\Big]_1^4 \\ &\quad= \Big(\frac{16}{3} - 4\Big) - \Big(\frac23 - 2\Big) = \frac83. \end{aligned}

(d) With u=x2+1u = x^2 + 1 the integrand is right, 12⋅duu,\tfrac12\cdot\tfrac{du}{u}\mathclose{\text{,}} but the limits are still those of x.x\mathclose{\text{.}} When x=0,x = 0\mathclose{\text{,}} u=1;u = 1\mathclose{\text{;}} when x=2,x = 2\mathclose{\text{,}} u=5.u = 5\mathclose{\text{.}} The right value is

12∫15duu=12ln⁡5≈0.8047.\frac12\int_1^5 \frac{du}{u} = \frac12\ln 5 \approx 0.8047.

The student’s integral is not even defined: 1/u1/u is unbounded near u=0.u = 0\mathclose{\text{.}}

Exercise 10.8★★An area function from a formula

Let g(x)=∫0x(t2−4t+3) dt.g(x) = \displaystyle\int_0^x (t^2 - 4t + 3)\,dt\mathclose{\text{.}}

  • (a) Find g′(x)g'(x) without evaluating the integral.
  • (b) On which intervals is gg increasing, and on which decreasing? Where does it have a local maximum and a local minimum?
  • (c) Where is the graph of gg concave up, and where concave down?
  • (d) Find a formula for g(x),g(x)\mathclose{\text{,}} and use it to find gg at the points of (b). What does g(3)g(3) say about areas?
Show solution✓ Checked

(a) The integrand is continuous on R,\R\mathclose{\text{,}} so by Part 1, g′(x)=x2−4x+3=(x−1)(x−3).g'(x) = x^2 - 4x + 3 = (x - 1)(x - 3)\mathclose{\text{.}}

(b) g′(x)>0g'(x) > 0 for x<1x < 1 and for x>3,x > 3\mathclose{\text{,}} and g′(x)<0g'(x) < 0 for 1<x<3.1 < x < 3\mathclose{\text{.}} So gg is increasing on (−∞,1](-\infty, 1] and on [3,∞),[3, \infty)\mathclose{\text{,}} and decreasing on [1,3].[1, 3]\mathclose{\text{.}} By the first derivative test (Module 8), gg has a local maximum at x=1x = 1 and a local minimum at x=3.x = 3\mathclose{\text{.}}

(c) g′′(x)=2x−4,g''(x) = 2x - 4\mathclose{\text{,}} which is negative for x<2x < 2 and positive for x>2:x > 2\mathclose{\text{:}} the graph is concave down on (−∞,2)(-\infty, 2) and concave up on (2,∞),(2, \infty)\mathclose{\text{,}} with an inflection point at x=2.x = 2\mathclose{\text{.}}

(d) By Part 2, g(x)=[t33−2t2+3t]0x=x33−2x2+3x.g(x) = \Big[\dfrac{t^3}{3} - 2t^2 + 3t\Big]_0^x = \dfrac{x^3}{3} - 2x^2 + 3x\mathclose{\text{.}} Then g(1)=13−2+3=43g(1) = \tfrac13 - 2 + 3 = \tfrac43 and g(3)=9−18+9=0.g(3) = 9 - 18 + 9 = 0\mathclose{\text{.}} So the area from 0 to 1, where the integrand is positive, is 43,\tfrac43\mathclose{\text{,}} and the signed area from 1 to 3, where it is negative, is −43:-\tfrac43\mathclose{\text{:}} on [0,3][0, 3] they cancel.

Exercise 10.9★★Charge from current

Electric current is the rate at which charge flows: one ampere is one coulomb per second. Suppose the current flowing into a capacitor is I(t)=0.2e−t/5I(t) = 0.2e^{-t/5} amperes for t≥0t \ge 0 seconds.

  • (a) How much charge flows in during the first 5 seconds? During the first 10 seconds? Give both to three decimal places.
  • (b) Find the charge Q(T)Q(T) that flows in during the first TT seconds, and the number it approaches as T→∞.T \to \infty\mathclose{\text{.}}
Show solution✓ Checked

(a) By the net change theorem, the charge is the integral of the current. With k=−15,k = -\tfrac15\mathclose{\text{,}} an antiderivative of e−t/5e^{-t/5} is e−t/5−1/5=−5e−t/5,\dfrac{e^{-t/5}}{-1/5} = -5e^{-t/5}\mathclose{\text{,}} so one of I(t)I(t) is 0.2⋅(−5e−t/5)=−e−t/5.0.2\cdot(-5e^{-t/5}) = -e^{-t/5}\mathclose{\text{.}} Then

∫050.2e−t/5 dt=[−e−t/5]05=1−e−1≈0.632 C,\begin{aligned} \int_0^5 0.2e^{-t/5}\,dt &= \big[-e^{-t/5}\big]_0^5 \\ &= 1 - e^{-1} \approx 0.632 \text{ C}, \end{aligned}

and in the same way ∫0100.2e−t/5 dt=1−e−2≈0.865\int_0^{10} 0.2e^{-t/5}\,dt = 1 - e^{-2} \approx 0.865 C.

(b) Q(T)=[−e−t/5]0T=1−e−T/5Q(T) = \big[-e^{-t/5}\big]_0^T = 1 - e^{-T/5} coulombs. As T→∞,T \to \infty\mathclose{\text{,}} e−T/5→0e^{-T/5} \to 0 (Module 3), so Q(T)→1:Q(T) \to 1\mathclose{\text{:}} in all, the capacitor takes on a charge approaching 1 coulomb, two thirds of it, roughly, in the first 5 seconds.

Exercise 10.10★★★The logarithm as an area

This exercise rebuilds the natural logarithm from an integral, without using anything you know about ln⁡.\ln\mathclose{\text{.}} For x>0x > 0 let

L(x)=∫1xdtt.L(x) = \int_1^x \frac{dt}{t}.
  • (a) Show that LL is differentiable on (0,∞)(0, \infty) with L′(x)=1/x,L'(x) = 1/x\mathclose{\text{,}} and that L(1)=0.L(1) = 0\mathclose{\text{.}}
  • (b) Fix y>0.y > 0\mathclose{\text{.}} Show that the functions x↦L(xy)x \mapsto L(xy) and x↦L(x)+L(y)x \mapsto L(x) + L(y) have the same derivative on (0,∞),(0, \infty)\mathclose{\text{,}} and deduce that L(xy)=L(x)+L(y)L(xy) = L(x) + L(y) for all x,y>0.x, y > 0\mathclose{\text{.}}
  • (c) Deduce that L(1/x)=−L(x),L(1/x) = -L(x)\mathclose{\text{,}} and that L(xn)=nL(x)L(x^n) = nL(x) for every positive integer n.n\mathclose{\text{.}}
  • (d) Show that L(2)≥12,L(2) \ge \tfrac12\mathclose{\text{,}} and deduce that L(x)→∞L(x) \to \infty as x→∞.x \to \infty\mathclose{\text{.}}
Show solution✓ Checked

(a) 1/t1/t is continuous on the open interval (0,∞),(0, \infty)\mathclose{\text{,}} which contains 1. By Part 1, in the form for open intervals, LL is differentiable at every x>0,x > 0\mathclose{\text{,}} with L′(x)=1/x.L'(x) = 1/x\mathclose{\text{.}} And L(1)=∫11dtt=0.L(1) = \int_1^1 \frac{dt}{t} = 0\mathclose{\text{.}}

(b) By the chain rule, ddxL(xy)=L′(xy)⋅y=yxy=1x.\dfrac{d}{dx}L(xy) = L'(xy)\cdot y = \dfrac{y}{xy} = \dfrac1x\mathclose{\text{.}} And ddx(L(x)+L(y))=1x+0,\dfrac{d}{dx}\big(L(x) + L(y)\big) = \dfrac1x + 0\mathclose{\text{,}} since L(y)L(y) does not depend on x.x\mathclose{\text{.}} The two functions have the same derivative on the interval (0,∞),(0, \infty)\mathclose{\text{,}} so by Module 8 they differ by a constant: L(xy)=L(x)+L(y)+CL(xy) = L(x) + L(y) + C for every x>0.x > 0\mathclose{\text{.}} At x=1x = 1 this says L(y)=0+L(y)+C,L(y) = 0 + L(y) + C\mathclose{\text{,}} so C=0.C = 0\mathclose{\text{.}}

(c) By (b), L(x)+L(1/x)=L(x⋅1x)=L(1)=0,L(x) + L(1/x) = L\big(x\cdot\tfrac1x\big) = L(1) = 0\mathclose{\text{,}} so L(1/x)=−L(x).L(1/x) = -L(x)\mathclose{\text{.}} For powers use induction: L(x1)=1⋅L(x),L(x^1) = 1\cdot L(x)\mathclose{\text{,}} and if L(xn)=nL(x),L(x^n) = nL(x)\mathclose{\text{,}} then L(xn+1)=L(xn⋅x)=nL(x)+L(x)=(n+1)L(x).L(x^{n+1}) = L(x^n\cdot x) = nL(x) + L(x) = (n + 1)L(x)\mathclose{\text{.}}

(d) For 1≤t≤2,1 \le t \le 2\mathclose{\text{,}} 1t≥12,\dfrac1t \ge \dfrac12\mathclose{\text{,}} so by the bounds property of integrals, L(2)≥12(2−1)=12.L(2) \ge \tfrac12(2 - 1) = \tfrac12\mathclose{\text{.}} By (c), L(2n)=nL(2)≥n2.L(2^n) = nL(2) \ge \tfrac{n}{2}\mathclose{\text{.}} Since L′=1/x>0,L' = 1/x > 0\mathclose{\text{,}} LL is increasing (Module 8), so L(x)≥n2L(x) \ge \tfrac{n}{2} for every x≥2n.x \ge 2^n\mathclose{\text{.}} Given any number M,M\mathclose{\text{,}} take n>2M:n > 2M\mathclose{\text{:}} then L(x)>ML(x) > M for all x≥2n.x \ge 2^n\mathclose{\text{.}} So L(x)→∞.L(x) \to \infty\mathclose{\text{.}}

These are the properties of ln⁡,\ln\mathclose{\text{,}} and indeed L=ln⁡:L = \ln\mathclose{\text{:}} both have derivative 1/x1/x on (0,∞)(0, \infty) and the value 0 at 1. Some books start here and define ln⁡x\ln x as this integral.

Exercise 10.11★★★Periodic functions

Let ff be continuous on R\R and periodic with period p>0:p > 0\mathclose{\text{:}} f(x+p)=f(x)f(x + p) = f(x) for every x.x\mathclose{\text{.}}

  • (a) Show that I(a)=∫aa+pf(x) dxI(a) = \displaystyle\int_a^{a + p} f(x)\,dx has the same value for every a.a\mathclose{\text{.}} (Differentiate with respect to a.)a\mathclose{\text{.)}}
  • (b) Deduce that ∫0npf(x) dx=n∫0pf(x) dx\displaystyle\int_0^{np} f(x)\,dx = n\int_0^p f(x)\,dx for every positive integer n.n\mathclose{\text{.}}
  • (c) Use (a) to evaluate ∫11+π∣sin⁡x∣ dx,\displaystyle\int_1^{1 + \pi} \abs{\sin x}\,dx\mathclose{\text{,}} and check the answer by splitting the interval where sin⁡x\sin x changes sign.
Show solution✓ Checked

(a) By the splitting property, I(a)=∫0a+pf(x) dx−∫0af(x) dx.I(a) = \int_0^{a + p} f(x)\,dx - \int_0^a f(x)\,dx\mathclose{\text{.}} By Theorem 10.3, with u(a)=a+p,u(a) = a + p\mathclose{\text{,}}

I′(a)=f(a+p)⋅1−f(a)=0,I'(a) = f(a + p)\cdot 1 - f(a) = 0,

by periodicity. A function with derivative 0 on the interval R\R is constant (Module 8), so I(a)=I(0)I(a) = I(0) for every a.a\mathclose{\text{.}}

(b) Split [0,np][0, np] into the nn intervals [kp,(k+1)p],[kp, (k + 1)p]\mathclose{\text{,}} for k=0,1,…,n−1:k = 0, 1, \dots, n - 1\mathclose{\text{:}}

∫0npf(x) dx=∑k=0n−1I(kp)=n I(0)=n∫0pf(x) dx.\begin{aligned} \int_0^{np} f(x)\,dx &= \sum_{k=0}^{n-1} I(kp) = n\,I(0) \\ &= n\int_0^p f(x)\,dx. \end{aligned}

(c) ∣sin⁡x∣\abs{\sin x} is continuous, and periodic with period π,\pi\mathclose{\text{,}} since ∣sin⁡(x+π)∣=∣−sin⁡x∣=∣sin⁡x∣.\abs{\sin(x + \pi)} = \abs{-\sin x} = \abs{\sin x}\mathclose{\text{.}} By (a),

∫11+π∣sin⁡x∣ dx=∫0π∣sin⁡x∣ dx=∫0πsin⁡x dx=2.\begin{aligned} \int_1^{1 + \pi} \abs{\sin x}\,dx &= \int_0^\pi \abs{\sin x}\,dx \\ &= \int_0^\pi \sin x\,dx = 2. \end{aligned}

Check: sin⁡x>0\sin x > 0 on (1,π)(1, \pi) and sin⁡x<0\sin x < 0 on (π,1+π),(\pi, 1 + \pi)\mathclose{\text{,}} so the integral is

∫1πsin⁡x dx−∫π1+πsin⁡x dx=(1+cos⁡1)+(1−cos⁡1)=2.\begin{aligned} &\int_1^\pi \sin x\,dx - \int_\pi^{1 + \pi} \sin x\,dx \\ &\quad= (1 + \cos 1) + (1 - \cos 1) = 2. \end{aligned}
Exercise 10.12★★★Sine squared by symmetry
  • (a) Use the substitution u=π2−xu = \dfrac{\pi}{2} - x to show that ∫0π/2sin⁡nx dx=∫0π/2cos⁡nx dx\displaystyle\int_0^{\pi/2} \sin^n x\,dx = \int_0^{\pi/2} \cos^n x\,dx for every positive integer n.n\mathclose{\text{.}}
  • (b) Deduce, with sin⁡2x+cos⁡2x=1,\sin^2 x + \cos^2 x = 1\mathclose{\text{,}} that ∫0π/2sin⁡2x dx=π4.\displaystyle\int_0^{\pi/2} \sin^2 x\,dx = \frac{\pi}{4}\mathclose{\text{.}}
  • (c) Find ∫0πsin⁡2x dx\displaystyle\int_0^\pi \sin^2 x\,dx and the average value of sin⁡2x\sin^2 x over [0,π].[0, \pi]\mathclose{\text{.}}
Show solution✓ Checked

(a) With u=π2−x,u = \dfrac{\pi}{2} - x\mathclose{\text{,}} du=−dx;du = -dx\mathclose{\text{;}} x=0x = 0 gives u=π2u = \dfrac{\pi}{2} and x=π2x = \dfrac{\pi}{2} gives u=0.u = 0\mathclose{\text{.}} By the addition formula of Module 1, sin⁡(π2−u)=sin⁡π2cos⁡u−cos⁡π2sin⁡u=cos⁡u.\sin\Big(\dfrac{\pi}{2} - u\Big) = \sin\dfrac{\pi}{2}\cos u - \cos\dfrac{\pi}{2}\sin u = \cos u\mathclose{\text{.}} So by Theorem 10.7

∫0π/2sin⁡nx dx=∫π/20cos⁡nu (−du)=∫0π/2cos⁡nu du.\begin{aligned} \int_0^{\pi/2} \sin^n x\,dx &= \int_{\pi/2}^0 \cos^n u\,(-du) \\ &= \int_0^{\pi/2} \cos^n u\,du. \end{aligned}

(b) Let S=∫0π/2sin⁡2x dx.S = \int_0^{\pi/2} \sin^2 x\,dx\mathclose{\text{.}} By (a), ∫0π/2cos⁡2x dx=S\int_0^{\pi/2} \cos^2 x\,dx = S too. Adding,

2S=∫0π/2(sin⁡2x+cos⁡2x) dx=∫0π/21 dx=π2,\begin{aligned} 2S &= \int_0^{\pi/2} \big(\sin^2 x + \cos^2 x\big)\,dx \\ &= \int_0^{\pi/2} 1\,dx = \frac{\pi}{2}, \end{aligned}

so S=π4.S = \dfrac{\pi}{4}\mathclose{\text{.}} No antiderivative of sin⁡2x\sin^2 x was needed.

(c) On [π2,π][\tfrac{\pi}{2}, \pi] substitute u=π−x:u = \pi - x\mathclose{\text{:}} since sin⁡(π−u)=sin⁡u,\sin(\pi - u) = \sin u\mathclose{\text{,}} ∫π/2πsin⁡2x dx=∫0π/2sin⁡2u du=π4.\int_{\pi/2}^\pi \sin^2 x\,dx = \int_0^{\pi/2} \sin^2 u\,du = \dfrac{\pi}{4}\mathclose{\text{.}} So ∫0πsin⁡2x dx=π2,\int_0^\pi \sin^2 x\,dx = \dfrac{\pi}{2}\mathclose{\text{,}} and the average value is 1π⋅π2=12.\dfrac{1}{\pi}\cdot\dfrac{\pi}{2} = \dfrac12\mathclose{\text{.}} This is why an alternating voltage V0sin⁡ωtV_0\sin\omega t delivers, on average, the power of a steady voltage V0/2:V_0/\sqrt2\mathclose{\text{:}} power is proportional to the square of the voltage, and the average of sin⁡2\sin^2 over a half period is 12.\tfrac12\mathclose{\text{.}}

11

Check yourself

1
Which function is an antiderivative of 1x2\dfrac{1}{x^2} on (0,∞)?(0, \infty)\mathclose{\text{?}}
2
Let ff be continuous on R\R and A(x)=∫2xf(t) dt.A(x) = \displaystyle\int_2^x f(t)\,dt\mathclose{\text{.}} Then A′(x)A'(x) is
3
ddx∫0x3cos⁡t dt\dfrac{d}{dx}\displaystyle\int_0^{x^3} \cos t\,dt equals
4
∫133x2 dx\displaystyle\int_1^3 3x^2\,dx equals
5
A particle moves along a line with velocity v(t)=t−2v(t) = t - 2 metres per second for 0≤t≤4.0 \le t \le 4\mathclose{\text{.}} How far does it travel?
6
With u=x2+1,u = x^2 + 1\mathclose{\text{,}} the integral ∫01x(x2+1)3 dx\displaystyle\int_0^1 x(x^2 + 1)^3\,dx becomes
7
Integrating sin⁡xcos⁡x\sin x\cos x with u=cos⁡x,u = \cos x\mathclose{\text{,}} you get −12cos⁡2x+C;-\tfrac12\cos^2 x + C\mathclose{\text{;}} SymPy prints sin(x)**2/2. Which is true?
8
∫−11(x3+3x2) dx\displaystyle\int_{-1}^1 (x^3 + 3x^2)\,dx equals
Finished this module?