Math Lab
Home/Class XII/Ch 7/Integration by substitution

Integration by substitution

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)u = g(x), then du=g(x)dxdu = g'(x)\,dx. So f(g(x))g(x)dx=f(u)du.\int f(g(x))\,g'(x)\,dx = \int f(u)\,du.

In practice you choose uu 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 uu.

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\int 2x \cos(x^2)\,dx, the 2x2x is the derivative of x2x^2, the inner function in cos(x2)\cos(x^2). Set u=x2u = x^2 and the integral becomes cosudu=sinu+C=sin(x2)+C\int \cos u\,du = \sin u + C = \sin(x^2) + C.

A second cue: the integrand contains a composition h(g(x))h(g(x)) and you suspect that "untangling" gg will help. Even when g(x)g'(x) is not literally present, sometimes you can manufacture it by multiplying and dividing.

Standard substitutions

Integrand containsTry
g(x)ng(x)g(x)^n \cdot g'(x)u=g(x)u = g(x)
sinnxcosx\sin^n x \cos x, cosnxsinx\cos^n x \sin xu=sinxu = \sin x or cosx\cos x
tannxsec2x\tan^n x \sec^2 xu=tanxu = \tan x
eg(x)g(x)e^{g(x)} \cdot g'(x)u=g(x)u = g(x)
g(x)g(x)\dfrac{g'(x)}{g(x)}u=g(x)u = g(x), gives ln\ln
a2x2\sqrt{a^2 - x^2}x=asinθx = a \sin\theta
a2+x2\sqrt{a^2 + x^2}x=atanθx = a \tan\theta
x2a2\sqrt{x^2 - a^2}x=asecθx = a \sec\theta

Trigonometric substitution

When a radical appears, ordinary uu-substitution stalls. Trigonometric substitution converts the radical into a single trigonometric function via Pythagorean identities.

For a2x2\sqrt{a^2 - x^2}, put x=asinθx = a\sin\theta, π2θπ2-\tfrac{\pi}{2} \le \theta \le \tfrac{\pi}{2}. Then a2x2=a2cos2θa^2 - x^2 = a^2\cos^2\theta, a2x2=acosθ\sqrt{a^2-x^2} = a\cos\theta, and dx=acosθdθdx = a\cos\theta\,d\theta. The integral becomes a trigonometric integral, which you finish using identities, and then convert back to xx via a right-triangle picture.

For a2+x2\sqrt{a^2+x^2}, put x=atanθx = a\tan\theta: a2+x2=a2sec2θa^2 + x^2 = a^2\sec^2\theta. For x2a2\sqrt{x^2 - a^2}, put x=asecθx = a\sec\theta.

The g(x)g(x)\frac{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=lng(x)+C.\int \frac{g'(x)}{g(x)}\,dx = \ln|g(x)| + C. This unifies several common patterns: tanxdx=sinxcosxdx=lncosx+C\int \tan x\,dx = \int \dfrac{\sin x}{\cos x}\,dx = -\ln|\cos x| + C, 2xx2+1dx=ln(x2+1)+C\int \dfrac{2x}{x^2 + 1}\,dx = \ln(x^2 + 1) + C, and so on.

Worked examples

Example 1. 2xex2dx\int 2x e^{x^2}\,dx.

Let u=x2u = x^2, du=2xdxdu = 2x\,dx. Integral becomes eudu=eu+C=ex2+C\int e^u\,du = e^u + C = e^{x^2} + C.

Example 2. sin4xcosxdx\int \sin^4 x \cos x\,dx.

Let u=sinxu = \sin x, du=cosxdxdu = \cos x\,dx. Integral =u4du=u55+C=sin5x5+C= \int u^4\,du = \dfrac{u^5}{5} + C = \dfrac{\sin^5 x}{5} + C.

Example 3. dxxlnx\int \dfrac{dx}{x \ln x}.

Let u=lnxu = \ln x, du=dxxdu = \dfrac{dx}{x}. Integral =duu=lnlnx+C= \int \dfrac{du}{u} = \ln|\ln x| + C.

Example 4. x1+x4dx\int \dfrac{x}{1+x^4}\,dx.

Let u=x2u = x^2, du=2xdxdu = 2x\,dx. Integral =12du1+u2=12tan1(x2)+C= \dfrac{1}{2}\int \dfrac{du}{1+u^2} = \dfrac{1}{2}\tan^{-1}(x^2) + C.

Example 5. 4x2dx\int \sqrt{4 - x^2}\,dx.

Let x=2sinθx = 2\sin\theta, dx=2cosθdθdx = 2\cos\theta\,d\theta. Then 4x2=2cosθ\sqrt{4-x^2} = 2\cos\theta. Integral =2cosθ2cosθdθ=4cos2θdθ=4θ+sinθcosθ2=2θ+2sinθcosθ+C= \int 2\cos\theta \cdot 2\cos\theta\,d\theta = 4\int \cos^2\theta\,d\theta = 4 \cdot \dfrac{\theta + \sin\theta\cos\theta}{2} = 2\theta + 2\sin\theta\cos\theta + C. Back-substitute: sinθ=x/2\sin\theta = x/2, θ=sin1(x/2)\theta = \sin^{-1}(x/2), cosθ=4x2/2\cos\theta = \sqrt{4-x^2}/2. So the integral equals 2sin1(x/2)+x4x22+C2\sin^{-1}(x/2) + \dfrac{x\sqrt{4-x^2}}{2} + C.

Example 6. cosxsin2x+4dx\int \dfrac{\cos x}{\sin^2 x + 4}\,dx.

Let u=sinxu = \sin x, du=cosxdxdu = \cos x\,dx. Integral =duu2+4=12tan1(u/2)+C=12tan1(sinx2)+C= \int \dfrac{du}{u^2 + 4} = \dfrac{1}{2}\tan^{-1}(u/2) + C = \dfrac{1}{2}\tan^{-1}\left(\dfrac{\sin x}{2}\right) + C.

Try it yourself

  1. 3x2x3+1dx\int 3x^2 \sqrt{x^3 + 1}\,dx
  2. etan1x1+x2dx\int \dfrac{e^{\tan^{-1}x}}{1 + x^2}\,dx
  3. tan3xsec2xdx\int \tan^3 x \sec^2 x\,dx
  4. dxx2+9\int \dfrac{dx}{x^2 + 9}
  5. sin(lnx)xdx\int \dfrac{\sin(\ln x)}{x}\,dx
  6. cosxcos(sinx)dx\int \cos x \cos(\sin x)\,dx
  7. dx9x2\int \dfrac{dx}{\sqrt{9 - x^2}}
  8. x21x6dx\int \dfrac{x^2}{\sqrt{1-x^6}}\,dx
  9. dxx2+6x+13\int \dfrac{dx}{x^2 + 6x + 13} (complete the square first)
  10. 2x+3x2+3x+1dx\int \dfrac{2x+3}{x^2 + 3x + 1}\,dx
  11. sec4xdx\int \sec^4 x\,dx (split off one sec2x\sec^2 x)
  12. dxex+ex\int \dfrac{dx}{e^x + e^{-x}} (multiply numerator and denominator by exe^x)
  13. x1+xdx\int x\sqrt{1 + x}\,dx (let u=1+xu = 1 + x)
  14. sin2x1+sin4xdx\int \dfrac{\sin 2x}{1 + \sin^4 x}\,dx

Pitfalls and tricks

  • The differential must come along. When you set u=g(x)u = g(x), you must also replace dxdx with du/g(x)du/g'(x).
  • Re-substitute at the end of an indefinite integral. The answer must be in terms of the original variable xx.
  • Complete the square before integrating 1ax2+bx+c\dfrac{1}{ax^2 + bx + c} , it converts the denominator into u2+ku^2 + k or u2ku^2 - k, which match standard forms.
  • For f(linear)dx\int f(\text{linear})\,dx, e.g. sin(3x+2)dx\int \sin(3x+2)\,dx, use u=3x+2u = 3x+2 and remember du=3dxdu = 3\,dx , a constant scaling.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Substitution
6 questions · pick the best answer
Q1

2xcos(x2)dx=\int 2x \cos(x^2)\,dx=

Q2

ex1+exdx=\int \frac{e^x}{1 + e^x}\,dx=

Q3

For 1x2dx\int \sqrt{1 - x^2}\,dx, substitute

Q4

tanxdx=\int \tan x\,dx=

Q5

dx4+x2=\int \frac{dx}{4 + x^2}=

Q6

For sin3xcosxdx\int \sin^3 x \cos x\,dx, set u=u =