Skip to main content

Unit 11.3 Substitution

Integration by parts is what you get from reversing the product rule. Reversing the chain rule is called substitution. You can probably guess what it says. The chain rule says \((d/dx) f(g(x)) = f'(g(x)) g'(x)\text{.}\) Therefore, we need a rule to tell us that \(\displaystyle\int f'(g(x)) g'(x) \, dx = f(g(x))\text{.}\) This gives the simplest form of the substitution method.

Example 11.10.

We compute the integral of \(\frac{(\ln x)^2}{x}\text{.}\) The numerator \((\ln x)^2\) looks like a composition \(f(g(x))\) where \(f(x) = x^2\) and \(g(x) = \ln x\text{.}\) We are in luck because \(g'(x) = 1/x\) so there is alread a \(g'\) sitting there. The expression to be integrated looks like \(f(g(x)) g'(x)\text{,}\) so applying (11.3),
\begin{equation*} \displaystyle\int \frac{(\ln x)^2}{x} \, dx = \left ( \displaystyle\int x^2 \right ) \circ \ln \, . \end{equation*}
The indefinite integral of \(x^2\) is \(x^3 / 3\text{,}\) so the final answer is that the indefinite integral of \((\ln x)^2 / x\) is \((\ln x)^3 / 3 + C\text{.}\)

Checkpoint 168.

Use the substitution method to evaluate \(\displaystyle\int (2x) e^{x^2} \, dx\text{.}\)
Answer.
\(e^{x^{2}}+C\)
The substitution rule is very often stated in the language of science, with a variable \(u\text{,}\) thought of as a physical quantity related to the variable \(x\) via \(u = g(x)\text{.}\)

Aside

Instead of a theorem, this version is usually described as a procedure.
  1. Change variables from \(x\) to \(u\) (hence the common name "\(u\)-substitution")
  2. Keep track of the relation between \(dx\) and \(du\)
  3. If you chose correctly you can now do the \(u\)-integral
  4. When you’re done, substitute back for \(x\)
Again, we let \(g\) be the function relating \(u\) to \(x\) via \(u = g(x)\text{,}\) and again you need hypotheses, namely the ones stated in Theorem 11.9). Then \(du = g'(x) \, dx\text{.}\) Usually you don’t do this kind of substitution unless there will be an \(g' (x) \, dx\) term waiting which you can then turn into \(du\text{.}\) Also, you don’t do this unless the rest of the occurences of \(x\) can also be turned into \(u\text{.}\) If \(g\) has an inverse function, you can do this by substituting \(g^{-1} (u)\) for \(x\) everywhere. Now when you reach the fourth step, it’s easier because you can just plug in \(u = g(x)\) to get things back in terms of \(x\text{.}\)
This notation gives a particularly nice simplification when \(u = x + c\) for some constant \(c\text{.}\) Replacing \(x\) by \(x+c\) is called a translation. In the first unit of the course, we discussed what this does to the graph. It is a very natural change of variables, corresponding to a different starting point for a parametrization.

Example 11.11.

Compute the indefinite integral of \(\sqrt{x+6}\text{.}\) Let \(u = x+6\text{.}\) Then \(du = dx\text{.}\) Integrating the \(1/2\) power (one of the basic facts in Proposition 11.1),
\begin{equation*} \displaystyle\int \sqrt{x+6} \, dx = \displaystyle\int \sqrt{u} \, du = \frac{2}{3} u^{3/2} = \frac{2}{3} (x+1)^{3/2} + C \, . \end{equation*}
The moral of this story is that you can "read off" integrals of translations. For example, knowing \(\displaystyle\int \cos x \, dx = \sin x+C\) allows you to read off \(\displaystyle\int \cos (x-\pi/4) \, dx = \sin (x - \pi/4)+C\text{.}\) Don’t let this example fool you into thinking it works this way for functions other than translations. Thinking that \(\displaystyle\int \cos (\sqrt{x}) \, dx = \sin (\sqrt{x}) + C\) is wrong; it is the calculus equivalent of the algebra mistake \((a+b)^2 = a^2 + b^2\text{.}\)
Here’s an example of \(u\)-substitution with something other than a translation.

