Evaluation Of Definite Integrals By Substitution

There are two ways to use a substitution in a definite integral: evaluate the indefinite integral first and convert back to x , or change the variable and the limits at the same time and never return to x at all.

FormulaNameNotes
\displaystyle\int_{a}^{b}f\!\left(g(x)\right)g'(x)\,dx=\int_{g(a)}^{g(b)}f(u)\,duSubstitution in Definite Integralsg' continuous on [ a , b ] , f continuous on the range of g
u=g(x),\quad du=g'(x)\,dxThe SubstitutionThe engine of both methods
a b f ( x ) d x = [ f ( x ) d x ] a b Method (a)Return to x , then use the original limits
New limits: u = g ( a ) and u = g ( b ) Method (b)Never return to x
g need not be one-to-oneScope of the TheoremIncreasing and decreasing stretches balance out

In the previous chapter, we learned the substitution rule for indefinite integrals. In summary, if we have an indefinite integral of the form

\int f\!\left(g(x)\right)g'(x)\,dx,

we make the substitution

u=g(x),\qquad du=g'(x)\,dx,

and transform the integral into

\int f(\underbrace{g(x)}_{u})\underbrace{g'(x)\,dx}_{du}=\int f(u)\,du.

In this section, we learn how to evaluate a definite integral of the form

\int_{a}^{b}f\!\left(g(x)\right)g'(x)\,dx

by substitution.

A Motivating Example

Suppose that we want to evaluate

1 e ln x x d x .

It follows from the second part of the Fundamental Theorem of Calculus that

1 e ln x x d x = [ ln x x d x ] 1 e .

To evaluate the indefinite integral ln x x d x , we make the substitution

u = ln x , d u = 1 x d x ,

which converts the indefinite integral to

\begin{aligned} \int\overbrace{\ln x}^{u}\overbrace{\frac{1}{x}\,dx}^{du} &=\int u\,du\\ &=\frac{1}{2}u^{2}+C\\ &=\frac{1}{2}(\ln x)^{2}+C. \end{aligned}

Therefore

\begin{aligned} \int_{1}^{e}\frac{\ln x}{x}\,dx &=\left[\int\frac{\ln x}{x}\,dx\right]_{1}^{e}\\ &=\left[\frac{1}{2}(\ln x)^{2}\right]_{1}^{e}\\ &=\frac{1}{2}\left[(\ln e)^{2}-(\ln1)^{2}\right]=\frac{1}{2}\left[1^{2}-0^{2}\right]\\ &=\frac{1}{2}. \end{aligned}

When integrating by the substitution of a new variable (u in the above example), it is sometimes rather troublesome to express the result in terms of the original variable (x in the above example). We may avoid the process of restoring the original variable if we change the limits of integration to correspond with the new variable.

In the above example, the lower limit of integration is x = 1 , so in terms of u the lower limit becomes u = ln 1 = 0 . The upper limit is x = e , so in terms of u the upper limit becomes u = ln e = 1 . Therefore,

1 e ln x x d x = 0 1 u d u = [ 1 2 u 2 ] 0 1 = 1 2 ,

and we get the same result as before.

Geometrically, the equation

1 e ln x x d x = 0 1 u d u

means that the two different regions shown below have the same area. This is worth dwelling on: substitution does not preserve the shape of the region, only its area.

Two differently shaped shaded regions, one under the curve ln x over x and one under the line u, each of area one half
The area of each shaded region is 1 / 2 .

The Two Methods

There are two methods to evaluate a definite integral by substitution:

  1. First find the corresponding indefinite integral by substitution, express the answer in terms of the original variable, and then apply the second part of the Fundamental Theorem of Calculus with the original limits.
  2. Use a substitution directly in the definite integral, changing both the variable and the limits of integration in one step, as stated in the following theorem.


Substitution in Definite Integrals. If the function u = g ( x ) has a continuous derivative on the interval [ a , b ] and f is continuous on the range of g , then

\int_{a}^{b}f\!\left(g(x)\right)g'(x)\,dx=\int_{u=g(a)}^{u=g(b)}f(u)\,du.\qquad\left(u=g(x)\right)
Proof

Let F be an antiderivative of f . Then it follows from the Chain Rule that

\begin{aligned} \frac{d}{dx}F\!\left(g(x)\right) &=F'\!\left(g(x)\right)g'(x)\\ &=f\!\left(g(x)\right)g'(x); \end{aligned}

that is, F ( g ( x ) ) is an antiderivative of f\!\left(g(x)\right)g'(x). Therefore, by the second part of the Fundamental Theorem of Calculus,

\begin{aligned} \int_{a}^{b}f\!\left(g(x)\right)g'(x)\,dx &=F\!\left(g(x)\right)\bigg]_{x=a}^{x=b}\\ &=F\!\left(g(b)\right)-F\!\left(g(a)\right)\\ &=F(u)\bigg]_{u=g(a)}^{u=g(b)}\\ &=\int_{g(a)}^{g(b)}f(u)\,du. \end{aligned}

The single most common mistake is changing the variable but forgetting to change the limits. If the integral is written in terms of u , then the numbers on the integral sign must be u -values, not x -values.

Worked Examples

Evaluate

0 3 x 1 + x d x .
Solution

Method (a). An appropriate substitution is u = 1 + x , or x = u 1 . Then

d u = d x

and

\begin{aligned} \int\overbrace{x}^{u-1}\overbrace{\sqrt{1+x}}^{\sqrt{u}}\ \overbrace{dx}^{du} &=\int(u-1)\sqrt{u}\,du\\ &=\int\left(u^{3/2}-u^{1/2}\right)du\\ &=\frac{2}{5}u^{5/2}-\frac{2}{3}u^{3/2}\\ &=\frac{2}{5}(1+x)^{5/2}-\frac{2}{3}(1+x)^{3/2}. \end{aligned}

Therefore, using the original limits,

\begin{aligned} \int_{0}^{3}x\sqrt{1+x}\,dx &=\left[\frac{2}{5}(1+x)^{5/2}-\frac{2}{3}(1+x)^{3/2}\right]_{x=0}^{x=3}\\ &=\frac{2}{5}\left(4^{5/2}\right)-\frac{2}{3}\left(4^{3/2}\right)-\frac{2}{5}+\frac{2}{3}\\ &=\frac{64}{5}-\frac{16}{3}-\frac{2}{5}+\frac{2}{3}\\ &=\frac{116}{15}. \end{aligned}

Method (b). Change the variable of integration to u = 1 + x and the limits of integration to correspond with u simultaneously:

  • The lower limit: when x = 0 , u = 1 + 0 = 1 .
  • The upper limit: when x = 3 , u = 1 + 3 = 4 .

Therefore

\begin{aligned} \int_{0}^{3}x\sqrt{1+x}\,dx &=\int_{1}^{4}(u-1)\sqrt{u}\,du\\ &=\left[\frac{2}{5}u^{5/2}-\frac{2}{3}u^{3/2}\right]_{u=1}^{u=4}\\ &=\left(\frac{2}{5}\left(\sqrt{4}\right)^{5}-\frac{2}{3}\left(\sqrt{4}\right)^{3}\right)-\left(\frac{2}{5}(1)-\frac{2}{3}(1)\right)\\ &=\frac{116}{15}. \end{aligned}

The previous example was solved by two different methods. In method (a), the indefinite integral is evaluated using the Substitution Rule, and then the original limits are used. In method (b), the transformed definite integral with transformed limits is evaluated using the theorem above. There is no general rule to say which method is easier.

Evaluate 0 π / 2 cos x 1 + sin 2 x d x .

Solution

Method (a). Because both sin x and its derivative cos x appear in the integrand, we try the substitution u = sin x . So

u = sin x     d u = cos x d x

and

\begin{aligned} \int\frac{\overbrace{\cos x\,dx}^{du}}{1+\underbrace{\sin^{2}x}_{u^{2}}} &=\int\frac{du}{1+u^{2}}\\ &=\arctan u+C\\ &=\arctan(\sin x)+C. &&{\small(u=\sin x)} \end{aligned}

Therefore,

\begin{aligned} \int_{0}^{\pi/2}\frac{\cos x}{1+\sin^{2}x}\,dx &=\arctan(\sin x)\bigg]_{x=0}^{x=\pi/2}\\ &=\arctan\Big(\underbrace{\sin\frac{\pi}{2}}_{1}\Big)-\arctan(\sin0)\\ &=\frac{\pi}{4}. \end{aligned}

