Reversing the chain rule: choosing the substitution, computing the differential, rewriting every x in terms of the new variable, back-substituting or changing the limits, adjusting constants but never variables, and recognising when substitution cannot help.
Subject: Calculus I · 66 slides · symbolic lesson
Open the interactive version of this deck
Title
Calculus I · Section 5.5
Running the chain rule backwards
Objectives
The Fundamental Theorem turns every definite integral into an antiderivative problem, but so far you can only find antiderivatives that appear in the basic table. This lesson adds the first real technique for finding more.
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, pp. 506-515 — learning objectives 5.5.1 and 5.5.2
The Fundamental Theorem of Calculus made definite integrals easy, with one catch: you need an antiderivative. So far you can only find antiderivatives that are on the basic list, powers, exponentials, sines and cosines. Change one small thing, put a polynomial inside the power or inside the cosine, and the list stops helping.
Substitution is the first technique that reaches beyond the list. It is the chain rule read backwards, so everything you learned about differentiating compositions becomes a tool for integrating them.
The method itself is only a few lines. Most of this lesson is about the three ways it goes wrong: a leftover variable, a constant forgotten or a variable wrongly moved, and limits that do not match the variable. The last part is about the integrals no method can crack, so you know when to stop trying.
Warm-up
\[ y = \frac{(x^2 - 3)^4}{4} \]
Discussion prompt
Differentiate this function with the chain rule. Write the answer as a product and say which factor the chain rule contributed.
Write your derivative before you reveal the answer. This is ordinary chain-rule practice, but the shape of the answer is the whole point of the lesson.
The outer function is a fourth power divided by four, so its derivative is the cube of the inside. Then the chain rule multiplies by the derivative of the inside, which is 2x. The answer is a composition times the derivative of its inner function.
Keep that product in mind. In a few slides you will be handed the product and asked to go back to the function it came from. Recognising the extra factor as the inner derivative is the whole skill.
Section
Part 1
Picture it
Figure (svg): Two rows of boxes. Top row: F of g of x on the left, f of g of x times g prime of x on the right, an arrow to the right labelled differentiate by the chain rule and an arrow back labelled integrate by substitution. Bottom row: the same for the fourth power of x squared minus 3 over 4 and the cube of x squared minus 3 times 2x.
Every chain-rule derivative has a fingerprint: a function of an inner expression, multiplied by the derivative of that inner expression. An integrand with that fingerprint can be integrated by reading the chain rule in reverse.
Read the top row as a general law and the bottom row as one instance of it. Going right, the chain rule differentiates a composition and leaves the derivative of the inner function behind as an extra factor. Going left, you start from a product with that fingerprint and recover the composition.
The grey captions under the bottom row say where each piece lives. On the left, the outer operation is a power and the inner function is x squared minus 3. On the right, that same inner function is still there, cubed now, and next to it sits 2x, its derivative.
Substitution works exactly when an integrand looks like the right-hand box. If the inner derivative is not sitting next to the composition, the left arrow has nowhere to go, and that is the situation the last part of the lesson deals with.
Concept
The book puts the target shape in one line: an outer function evaluated at an inner function, times the inner function's derivative.
\[ \int f\left[g(x)\right]\,g'(x)\,dx \]
The warm-up's answer has exactly this shape. Reading off the pieces:
\[ \int (x^2-3)^3\,2x\,dx: \quad f(x) = x^3, \quad g(x) = x^2 - 3, \quad g'(x) = 2x \]
\[ f\left[g(x)\right]g'(x) = (x^2-3)^3(2x) \]
Recognising this is mostly visual: find the inside of a power, root, exponential or trig function, and check whether its derivative is sitting next to it.
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, pp. 506-507 — the introductory example
This is the book's first example, taken apart. The integrand is the cube of x squared minus 3, times 2x. The outer function f is cubing, the inner function g is x squared minus 3, and g prime is 2x. Put them together and you get back exactly the integrand.
You do not usually write out f and g like this in practice. What you do is scan the integrand for something inside something else: inside a bracket that is raised to a power, under a root, up in an exponent, inside a sine or cosine. That inside expression is the candidate for u.
Then you ask one question: is its derivative sitting somewhere else in the integrand, as a factor? If yes, substitution will work. If it is there apart from a number, it will still work, as you will see in Part 3.
Notation
Annotate
On: \( \int f\left[g(x)\right]g'(x)\,dx = \int f(u)\,du = F(u) + C \)
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 507 — Theorem 5.7, equation 5.19
Step through the notes in order. The first two are the substitution itself: name the inner function u, and replace the inner derivative together with the dx by du. Those two replacements must use up everything in the integrand.
The third note is the payoff. What remains is an integral in u alone, and it should be one you can do from the basic list. If it is not, you chose the wrong u, and the strategy on a later slide tells you to go back and choose again.
The fourth note is easy to forget under time pressure. The antiderivative F(u) is written in your invented variable. The question was about x, so the answer must be about x: replace u by g(x) before you add the constant and stop.
Concept
The proof is the chain rule, read backwards. Let F be an antiderivative of f.
\[ \frac{d}{dx}F(g(x)) = F'(g(x))\,g'(x) \]
\[ \frac{d}{dx}F(g(x)) = f\left[g(x)\right]g'(x) \]
So F of g of x is an antiderivative of the integrand. Integrate both sides:
\[ \int f\left[g(x)\right]g'(x)\,dx = F(g(x)) + C \]
Writing u for g(x), and du for g prime of x times dx, turns the left side into the integral of f(u) du, which is F(u) plus C.
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 507 — proof of Theorem 5.7
The proof is three lines, and it is worth being able to reproduce, because it tells you exactly why the method works. Take any antiderivative F of the outer function f. The chain rule says the derivative of F of g of x is F prime at g of x, times g prime of x.
But F prime is f, because F is an antiderivative of f. So the derivative of F of g of x is exactly the integrand. That means F of g of x is an antiderivative of the integrand, and integrating both sides says so.
The letters u and du are then just bookkeeping. They let you do the step in your head that the chain rule does forwards: forget the inside for a moment, treat it as a single variable, and integrate the outside.
Worked example
\[ \int (x^2-3)^3\,2x\,dx \]
Choose u
Why: The inside of the cube, since its derivative 2x is present.
\[ u = x^2 - 3 \]
Compute du
Why: Differentiate u and multiply by dx.
\[ du = 2x\,dx \]
Rewrite in u
Why: The cube becomes u cubed and the factor 2x dx becomes du.
\[ \int (x^2-3)^3\,(2x\,dx) = \int u^3\,du \]
Integrate
Why: Power rule.
\[ \int u^3\,du = \frac{u^4}{4} + C \]
Substitute back
Why: Put the original expression in place of u.
\[ \frac{u^4}{4} + C = \frac{(x^2-3)^4}{4} + C \]
Check against the warm-up
Why: Differentiating the answer was the warm-up, and it returned the integrand exactly. At x equal to 2 both sides give 4.
\[ \frac{d}{dx}\frac{(x^2-3)^4}{4}\Big|_{x=2} = (1)^3(4) = 4 \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 507 — the worked introduction
Cover the words and follow the maths alone: choose u, compute du, rewrite, integrate, substitute back. Every substitution you do will have these same five lines, sometimes with an extra line for adjusting a constant or converting limits.
The rewrite step is where the method earns its keep. The messy product becomes u cubed du, which is on the basic list. Notice how the factor 2x dx disappears completely: it became du. If some part of the integrand had not been used up, you would be stuck.
The check is the warm-up, done in reverse. Differentiating the answer gives the cube of x squared minus 3 times 2x, the integrand. At x equal to 2 both sides are 4. Checking by differentiation is always available for an indefinite integral, and it catches nearly every error.
Concept
The equation for du is the derivative of u, rewritten with the dx moved across. It records how fast u changes as x changes.
\[ u = g(x) \quad\Longrightarrow\quad \frac{du}{dx} = g'(x) \quad\Longrightarrow\quad du = g'(x)\,dx \]
So du is not decoration. It is computed from u alone, whatever the integrand happens to contain, and then you look for it in the integrand.
\[ u = 3x^2 + 4 \quad\Longrightarrow\quad du = 6x\,dx \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 508 — the remark in Example 5.30
The notation du is borrowed from Leibniz, and it behaves exactly as if the derivative were a fraction you can multiply across. That is not a proof, but it is a reliable way to remember what du is: the derivative of u, times dx.
The book makes a point you should take seriously. You compute du from your choice of u, and nothing else. You do not look at the integrand to decide what du is. For u equal to 3x squared plus 4, du is 6x dx, whatever the integrand contains.
Only after computing it do you look for it in the integrand. If it is there exactly, rewrite. If it is there apart from a number, adjust the number. If a variable is missing, this u will not work. That order, compute first, then search, stops you from bending du to fit what you hoped to see.
Matching
Match the pairs
Why: In each case u is the inside of something (a power, an exponential) and du, up to a constant, is the leftover factor: 6x dx, minus sin t dt, 8x dx, and minus sin t dt again. Two different integrands can share the same u; what matters is that du is present.
For each integrand, find the inside of the power or the exponential first, then confirm its derivative is present. Make all four matches before checking.
Two of the integrands use the same u, cosine of t, and it is worth seeing why. In one the cosine is cubed in the denominator, in the other cubed in the numerator, but both times the derivative of cosine, minus sine, is sitting there as a factor. The position of the cube does not matter; the presence of the derivative does.
The exponential case shows that u need not be inside a bracket. When e is raised to a complicated power, the exponent is the inside. Its derivative is 8x, and the integrand has x, so a constant of one eighth will be needed. You will do exactly that integral in Example 5.35.
Sorting
Sort into buckets
For each integrand, is the derivative of the natural u present exactly, present up to a constant factor, or missing a variable?
For each item, pick the natural u, compute du from it, and compare with what is actually in the integrand. The three buckets are the three situations substitution can meet.
Present exactly is the easy case. Present up to a constant is almost as easy: you multiply du by the missing number, and the constant moves outside. That is Part 3.
A missing factor of x is a different kind of failure. The integral of e to the x squared needs 2x dx, and there is no x anywhere in the integrand. No number fixes that. The same goes for sine of x squared. Both of these, it turns out, have no elementary antiderivative at all, which you will meet at the end of the lesson.
Section
Part 2
Concept
Step three is the one people skip. If the new integral still contains an x, or is no easier than the old one, the choice of u was wrong and you should try another before doing any algebra.
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 508 — Problem-Solving Strategy: Integration by Substitution
This is the book's Problem-Solving Strategy, word for word in substance. Steps one, two, four and five are the mechanics you have already seen. Step three is the one that separates a clean solution from a page of algebra that goes nowhere.
After rewriting, look at the new integral before doing anything else. Two things can be wrong. There might still be an x in it, which means some part of the integrand was not used up. Or it might be no easier than the original, which means u was the wrong expression.
Either way, go back to step one and pick a different u. That is not a failure; trying a candidate and rejecting it takes one line, and with practice you will reject bad candidates before writing anything down.
Worked example
\[ \int 6x\left(3x^2+4\right)^4 dx \]
Choose u
Why: The inside of the fourth power.
\[ u = 3x^2 + 4 \]
Compute du
Why: Its derivative is 6x, which is already a factor of the integrand.
\[ du = 6x\,dx \]
Rewrite in u
Why: The factor 6x dx is exactly du.
\[ \int 6x\left(3x^2+4\right)^4 dx = \int u^4\,du \]
Integrate
Why: Power rule.
\[ \int u^4\,du = \frac{u^5}{5} + C \]
Substitute back
Why: Replace u.
\[ \frac{u^5}{5} + C = \frac{\left(3x^2+4\right)^5}{5} + C \]
Check by differentiating
Why: Take C equal to 1 as the book does; the chain rule returns the integrand. At x equal to 1 both sides are 14,406.
\[ \frac{d}{dx}\left[\tfrac15\left(3x^2+4\right)^5 + 1\right] = \tfrac15\cdot 5\left(3x^2+4\right)^4\cdot 6x = 6x\left(3x^2+4\right)^4 \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 508 — Example 5.30 and its Analysis
This is the cleanest possible case: the inside of the fourth power has derivative 6x, and 6x is sitting in front of the bracket. The rewrite turns the whole integrand into u to the fourth du.
Notice the substitution in the fifth line. The answer in u, u to the fifth over five, is not finished until the bracket goes back in. Writing the answer in u is one of the traps later in this part.
The book's Analysis does the check with a particular constant, C equal to 1, to show that the constant plays no part. Differentiating one fifth of the fifth power gives the fourth power times the derivative of the inside, which is 6x. At x equal to 1 both the derivative and the integrand equal 14,406. The derivative of the constant is zero, which is why every antiderivative differs from another only by a constant.
Worked example
\[ \int 3x^2\left(x^3-3\right)^2 dx \]
Choose u
Why: The inside of the square; its derivative 3x squared is present.
\[ u = x^3 - 3, \quad du = 3x^2\,dx \]
Rewrite in u
Why: The factor 3x squared dx is du.
\[ \int 3x^2\left(x^3-3\right)^2 dx = \int u^2\,du \]
Integrate
Why: Power rule.
\[ \int u^2\,du = \frac{u^3}{3} + C \]
Substitute back
Why: Replace u.
\[ \frac{\left(x^3-3\right)^3}{3} + C \]
Check by differentiating at x equal to 2
Why: The chain rule gives the square of x cubed minus 3 times 3x squared; at x equal to 2 that is 25 times 12, the integrand's value.
\[ \frac{d}{dx}\frac{\left(x^3-3\right)^3}{3} = \left(x^3-3\right)^2 3x^2 \;\overset{x=2}{=}\; 25\cdot 12 = 300 \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 508 — Checkpoint 5.25
Try this one yourself before stepping through it. It has exactly the shape of Example 5.30: the bracket is x cubed minus 3, its derivative is 3x squared, and 3x squared is right there in front.
So the whole integral becomes u squared du, and the power rule finishes it: u cubed over three. Put x cubed minus 3 back in and you are done.
The check evaluates both sides at x equal to 2, which is a useful habit when the symbolic derivative is long. The bracket is 8 minus 3, which is 5; its square is 25; and 3x squared is 12. The derivative of the answer gives 25 times 12 as well, 300 on both sides.
Worked example
\[ \int \frac{\sin t}{\cos^3 t}\,dt \]
Choose u
Why: The cosine is cubed, and its derivative, minus sine, is in the numerator.
\[ u = \cos t \]
Compute du
Why: The derivative of cosine is minus sine.
\[ du = -\sin t\,dt \quad\Longrightarrow\quad \sin t\,dt = -du \]
Rewrite in u
Why: The numerator with the dt becomes minus du.
\[ \int \frac{\sin t}{\cos^3 t}\,dt = -\int \frac{du}{u^3} = -\int u^{-3}\,du \]
Integrate
Why: Power rule with exponent minus 3: raise it to minus 2 and divide by minus 2.
\[ -\int u^{-3}\,du = -\left(-\frac12\right)u^{-2} + C = \frac{1}{2u^2} + C \]
Substitute back
Why: Replace u by cos t.
\[ \int \frac{\sin t}{\cos^3 t}\,dt = \frac{1}{2\cos^2 t} + C \]
Figure (svg): Three vertically shifted copies of the curve one over two cos squared t, for C equal to minus 1, 0 and 1, on t from minus 1.25 to 1.25, together with the dashed integrand sin t over cos cubed t, which is negative left of zero and positive right of it.
Check by differentiating
Why: The chain rule on one half times cosine to the minus 2 returns the integrand; at t equal to one half both sides are 0.70934.
\[ \frac{d}{dt}\tfrac12(\cos t)^{-2} = \tfrac12(-2)(\cos t)^{-3}(-\sin t) = \frac{\sin t}{\cos^3 t} \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, pp. 509-510 — Example 5.32
A power of a trig function, in the denominator, is still an inside and an outside. The inside is cosine of t, and the numerator, sine, is its derivative apart from a minus sign.
The minus sign is the one thing to handle carefully. Since du is minus sine dt, sine dt is minus du, and that minus comes out in front. Then the integral of u to the minus 3 is u to the minus 2 over minus 2, and the two minus signs cancel to give one over 2u squared.
The figure shows three members of the family of answers, one for each value of C, and the dashed integrand beneath them. Where the curves fall, the integrand is negative; at t equal to 0 the curves are flat and the integrand is zero; where they rise it is positive. At t equal to one half both the slope and the integrand are 0.70934, which is the check.
Prediction
\[ \int \frac{\cos t}{\sin^2 t}\,dt \]
Predict first
With u = sin t, which is the antiderivative?
Correct: −1/sin t + C
Why: With u equal to sin t, du is cos t dt, which is the whole numerator. The integral becomes the integral of u to the minus 2, which is minus u to the minus 1. So the answer is minus one over sin t, plus C. Check: differentiating minus one over sin t gives cos t over sin squared t, the integrand; at t equal to 1 both are 0.76306.
\[ \int \frac{\cos t}{\sin^2 t}\,dt = \int u^{-2}\,du = -u^{-1} + C = -\frac{1}{\sin t} + C \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 510 — Checkpoint 5.27
Commit to an option before revealing. This is Example 5.32 with sine and cosine swapped, so it is a good test of whether you followed the sign.
This time u is sine of t, and its derivative, cosine, is the numerator with a plus sign, so no minus sign appears in the rewrite. The integral of u to the minus 2 is minus u to the minus 1, and that minus sign is the one that survives.
If you picked one over sine of t, differentiate it: you get minus cosine over sine squared, the negative of the integrand. Checking by differentiation settles sign questions in seconds. The third option comes from treating the square as if it were a cube, and the fourth from reaching for a logarithm, which applies only to u to the minus 1.
Worked example
\[ \int \cos^3 t\,\sin t\,dt \]
Choose u
Why: The cube is of cosine, and minus sine is its derivative.
\[ u = \cos t, \quad du = -\sin t\,dt \]
Rewrite in u
Why: Sine t dt is minus du.
\[ \int \cos^3 t\,\sin t\,dt = -\int u^3\,du \]
Integrate
Why: Power rule.
\[ -\int u^3\,du = -\frac{u^4}{4} + C \]
Substitute back
Why: Replace u.
\[ -\frac{\cos^4 t}{4} + C \]
Check by differentiating
Why: The chain rule gives minus a quarter, times 4 cosine cubed, times minus sine; at t equal to 1 both sides are 0.13272.
\[ \frac{d}{dt}\left(-\frac{\cos^4 t}{4}\right) = -\frac14\cdot 4\cos^3 t\cdot(-\sin t) = \cos^3 t\,\sin t \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 510 — Checkpoint 5.28
Same u as Example 5.32, cosine of t, but now the cube is in the numerator. The derivative of cosine is minus sine, so sine dt is minus du, and a minus sign comes out in front of the integral.
The integral of u cubed is u to the fourth over four, so the answer is minus cosine to the fourth over four, plus C.
The check shows the three factors the chain rule produces: minus one quarter, then four cosine cubed from the power, then minus sine from the inside. The two minus signs cancel and the four cancels the quarter, leaving the integrand. At t equal to 1 both sides are 0.13272. When a check has several factors, write each one down separately; it is where sign errors hide.
Prediction
\[ \frac{d}{dx}(g\circ h)(x) = g'(h(x))\,h'(x) \]
Predict first
When you reverse this chain rule by substitution, should you take u = g(x) or u = h(x)?
Correct: u = h(x), the inner function
Why: The factor that must be used up is h prime of x dx, and that is du only when u is h of x. With u equal to h(x) the integrand becomes g prime of u du, whose antiderivative is g(u). Taking the outer function as u would demand g prime of x in the integrand, which is not there.
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 513 — Exercise 255
Choose before you reveal. The question is phrased abstractly on purpose, so you have to reason from the structure of the chain rule rather than from a particular example.
The chain rule's answer has two factors: g prime evaluated at h of x, and h prime of x. The factor that must be absorbed into du is h prime of x dx. That happens only if u is h of x, the inner function. Then the integral is the integral of g prime of u du, which is g of u.
Choosing the outer function would require its derivative, evaluated at x, to be in the integrand, and it is not. This is why the rule of thumb says u is the inside of something.
Error analysis
Annotate
On: \( \int 6x\left(3x^2+4\right)^4 dx = \int u^4\,du = \frac{u^5}{5} + C \)
A quick test for every indefinite integral: each letter in the answer must also appear in the question.
Every step up to the last was right, which makes this mistake easy to make and easy to miss when you check your own work. The substitution was a private device for doing the integral, not part of the answer.
The reader of your answer asked about x and was never told what u is. An answer in u is therefore incomplete, and on an exam it usually costs the final mark. The fix is step five of the strategy: replace u by the expression it stood for.
The one-line test on the slide works for every indefinite integral: the variable in your answer must be the variable in the question. For definite integrals the rule is different, because the answer is a number, and Part 4 will show you how to avoid substituting back at all.
Section
Part 3
Concept
Often du is in the integrand except for a numerical factor. Solve the du equation for exactly what is present:
\[ u = z^2 - 5 \quad\Longrightarrow\quad du = 2z\,dz \quad\Longrightarrow\quad \tfrac12\,du = z\,dz \]
The constant one half then moves outside the integral, which the constant multiple rule allows.
\[ \int z\left(z^2-5\right)^{1/2}dz = \frac12\int u^{1/2}\,du \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 509 — Example 5.31, substitution with alteration
Very often the derivative of u is in the integrand except for a number. For u equal to z squared minus 5, du is 2z dz, but the integrand only has z dz. That is half of du.
The move is to solve the du equation for exactly what you have: multiply both sides by one half, so that one half du equals z dz. Now the integrand can be rewritten completely in u, with a one half attached.
The one half then comes outside the integral by the constant multiple rule, which you learned in Section 4.10. That rule says a fixed number can pass through an integral sign. The whole of Part 3 turns on the word fixed.
Worked example
\[ \int z\sqrt{z^2-5}\,dz \]
Rewrite the root as a power
Why: Powers are what the power rule handles.
\[ \int z\left(z^2-5\right)^{1/2}dz \]
Choose u and compute du
Why: The inside of the root; its derivative is 2z, but only z is present.
\[ u = z^2 - 5, \quad du = 2z\,dz \]
Adjust the constant
Why: Multiply both sides of the du equation by one half.
\[ \tfrac12\,du = z\,dz \]
Rewrite in u, constant outside
Why: The one half comes out by the constant multiple rule.
\[ \int z\left(z^2-5\right)^{1/2}dz = \frac12\int u^{1/2}\,du \]
Integrate
Why: Power rule: raise to three halves and divide by three halves.
\[ \frac12\int u^{1/2}\,du = \frac12\cdot\frac{u^{3/2}}{3/2} + C \]
Simplify
Why: One half times two thirds is one third.
\[ \frac12\cdot\frac23 u^{3/2} + C = \frac13 u^{3/2} + C \]
Substitute back
Why: Replace u.
\[ \int z\sqrt{z^2-5}\,dz = \frac13\left(z^2-5\right)^{3/2} + C \]
Check by differentiating at z equal to 3
Why: The chain rule gives one third times three halves times the root, times 2z, which is z times the root; at z equal to 3 that is 3 times 2.
\[ \frac{d}{dz}\tfrac13\left(z^2-5\right)^{3/2} = \tfrac13\cdot\tfrac32\left(z^2-5\right)^{1/2}\cdot 2z \;\overset{z=3}{=}\; 3\cdot 2 = 6 \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 509 — Example 5.31
The first line rewrites the root as a one-half power, because the power rule works with exponents, not root signs. Then the familiar pattern starts: u is the inside of the root and du is 2z dz.
Only z dz is present, so the constant is adjusted and the one half comes out in front. The integral of u to the one half is u to the three halves divided by three halves, and dividing by three halves is multiplying by two thirds. One half times two thirds is one third.
The check is worth doing in full once. The derivative of one third of the three-halves power is one third times three halves, times the one-half power, times 2z from the inside. The constants multiply to 1, leaving z times the root, the integrand. At z equal to 3 both sides are 6.
Fill the middle
\[ \int x^2\left(x^3+5\right)^9 dx, \qquad u = x^3+5, \quad du = 3x^2\,dx \]
Fill in the blanks
\int x^2\left(x^3+5\right)^9 dx = \frac{1}{30}\left(x^3+5\right)^___ + C
Why: Only x squared dx is present, which is one third of du. So the integral is one third of the integral of u to the ninth, which is one third times u to the tenth over 10: one thirtieth. Check: differentiating one thirtieth of the tenth power gives one thirtieth times 10 times the ninth power times 3x squared, which is x squared times the ninth power.
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 509 — Checkpoint 5.26
Fill in the blank before checking. The substitution and its du are given, so the only question is the constant.
The integrand has x squared dx, and du is 3x squared dx, so x squared dx is one third of du. The integral becomes one third of the integral of u to the ninth. That integrates to u to the tenth over ten, and one third of one tenth is one thirtieth.
If you wrote one third or one tenth, you used only one of the two constants. Both come from different places: one third from adjusting du, one tenth from the power rule. Differentiating your answer shows it immediately, because the product of the constants in the derivative must come out to exactly 1.
Concept
Try the same trick on an integrand with no factor of x at all:
\[ \int e^{x^2}dx, \qquad u = x^2, \quad du = 2x\,dx \quad\Longrightarrow\quad dx = \frac{du}{2x} \]
\[ \int e^{x^2}dx = \int e^{u}\,\frac{du}{2x} \]
The one over 2x cannot come outside: it changes as x changes, and the constant multiple rule is only for constants. An x is left inside an integral in u, so the substitution has failed.
Figure (svg): Two curves on x from 0.6 to 1.6: the integrand e to the x squared, rising from about 1.4 to about 13, and the derivative of the proposed answer e to the x squared over 2x, which starts negative and stays well below the integrand.
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 510 — every x must be eliminated
Here is the same trick applied where it does not belong. For e to the x squared, the natural u is x squared, with du equal to 2x dx. The integrand has no x at all, so dx on its own is du divided by 2x.
Rewriting gives an integral in u that still contains one over 2x. That factor is not a constant: it is different at every point. The constant multiple rule does not let it through the integral sign, so it stays inside, and the integral now mixes two variables. The substitution has failed.
The figure shows what happens if you move it outside anyway, which is the trap on the next slide. The green curve is what the derivative of your answer should be; the red dashed curve is what it actually is. They do not coincide, and at x equal to 1 the red one is exactly half the green.
Trap
The illegal version of the previous slide:
\[ \int e^{x^2}dx = \frac{1}{2x}\int e^{u}\,du \]
\[ = \frac{e^{x^2}}{2x} + C \]
Wrong. Differentiate it and see.
The quotient rule does not give back the integrand:
\[ \frac{d}{dx}\frac{e^{x^2}}{2x} = e^{x^2} - \frac{e^{x^2}}{2x^2} \]
At x equal to 1 that is 1.359, half of e. Only a constant may cross the integral sign.
This is the most tempting wrong line in the whole topic, because it looks exactly like the legal move from Example 5.31. The only difference is that the thing moved outside contains x.
The quotient rule exposes it at once. Differentiating e to the x squared over 2x gives e to the x squared, minus an extra term. The extra term would vanish only if one over 2x were a constant. At x equal to 1 the derivative is 1.359, half of e, so the answer is wrong by a lot.
The rule to keep is short: numbers may cross the integral sign, variables never do. When a factor of the variable is missing, substitution with that u cannot work, and you must either find another route or accept that there may be none.
Tweak it
Parameter explorer
The curve is the area under cos(kt) from 0 to x, found by u = kt, du = k dt. Slide k. What happens to the height of the curve, and why is that the factor 1/k?
\[ \int_0^{x}\cos({k}t)\,dt = \frac{1}{{k}}\sin({k}x) \]
Start with k equal to 1, where the curve is sine of x with height 1. Then slide k up. The curve oscillates faster, because cosine of kt completes a cycle k times sooner, and its height shrinks.
The height is one over k, and that is the constant the substitution produces. With u equal to kt, du is k dt, so dt is du over k. Geometrically, each hump of cosine of kt is k times narrower than a hump of cosine of t, so it encloses k times less area. The substitution just records that squeeze.
This is the most common constant adjustment you will do: any linear inside, kx or kx plus a number, contributes a factor of one over k. Once you trust it, you can write down the integral of cosine of 5x as one fifth of sine of 5x without a formal substitution.
Trap
A linear inside, handled too quickly:
\[ \int \cos(5x)\,dx = \sin(5x) + C \]
Wrong by a factor of five.
With u equal to 5x, du is 5 dx, so dx is one fifth of du:
\[ \int \cos(5x)\,dx = \frac15\int\cos u\,du \]
\[ = \frac15\sin(5x) + C \]
Differentiating the wrong answer gives 5 cos 5x: five times too big.
Linear insides are so common that people stop writing the substitution, and then the constant is the first thing to go. Integrating cosine of 5x to sine of 5x feels right because the derivative of sine is cosine.
But differentiate sine of 5x and the chain rule multiplies by 5. So sine of 5x is an antiderivative of 5 cosine of 5x, not of cosine of 5x. The correct answer divides by the 5.
The slider on the previous slide is the picture of this mistake: the wrong answer has height 1 where the true area only reaches one fifth. A two-second differentiation check catches it every time.
Concept
Sometimes the leftover x is not a missing constant but an extra factor. If u is simple enough, solve the u equation for x and replace it.
\[ u = x - 1 \quad\Longrightarrow\quad x = u + 1, \quad du = dx \]
\[ \int \frac{x}{\sqrt{x-1}}\,dx = \int \frac{u+1}{\sqrt u}\,du \]
Now u is the only variable, and the new integrand splits into two powers of u.
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 510 — the paragraph before Example 5.33
Sometimes du is present but there is an extra x left over, not a missing one. In x over the root of x minus 1, the natural u is x minus 1, and du is dx, which is present. The numerator x is not part of du, so it survives the rewrite.
Because u is so simple, you can solve for x: x is u plus 1. Replace the stray x by that, and the integral is entirely in u.
This is what the book means by eliminating all the expressions in the original variable. It works whenever the substitution equation can be solved for x easily, which is usually when u is linear. It is not the same as the illegal move of Part 3: there, a factor of x was missing, and nothing could be done; here, an x is present, and it is rewritten, not moved.
Step zero
\[ \int \frac{x}{\sqrt{x-1}}\,dx, \qquad u = x - 1 \]
Discussion prompt
You have chosen u and found du equal to dx. Before integrating anything, what is still wrong with the integral, and what single equation fixes it?
Write your answer before revealing. The instinct is to integrate as soon as u and du are written down, and this slide is here to stop that instinct for thirty seconds.
After replacing the root of x minus 1 by the root of u and dx by du, look at what is left. The numerator is still x. An integral in du with an x inside cannot be evaluated, because x is not a constant with respect to u.
The one equation that fixes it is the substitution itself, solved the other way round: x equals u plus 1. That turns the numerator into u plus 1, and then the fraction splits into two powers of u.
Worked example
\[ \int \frac{x}{\sqrt{x-1}}\,dx \]
Choose u and compute du
Why: The inside of the root.
\[ u = x - 1, \quad du = dx \]
Eliminate the stray x
Why: Solve the u equation for x.
\[ x = u + 1 \]
Rewrite in u
Why: Every x is now gone.
\[ \int \frac{x}{\sqrt{x-1}}\,dx = \int \frac{u+1}{\sqrt u}\,du \]
Split the fraction
Why: Divide each term by the root of u.
\[ \int \frac{u+1}{\sqrt u}\,du = \int\left(u^{1/2} + u^{-1/2}\right)du \]
Integrate each power
Why: Power rule twice.
\[ \int\left(u^{1/2} + u^{-1/2}\right)du = \tfrac23u^{3/2} + 2u^{1/2} + C \]
Substitute back
Why: Replace u by x minus 1.
\[ \tfrac23(x-1)^{3/2} + 2(x-1)^{1/2} + C \]
Factor out the root
Why: Take out the one-half power.
\[ (x-1)^{1/2}\left[\tfrac23(x-1) + 2\right] + C \]
Simplify the bracket
Why: Two thirds of x minus 1, plus 2, is two thirds of x plus 2.
\[ \tfrac23(x-1) + 2 = \tfrac23x + \tfrac43 = \tfrac23(x+2) \]
State the answer
Why: The book's factored form.
\[ \int \frac{x}{\sqrt{x-1}}\,dx = \tfrac23(x-1)^{1/2}(x+2) + C \]
Figure (svg): The antiderivative two thirds root of x minus 1 times x plus 2, rising from x equals 1 to 7, with its tangent line at x equals 5 of slope 2.5; below it the integrand x over root of x minus 1, which dips to a minimum of 2 at x equals 2 and has height 2.5 at x equals 5.
Check the slope at x equal to 5
Why: The antiderivative's slope there must be the integrand's value, 5 over the root of 4. Differentiating numerically gives 2.5000.
\[ F'(5) = 2.5 = \frac{5}{\sqrt{4}} = f(5) \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 510 — Example 5.33
Follow the maths line by line with the words covered. The substitution is linear, so du is simply dx, and the stray x is replaced by u plus 1. After that the new integrand splits into u to the one half plus u to the minus one half, two powers the power rule handles.
The last few lines are algebra, not calculus. The book factors out the root of x minus 1 and simplifies what is left to two thirds of x plus 2. You do not have to simplify, but the factored form is easier to check and to use.
The figure makes the check visual. The blue curve is the antiderivative; the orange curve is the integrand. The dashed yellow line is tangent to the blue curve at x equal to 5, and its slope is 2.5. The orange curve at x equal to 5 has height exactly 2.5. That agreement is what it means for one curve to be an antiderivative of the other.
Error analysis
Annotate
On: \( \int x\sqrt{x-1}\,dx = \int x\sqrt{u}\,du = x\cdot\tfrac23u^{3/2} + C \)
Read the argument and find the wrong move before revealing the notes. The first move is fine: u equal to x minus 1 is a sensible choice, and du really is dx.
The error comes in the second and third moves. An x survives inside an integral in u, and then it is treated as a constant and pulled out. But x is not a constant while u varies; x is u plus 1, and it changes with every change in u. That is the illegal move from the trap earlier, in a disguise.
The fix is the one from Example 5.33: replace x by u plus 1, multiply out, and integrate two powers of u. Differentiating the corrected answer returns x times the root of x minus 1, which you should confirm yourself.
Section
Part 4
Concept
For a definite integral the limits change along with the variable: the new limits are where u starts and stops.
\[ \int_a^b f(g(x))\,g'(x)\,dx = \int_{g(a)}^{g(b)} f(u)\,du \]
The justification is the Fundamental Theorem applied to the antiderivative from Theorem 5.7:
\[ \int_a^b f(g(x))\,g'(x)\,dx = F(g(x))\Big|_{x=a}^{x=b} = F(g(b)) - F(g(a)) \]
\[ F(g(b)) - F(g(a)) = F(u)\Big|_{u=g(a)}^{u=g(b)} = \int_{g(a)}^{g(b)} f(u)\,du \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 511 — Theorem 5.8 and equation 5.20
For a definite integral, the substitution comes with one extra job: the limits. The limits a and b are values of x. Once the integral is in u, its limits must be values of u, and the natural values are where u starts and stops: g of a and g of b.
The justification on the slide is equation 5.20 from the book, and it is just the Fundamental Theorem used twice. Evaluate the antiderivative F of g of x between a and b. That is F at g of b minus F at g of a. Now read the same difference as F of u between g of a and g of b, which is the integral in u.
So the definite version adds nothing new to the method. It simply saves you the work of substituting back, as long as you convert the limits.
Notation
Annotate
On: \( \int_a^b f(g(x))\,g'(x)\,dx = \int_{g(a)}^{g(b)} f(u)\,du \)
Step through the notes and pay special attention to the second. The new limits are not new numbers pulled from nowhere; they are the old limits pushed through the substitution formula. You compute them the moment you have written down u.
The third note is the practical reward. Because the integral in u has its own limits, you can evaluate there and stop. There is no plus C, because the answer is a number, and there is no return to x.
The hypotheses matter more than they look. The outer function must be continuous on the whole range of u values between the new limits. You will see in Exercise 305 what happens when that fails.
Concept
Figure (svg): Two number lines. The top one is the x-axis from 0 to 1; the bottom one is the u-axis from 1 to 3. Dashed connectors join each x to u equals 1 plus 2x cubed: the connectors from x near 0 all land bunched near u equals 1, and those from x near 1 spread out toward u equals 3.
For Example 5.34 the substitution is u equal to 1 plus 2x cubed. Push the two x-limits through it:
\[ x = 0 \;\Rightarrow\; u = 1 + 2(0)^3 = 1, \qquad x = 1 \;\Rightarrow\; u = 1 + 2(1)^3 = 3 \]
The whole interval of x from 0 to 1 is carried onto the interval of u from 1 to 3; the integral in u must run over that interval.
Look at the two number lines. The top one is x from 0 to 1; the bottom one is u from 1 to 3. Each dashed connector joins an x to its u. The endpoints are the new limits: 0 goes to 1 and 1 goes to 3.
The spacing tells you what du is doing. Near x equal to 0 the connectors land almost on top of each other, because 6x squared, the stretch factor, is nearly zero there. Near x equal to 1 they fan out, because the stretch factor is 6. The equation du equals 6x squared dx is exactly this local stretching.
The substitution is really a change of ruler. Measuring the same interval with a new ruler changes the numbers at the ends, and forgetting to change them is the commonest error in this part.
Worked example
\[ \int_0^1 x^2\left(1+2x^3\right)^5 dx \]
Choose u and compute du
Why: The inside of the fifth power.
\[ u = 1 + 2x^3, \quad du = 6x^2\,dx \]
Adjust the constant
Why: Only x squared dx is present: one sixth of du.
\[ \tfrac16\,du = x^2\,dx \]
Convert the limits
Why: Push each x-limit through u.
\[ x = 0 \Rightarrow u = 1, \qquad x = 1 \Rightarrow u = 3 \]
Rewrite as an integral in u
Why: New integrand, new limits.
\[ \int_0^1 x^2\left(1+2x^3\right)^5 dx = \frac16\int_1^3 u^5\,du \]
Integrate
Why: Power rule.
\[ \frac16\int_1^3 u^5\,du = \frac16\left[\frac{u^6}{6}\right]_1^3 \]
Evaluate at the u-limits
Why: No return to x is needed.
\[ \frac1{36}\left[3^6 - 1^6\right] = \frac{729 - 1}{36} \]
Simplify
Why: Divide top and bottom by 4.
\[ \frac{728}{36} = \frac{182}{9} \approx 20.222 \]
Check numerically
Why: Simpson's rule on the original integral in x, with two thousand strips, gives the same number.
\[ \int_0^1 x^2\left(1+2x^3\right)^5 dx \approx 20.2222 = \frac{182}{9} \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 511 — Example 5.34
Four of these lines you have done before: choose u, compute du, adjust the constant by one sixth, rewrite. The new line is the fourth, converting the limits. Do it straight after choosing u, before you forget which limits belong to which variable.
Once the integral is in u, with u-limits 1 and 3, you never go back to x. Integrate u to the fifth, evaluate at 3 and 1, and simplify: 729 minus 1 is 728, over 36, which reduces to 182 over 9, about 20.222.
The check uses Simpson's rule, a numerical method, on the original integral in x. It gives 20.2222, matching the exact answer. For definite integrals a numerical check is often easier than differentiating, and any calculator can do it.
Picture it
Figure (svg): Left: the region under x squared times the fifth power of 1 plus 2x cubed, for x from 0 to 1, a thin spike climbing to 243. Right: the region under u to the fifth over 6, for u from 1 to 3, climbing to 40.5. Both are labelled area 182 over 9, about 20.2.
Theorem 5.8 is a statement about areas. The integrand in x and the integrand in u draw completely different regions over different intervals, and the substitution guarantees their areas are equal.
The left panel is the original integrand on x from 0 to 1: a thin spike that shoots up to 243 at the right end. The right panel is one sixth of u to the fifth on u from 1 to 3: lower, wider, and a quite different shape.
Theorem 5.8 says the two shaded areas are equal, and they are, both 182 over 9. Nothing about the pictures makes that obvious, which is the point: the substitution is not a rearrangement of the region, it is a change of the measuring stick. Where u is stretched relative to x, the height is shrunk by the same factor, and the area comes out the same.
Worked example
\[ \int_{-1}^{0} y\left(2y^2-3\right)^5 dy \]
Choose u and compute du
Why: The inside of the fifth power.
\[ u = 2y^2 - 3, \quad du = 4y\,dy \quad\Longrightarrow\quad \tfrac14\,du = y\,dy \]
Convert the limits
Why: Minus 1 goes to 2 minus 3; zero goes to minus 3.
\[ y = -1 \Rightarrow u = -1, \qquad y = 0 \Rightarrow u = -3 \]
Figure (svg): Two number lines. Top: y from minus 1 to 0. Bottom: u from minus 3 to minus 1. Dashed connectors join each y to u equals 2y squared minus 3; they cross, because y equal to minus 1 goes to u equal to minus 1 on the right while y equal to 0 goes to u equal to minus 3 on the left.
Rewrite in u, keeping the order
Why: The lower limit is the image of the lower limit, even though it is the larger number.
\[ \int_{-1}^{0} y\left(2y^2-3\right)^5 dy = \frac14\int_{-1}^{-3} u^5\,du \]
Integrate
Why: Power rule.
\[ \frac14\left[\frac{u^6}{6}\right]_{-1}^{-3} = \frac1{24}\left[(-3)^6 - (-1)^6\right] \]
Evaluate
Why: Both sixth powers are positive.
\[ \frac{729 - 1}{24} = \frac{728}{24} = \frac{91}{3} \approx 30.333 \]
Check the sign and the value
Why: On the interval, y and the fifth power are both negative, so the integrand is positive and a positive answer is right; Simpson's rule on the original gives 30.3333.
\[ y < 0, \;\left(2y^2 - 3\right)^5 < 0 \;\Rightarrow\; \text{integrand} > 0, \quad \int \approx 30.3333 \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 512 — Checkpoint 5.29
Work this one through before stepping. The substitution is the same kind as Example 5.34: u is the inside of the fifth power, and y dy is one quarter of du.
The new feature is the limits. The lower limit y equal to minus 1 goes to u equal to minus 1, and the upper limit y equal to 0 goes to u equal to minus 3. The new lower limit is bigger than the new upper limit. That is fine: keep them in that order. The figure shows why: as y increases, u decreases, so the connectors cross.
The check starts with the sign. On this interval y is negative and the fifth power is negative, so the integrand is positive and the answer must be positive. It is 91 over 3, about 30.333, and Simpson's rule on the original gives the same. If you had swapped the limits to make them look tidy, you would have got minus 91 over 3.
Worked example
\[ \int_0^1 x e^{4x^2+3}\,dx \]
Choose u and compute du
Why: The exponent.
\[ u = 4x^2 + 3, \quad du = 8x\,dx \quad\Longrightarrow\quad \tfrac18\,du = x\,dx \]
Convert the limits
Why: Push 0 and 1 through u.
\[ x = 0 \Rightarrow u = 3, \qquad x = 1 \Rightarrow u = 7 \]
Rewrite in u
Why: New integrand, new limits.
\[ \int_0^1 x e^{4x^2+3}\,dx = \frac18\int_3^7 e^u\,du \]
Integrate and evaluate
Why: The exponential is its own antiderivative.
\[ \frac18 e^u\Big|_3^7 = \frac{e^7 - e^3}{8} \]
Approximate
Why: e to the 7 is about 1096.633 and e cubed about 20.086.
\[ \frac{1096.633 - 20.086}{8} \approx 134.568 \]
Check numerically
Why: Simpson's rule on the original integral agrees to six figures.
\[ \int_0^1 x e^{4x^2+3}\,dx \approx 134.5685 \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 512 — Example 5.35
When e is raised to a complicated power, the exponent is the inside, and here its derivative, 8x, matches the x in front apart from a factor of eight.
The limits convert to 3 and 7, and the integral of e to the u is e to the u, so the exact answer is e to the 7 minus e cubed, over 8. The book gives the decimal 134.568, and it is worth seeing where that comes from: e to the 7 is about 1096.633, e cubed about 20.086, and their difference over 8 is 134.568.
The numerical check agrees to all the digits shown. Notice how large the answer is compared with the interval of length 1: the integrand is enormous near x equal to 1, where the exponent is 7.
Worked example
\[ \int_0^1 x^2\cos\left(\frac{\pi}{2}x^3\right)dx \]
Choose u and compute du
Why: The inside of the cosine.
\[ u = \frac{\pi}{2}x^3, \quad du = \frac{3\pi}{2}x^2\,dx \]
Adjust the constant
Why: Solve for what is present.
\[ x^2\,dx = \frac{2}{3\pi}\,du \]
Convert the limits
Why: Zero stays zero; one goes to pi over 2.
\[ x = 0 \Rightarrow u = 0, \qquad x = 1 \Rightarrow u = \frac{\pi}{2} \]
Rewrite in u
Why: New integrand, new limits.
\[ \int_0^1 x^2\cos\left(\frac{\pi}{2}x^3\right)dx = \frac{2}{3\pi}\int_0^{\pi/2}\cos u\,du \]
Integrate and evaluate
Why: Sine of pi over 2 is 1 and sine of 0 is 0.
\[ \frac{2}{3\pi}\sin u\Big|_0^{\pi/2} = \frac{2}{3\pi}(1 - 0) = \frac{2}{3\pi} \]
Figure (svg): Left: the region under x squared cos of pi x cubed over 2 on x from 0 to 1, a hump peaking near 0.5. Right: the region under two over three pi times cos u on u from 0 to pi over 2, falling from 0.21 to 0. Both have area two over three pi, about 0.212.
Check numerically
Why: Simpson's rule on the original integral.
\[ \int_0^1 x^2\cos\left(\frac{\pi}{2}x^3\right)dx \approx 0.212207 \approx \frac{2}{3\pi} \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 512 — Checkpoint 5.30
Here the inside of the cosine is pi over 2 times x cubed, and its derivative, three pi over 2 times x squared, matches the x squared in front apart from a constant. The constant to adjust is two over three pi, which looks awkward but is just a number.
The limits convert to 0 and pi over 2, which is a lovely coincidence: the integral of cosine from 0 to pi over 2 is exactly 1. So the answer is the constant itself, two over three pi, about 0.2122.
The two panels show the two regions. On the left, a hump in x; on the right, a quarter-wave of cosine in u, scaled down by two over three pi. The areas agree, and Simpson's rule on the original confirms it.
Intuition
A definite integral can be finished either way. Convert the limits and never look back:
\[ \int_a^b f(g(x))g'(x)\,dx = \int_{g(a)}^{g(b)} f(u)\,du \]
Or treat it as indefinite first, substitute back to x, and use the original limits:
\[ \int_a^b f(g(x))g'(x)\,dx = F(g(x))\Big|_a^b \]
Both are correct. What is never correct is a mixture: an integral in u with limits that belong to x.
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 512 — the paragraph before Example 5.36
There are two correct routes for a definite integral, and you should be able to use both. The first converts the limits and stays in u to the end. The second treats the integral as indefinite, returns to x, and then uses the original limits.
Converting the limits is usually shorter, because you skip substituting back, and the u-integral often has simpler numbers. Substituting back is useful when you already have the antiderivative in x, or when you want to reuse it for several different limits.
What you must never do is mix them: an integral in u carrying the x-limits, or an antiderivative in x evaluated at the u-limits. Both give wrong numbers, and the trap later in this part shows how wrong.
Worked example
\[ \int_0^{\pi/2}\cos^2\theta\,d\theta \]
Rewrite with an identity
Why: No substitution works on a square of cosine directly; the double-angle identity removes the square.
\[ \cos^2\theta = \frac{1+\cos 2\theta}{2} \]
Split the integral
Why: Linearity.
\[ \int_0^{\pi/2}\cos^2\theta\,d\theta = \frac12\int_0^{\pi/2}d\theta + \frac12\int_0^{\pi/2}\cos 2\theta\,d\theta \]
Substitute in the second integral
Why: A linear inside; adjust the constant and convert the limits.
\[ u = 2\theta, \quad \tfrac12\,du = d\theta, \quad \theta: 0 \to \tfrac{\pi}{2} \;\Rightarrow\; u: 0 \to \pi \]
Rewrite
Why: The second integral picks up another one half.
\[ = \frac12\int_0^{\pi/2}d\theta + \frac12\cdot\frac12\int_0^{\pi}\cos u\,du \]
Evaluate each piece
Why: The first is the length of the interval; sine of pi and sine of 0 are both zero.
\[ = \frac{\theta}{2}\Big|_0^{\pi/2} + \frac14\sin u\Big|_0^{\pi} = \frac{\pi}{4} + 0 \]
Figure (svg): The curve cos squared theta from 0 to pi over 2, falling from 1 to 0, with a dashed horizontal line at one half. The part of the curve above the line, from 0 to pi over 4, is shaded green; the gap below the line, from pi over 4 to pi over 2, is shaded red; the two pieces have the same size.
Check the other route and the picture
Why: Substituting back instead gives one half theta plus one quarter sine 2 theta between 0 and pi over 2, again pi over 4; and the figure shows the area is half of the 1 by pi-over-2 rectangle.
\[ \left[\tfrac{\theta}{2} + \tfrac14\sin 2\theta\right]_0^{\pi/2} = \frac{\pi}{4} \approx 0.785398 \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, pp. 512-513 — Example 5.36
This example shows substitution as one tool among several. No choice of u works on cosine squared directly: with u equal to cosine, du is minus sine, and there is no sine present. So the first move is an identity, the double-angle formula, which replaces cosine squared by one half plus one half cosine of 2 theta.
Now the integral splits in two. The first piece is trivial. The second has a linear inside, 2 theta, so u equal to 2 theta gives another factor of one half and new limits 0 and pi. The sine of pi and the sine of 0 are both zero, so the second piece vanishes, and the answer is pi over 4.
The check does it the other way, substituting back instead of changing the limits, and gets the same pi over 4. The figure gives a third check: the curve swings above and below the line at height one half by equal amounts, so the area is half of the rectangle, pi over 4.
Comparison
Comparison matrix
| change the limits | substitute back | |
|---|---|---|
| variable at the end | u | x |
| limits used | g(a) and g(b) | a and b |
| Example 5.34: limits | 1 and 3 | 0 and 1 |
| Example 5.35: value | (e⁷ − e³)/8 | (e⁷ − e³)/8 |
| + C needed? | no | no |
Fill in every blank before checking. The table lines the two routes up side by side, using the examples you just did, so you can see exactly where they differ.
The differences are all at the end: which variable the antiderivative is in, and which limits it is evaluated at. The middle, choosing u, computing du, integrating, is identical. The value is identical too, because both routes are correct; Example 5.35 gives e to the 7 minus e cubed over 8 either way.
The last row is a small but real point. Neither route needs a plus C. A definite integral is a number, and any constant would cancel when you subtract the value at the lower limit from the value at the upper one.
Trap
Example 5.34 with the limits left alone:
\[ \int_0^1 x^2(1+2x^3)^5 dx \]
\[ = \frac16\int_0^1 u^5\,du \]
\[ = \frac{1}{36} \approx 0.028 \]
Wrong: the true value is about 20.2.
The limits 0 and 1 are values of x. In an integral in u they must be values of u:
\[ \frac16\int_1^3 u^5\,du = \frac{182}{9} \]
Label limits while you work, as x equals 0 or u equals 1, and the mistake cannot happen.
This is the error that costs the most marks in this topic, and it is very easy to make. Everything is right except the limits: the integral is correctly rewritten in u, but it still runs from 0 to 1, which were values of x.
The result, one thirty-sixth, is not slightly off; it is about seven hundred times too small. The true integral runs over u from 1 to 3, where u to the fifth is much bigger.
The habit that prevents it is cheap. Whenever you write limits during a substitution, label them with their variable: x equals 0 at the bottom, or u equals 1. An integral in du with a label saying x is a contradiction you will notice at once.
Estimation
\[ \int_0^2 3(1-x)^2\,dx \]
Predict first
A left Riemann sum with 50 rectangles is 2.0016. Before computing the exact value, which is it most likely to be?
Correct: Exactly 2
Why: Fifty rectangles on an interval of length 2 are only 0.04 wide, so the left sum should sit very close to the true area; a nearby simple number is 2. Substitution confirms it on the next slide. Only 6 is the area of the rectangle 3 by 2 that encloses the curve, far too big.
Figure (svg): Fifty thin rectangles of a left Riemann sum under the parabola y equals 3 times the square of 1 minus x on x from 0 to 2; the parabola touches zero at x equals 1. The rectangles total 2.0016; the exact area is 2.
Make your prediction before revealing. The exercise asks you to do what a working scientist does: get a numerical estimate first, then an exact answer, and make sure they agree.
The figure shows the fifty rectangles of the left Riemann sum under the parabola. They are so thin that they follow the curve closely, and their total, 2.0016, is almost certainly within a few thousandths of the true area. A number that close to 2 is a strong hint.
Six is the area of the whole rectangle that encloses the curve, three high and two wide. The curve fills only a third of it, which matches an exact answer of 2.
Worked example
\[ \int_0^2 3(1-x)^2\,dx \]
Choose u and compute du
Why: The inside of the square; its derivative is minus 1.
\[ u = 1 - x, \quad du = -dx \]
Convert the limits
Why: Zero goes to 1; two goes to minus 1.
\[ x = 0 \Rightarrow u = 1, \qquad x = 2 \Rightarrow u = -1 \]
Rewrite in u
Why: Minus du replaces dx.
\[ \int_0^2 3(1-x)^2\,dx = -\int_1^{-1} 3u^2\,du \]
Integrate and evaluate
Why: Power rule.
\[ -u^3\Big|_1^{-1} = -\left[(-1)^3 - 1^3\right] = -(-2) = 2 \]
Check against the Riemann sum
Why: Fifty left rectangles gave 2.0016, just above: the parabola falls on the first half, so left heights overestimate there, and the two halves do not cancel exactly.
\[ L_{50} = 2.0016, \quad L_{50} - 2 = 0.0016 \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 514 — Exercise 288
The inside of the square is 1 minus x, whose derivative is minus 1. So du is minus dx, and a minus sign appears in front. The limits convert to 1 and minus 1, and they run downward, like Checkpoint 5.29.
Integrating 3u squared gives u cubed, and evaluating between 1 and minus 1 gives minus 1 minus 1, which is minus 2. The minus sign in front makes it 2, exactly.
The check compares with the Riemann sum. The left sum overshoots by 0.0016, and the reason is in the picture: on the first half the curve is falling, so left-endpoint heights are too tall, and on the second half they are too short, and those two errors almost cancel but not quite.
Worked example
\[ \int_0^2 (1-t)\cos(\pi t)\,dt \]
Choose the half-turn substitution
Why: Centre the interval: let u measure the distance from t equal to 1.
\[ u = 1 - t, \quad du = -dt, \quad t: 0 \to 2 \;\Rightarrow\; u: 1 \to -1 \]
Rewrite the cosine
Why: Cosine of pi minus pi u is minus cosine of pi u.
\[ \cos(\pi t) = \cos(\pi - \pi u) = -\cos(\pi u) \]
Rewrite the integral
Why: The minus from du and the minus from the cosine cancel; flip the limits with a third minus.
\[ \int_0^2 (1-t)\cos(\pi t)\,dt = \int_1^{-1} u\cos(\pi u)\,du = -\int_{-1}^{1} u\cos(\pi u)\,du \]
Use odd symmetry
Why: u times cos(pi u) is odd, so its integral over an interval symmetric about 0 is zero.
\[ h(-u) = -u\cos(-\pi u) = -h(u) \;\Rightarrow\; \int_{-1}^{1} h(u)\,du = 0 \]
Figure (svg): The curve 1 minus t times cos pi t on t from 0 to 2. It is positive on 0 to one half and on 1 to three halves (shaded green) and negative on one half to 1 and on three halves to 2 (shaded red). A dot at t equals 1 on the axis marks the centre of symmetry: rotating the graph half a turn about it swaps the green and red pieces.
Check numerically
Why: Simpson's rule on the original gives zero to machine precision, while the first half alone is 0.2026: the cancellation is real.
\[ \int_0^2 \approx 0.0000, \qquad \int_0^1 \approx 0.2026 \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 515 — Exercise 311
Sometimes a substitution is used not to compute an antiderivative but to reveal a structure. Here the substitution u equal to 1 minus t measures position from the middle of the interval.
After the substitution the cosine turns into minus cosine of pi u, the minus signs cancel, and the integrand is u times cosine of pi u. That function is odd: replacing u by minus u changes its sign. The integral of an odd function over an interval symmetric about zero is zero, because the left half cancels the right half exactly.
The figure shows the same fact in t. Rotating the graph half a turn about the yellow point swaps every green piece with an equal red piece. Simpson's rule confirms the total is zero, while the first half alone is about 0.2026, so the cancellation is genuine.
Counterexample
\[ \int_0^2 \frac{x}{1-x^2}\,dx, \qquad u = 1 - x^2 \]
Discussion prompt
The substitution turns this into minus one half times the integral of du over u from 1 to minus 3. Is that a legitimate calculation? If not, what went wrong?
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 514 — Exercise 305
Write your answer before revealing it. The calculation looks routine: the limits convert to 1 and minus 3, and the integral of du over u is a logarithm.
But one over u is undefined at u equal to 0, and 0 lies between 1 and minus 3. Theorem 5.8 requires the outer function to be continuous on the whole range of u, and that hypothesis fails. Back in x the problem is visible too: the denominator 1 minus x squared is zero at x equal to 1, inside the interval, so the integrand has a vertical asymptote there.
The lesson is that substitution is exact but not magic. It transforms a valid integral into a valid integral. It cannot make sense of an integral that was never an ordinary definite integral in the first place.
Section
Part 5
Concept
Some integrands need an identity before any u will work. Exercise 270 has an odd power of sine:
\[ \int\sin^3\theta\,d\theta = \int\sin^2\theta\,\sin\theta\,d\theta \]
Trade the square for cosines with the Pythagorean identity, so that the lone sine can be du:
\[ \int\left(1 - \cos^2\theta\right)\sin\theta\,d\theta \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 513 — Exercise 270 and its hint
Some integrands are one identity away from a substitution. Sine cubed has no obvious inside: there is no function whose derivative is sitting next to it. But split off one sine, and the remaining sine squared can be written in terms of cosine.
Once the integrand is one minus cosine squared, times sine, the pattern is back. Cosine is the inside, and sine is its derivative apart from a sign.
This trick works for any odd power of sine or cosine: save one factor for du and convert the rest with the Pythagorean identity. Even powers need the double-angle identity instead, as in Example 5.36.
Worked example
\[ \int\left(1 - \cos^2\theta\right)\sin\theta\,d\theta \]
Choose u
Why: Cosine, whose derivative is the leftover sine up to a sign.
\[ u = \cos\theta, \quad du = -\sin\theta\,d\theta \]
Rewrite in u
Why: Sine theta d theta is minus du.
\[ = -\int\left(1 - u^2\right)du \]
Integrate
Why: Power rule on each term.
\[ -\int\left(1 - u^2\right)du = -u + \frac{u^3}{3} + C \]
Substitute back
Why: Replace u by cos theta.
\[ \int\sin^3\theta\,d\theta = -\cos\theta + \frac{\cos^3\theta}{3} + C \]
Check by differentiating
Why: The derivative is sine minus cosine squared times sine, which is sine times sine squared; at theta equal to 1 both sides are 0.59582.
\[ \sin\theta - \cos^2\theta\sin\theta = \sin\theta\left(1 - \cos^2\theta\right) = \sin^3\theta \]
OpenStax Calculus Volume 1, §5.5 Substitution §5.5, p. 513 — Exercise 270
After the rewrite, the substitution is exactly like Checkpoint 5.28: u is cosine, and sine d theta is minus du. The integral of one minus u squared is u minus u cubed over three, and the minus sign in front flips both signs.
So the answer is minus cosine plus cosine cubed over three, plus C. It does not look like it has anything to do with sine cubed, which is why the check matters.
Differentiate: minus cosine gives sine, and cosine cubed over three gives cosine squared times minus sine. Factor out the sine and you get sine times one minus cosine squared, which is sine cubed. At theta equal to 1 both sides are 0.59582.
Concept
One factor of x separates a routine integral from an impossible one:
\[ \int x\sin(x^2)\,dx = -\tfrac12\cos(x^2) + C \]
\[ \int\sin(x^2)\,dx = \;? \]
The second has an antiderivative, because the integrand is continuous and the Fundamental Theorem builds one as an area. It has been proved that no combination of powers, roots, exponentials, logarithms and trig functions equals it. The same is true of e to the x squared.
Figure (svg): Two accumulation curves for x from 0 to 3. The first, the area under sin of x squared from 0 to x, computed numerically, rises to about 0.9 and then wobbles around 0.63. The second, the area under x sin of x squared, equals one half minus one half cos x squared, and oscillates between 0 and 1. The integrand sin of x squared is drawn faintly underneath.
Here is the real limit of the method. With a factor of x in front, the integral of sine of x squared is a routine substitution. Without it, no substitution works, because the needed 2x is missing and cannot be supplied.
It is worth being precise about what fails. The integral of sine of x squared exists: the integrand is continuous, so the Fundamental Theorem builds an antiderivative as the area from 0 to x. The blue curve in the figure is that antiderivative, computed numerically. What does not exist is a formula for it using powers, roots, exponentials, logarithms and trig functions. That was proved in the nineteenth century.
So when substitution fails on something like this, the problem is not your skill. For a definite integral you can still get as accurate a number as you like with a numerical method, which is how the blue curve was drawn.
Sorting
Sort into buckets
Sort each integral by what it needs.
Sort each item by what it needs, and do not just guess from the look: compute the du that the natural u would need and see whether it is there.
Two go straight to substitution. The third item in that bucket, t times sine of t squared times cosine of t squared, is Exercise 279 and looks complicated, but with u equal to sine of t squared, du is 2t cosine of t squared dt, and everything is used up.
Two need an identity first, the even and odd powers of trig functions you have just seen. And two have no elementary antiderivative at all. They have the same fingerprint: a square inside the function, with no x outside to supply the derivative.
Prediction
\[ \int e^{x^2}dx \]
Predict first
Which statement is true?
Correct: It has an antiderivative, but no elementary formula for it exists
Why: The integrand is continuous, so the Fundamental Theorem guarantees an antiderivative: the area from 0 to x. What does not exist is a formula built from elementary functions, and that has been proved, so no substitution can succeed. The third option differentiates to e to the x squared minus e to the x squared over 2x squared, not the integrand.
Commit to an answer before revealing. This question separates two ideas that are easy to blur: whether an antiderivative exists, and whether it has a formula.
Existence is guaranteed. The integrand is continuous everywhere, and the Fundamental Theorem says the area from 0 to x is an antiderivative. What fails is the formula: it is a theorem, not a lack of cleverness, that no elementary expression has e to the x squared as its derivative.
This function is too important to leave nameless. Up to constants, its antiderivative is the error function used throughout probability and statistics, and it is computed numerically, just like the sine or logarithm on your calculator.
Real world
Figure (svg): The Rayleigh wind-speed density t over 36 times e to the minus t squared over 72, for t from 0 to 25 metres per second, peaking at t equals 6. The area under it from 0 to 12 is shaded and labelled 0.865.
Discussion prompt
Wind turbine engineers model wind speed with the Rayleigh density below, with sigma equal to 6 metres per second. What fraction of the time is the wind at or below 12 metres per second?
Work the prompt before revealing. Wind speed at a site changes constantly, and engineers describe it with a probability density: the area under the curve between two speeds is the fraction of the time the wind blows at speeds in that range. The Rayleigh density is the standard model for siting turbines.
The integral is a substitution in disguise. The exponent is minus t squared over 72, whose derivative is minus t over 36, and t over 36 is exactly the factor in front. The limits convert to 0 and minus 2, and the answer is 1 minus e to the minus 2, about 0.865.
Notice what made this possible: the factor t in front of the exponential. The normal distribution, which has no such factor, leads to an integral of the e-to-a-square type with no formula, which is why statistics books print tables for it.
Section
Part 6
Pattern
Figure (svg): A flow diagram. Find an inner function whose derivative appears. If it appears exactly or up to a constant, set u, compute du, rewrite every x, integrate, then either substitute back or use the converted limits. If a factor of x is missing, solve u for x if possible, otherwise try an identity or another method.
This is the whole lesson as a procedure. The flow diagram starts where every substitution starts: find the inside, and ask whether its derivative is there.
If it is, exactly or up to a constant, the path to the right is mechanical. If a factor of x is missing, you drop to the lower branch: solve the substitution for x if an x is present to be rewritten, or rewrite with an identity, or accept that there may be no elementary answer.
The last step in the list is not optional. Differentiating an indefinite answer, or estimating a definite one numerically, takes a minute and catches every error in this lesson: the missing constant, the variable moved outside, the wrong limits.
Ranking
Put in order
Order the steps of a definite integral done by changing the limits.
Why: Choosing u comes first because everything else depends on it. The limits must be converted before the integral is rewritten, so that the u-integral never carries x-limits, and the answer is evaluated in u with no return to x.
Drag the steps into order before checking. The order that is genuinely up for debate is the position of the limit conversion.
Convert the limits as soon as you have u, before rewriting the integral. That way the u-integral is born with u-limits, and the mistake of the trap slide never gets a chance. After that, the integral is evaluated in u and the problem ends there, with no return to x.
Check
Check your understanding
Which substitution evaluates the integral of x² e^(x³) dx?
Answer: B
Why: With u equal to x cubed, du is 3x squared dx, so x squared dx is one third of du, and the integral becomes one third of the integral of e to the u, which is one third of e to the x cubed, plus C.
The inside of the exponential is x cubed, and its derivative, 3x squared, matches the x squared in front apart from a factor of three. So u equal to x cubed works, with a one third outside.
The tempting wrong answer is u equal to the whole exponential. Its derivative is not itself; the chain rule gives 3x squared times e to the x cubed. And the choices that do not simplify the integral fail step three of the strategy.
Check
Check your understanding
With u = x² + 1, what does the integral of x(x² + 1)³ from 0 to 2 become?
Answer: B
Why: du is 2x dx, so x dx is half of du. At x equal to 0, u is 1; at x equal to 2, u is 5. The integral is one half of the integral of u cubed from 1 to 5, which is one eighth of 625 minus 1, which is 78.
Push each limit through u equal to x squared plus 1: zero gives 1, and 2 gives 5. The constant comes from du equal to 2x dx, so x dx is half of du.
The first option is the new-variable, old-limits mistake. The last option pushed 2 through the wrong formula. The finished value is one eighth of 5 to the fourth minus 1, which is 78.
Check
Check your understanding
Why can the integral of e^(x²) dx not be done by substitution?
Answer: B
Why: With u equal to x squared, du is 2x dx, and there is no x in the integrand to make it. A constant could be supplied, but one over 2x cannot move outside the integral. In fact no elementary antiderivative exists at all.
The only thing that decides whether a substitution works is whether du is present. For e to the x squared it would need 2x dx, and there is no x to supply it.
The other options are wrong for instructive reasons. The integrand is continuous, so an antiderivative does exist. The answer e to the x squared over 2x is the illegal move from the trap. And exponentials integrate by substitution perfectly well when the inner derivative is there, as in Example 5.35.
Explain it to yourself
Discussion prompt
In Example 5.31 you multiplied du by one half and moved the one half outside the integral. Explain in two sentences why the same move with one over 2x fails for the integral of e to the x squared.
Write your two sentences before revealing. This is the one conceptual point in the lesson that the mechanics hide, so it is worth being able to say it cleanly.
The constant multiple rule is about scaling. Multiplying every height of a region by the same number multiplies its area by that number, so the number can be applied before or after integrating. A factor like one over 2x multiplies different heights by different amounts, so it cannot be applied afterwards. It must stay inside, where it leaves an x in an integral in u.
Exit ticket
\[ \int_0^2 x\sqrt{x^2+5}\,dx \]
Discussion prompt
Evaluate this integral by substitution, converting the limits. Give the exact value and a decimal.
This brings together the definite-integral route: choose u, adjust the constant, convert the limits, integrate in u, evaluate. Try it on paper before revealing.
The inside of the root is x squared plus 5, so x dx is half of du and the limits become 5 and 9. The integral of u to the one half, times one half, is one third of u to the three halves. Nine to the three halves is 27 and five to the three halves is five root five.
The exact answer is 27 minus five root five, over three, about 5.2732, and a numerical check of the original integral agrees.
Recap
| idea | in symbols | watch out for |
|---|---|---|
| the shape | ∫ f(g(x)) g′(x) dx | u is the inside; its derivative must be present |
| the swap | u = g(x), du = g′(x) dx | compute du from u, then look for it |
| constants | (1/2) du = z dz | a constant may move outside; a variable may not |
| stray x | u = x − 1 ⇒ x = u + 1 | no x may remain in the u-integral |
| definite | ∫ₐᵇ … dx = ∫ from g(a) to g(b) of f(u) du | new variable, new limits; never mix |
| the limit | ∫ e^(x²) dx, ∫ sin(x²) dx | antiderivatives exist but have no formula |
\[ \int_a^b f(g(x))\,g'(x)\,dx = \int_{g(a)}^{g(b)} f(u)\,du \]
Next, Section 5.6 applies substitution to exponential and logarithmic integrands, where the inner derivative is often hiding in plain sight.
Stewart, Calculus: Early Transcendentals 8e, §5.5 The Substitution Rule §5.5, pp. 412-420 — the Substitution Rule in Stewart
Substitution is the chain rule read backwards. Its whole content is one condition, the inner derivative must be present, and one bookkeeping rule, every x must go.
Three details carry the marks. A missing constant is supplied by adjusting du, and it moves outside; a missing variable cannot be supplied. A stray x that is present can be rewritten by solving u for x. And in a definite integral, the limits change with the variable, or you return to x before evaluating, never a mixture.
Some integrals, like e to the x squared and sine of x squared, have antiderivatives with no formula at all. Section 5.6 turns to exponential and logarithmic integrands, where substitution does most of the work.
Want this taught 1-on-1? Alexander tutors Calculus I — $55/session, free consultation.