Integration by Substitution

When an integral is not in a direct standard form, we often simplify it by changing the variable. This technique is called integration by substitution.

The key idea is to identify a part of the integrand, say g(x)g(x), whose derivative g(x)g'(x) also appears in the integral. Then the integral can be reduced to a simpler form.

General Rule

If I=f(g(x))g(x)dx,I = \int f(g(x))\,g'(x)\,dx, then we put t=g(x).t = g(x). Differentiating, dtdx=g(x)dt=g(x)dx.\frac{dt}{dx} = g'(x) \quad \Rightarrow \quad dt = g'(x)\,dx. So the integral becomes I=f(t)dt.I = \int f(t)\,dt. After integrating with respect to tt, we replace tt by g(x)g(x).

Steps of the Method

  1. Choose a suitable substitution t=g(x)t = g(x).
  2. Differentiate to get dt=g(x)dxdt = g'(x)dx.
  3. Rewrite the whole integral in terms of tt.
  4. Integrate with respect to tt.
  5. Substitute back in terms of xx.

Integrals of Standard Trigonometric Functions using Substitution

Using substitution, we can derive the integrals of trigonometric functions that are not immediately obvious from standard derivatives.

  1. Integral of tanx\tan x: tanxdx=sinxcosxdx.\int \tan x\,dx = \int \frac{\sin x}{\cos x}\,dx. Put t=cosxt = \cos x, so dt=sinxdxdt = -\sin x\,dx. Then, tanxdx=dtt=lnt+C=lncosx+C=lnsecx+C.\int \tan x\,dx = -\int \frac{dt}{t} = -\ln|t| + C = -\ln|\cos x| + C = \ln|\sec x| + C.

  2. Integral of cotx\cot x: cotxdx=cosxsinxdx.\int \cot x\,dx = \int \frac{\cos x}{\sin x}\,dx. Put t=sinxt = \sin x, so dt=cosxdxdt = \cos x\,dx. Then, cotxdx=dtt=lnt+C=lnsinx+C.\int \cot x\,dx = \int \frac{dt}{t} = \ln|t| + C = \ln|\sin x| + C.

  3. Integral of secx\sec x: Multiply and divide by (secx+tanx)(\sec x + \tan x): secxdx=secx(secx+tanx)secx+tanxdx\int \sec x\,dx = \int \frac{\sec x(\sec x + \tan x)}{\sec x + \tan x}\,dx =sec2x+secxtanxsecx+tanxdx.= \int \frac{\sec^2 x + \sec x\tan x}{\sec x + \tan x}\,dx. Put t=secx+tanxt = \sec x + \tan x, so dt=(secxtanx+sec2x)dx.dt = (\sec x\tan x + \sec^2 x)dx. Therefore, secxdx=dtt=lnt+C=lnsecx+tanx+C.\int \sec x\,dx = \int \frac{dt}{t} = \ln|t| + C = \ln|\sec x + \tan x| + C.

  4. Integral of cscx\csc x: Multiply and divide by (cscxcotx)(\csc x - \cot x): cscxdx=cscx(cscxcotx)cscxcotxdx\int \csc x\,dx = \int \frac{\csc x(\csc x - \cot x)}{\csc x - \cot x}\,dx =csc2xcscxcotxcscxcotxdx.= \int \frac{\csc^2 x - \csc x\cot x}{\csc x - \cot x}\,dx. Put t=cscxcotxt = \csc x - \cot x, so dt=(cscxcotx+csc2x)dx.dt = ( -\csc x\cot x + \csc^2 x )dx. Hence, cscxdx=dtt=lnt+C=lncscxcotx+C.\int \csc x\,dx = \int \frac{dt}{t} = \ln|t| + C = \ln|\csc x - \cot x| + C.

Integration using Trigonometric Identities

When the integrand contains powers or products of trigonometric functions, direct substitution may not be enough. In such cases, trigonometric identities help convert the integral into an easier form.

Important Identities

Half-angle formulas

sin2x=1cos2x2,cos2x=1+cos2x2\sin^2 x = \frac{1 - \cos 2x}{2}, \qquad \cos^2 x = \frac{1 + \cos 2x}{2} These are especially useful for even powers of sine and cosine.

Pythagorean identities

sin2x+cos2x=1\sin^2 x + \cos^2 x = 1 sec2xtan2x=1\sec^2 x - \tan^2 x = 1 csc2xcot2x=1\csc^2 x - \cot^2 x = 1 These help convert odd powers into a form suitable for substitution.

