Guides / Integrals
Trig substitution: pick sin, tan, or sec from the square root, then draw the triangle
Short answer
Match the square root to an identity. √(a2 − x2): let x = a sin θ, and the root becomes a cos θ. √(a2 + x2): let x = a tan θ, and it becomes a sec θ. √(x2 − a2): let x = a sec θ, and it becomes a tan θ. Replace dx too (for x = a sin θ, dx = a cos θ dθ), integrate in θ, then draw a right triangle from the substitution to write the answer in x. In a definite integral, change the limits to θ.
Why it works
Each substitution is built so that a Pythagorean identity swallows the square root. With x = 3 sin θ, 9 − x2 = 9 − 9 sin2θ = 9 cos2θ, and the square root of that is 3 cos θ. The other two use 1 + tan2θ = sec2θ and sec2θ − 1 = tan2θ the same way.
To get back to x, read the substitution as a triangle. x = 3 sin θ says sin θ = x/3: opposite side x, hypotenuse 3. Pythagoras gives the adjacent side, √(9 − x2), and then every trig function of θ can be read off the triangle. The restricted ranges of θ (for sin, from −π/2 to π/2) keep cos θ positive, so the square root really is 3 cos θ and not −3 cos θ.
Example 1: a² − x², x = a sin θ
Find ∫ dxx2√(9 − x2).
- x = 3 sin θ, dx = 3 cos θ dθ, √(9 − x2) = 3 cos θa² − x² with a = 3, so use sin.
- ∫ 3 cos θ dθ9 sin2θ · 3 cos θ = 19∫ csc2θ dθThe cos θ from dx cancels the one from the root.
- = −19 cot θ + CThe derivative of cot θ is −csc²θ.
- = −√(9 − x2)9x + CThe triangle has opposite x, hypotenuse 3 and adjacent √(9 − x²), and cot θ is adjacent over opposite.
Example 2: a² + x², x = a tan θ
Find ∫ dx(x2 + 4)3/2.
- x = 2 tan θ, dx = 2 sec2θ dθ, (x2 + 4)3/2 = (2 sec θ)3 = 8 sec3θ4 tan²θ + 4 = 4 sec²θ, and its square root is 2 sec θ.
- ∫ 2 sec2θ8 sec3θ dθ = 14∫ cos θ dθ = 14 sin θ + C1/sec θ = cos θ.
- = x4√(x2 + 4) + Ctan θ = x/2: opposite x, adjacent 2, hypotenuse √(x² + 4). sin θ is opposite over hypotenuse.
Example 3: x² − a², x = a sec θ
Find ∫ √(x2 − 9)x dx for x ≥ 3.
- x = 3 sec θ, dx = 3 sec θ tan θ dθ, √(x2 − 9) = 3 tan θx² − a² with a = 3, so use sec. For x ≥ 3, θ is between 0 and π/2, where tan θ ≥ 0.
- ∫ 3 tan θ3 sec θ · 3 sec θ tan θ dθ = 3∫ tan2θ dθThe sec θ cancels.
- = 3∫ (sec2θ − 1) dθ = 3 tan θ − 3θ + Ctan²θ has no direct antiderivative, but sec²θ − 1 does.
- = √(x2 − 9) − 3 arcsec(x/3) + C3 tan θ is √(x² − 9) from step 1, and θ = arcsec(x/3) from the substitution.
Example 4: a definite integral, limits in θ
Evaluate ∫02 √(4 − x2) dx.
- x = 2 sin θ: x = 0 → θ = 0, x = 2 → θ = π2Change the limits along with the variable, and there's no need to go back to x.
- ∫0π/2 2 cos θ · 2 cos θ dθ = ∫0π/2 4 cos2θ dθThe root is 2 cos θ, and dx = 2 cos θ dθ.
- = ∫0π/2 2(1 + cos 2θ) dθ = [2θ + sin 2θ]0π/2The double-angle identity cos²θ = (1 + cos 2θ)/2.
- = πA check: y = √(4 − x²) is a quarter of a circle of radius 2, and its area is ¼ · π · 2² = π.
Common mistakes, and the exact line they happen on
1. Substituting for x but not for dx
The quarter circle from Example 4.
- √(4 − x2) = 2 cos θ, limits 0 to π2Right so far.
- ∫0π/2 2 cos θ dθ = 2This is the mistake. dx became dθ, but dx = 2 cos θ dθ. Without that factor the answer is 2, not the area of the quarter circle, π ≈ 3.142.
2. Keeping the x-limits after changing to θ
Example 4 again.
- ∫ 4 cos2θ dθ = 2θ + sin 2θRight so far.
- [2θ + sin 2θ]02 = 4 + sin 4 ≈ 3.243This is the mistake. 0 and 2 are values of x. In θ the limits are 0 and π/2, which give π ≈ 3.142. Either change the limits, or go back to x before you evaluate. Don't mix the two.
3. Reading the wrong side off the triangle
The last step of Example 1.
- −19 cot θ + C, with sin θ = x3Right so far.
- cot θ = x√(9 − x2), so the answer is −x9√(9 − x2) + CThis is the mistake. That's tan θ, opposite over adjacent. cot θ is adjacent over opposite, √(9 − x²)/x. Differentiating catches it: at x = 1 the integrand is 1/√8 ≈ 0.354, but the derivative of this answer is about −0.044. Label the triangle's sides before you read anything off it.
Practice
Find ∫ dx√(16 − x2).
Show answer
x = 4 sin θ gives ∫ dθ = θ + C = arcsin(x/4) + C.
Find ∫ dxx2 + 9.
Show answer
x = 3 tan θ gives 13∫ dθ = 13 arctan(x/3) + C. No square root, but the same substitution works.
Find ∫ x2√(1 − x2) dx.
Show answer
x = sin θ gives ∫ sin2θ dθ = θ2 − sin θ cos θ2, which is ½(arcsin x − x√(1 − x2)) + C.
Evaluate ∫01 dx(x2 + 1)3/2.
Show answer
x = tan θ, θ from 0 to π/4: ∫ cos θ dθ = sin(π/4) = √22 ≈ 0.707.
Find ∫ dx√(x2 − 1) for x > 1.
Show answer
x = sec θ gives ∫ sec θ dθ = ln |sec θ + tan θ|, which is ln(x + √(x2 − 1)) + C.