Example 11.12.

Let’s compute \(\displaystyle\int \sin^n x \, \cos x \, dx\text{.}\)
Solution: substitute \(u = \sin x\) and \(du = \cos x \, dx\text{.}\) This turns the integral into \(\displaystyle\int u^n \, du\) which is easily valuated as \(u^{n+1} / (n+1) + C\text{.}\) Now plug back in \(u = \sin x\) and you get the answer
\begin{equation*} \frac{\sin^{n+1} x}{n+1} + C \, . \end{equation*}
You might think to worry whether the substitution had the right domain and range, was one to one, etc., but you don’t need to. When computing an indefinite integral you are computing an anti-derivative and the proof of correctness is whether the derivative is what you started with. You can easily check that the derivative of \(\sin^{n+1} x / (n+1)\) is \(\sin^n x \cos x\text{.}\)
After a translation, the next simplest substitution is a dilation, where \(u(x) = c x\) for some nonzero real number \(c\text{.}\) This is the other case in which substitution always succeeds: if you can integrate \(f(x)\) you can always integrate \(f(cx)\text{.}\) We leave it to you to work this out, first in an example, then in the general case.

Checkpoint 169.

Use substitution to integrate \(\cos (5x)\text{.}\)
Suppose you know the anti-derivative for \(f\text{;}\) say \(f = h'\text{.}\) Use subsitution to work out the general formula for \(\displaystyle\int f(cx) \, dx\text{.}\)
Answer 1.
\(\frac{1}{5}\sin\mathopen{}\left(5x\right)+C\)
Answer 2.
\(\frac{1}{c}hcx+C\)
When evaluating a definite integral you can compute the indefinite integral as above and then evaluate. A second option is to change variables, including the limits of integration, and then never change back.

Example 11.13.

Let’s compute \(\displaystyle\int_1^2 \frac{x}{x^2+1} \, dx\text{.}\)
If we let \(u = x^2+1\) then \(du = 2x \, dx\text{,}\) so the integrand becomes \((1/2) \, du / u\text{.}\) If \(x\) goes from 1 to 2 then \(u\) goes from 2 to 5, thus the integral becomes
\begin{equation*} \displaystyle\int_2^5 \frac{1}{2} \frac{du}{u} = \frac{1}{2} (\ln 5 - \ln 2) \, . \end{equation*}
Of course you can get the same answer in the usual way: the indefinite integral is \((1/2) \ln u\text{;}\) we substitute back and get \((1/2) \ln (x^2 + 1)\text{.}\) Now we evaluate at 2 and 1 instead of 5 and 2, but the result is the same: \((1/2) (\ln 5 - \ln 2).\)

Backwards substitution.

There are times when the best substitution is of the form \(x = g(u)\) rather than \(u = g(x)\text{.}\) No matter what \(f\) and \(g\) are, the substitution \(x = g(u), \; dx = g'(u) \, du\) always leads to a new integral, it’s just hard to choose \(g\) in a way that makes the new integral simpler than the old one. It turns out there are some integrals, not apparently involving trig functions, where substituting \(x = g(u)\) for some trig function \(g\) will magically unlock a dead end. Knowing tricks for dealing with a wide class of anti-derivative extractions is not the aim of this course, therefore we will not be featuring this method in the text. If you’re interested in seeing one of these, try googling "integrate sqrt(1-x^2)".

Looking it up.

Math is about understanding relations of a precise nature, about abstraction, and about making models of physical phenomena. It is also about building a library of computational tricks, but that’s only a small part of math, and it’s somewhat time-consuming. We have taught you what we think it is reasonable for you to know and remember -- to have in your quick-access library. For all the other integrals currently known to mankind, there are lookup tables. The following integral table is stolen from a popular calculus book. Use it as a reference as needed.