Product-to-sum formulas

2sinAcosB=sin(A+B)+sin(AB)2\sin A\cos B = \sin(A+B) + \sin(A-B) 2cosAsinB=sin(A+B)sin(AB)2\cos A\sin B = \sin(A+B) - \sin(A-B) 2cosAcosB=cos(A+B)+cos(AB)2\cos A\cos B = \cos(A+B) + \cos(A-B) 2sinAsinB=cos(AB)cos(A+B)2\sin A\sin B = \cos(A-B) - \cos(A+B) These are very useful when the integrand is a product like sinmxcosnx\sin mx\cos nx or cosmxcosnx\cos mx\cos nx.

Solved Examples

Example 1: Basic Substitution

Evaluate: 2xsin(x2+1)dx\int 2x\sin(x^2 + 1)\,dx

Solution: Step 1: The expression x2+1x^2+1 is inside the sine function, and its derivative is 2x2x, which is present in the integrand. Let t=x2+1.t = x^2 + 1.

Step 2: Differentiate: dt=2xdx.dt = 2x\,dx.

Step 3: Substitute into the integral: 2xsin(x2+1)dx=sintdt.\int 2x\sin(x^2+1)\,dx = \int \sin t\,dt.

Step 4: Integrate: sintdt=cost+C.\int \sin t\,dt = -\cos t + C.

Step 5: Replace tt by x2+1x^2+1: cos(x2+1)+C.-\cos(x^2+1) + C.

Answer: cos(x2+1)+C-\cos(x^2 + 1) + C


Example 2: Substitution Involving Logarithms

Evaluate: lnxxdx\int \frac{\ln x}{x}\,dx

Solution: Step 1: Since the derivative of lnx\ln x is 1x\frac{1}{x}, use the substitution t=lnx.t = \ln x.

Step 2: Then dt=1xdx.dt = \frac{1}{x}\,dx.

Step 3: Substitute: lnxxdx=tdt.\int \frac{\ln x}{x}\,dx = \int t\,dt.

Step 4: Integrate: tdt=t22+C.\int t\,dt = \frac{t^2}{2} + C.

Step 5: Put back t=lnxt = \ln x: (lnx)22+C.\frac{(\ln x)^2}{2} + C.

Answer: (lnx)22+C\frac{(\ln x)^2}{2} + C


Example 3: Substitution with Inverse Trigonometric Functions

Evaluate: etan1x1+x2dx\int \frac{e^{\tan^{-1}x}}{1+x^2}\,dx

Solution: Step 1: The derivative of tan1x\tan^{-1}x is 11+x2\frac{1}{1+x^2}, which appears in the integrand. Let t=tan1x.t = \tan^{-1}x.

Step 2: Then dt=11+x2dx.dt = \frac{1}{1+x^2}\,dx.

Step 3: Substitute: etan1x1+x2dx=etdt.\int \frac{e^{\tan^{-1}x}}{1+x^2}\,dx = \int e^t\,dt.

Step 4: Integrate: etdt=et+C.\int e^t\,dt = e^t + C.

Step 5: Replace tt: etan1x+C.e^{\tan^{-1}x} + C.

Answer: etan1x+Ce^{\tan^{-1}x} + C


Example 4: Integrals of the form f(x)/f(x)f'(x)/f(x)

Evaluate: 2x+3x2+3x+5dx\int \frac{2x+3}{x^2+3x+5}\,dx

Solution: Step 1: The denominator is x2+3x+5,x^2+3x+5, and its derivative is 2x+3,2x+3, which is exactly the numerator. Let t=x2+3x+5.t = x^2+3x+5.

Step 2: Then dt=(2x+3)dx.dt = (2x+3)\,dx.

Step 3: Substitute: 2x+3x2+3x+5dx=1tdt.\int \frac{2x+3}{x^2+3x+5}\,dx = \int \frac{1}{t}\,dt.

Step 4: Integrate: 1tdt=lnt+C.\int \frac{1}{t}\,dt = \ln|t| + C.

Step 5: Replace tt: lnx2+3x+5+C.\ln|x^2+3x+5| + C.

Since x2+3x+5x^2+3x+5 is always positive, the modulus is not strictly necessary, but it is standard to write it.

Answer: lnx2+3x+5+C\ln|x^2 + 3x + 5| + C


Example 5: Integrating Even Powers of Sine/Cosine

Evaluate: sin2(2x+5)dx\int \sin^2(2x+5)\,dx

