Integration by substitution · Mathematics Class 11–12 | StemPy Lab
Course 11.1·Lesson 2 of 3
Integration by substitution
Substitution undoes the chain rule. When the integrand contains an inner function u=g(x) and, up to a constant, its derivative g′(x)
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
recognise an inner function and its derivative inside an integrand;
carry out a substitution in clear steps and return to x at the end;
integrate tanx, cotx, secx and cosecx.
The chain rule, read backwards
The chain rule says dxdF(g(x))=F′(g(x))g′(x). Read it from right to left. If F′=f, then
∫f(g(x))g′(x)dx=F(g(x))+C.
The method is a change of letter. Put u=g(x). Then du=g′(x)dx, and the integral becomes ∫f(u)du. This is easier, because the inner function has gone.
The steps
Choose u. Pick the inner function, often the part inside brackets, under a root, or in a power.
Find du. Differentiate: du=g′(x)dx.
Replace. Write the whole integral in u. No x may remain. A missing constant factor is fine, and you fix it with a number in front.
Integrate in u.
Return to x. Put u=g(x) back.
A shortcut for a linear inside
When the inner function is ax+b, we have du=adx. So
∫f(ax+b)dx=a1F(ax+b)+C.
The factor a1 is easy to forget. The simulation shows why it is needed.
Worked examples
Example 1. Find ∫2xcos(x2)dx.
Let u=x2. Then du=2xdx.
The integral becomes ∫cosudu=sinu+C.
Return to x: sin(x2)+C.
Example 2. Find ∫x2ex3dx.
Let u=x3. Then du=3x2dx, so x2dx=31du.
The integral becomes 31∫eudu=31eu+C.
Return to x: 31ex3+C.
Example 3. Find ∫x2+1xdx.
Let u=x2+1. Then xdx=21du.
The integral becomes 21∫udu=21ln∣u∣+C.
Since x2+1>0, the answer is 21ln(x2+1)+C.
Example 4. Find ∫xx+2dx. Here the derivative of the inside is 1, so the extra x is not a derivative. Replace it too.
Let u=x+2. Then x=u−2 and dx=du.
The integral becomes ∫(u−2)udu=∫(u3/2−2u1/2)du=52u5/2−34u3/2+C.
Return to x: 52(x+2)5/2−34(x+2)3/2+C.
The family f′/f
When the top is the derivative of the bottom, put u=f(x). Then du=f′(x)dx, and
∫f(x)f′(x)dx=ln∣f(x)∣+C.
This gives four integrals that every student should know.
∫tanxdx=∫cosxsinxdx=−ln∣cosx∣+C=ln∣secx∣+C.
∫cotxdx=∫sinxcosxdx=ln∣sinx∣+C.
∫secxdx=ln∣secx+tanx∣+C.
∫cosecxdx=ln∣cosecx−cotx∣+C.
For the third one, multiply the top and the bottom by secx+tanx. The top becomes sec2x+secxtanx, which is the derivative of the bottom secx+tanx. The fourth works the same way with cosecx−cotx.
Practise with new numbers
Try it in Python
Each row of the program has an integrand and the answer that a substitution gave. The program checks every answer by taking its slope. The last row has a deliberate slip.
Common mistakes
Forgetting the constant factor. From du=2xdx we get xdx=21du. Leaving out the half gives an answer twice too large.
Mixing x and u. Once you write u, every x must go. Return to x only at the end.
Stopping at u. The question is in x, so the answer must be too.
Forcing a substitution. If the derivative of the inside is not there, try expanding, or replace x as well, as in Example 4.
Dropping the absolute value.ln∣f(x)∣ is the safe form when f(x) can be negative.
Remember these
Substitution reverses the chain rule: u=g(x) and du=g′(x)dx.
For a linear inside, ∫f(ax+b)dx=a1F(ax+b)+C.
∫ff′dx=ln∣f∣+C.
∫tanxdx=ln∣secx∣, ∫cotxdx=ln∣sinx∣, ∫secxdx=ln∣secx+tanx∣ and ∫cosecxdx=ln∣cosecx−cotx∣.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.