Unit 5, lesson 54

The Substitution Method

How to undo the chain rule by changing variables, for indefinite integrals with back-substitution and for definite integrals with new bounds, and which conditions make the change valid.

  • Theory part 107
  • Practice part 108
  • Integration Techniques

Theory, part 107

Practice, part 108

Differentiate sin⁡(x2)\sin(x^2) and you get 2xcos⁡(x2)2x \cos(x^2), an inner function and its derivative side by side. Many integrands carry exactly that fingerprint of the chain rule. Substitution is the method for spotting it and running the chain rule backward.

Key terms

Reverse chain rule

Definition Let gg be differentiable on an interval JJ, and let FF be differentiable on an interval containing g(J)g(J) with F′=fF' = f. By the chain rule

ddxF(g(x))=f(g(x)) g′(x)for x∈J,\frac{d}{dx} F\big(g(x)\big) = f\big(g(x)\big) \, g'(x) \qquad \text{for } x \in J,

so

∫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.

In plain words If the integrand is a function of an inner expression times the derivative of that inner expression, the answer is an antiderivative of the outer function evaluated at the inner expression.

Example In ∫2xcos⁡(x2) dx\int 2x \cos(x^2) \, dx the inner function is x2x^2 with derivative 2x2x, and the outer function is cos⁡\cos, with antiderivative sin⁡\sin. So

∫2xcos⁡(x2) dx=sin⁡(x2)+C.\int 2x \cos(x^2) \, dx = \sin(x^2) + C.

Check by differentiating, which gives cos⁡(x2)⋅2x\cos(x^2) \cdot 2x.

Substitution for indefinite integrals

Definition Let u=g(x)u = g(x) be differentiable on an interval JJ, with values in an interval II, and let ff be continuous on II. Then

∫f(g(x)) g′(x) dx=∫f(u) du,where u=g(x).\int f\big(g(x)\big) \, g'(x) \, dx = \int f(u) \, du, \qquad \text{where } u = g(x).

The equation means that if FF is an antiderivative of ff on II, then F(g(x))F(g(x)) is an antiderivative of the left integrand on JJ. In practice you write du=g′(x) dxdu = g'(x) \, dx and replace every piece of the integrand. The new integral must contain only uu and dudu.

In plain words Name the inner expression uu, find dudu, and rewrite the integral so xx disappears. If some xx is left over that you cannot express through uu, the substitution has not worked.

Example For ∫x1+x2 dx\int x \sqrt{1 + x^2} \, dx let u=1+x2u = 1 + x^2, so du=2x dxdu = 2x \, dx and x dx=12dux \, dx = \frac{1}{2} du.

∫x1+x2 dx=12∫u1/2 du=13u3/2+C.\int x \sqrt{1 + x^2} \, dx = \frac{1}{2} \int u^{1/2} \, du = \frac{1}{3} u^{3/2} + C.

Back-substitution

Definition After integrating in uu, the result is a function of uu. Back-substitution replaces uu by g(x)g(x), giving an antiderivative of the original integrand as a function of xx. The answer can always be checked by differentiating it with respect to xx.

In plain words The question was asked in xx, so the answer must be given in xx.

Example Continuing the previous example, put u=1+x2u = 1 + x^2 back in to get

∫x1+x2 dx=13(1+x2)3/2+C.\int x \sqrt{1 + x^2} \, dx = \frac{1}{3}(1 + x^2)^{3/2} + C.

Its derivative is

13⋅32(1+x2)1/2⋅2x=x1+x2,\frac{1}{3} \cdot \frac{3}{2} (1 + x^2)^{1/2} \cdot 2x = x \sqrt{1 + x^2},

as it should be.

Change of variable

Definition Sometimes the leftover factors of xx must also be written through uu. If u=g(x)u = g(x) and gg has an inverse on the interval of interest, solve for x=g−1(u)x = g^{-1}(u) and replace every xx, including those outside the inner function. More generally, let ff be continuous on an interval and let x=h(u)x = h(u), where hh is differentiable on an interval with h′(u)≠0h'(u) \neq 0 there and takes values where ff is continuous. Then hh is one-to-one with a differentiable inverse, and

∫f(x) dx=∫f(h(u)) h′(u) du,\int f(x) \, dx = \int f\big(h(u)\big) \, h'(u) \, du,

followed by the back-substitution u=h−1(x)u = h^{-1}(x).

In plain words You are free to rename the variable in any reversible way, as long as you translate the whole integrand, dxdx included, into the new variable.

Example For ∫xx−1 dx\int x \sqrt{x - 1} \, dx on x≥1x \ge 1, let u=x−1u = x - 1. Then x=u+1x = u + 1 and dx=dudx = du.