Method (b). Change both the variable and the limits of integration:

u = sin x , d u = cos x d x .
  • The lower limit: when x = 0 , u = sin 0 = 0 .
  • The upper limit: when x = π 2 , u = sin π 2 = 1 .

Therefore

\begin{aligned} \int_{0}^{\pi/2}\frac{\cos x}{1+\sin^{2}x}\,dx &=\int_{0}^{1}\frac{du}{1+u^{2}}\\ &=\arctan u\bigg]_{u=0}^{u=1}\\ &=\arctan1-\arctan0\\ &=\frac{\pi}{4}-0=\frac{\pi}{4}. \end{aligned}

Evaluate 0 5 x x 2 + 2 3 d x .

Solution

Method (a). Let

u = x 2 + 2 , d u = 2 x d x .

Then

\begin{aligned} \int\frac{x}{\sqrt[3]{x^{2}+2}}\,dx &=\int\frac{1}{\sqrt[3]{u}}\overbrace{\frac{du}{2}}^{x\,dx}=\frac{1}{2}\int u^{-1/3}\,du\\ &=\frac{1}{2}\times\frac{3}{2}u^{2/3}\\ &=\frac{3}{4}\left(x^{2}+2\right)^{2/3}+C. &&{\small(u=x^{2}+2)} \end{aligned}

Therefore,

\begin{aligned} \int_{0}^{5}\frac{x}{\sqrt[3]{x^{2}+2}}\,dx &=\frac{3}{4}\left(x^{2}+2\right)^{2/3}\bigg]_{0}^{5}\\ &=\frac{3}{4}\left(27^{2/3}-2^{2/3}\right)=\frac{3}{4}\left(9-\sqrt[3]{4}\right). \end{aligned}

Method (b). With the same substitution, the lower and upper limits become: when x = 0 , u = 2 ; and when x = 5 , u = 27 . Therefore,

\begin{aligned} \int_{0}^{5}\frac{x}{\sqrt[3]{x^{2}+2}}\,dx &=\frac{1}{2}\int_{2}^{27}u^{-1/3}\,du\\ &=\frac{1}{2}\times\frac{3}{2}u^{2/3}\bigg]_{2}^{27}\\ &=\frac{3}{4}\left(27^{2/3}-2^{2/3}\right)\\ &=\frac{3}{4}\left(9-\sqrt[3]{4}\right). \end{aligned}

Evaluate

0 3 x 2 5 x + 1 d x .
Solution

Let u = 5 x + 1 , or x = u 1 5 . Then

d x = 1 5 d u .
  • The lower limit: when x = 0 , u = 5 ( 0 ) + 1 = 1 .
  • The upper limit: when x = 3 , u = 5 ( 3 ) + 1 = 16 .

Therefore,

\begin{aligned} \int_{0}^{3}\frac{x-2}{\sqrt{5x+1}}\,dx &=\int_{1}^{16}\frac{\frac{u-1}{5}-2}{\sqrt{u}}\underbrace{\frac{du}{5}}_{dx}\\ &=\frac{1}{25}\int_{1}^{16}\frac{u-11}{\sqrt{u}}\,du\\ &=\frac{1}{25}\int_{1}^{16}\left(u^{1/2}-11u^{-1/2}\right)du\\ &=\frac{1}{25}\left[\frac{2}{3}u^{3/2}-22u^{1/2}\right]_{1}^{16}\\ &=\frac{1}{25}\left[\left(\frac{2}{3}\left(4^{3}\right)-22(4)\right)-\left(\frac{2}{3}-22\right)\right]\\ &=-\frac{24}{25}. \end{aligned}

A different substitution. Another substitution that also works is u = 5 x + 1 , that is,

u 2 = 5 x + 1.

Taking the differential of each side we get

2 u d u = 5 d x or d x = 2 5 u d u .

