Substitution is the integration counterpart of the chain rule. When an integrand contains a function and (a constant multiple of) its derivative, you can replace the inner function by a new variable and shrink the integral to a standard form.
The idea
If u=g(x), then du=g′(x)dx. So
∫f(g(x))g′(x)dx=∫f(u)du.
In practice you choose u to be the "inner" function whose derivative also lives in the integrand. After the substitution, everything in the integrand , including the differential , must be in terms of u.
Recognising substitution opportunities
The classical cue: the integrand is a product where one factor is the derivative of another factor (up to a constant). For example, in ∫2xcos(x2)dx, the 2x is the derivative of x2, the inner function in cos(x2). Set u=x2 and the integral becomes ∫cosudu=sinu+C=sin(x2)+C.
A second cue: the integrand contains a composition h(g(x)) and you suspect that "untangling" g will help. Even when g′(x) is not literally present, sometimes you can manufacture it by multiplying and dividing.
Standard substitutions
Integrand contains
Try
g(x)n⋅g′(x)
u=g(x)
sinnxcosx, cosnxsinx
u=sinx or cosx
tannxsec2x
u=tanx
eg(x)⋅g′(x)
u=g(x)
g(x)g′(x)
u=g(x), gives ln
a2−x2
x=asinθ
a2+x2
x=atanθ
x2−a2
x=asecθ
Trigonometric substitution
When a radical appears, ordinary u-substitution stalls. Trigonometric substitution converts the radical into a single trigonometric function via Pythagorean identities.
For a2−x2, put x=asinθ, −2π≤θ≤2π. Then a2−x2=a2cos2θ, a2−x2=acosθ, and dx=acosθdθ. The integral becomes a trigonometric integral, which you finish using identities, and then convert back to x via a right-triangle picture.
For a2+x2, put x=atanθ: a2+x2=a2sec2θ. For x2−a2, put x=asecθ.
The g(x)g′(x) form
Whenever the integrand looks like a derivative divided by the original function, the answer is a logarithm:
∫g(x)g′(x)dx=ln∣g(x)∣+C.
This unifies several common patterns: ∫tanxdx=∫cosxsinxdx=−ln∣cosx∣+C, ∫x2+12xdx=ln(x2+1)+C, and so on.
Worked examples
Example 1.∫2xex2dx.
Let u=x2, du=2xdx. Integral becomes ∫eudu=eu+C=ex2+C.
Example 2.∫sin4xcosxdx.
Let u=sinx, du=cosxdx. Integral =∫u4du=5u5+C=5sin5x+C.
Example 3.∫xlnxdx.
Let u=lnx, du=xdx. Integral =∫udu=ln∣lnx∣+C.
Example 4.∫1+x4xdx.
Let u=x2, du=2xdx. Integral =21∫1+u2du=21tan−1(x2)+C.
Example 5.∫4−x2dx.
Let x=2sinθ, dx=2cosθdθ. Then 4−x2=2cosθ. Integral =∫2cosθ⋅2cosθdθ=4∫cos2θdθ=4⋅2θ+sinθcosθ=2θ+2sinθcosθ+C. Back-substitute: sinθ=x/2, θ=sin−1(x/2), cosθ=4−x2/2. So the integral equals 2sin−1(x/2)+2x4−x2+C.
Example 6.∫sin2x+4cosxdx.
Let u=sinx, du=cosxdx. Integral =∫u2+4du=21tan−1(u/2)+C=21tan−1(2sinx)+C.
Try it yourself
∫3x2x3+1dx
∫1+x2etan−1xdx
∫tan3xsec2xdx
∫x2+9dx
∫xsin(lnx)dx
∫cosxcos(sinx)dx
∫9−x2dx
∫1−x6x2dx
∫x2+6x+13dx (complete the square first)
∫x2+3x+12x+3dx
∫sec4xdx (split off one sec2x)
∫ex+e−xdx (multiply numerator and denominator by ex)
∫x1+xdx (let u=1+x)
∫1+sin4xsin2xdx
Pitfalls and tricks
The differential must come along. When you set u=g(x), you must also replace dx with du/g′(x).
Re-substitute at the end of an indefinite integral. The answer must be in terms of the original variable x.
Complete the square before integrating ax2+bx+c1 , it converts the denominator into u2+k or u2−k, which match standard forms.
For ∫f(linear)dx, e.g. ∫sin(3x+2)dx, use u=3x+2 and remember du=3dx , a constant scaling.