Solution: Step 1: Use the half-angle identity sin2θ=1cos2θ2.\sin^2 \theta = \frac{1-\cos 2\theta}{2}. Here θ=2x+5\theta = 2x+5. So, sin2(2x+5)=1cos(4x+10)2.\sin^2(2x+5) = \frac{1-\cos(4x+10)}{2}.

Step 2: Rewrite the integral: sin2(2x+5)dx=12[1cos(4x+10)]dx.\int \sin^2(2x+5)\,dx = \frac{1}{2}\int [1-\cos(4x+10)]\,dx.

Step 3: Integrate term by term: =12(1dxcos(4x+10)dx).= \frac{1}{2}\left( \int 1\,dx - \int \cos(4x+10)\,dx \right).

Step 4: Use cos(ax+b)dx=sin(ax+b)a+C.\int \cos(ax+b)\,dx = \frac{\sin(ax+b)}{a} + C. Therefore, =12(xsin(4x+10)4)+C.= \frac{1}{2}\left( x - \frac{\sin(4x+10)}{4} \right) + C.

Step 5: Simplify: =x2sin(4x+10)8+C.= \frac{x}{2} - \frac{\sin(4x+10)}{8} + C.

Answer: x2sin(4x+10)8+C\frac{x}{2} - \frac{\sin(4x + 10)}{8} + C


Example 6: Integrating Odd Powers of Sine/Cosine

Evaluate: sin3xcos2xdx\int \sin^3 x\cos^2 x\,dx

Solution: Step 1: Since the power of sine is odd, separate one factor of sinx\sin x: sin3x=sin2xsinx.\sin^3 x = \sin^2 x\sin x. So, sin3xcos2xdx=sin2xcos2xsinxdx.\int \sin^3 x\cos^2 x\,dx = \int \sin^2 x\cos^2 x\sin x\,dx.

Step 2: Use sin2x=1cos2x.\sin^2 x = 1-\cos^2 x. Then, =(1cos2x)cos2xsinxdx.= \int (1-\cos^2 x)\cos^2 x\sin x\,dx.

Step 3: Let t=cosx,dt=sinxdx.t = \cos x, \qquad dt = -\sin x\,dx. So, dt=sinxdx.-dt = \sin x\,dx.

Step 4: Substitute: (1t2)t2(dt)=(t2t4)dt=(t4t2)dt.\int (1-t^2)t^2(-dt) = -\int (t^2 - t^4)dt = \int (t^4 - t^2)dt.

Step 5: Integrate: (t4t2)dt=t55t33+C.\int (t^4 - t^2)dt = \frac{t^5}{5} - \frac{t^3}{3} + C.

Step 6: Replace t=cosxt = \cos x: cos5x5cos3x3+C.\frac{\cos^5 x}{5} - \frac{\cos^3 x}{3} + C.

Answer: cos5x5cos3x3+C\frac{\cos^5 x}{5} - \frac{\cos^3 x}{3} + C


Example 7: Product to Sum Identities

Evaluate: sin3xcos4xdx\int \sin 3x\cos 4x\,dx

Solution: Step 1: Use the product-to-sum identity 2sinAcosB=sin(A+B)+sin(AB).2\sin A\cos B = \sin(A+B) + \sin(A-B). Take A=3xA=3x and B=4xB=4x. Then, 2sin3xcos4x=sin7x+sin(x)=sin7xsinx.2\sin 3x\cos 4x = \sin 7x + \sin(-x) = \sin 7x - \sin x.

Step 2: Therefore, sin3xcos4x=12(sin7xsinx).\sin 3x\cos 4x = \frac{1}{2}(\sin 7x - \sin x). So the integral becomes sin3xcos4xdx=12(sin7xsinx)dx.\int \sin 3x\cos 4x\,dx = \frac{1}{2}\int (\sin 7x - \sin x)\,dx.

Step 3: Integrate term by term: =12(sin7xdxsinxdx).= \frac{1}{2}\left( \int \sin 7x\,dx - \int \sin x\,dx \right).

Step 4: Use sinaxdx=cosaxa+C.\int \sin ax\,dx = -\frac{\cos ax}{a} + C. Hence, =12(cos7x7+cosx)+C.= \frac{1}{2}\left( -\frac{\cos 7x}{7} + \cos x \right) + C.

Step 5: Simplify: =cosx2cos7x14+C.= \frac{\cos x}{2} - \frac{\cos 7x}{14} + C.

Answer: cosx2cos7x14+C\frac{\cos x}{2} - \frac{\cos 7x}{14} + C