The numerator can be written in terms of u as

x 2 = 1 5 ( u 2 1 ) 2 = u 2 11 5 .

The upper and lower limits in terms of u are

x = 3     u = 5 ( 3 ) + 1 = 4 , x = 0     u = 5 ( 0 ) + 1 = 1.

Therefore

\begin{aligned} \int_{0}^{3}\frac{x-2}{\sqrt{5x+1}}\,dx &=\int_{1}^{4}\frac{u^{2}-11}{5u}\left(\frac{2}{5}u\,du\right)\\ &=\frac{2}{25}\int_{1}^{4}\left(u^{2}-11\right)du\\ &=\frac{2}{25}\left[\frac{1}{3}u^{3}-11u\right]_{u=1}^{u=4}\\ &=\frac{2}{25}\left[\left(\frac{1}{3}\left(4^{3}\right)-11(4)\right)-\left(\frac{1}{3}\left(1^{3}\right)-11(1)\right)\right]\\ &=-\frac{24}{25}. \end{aligned}

The second substitution is slightly cleaner because it removes the radical entirely rather than leaving powers of u behind.

When evaluating a definite integral by substitution, it is entirely possible for the new upper limit to be smaller than the new lower limit. Do not "fix" this by swapping them; the reversal rule already accounts for the sign.

Evaluate 0 1 x 1 x 2 d x .

Solution

Let u = 1 x 2 . Then

d u = 2 x d x or x d x = 1 2 d u .
  • The lower limit: when x = 0 , u = 1 .
  • The upper limit: when x = 1 , u = 0 .

The new upper limit, 0, is smaller than the new lower limit, 1. That is fine. Therefore,

\begin{aligned} \int_{0}^{1}\frac{x}{\sqrt{1-x^{2}}}\,dx &=\int_{1}^{0}\frac{\overbrace{-\frac{1}{2}\,du}^{x\,dx}}{\sqrt{u}}\\ &=-\frac{1}{2}\int_{1}^{0}u^{-1/2}\,du\\ &=-\frac{1}{2}\times2u^{1/2}\bigg]_{1}^{0}\\ &=-(0-1)=1. \end{aligned}

The original variable of integration is not always x , and we do not have to call the new variable u .

Evaluate 0 16 z 4 1 + z d z .

Solution

To get rid of the roots, we let

t = z 4 , or z = t 4 .

Taking the differential of each side, we obtain

d z = 4 t 3 d t .

When z = 0 , t = 0 4 = 0 , and when z = 16 , t = 16 4 = 2 . Therefore,

\begin{aligned} \int_{0}^{16}\frac{\sqrt[4]{z}}{1+\sqrt{z}}\,dz &=\int_{0}^{2}\frac{t}{1+\sqrt{t^{4}}}\overbrace{4t^{3}\,dt}^{dz}\\ &=4\int_{0}^{2}\frac{t^{4}}{1+t^{2}}\,dt\\ &=4\int_{0}^{2}\frac{t^{4}-1+1}{1+t^{2}}\,dt\\ &=4\int_{0}^{2}\left[\frac{\left(t^{2}-1\right)\left(t^{2}+1\right)}{1+t^{2}}+\frac{1}{1+t^{2}}\right]dt\\ &=4\int_{0}^{2}\left[t^{2}-1+\frac{1}{1+t^{2}}\right]dt\\ &=4\left[\frac{t^{3}}{3}-t+\arctan t\right]_{0}^{2}\\ &=\frac{4}{3}\times8-4\times2+4\arctan2\\ &=\frac{8}{3}+4\arctan2. \end{aligned}

The trick of writing t 4 = t 4 1 + 1 turned an improper-looking rational function into a polynomial plus a recognizable arctangent form.

Evaluate 0 2 r 3 r 2 + 8 3 d r .

Solution

To get rid of the cube root, let u 3 = r 2 + 8 . Taking the differential of each side of this substitution, we obtain

3 u 2 d u = 2 r d r .
  • The lower limit: when r = 0 , u 3 = 8 , so u = 2 .
  • The upper limit: when r = 2 , u 3 = 12 , so u = 12 3 .

Writing r 3 d r = r 2 r d r so that the factor r d r matches the differential,

\begin{aligned} \int_{0}^{2}\frac{r^{2}}{\sqrt[3]{r^{2}+8}}\,r\,dr &=\int_{2}^{\sqrt[3]{12}}\frac{\overbrace{u^{3}-8}^{r^{2}}}{\underbrace{u}_{\sqrt[3]{r^{2}+8}}}\overbrace{\frac{3}{2}u^{2}\,du}^{r\,dr}\\ &=\frac{3}{2}\int_{2}^{\sqrt[3]{12}}\left(u^{4}-8u\right)du &&{\small(\text{simplify})}\\ &=\frac{3}{2}\left[\frac{1}{5}u^{5}-4u^{2}\right]_{2}^{\sqrt[3]{12}}\\ &=\frac{3}{10}\left[u^{2}\left(u^{3}-20\right)\right]_{2}^{\sqrt[3]{12}}\\ &=\frac{3}{10}\left(12^{2/3}(12-20)-4(8-20)\right)\\ &=\frac{3}{10}\left(48-8\times12^{2/3}\right)\\ &=\frac{3}{10}\left(48-16\times2^{1/3}\times3^{2/3}\right). \end{aligned}

A different substitution. Another substitution that also works is u = r 2 + 8 :

u = r 2 + 8 d u = 2 r d r .
  • The lower limit: when r = 0 , u = 8 .
  • The upper limit: when r = 2 , u = 12 .
\begin{aligned} \int_{0}^{2}\frac{r^{2}}{\sqrt[3]{r^{2}+8}}\,r\,dr &=\int_{8}^{12}\frac{u-8}{u^{1/3}}\cdot\frac{1}{2}\,du\\ &=\frac{1}{2}\int_{8}^{12}\left(u^{2/3}-8u^{-1/3}\right)du\\ &=\frac{1}{2}\left[\frac{3}{5}u^{5/3}-12u^{2/3}\right]_{8}^{12}\\ &=\frac{3}{10}\left[u^{2/3}(u-20)\right]_{8}^{12}\\ &=\frac{3}{10}\left(12^{2/3}\times(-8)-4\times(-12)\right)\\ &=\frac{3}{10}\left(48-16\times2^{1/3}\times3^{2/3}\right). \end{aligned}