∫xx−1 dx=∫(u+1)u1/2 du=25u5/2+23u3/2+C.\int x \sqrt{x - 1} \, dx = \int (u + 1) u^{1/2} \, du = \frac{2}{5} u^{5/2} + \frac{2}{3} u^{3/2} + C.

Back in xx this is

25(x−1)5/2+23(x−1)3/2+C.\frac{2}{5}(x - 1)^{5/2} + \frac{2}{3}(x - 1)^{3/2} + C.

Its derivative is

(x−1)3/2+(x−1)1/2=(x−1)1/2((x−1)+1)=xx−1.(x - 1)^{3/2} + (x - 1)^{1/2} = (x - 1)^{1/2} \big( (x - 1) + 1 \big) = x\sqrt{x - 1}.

Definite-integral bounds

Definition If g′g' is continuous on [a,b][a, b] and ff is continuous on the range of u=g(x)u = g(x) for xx in [a,b][a, b], 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.

In plain words Change the bounds along with the variable. The new bounds are the values of uu at the old bounds, and then there is no need to go back to xx.

Example For ∫01xex2 dx\int_0^1 x e^{x^2} \, dx let u=x2u = x^2, so du=2x dxdu = 2x \, dx. When x=0x = 0, u=0u = 0, and when x=1x = 1, u=1u = 1.

∫01xex2 dx=12∫01eu du=12(e−1)≈0.859.\int_0^1 x e^{x^2} \, dx = \frac{1}{2} \int_0^1 e^u \, du = \frac{1}{2}(e - 1) \approx 0.859.

Interval and regularity conditions

Definition The definite substitution rule requires gg to be continuously differentiable on the whole closed interval [a,b][a, b] and ff to be continuous on an interval containing every value g(x)g(x) for xx in [a,b][a, b]. It does not require gg to be one-to-one. The indefinite rule holds on each interval where these conditions hold.

In plain words The inner function must be smooth across the entire interval, with no breaks or vertical asymptotes. If it fails somewhere inside, the bounds you plug in can lie.

Example The expression sec⁡2x1+tan⁡2x\frac{\sec^2 x}{1 + \tan^2 x} is not defined at x=π2x = \frac{\pi}{2}, but at every other point of [0,π][0, \pi] it equals 11, since 1+tan⁡2x=sec⁡2x1 + \tan^2 x = \sec^2 x. So it extends continuously to the constant function 11 on [0,π][0, \pi], and with that value at π2\frac{\pi}{2}

∫0πsec⁡2x1+tan⁡2x dx=∫0π1 dx=π.\int_0^{\pi} \frac{\sec^2 x}{1 + \tan^2 x} \, dx = \int_0^{\pi} 1 \, dx = \pi.

Substituting u=tan⁡xu = \tan x blindly gives bounds tan⁡0=0\tan 0 = 0 and tan⁡π=0\tan \pi = 0, so ∫00du1+u2=0\int_0^0 \frac{du}{1 + u^2} = 0, which is wrong. The inner function g(x)=tan⁡xg(x) = \tan x is not defined at x=π2x = \frac{\pi}{2}, which lies inside [0,π][0, \pi], so it is not continuously differentiable on the whole interval and the rule does not apply.

Check yourself

  1. Find ∫cos⁡3xsin⁡x dx\int \cos^3 x \sin x \, dx.
Show the answer

Let u=cos⁡xu = \cos x, so du=−sin⁡x dxdu = -\sin x \, dx. The integral is

−∫u3 du=−u44+C=−cos⁡4x4+C.-\int u^3 \, du = -\frac{u^4}{4} + C = -\frac{\cos^4 x}{4} + C.
  1. Evaluate ∫1eln⁡xx dx\int_1^e \frac{\ln x}{x} \, dx.
Show the answer

Let u=ln⁡xu = \ln x, du=dxxdu = \frac{dx}{x}, with new bounds 00 and 11. The value is

∫01u du=12.\int_0^1 u \, du = \frac{1}{2}.
  1. Find ∫dx3x+2\int \frac{dx}{3x + 2} and say where the answer is valid.
Show the answer

Let u=3x+2u = 3x + 2, du=3 dxdu = 3 \, dx. The integral is

13∫duu=13ln⁡∣3x+2∣+C,\frac{1}{3} \int \frac{du}{u} = \frac{1}{3} \ln \lvert 3x + 2 \rvert + C,

valid on each of the intervals x<−23x < -\frac{2}{3} and x>−23x > -\frac{2}{3}.

How this lesson connects