Both substitutions land on the same answer, as they must.

Geometric Interpretation

So far, we have learned that the substitution rule for definite integrals is

\int_{a}^{b}f\!\left(g(x)\right)g'(x)\,dx=\int_{g(a)}^{g(b)}f(u)\,du. \tag{i}

Instead of thinking of this rule as an algebraic consequence of the Chain Rule, let us see what it means geometrically.

For convenience, assume that:

  • a < b ,
  • f ( x ) > 0 , and
  • g is an increasing function; that is, g'(x)>0.

Let us represent g with a separate domain and range. The function g maps the interval [ a , b ] on the x -axis to the interval [ g ( a ) , g ( b ) ] on the u -axis. Now let us subdivide the interval [ a , b ] by a = x 0 , x 1 , , x n = b . The images of the points x 0 , , x n under g are

u 0 = g ( x 0 ) ,   u 1 = g ( x 1 ) ,   ,   u n = g ( x n )

on the u -axis. Specifically, the image of the subinterval [ x i 1 , x i ] under g is the subinterval [ g ( x i 1 ) , g ( x i ) ] .

The function g mapping a subdivided interval on the x-axis to an unevenly subdivided interval on the u-axis
g maps the subdivision of [ a , b ] to a subdivision of [ g ( a ) , g ( b ) ] .

Even if the division points x 0 , , x n are equally spaced, those image subintervals on the u -axis will not all have the same width. In fact, the width of [ u , u + Δ u ] is approximately g'(x) times the width of [ x , x + Δ x ] , because by linear approximation

\Delta u\approx g'(x)\,\Delta x.

The approximation becomes an equality, and \Delta u\to du=g'(x)\,dx, as Δ x = d x 0 . If g'(x)>1, then the image of each subinterval on the x -axis is stretched on the u -axis; if 0, the image of each subinterval is compressed on the u -axis.

Linear approximation showing delta u approximately equal to g prime of x times delta x
Linear approximation relates the widths: \Delta u\approx g'(x)\Delta x.

Now let us compare the graphs of f g and f . Notice that the value of f g at x i is the same as the value of f at u i :

\begin{aligned} f\circ g(x_{i}) &=f\!\left(g(x_{i})\right)\\ &=f(u_{i}). &&{\small(u_{i}=g(x_{i}))} \end{aligned}
Side by side graphs of f composed with g and of f showing equal heights at corresponding points
The graphs of f g and f have equal heights at corresponding points.

Therefore, the rectangle with corners ( x i , 0 ) , ( x i + Δ x , 0 ) , ( x i , f g ( x i ) ) and ( x i + Δ x , f g ( x i ) ) under the graph of f g , and the rectangle with corners ( u i , 0 ) , ( u i + Δ u , 0 ) , ( u i , f ( u i ) ) and ( u i + Δ u , f ( u i ) ) under the graph of f , have the same height, but the width of the second one is approximately g'(x_{i})\Delta x. So if we multiply the height of the first rectangle by g'(x_{i}), then both rectangles have the same area.

Two rectangles of equal area, one taller and narrower than the other, related by the factor g prime
Multiplying the height by g'(x_{i}) compensates for the change in width.

In other words, the role of g'(x) in the formula

\int_{a}^{b}f\!\left(g(x)\right)g'(x)\,dx=\int_{g(a)}^{g(b)}f(u)\,du

is to cancel the change in the width by an opposite change in the height, so that the net signed areas remain the same.

Three shaded regions of equal net area illustrating the substitution rule
The factor g'(x) keeps the net signed area unchanged.

A Concrete Illustration

Let f ( u ) = 1.5 for 0 u 4 and u = g ( x ) = x 2 . Then g maps the interval [ 0 , 2 ] to [ 0 , 4 ] . Because f is a constant function,

0 4 f ( u ) d u = 1.5 × 4 = 6

and

0 2 f ( g ( x ) ) d x = 1.5 × 2 = 3.
Graphs of f of u, of f composed with g, and of f composed with g times g prime for the constant function example
The graphs of f ( u ) , f g ( x ) , and (f\circ g)(x)g'(x).

The two numbers differ, and the missing factor is exactly g'. We notice that g'(x)=2x and

0\leq g'(x)\leq1\qquad\text{when }0\leq x\leq\frac{1}{2}.

The function g maps the interval [ 0 , 1 2 ] on the x -axis to the smaller interval [ 0 , 1 4 ] on the u -axis. In fact, g maps any subinterval of [ 0 , 1 2 ] to a smaller interval, because by the Mean Value Theorem

|u_{2}-u_{1}|=\left|g(x_{2})-g(x_{1})\right|=\underbrace{\left|g'(c)\right|}_{\leq1}\left|x_{2}-x_{1}\right|\leq\left|x_{2}-x_{1}\right|

for every x 1 , x 2 [ 0 , 1 2 ] and some c between x 1 and x 2 . The area under the graph of f g on [ 0 , 1 2 ] is twice the area under the graph of f on [ 0 , 1 4 ] . If we multiply f g by g'(x)=2x, then the graph of (f\circ g)g' is a straight line whose area on [ 0 , 1 2 ] is exactly the same as the area under the graph of f on [ 0 , 1 4 ] .

On the other hand, because

1\frac{1}{2},

for every x 1 , x 2 in [ 1 2 , 2 ] the image of [ x 1 , x 2 ] under g is a larger interval [ g ( x 1 ) , g ( x 2 ) ] :

|u_{2}-u_{1}|=\left|g(x_{2})-g(x_{1})\right|=\underbrace{\left|g'(c^{*})\right|}_{>1}\left|x_{2}-x_{1}\right|\geq\left|x_{2}-x_{1}\right|.

Therefore, the area under the graph of f g on [ x 1 , x 2 ] is less than the area under the graph of f on [ g ( x 1 ) , g ( x 2 ) ] . Again, multiplying f g by g'(x) makes the area under (f\circ g)g' on [ x 1 , x 2 ] equal to the area under f on [ g ( x 1 ) , g ( x 2 ) ] .

If g is a decreasing function, then g'(x)<0 and g ( b ) < g ( a ) . So if f is positive, both sides of Equation (i) are negative: the left-hand side because \underbrace{f\!\left(g(x)\right)}_{>0}\underbrace{g'(x)}_{<0}<0, and the right-hand side because g ( a ) > g ( b ) and

g ( a ) g ( b ) f ( u ) d u = g ( b ) g ( a ) f ( u ) d u > 0 .

When g Is Not One-to-One

Note that in the substitution theorem, g does not have to be a one-to-one function. Let us see what happens if it is not, through an example. Suppose f ( u ) = 1 for 1 u 4 . Then

1 4 f ( u ) d u = 1 4 d u = 3.

Now consider g : [ 1 , 2 ] and h : [ 1 , 2 ] with

u = g ( x ) = h ( x ) = x 2 .
Graph of g of x equals x squared on the interval from negative 1 to 2, which is not one-to-one
Both g and h map the endpoints of their domains to u = 1 and u = 4 .
Graph of h of x equals x squared on the interval from 1 to 2, which is one-to-one
On [ 1 , 2 ] the same formula defines a one-to-one function h .

Notice that g ( 1 ) = h ( 1 ) = 1 and g ( 2 ) = h ( 2 ) = 4 . Unlike h , the function g is not one-to-one. If we integrate f\!\left(g(x)\right)g'(x) on the domain of g and f\!\left(h(x)\right)h'(x) on the domain of h , both integrals are equal to 1 4 f ( u ) d u :

\int_{-1}^{2}f\!\left(g(x)\right)g'(x)\,dx=\int_{-1}^{2}(1)(2x)\,dx=x^{2}\big|_{-1}^{2}=2^{2}-(-1)^{2}=3,\int_{1}^{2}f\!\left(h(x)\right)h'(x)\,dx=\int_{1}^{2}(1)(2x)\,dx=x^{2}\big|_{1}^{2}=2^{2}-1^{2}=3.

We notice that

Dom ( g ) = Dom ( h ) [ 1 , 1 ] ,

the function g is decreasing on [ 1 , 0 ] and increasing on [ 0 , 1 ] , and

\int_{-1}^{0}f\!\left(g(x)\right)g'(x)\,dx=-\int_{0}^{1}f\!\left(g(x)\right)g'(x)\,dx,\Rightarrow\ \int_{-1}^{1}f\!\left(g(x)\right)g'(x)\,dx=\int_{-1}^{0}f\!\left(g(x)\right)g'(x)\,dx+\int_{0}^{1}f\!\left(g(x)\right)g'(x)\,dx=0.

Therefore,

\int_{-1}^{2}f\!\left(g(x)\right)g'(x)\,dx=\overset{0}{\cancel{\int_{-1}^{1}f\!\left(g(x)\right)g'(x)\,dx}}+\underbrace{\int_{1}^{2}f\!\left(g(x)\right)g'(x)\,dx}_{g(x)=h(x)\text{ on }[1,2]}.

In general, if g is not one-to-one, then the value of the integral on the intervals where g is increasing and on the intervals where g is decreasing balance each other, so that the total value of the integral of f\!\left(g(x)\right)g'(x) on the entire interval [ a , b ] is still equal to g ( a ) g ( b ) f ( u ) d u .

Shaded regions on the interval from negative 1 to 0 and from 0 to 1 that cancel each other
\displaystyle\int_{0}^{1}f(g(x))g'(x)\,dx cancels \displaystyle\int_{-1}^{0}f(g(x))g'(x)\,dx. All of the shaded regions have the same net area.
Second view of the cancelling shaded regions under the transformed integrand
The same cancellation seen on the graph of (f\circ g)g'.
Third view showing the surviving region equal to the integral of f from 1 to 4
What survives is exactly 1 4 f ( u ) d u .

A Substitution That Requires Sign Tracking

The next example is a cautionary one. When the substitution is not one-to-one on the interval concerned, the new limits are not unique, and a radical such as 1 x 2 = | cos t | can change sign midway. Every valid choice gives the same answer, but only if the absolute value is respected.

Compute the integral

1 / 2 3 / 2 1 x 2 d x .
Solution

Apply the substitution x = sin t , so that

d x = cos t d t , 1 x 2 = | cos t | .

The sign of cos t depends on which interval we choose for t , and tracking it carefully is the central task of this example.

Finding the new limits. The limits satisfy x = sin t :

\begin{aligned} \sin t=\frac{1}{2} &\ \Longrightarrow\ t=\frac{\pi}{6}+2k\pi \ \text{ or }\ t=\frac{5\pi}{6}+2k\pi,\\ \sin t=\frac{\sqrt{3}}{2} &\ \Longrightarrow\ t=\frac{\pi}{3}+2k\pi \ \text{ or }\ t=\frac{2\pi}{3}+2k\pi, \end{aligned}

for k . The four possible pairs ( t 1 , t 2 ) are

( π 6 , π 3 ) , ( π 6 , 2 π 3 ) , ( 5 π 6 , π 3 ) , ( 5 π 6 , 2 π 3 ) .

Since the integrand 1 x 2 is continuous on [ 1 , 1 ] , all four pairs are valid. We must track the sign of cos t on each interval. On intervals that contain t = π 2 , the sign changes and we must split the integral there.

t x π/6 π/3 π/2 2π/3 5π/6 π 1/2 √3/2
The four values of t with sin t = 1 2 or sin t = 3 2 in [ 0 , π ] . The sign of cos t flips at t = π 2 .

Under the substitution the integrand becomes

1 x 2 d x = | cos t | cos t d t .

We use the antiderivative

cos 2 t d t = 1 + cos 2 t 2 d t = t 2 + sin 2 t 4 + C .

Case 1. t 1 = π 6 , t 2 = π 3 .

On [ π 6 , π 3 ] we have cos t > 0 , so | cos t | = cos t and the integrand is cos 2 t d t :

\begin{aligned} \int_{1/2}^{\sqrt{3}/2}\sqrt{1-x^{2}}\,dx &=\int_{\pi/6}^{\pi/3}\cos^{2}t\,dt\\ &=\left[\frac{t}{2}+\frac{\sin2t}{4}\right]_{\pi/6}^{\pi/3}\\ &=\left(\frac{\pi}{6}+\frac{\sin\frac{2\pi}{3}}{4}\right)-\left(\frac{\pi}{12}+\frac{\sin\frac{\pi}{3}}{4}\right). \end{aligned}

Since sin 2 π 3 = sin π 3 = 3 2 , the sine terms cancel:

= π 6 π 12 = π 12 .

Case 2. t 1 = 5 π 6 , t 2 = 2 π 3 .

Note that sin 5 π 6 = 1 2 and sin 2 π 3 = 3 2 , so the limits match the original integration direction. On the traversed interval [ 2 π 3 , 5 π 6 ] we have cos t < 0 , so | cos t | = cos t and the integrand is cos 2 t d t :

\begin{aligned} \int_{1/2}^{\sqrt{3}/2}\sqrt{1-x^{2}}\,dx &=\int_{5\pi/6}^{2\pi/3}\left(-\cos^{2}t\right)dt\\ &=\int_{2\pi/3}^{5\pi/6}\cos^{2}t\,dt &&{\small\left(\int_{a}^{b}f=-\int_{b}^{a}f\right)}\\ &=\left[\frac{t}{2}+\frac{\sin2t}{4}\right]_{2\pi/3}^{5\pi/6}\\ &=\left(\frac{5\pi}{12}+\frac{\sin\frac{5\pi}{3}}{4}\right)-\left(\frac{\pi}{3}+\frac{\sin\frac{4\pi}{3}}{4}\right). \end{aligned}

Since sin 5 π 3 = sin 4 π 3 = 3 2 , the sine terms cancel:

= 5 π 12 4 π 12 = π 12 .

Case 3. t 1 = π 6 , t 2 = 2 π 3 .

As t increases from π 6 to 2 π 3 , it crosses t = π 2 , where cos t changes sign:

cos t > 0    on    ( π 6 , π 2 ) , cos t < 0    on    ( π 2 , 2 π 3 ) .

We split at t = π 2 :

π / 6 2 π / 3 | cos t | cos t d t = π / 6 π / 2 cos 2 t d t π / 2 2 π / 3 cos 2 t d t .

First part ( cos t > 0 , so | cos t | = cos t ):

\begin{aligned} \int_{\pi/6}^{\pi/2}\cos^{2}t\,dt &=\left[\frac{t}{2}+\frac{\sin2t}{4}\right]_{\pi/6}^{\pi/2}\\ &=\left(\frac{\pi}{4}+0\right)-\left(\frac{\pi}{12}+\frac{\sqrt{3}}{8}\right)\\ &=\frac{\pi}{6}-\frac{\sqrt{3}}{8}. \end{aligned}

Second part ( cos t < 0 , so | cos t | = cos t ):

\begin{aligned} -\int_{\pi/2}^{2\pi/3}\cos^{2}t\,dt &=-\left[\frac{t}{2}+\frac{\sin2t}{4}\right]_{\pi/2}^{2\pi/3}\\ &=-\left[\left(\frac{\pi}{3}-\frac{\sqrt{3}}{8}\right)-\frac{\pi}{4}\right]\\ &=-\frac{\pi}{12}+\frac{\sqrt{3}}{8}. \end{aligned}

Adding:

( π 6 3 8 ) + ( π 12 + 3 8 ) = π 6 π 12 = π 12 .

Case 4. t 1 = 5 π 6 , t 2 = π 3 .

As t decreases from 5 π 6 to π 3 , it crosses t = π 2 , where cos t changes sign:

cos t < 0    on    ( π 2 , 5 π 6 ) , cos t > 0    on    ( π 3 , π 2 ) .

We split at t = π 2 :

5 π / 6 π / 3 | cos t | cos t d t = 5 π / 6 π / 2 cos 2 t d t + π / 2 π / 3 cos 2 t d t .

First part ( cos t < 0 , so | cos t | = cos t ):

5 π / 6 π / 2 cos 2 t d t = [ t 2 + sin 2 t 4 ] 5 π / 6 π / 2 .

At t = π 2 : π 4 + 0 = π 4 . At t = 5 π 6 : 5 π 12 + sin 5 π 3 4 = 5 π 12 3 8 , since sin 5 π 3 = 3 2 .

So the bracket is π 4 ( 5 π 12 3 8 ) = π 6 + 3 8 , and

( π 6 + 3 8 ) = π 6 3 8 .

Second part ( cos t > 0 , so | cos t | = cos t , limits descending):

\begin{aligned} \int_{\pi/2}^{\pi/3}\cos^{2}t\,dt &=\left[\frac{t}{2}+\frac{\sin2t}{4}\right]_{\pi/2}^{\pi/3}\\ &=\left(\frac{\pi}{6}+\frac{\sin\frac{2\pi}{3}}{4}\right)-\frac{\pi}{4}\\ &=\frac{\pi}{6}+\frac{\sqrt{3}}{8}-\frac{\pi}{4}\\ &=-\frac{\pi}{12}+\frac{\sqrt{3}}{8}. \end{aligned}

Adding:

( π 6 3 8 ) + ( π 12 + 3 8 ) = π 6 π 12 = π 12 .

All four cases yield the same answer:

  1 / 2 3 / 2 1 x 2 d x = π 12 .  

Remark. The integral computes the area of the region bounded above by the unit circle x 2 + y 2 = 1 , below by the x -axis, and between x = 1 2 and x = 3 2 .

P Q O 1/2 √3/2 1 y x
The shaded region has area π / 12 . It equals the circular sector O P Q plus triangle OPP' minus triangle OQQ'.

Let P = ( 1 2 , 3 2 ) and Q = ( 3 2 , 1 2 ) be the endpoints of the arc. The shaded area can be decomposed as

\text{shaded area}=\text{sector }OPQ+\triangle OPP'-\triangle OQQ',

where P'=\left(\frac{1}{2},0\right) and Q'=\left(\frac{\sqrt{3}}{2},0\right) are the feet of the vertical lines. Explicitly,

sector  O P Q = 1 2 r 2 θ = 1 2 1 π 6 = π 12 , \triangle OPP'=\frac{1}{2}\cdot\frac{1}{2}\cdot\frac{\sqrt{3}}{2}=\frac{\sqrt{3}}{8},\qquad \triangle OQQ'=\frac{1}{2}\cdot\frac{\sqrt{3}}{2}\cdot\frac{1}{2}=\frac{\sqrt{3}}{8}.

The two triangles have equal area and cancel:

shaded area = π 12 + 3 8 3 8 = π 12 ,

confirming the result. The cancellation is not a coincidence: it reflects the symmetry of the two radii O P and O Q about the line y = x .

Exercises


Evaluate 0 2 x ( x 2 + 1 ) 3 d x by both methods.

Answer

78

Solution

Method (b). Let u = x 2 + 1 , so d u = 2 x d x and x d x = 1 2 d u . When x = 0 , u = 1 ; when x = 2 , u = 5 . Hence

0 2 x ( x 2 + 1 ) 3 d x = 1 2 1 5 u 3 d u = 1 2 [ u 4 4 ] 1 5 = 625 1 8 = 78.

Method (a). The indefinite integral is ( x 2 + 1 ) 4 8 , and

[ ( x 2 + 1 ) 4 8 ] 0 2 = 5 4 1 4 8 = 78.


Evaluate 0 π / 2 sin 3 x cos x d x .

Answer

1 4

Solution

Let u = sin x , d u = cos x d x . When x = 0 , u = 0 ; when x = π 2 , u = 1 .

0 π / 2 sin 3 x cos x d x = 0 1 u 3 d u = [ u 4 4 ] 0 1 = 1 4 .


Evaluate 1 2 d x ( 3 x 1 ) 2 .

Answer

1 10

Solution

Let u = 3 x 1 , d u = 3 d x . When x = 1 , u = 2 ; when x = 2 , u = 5 .

\begin{aligned} \int_{1}^{2}\frac{dx}{(3x-1)^{2}} &= \frac{1}{3}\int_{2}^{5}u^{-2}\,du\\ &= \frac{1}{3}\left[-\frac{1}{u}\right]_{2}^{5} = \frac{1}{3}\left(-\frac{1}{5}+\frac{1}{2}\right)=\frac{1}{3}\cdot\frac{3}{10}=\frac{1}{10}. \end{aligned}


Evaluate 0 1 x 1 x 2 d x .

Answer

1 3

Solution

Let u = 1 x 2 , so x d x = 1 2 d u . When x = 0 , u = 1 ; when x = 1 , u = 0 . Note again that the new upper limit is the smaller number.

\begin{aligned} \int_{0}^{1}x\sqrt{1-x^{2}}\,dx &= -\frac{1}{2}\int_{1}^{0}u^{1/2}\,du = \frac{1}{2}\int_{0}^{1}u^{1/2}\,du\\ &= \frac{1}{2}\cdot\frac{2}{3}=\frac{1}{3}. \end{aligned}


Evaluate 1 e 2 d x x ln x + 1 .

Answer

2 ( 3 1 )

Solution

Let u = ln x + 1 , d u = d x x . When x = 1 , u = 1 ; when x = e 2 , u = 3 .

1 e 2 d x x ln x + 1 = 1 3 u 1 / 2 d u = [ 2 u ] 1 3 = 2 3 2.


Evaluate 0 ln 2 e x 1 + e 2 x d x .

Answer

arctan 2 π 4

Solution

Write e 2 x = ( e x ) 2 and let u = e x , d u = e x d x . When x = 0 , u = 1 ; when x = ln 2 , u = 2 .

0 ln 2 e x d x 1 + ( e x ) 2 = 1 2 d u 1 + u 2 = [ arctan u ] 1 2 = arctan 2 π 4 .


Evaluate 0 4 d x 1 + x .

Answer

4 2 ln 3

Solution

Let t = x , so x = t 2 and d x = 2 t d t . When x = 0 , t = 0 ; when x = 4 , t = 2 .

\begin{aligned} \int_{0}^{4}\frac{dx}{1+\sqrt{x}} &= \int_{0}^{2}\frac{2t\,dt}{1+t} = 2\int_{0}^{2}\frac{t+1-1}{1+t}\,dt\\ &= 2\int_{0}^{2}\left(1-\frac{1}{1+t}\right)dt\\ &= 2\left[t-\ln|1+t|\right]_{0}^{2} = 2\left(2-\ln3\right)=4-2\ln3. \end{aligned}

The step t = t + 1 1 is the standard trick for an improper-looking rational function: make the numerator contain the denominator.


Evaluate 0 1 x x + 1 d x .

Answer

4 2 2 3

Solution

Let u = x + 1 , so x = u 1 and d x = d u . When x = 0 , u = 1 ; when x = 1 , u = 2 .

\begin{aligned} \int_{0}^{1}\frac{x}{\sqrt{x+1}}\,dx &= \int_{1}^{2}\frac{u-1}{\sqrt{u}}\,du = \int_{1}^{2}\left(u^{1/2}-u^{-1/2}\right)du\\ &= \left[\frac{2}{3}u^{3/2}-2u^{1/2}\right]_{1}^{2}\\ &= \left(\frac{4\sqrt{2}}{3}-2\sqrt{2}\right)-\left(\frac{2}{3}-2\right)\\ &= -\frac{2\sqrt{2}}{3}+\frac{4}{3}=\frac{4-2\sqrt{2}}{3}. \end{aligned}

Numerically this is about 0.390 .


Evaluate 0 π / 3 tan x d x .

Answer

ln 2

Solution

Write tan x = sin x cos x and let u = cos x , d u = sin x d x . When x = 0 , u = 1 ; when x = π 3 , u = 1 2 .

\begin{aligned} \int_{0}^{\pi/3}\frac{\sin x}{\cos x}\,dx &= -\int_{1}^{1/2}\frac{du}{u} = -\left[\ln|u|\right]_{1}^{1/2}\\ &= -\left(\ln\tfrac{1}{2}-\ln1\right)=\ln2. \end{aligned}


Evaluate 1 9 d x x ( 1 + x ) 2 .

Answer

1 2

Solution

Let u = 1 + x , so d u = d x 2 x , that is d x x = 2 d u . When x = 1 , u = 2 ; when x = 9 , u = 4 .

\begin{aligned} \int_{1}^{9}\frac{dx}{\sqrt{x}\left(1+\sqrt{x}\right)^{2}} &= 2\int_{2}^{4}\frac{du}{u^{2}} = 2\left[-\frac{1}{u}\right]_{2}^{4}\\ &= 2\left(-\frac{1}{4}+\frac{1}{2}\right)=\frac{1}{2}. \end{aligned}


Evaluate 0 1 arctan x 1 + x 2 d x .

Answer

π 2 32

Solution

Let u = arctan x , so d u = d x 1 + x 2 . When x = 0 , u = 0 ; when x = 1 , u = π 4 .

0 1 arctan x 1 + x 2 d x = 0 π / 4 u d u = [ u 2 2 ] 0 π / 4 = 1 2 π 2 16 = π 2 32 .


Evaluate 1 1 x ( x 2 + 3 ) 5 d x two ways: by substitution, and by a symmetry argument.

Answer

0

Solution

By substitution. Let u = x 2 + 3 , x d x = 1 2 d u . When x = 1 , u = 4 ; when x = 1 , u = 4 . The two limits are equal, so

1 1 x ( x 2 + 3 ) 5 d x = 1 2 4 4 u 5 d u = 0.

This is a striking illustration of a substitution that is not one-to-one: g ( x ) = x 2 + 3 takes the same value at both endpoints, and the increasing and decreasing halves cancel exactly.

By symmetry. The integrand is an odd function, since replacing x by x changes the sign of the factor x while leaving ( x 2 + 3 ) 5 unchanged. An odd function integrated over a symmetric interval gives 0, as shown in the next section.


Evaluate 0 π / 2 cos x 1 + sin x d x .

Answer

2 ( 2 1 )

Solution

Let u = 1 + sin x , d u = cos x d x . When x = 0 , u = 1 ; when x = π 2 , u = 2 .

0 π / 2 cos x d x 1 + sin x = 1 2 u 1 / 2 d u = [ 2 u ] 1 2 = 2 2 2.


Evaluate 0 1 e 2 x e x + 1 d x .

Answer

e 1 ln e + 1 2

Solution

Let u = e x + 1 , so e x = u 1 and d u = e x d x . When x = 0 , u = 2 ; when x = 1 , u = e + 1 . Writing e 2 x d x = e x e x d x = ( u 1 ) d u ,

\begin{aligned} \int_{0}^{1}\frac{e^{2x}}{e^{x}+1}\,dx &= \int_{2}^{e+1}\frac{u-1}{u}\,du = \int_{2}^{e+1}\left(1-\frac{1}{u}\right)du\\ &= \left[u-\ln u\right]_{2}^{e+1}\\ &= \left(e+1-\ln(e+1)\right)-\left(2-\ln2\right)\\ &= e-1-\ln\frac{e+1}{2}. \end{aligned}


Evaluate 0 7 d x ( x + 1 ) 2 3 .

Answer

3

Solution

Let u = x + 1 , d u = d x . When x = 0 , u = 1 ; when x = 7 , u = 8 .

1 8 u 2 / 3 d u = [ 3 u 1 / 3 ] 1 8 = 3 ( 2 ) 3 ( 1 ) = 3.


Find the error in the following computation and give the correct value:

0 π sin x cos x d x = u = sin x 0 0 u d u = 0   ?

Is the stated answer nevertheless correct?

Answer

There is no error: the substitution is legitimate even though sin x is not one-to-one on [ 0 , π ] , and the value is indeed 0 .

Solution

The substitution u = sin x , d u = cos x d x satisfies the hypotheses of the substitution theorem: g ( x ) = sin x has a continuous derivative on [ 0 , π ] and the integrand f ( u ) = u is continuous. The theorem does not require g to be one-to-one, so the calculation is valid and the answer is 0.

Confirming directly: sin x cos x = 1 2 sin 2 x , and

0 π 1 2 sin 2 x d x = [ cos 2 x 4 ] 0 π = 1 4 + 1 4 = 0.

The lesson is the one drawn in the geometric discussion above: on [ 0 , π 2 ] the substitution sweeps u from 0 up to 1, and on [ π 2 , π ] it sweeps back down, and the two contributions cancel.


Show that for any continuous f and any a > 0 ,

0 a f ( x ) d x = 0 a f ( a x ) d x ,

and use it to evaluate 0 π / 2 sin x sin x + cos x d x .

Answer

The identity follows from u = a x ; the integral equals π 4 .

Solution

The identity. Let u = a x , so d u = d x . When x = 0 , u = a ; when x = a , u = 0 . Hence

0 a f ( a x ) d x = a 0 f ( u ) d u = 0 a f ( u ) d u = 0 a f ( x ) d x ,

the last step because the variable of integration is a dummy.

The application. Call the integral I and apply the identity with a = π 2 . Since sin ( π 2 x ) = cos x and cos ( π 2 x ) = sin x ,

I = 0 π / 2 cos x cos x + sin x d x .

Adding the two expressions for I ,

2 I = 0 π / 2 sin x + cos x sin x + cos x d x = 0 π / 2 1 d x = π 2 ,

so I = π 4 . The integrand has no elementary antiderivative that is pleasant to find, yet the symmetry trick gives the exact value in three lines.


The region under y = 1 x from x = 1 to x = a has the same area as the region under y = 1 x from x = k to x = k a , for any k > 0 . Prove this with a substitution, and say what property of the logarithm it expresses.

Answer

The substitution u = x / k proves it; the property is ln ( k a ) ln k = ln a .

Solution

In the second integral let u = x k , so x = k u and d x = k d u . When x = k , u = 1 ; when x = k a , u = a . Therefore

k k a d x x = 1 a k d u k u = 1 a d u u ,

which is the first integral.

Since 1 x d t t = ln x , the statement reads ln ( k a ) ln k = ln a , that is, ln ( k a ) = ln k + ln a . The multiplicative property of the logarithm is exactly the scale-invariance of the area under the hyperbola.