Integration

Integration Hub Substitution Rule Integration by Parts Trig Integrals Trig Substitution Improper Integrals Volumes of Revolution

More

Differentiation Limits Differential Equations Series & Sequences Contact

Integration · Advanced Techniques

Trigonometric
Substitution

Eliminating square roots by replacing x with a trig function, and the Pythagorean identity does the heavy lifting.

3Substitution Cases
12Worked Examples
10Quiz Questions
Share this page

§ 01When Trig Substitution Applies

Standard integration methods break down in the face of expressions like √(a² − x²), √(a² + x²), and √(x² − a²). Trig substitution is the tool that removes those square roots entirely.

The core idea is borrowed from right-triangle geometry. Every Pythagorean identity says that some combination of trig functions squared always collapses to a perfect square, and therefore its square root is just another trig function: no radical required.

The technique works in three situations, each corresponding to one of the three Pythagorean identities:

Case 1 — Sine Sub √(a² − x²)

Use x = a sin θ. The identity 1 − sin²θ = cos²θ clears the root.

Case 2 — Tangent Sub √(a² + x²)

Use x = a tan θ. The identity 1 + tan²θ = sec²θ clears the root.

Case 3 — Secant Sub √(x² − a²)

Use x = a sec θ. The identity sec²θ − 1 = tan²θ clears the root.

When the expression is not under a square root Trig substitution also works when you see (a² − x²)ⁿ, (a² + x²)ⁿ, or (x² − a²)ⁿ for any n — including positive integers. The square root is the most common scenario, but the same substitution clears the radical-free version too.

After substituting, you integrate in terms of θ, then convert back to x using a reference triangle or inverse trig functions. The four-step workflow is: choose the substitution → find dx → substitute everything → back-convert.

§ 02Case 1 — The Sine Substitution for √(a² − x²)

Whenever you see a² − x² under or raised to a power, let x = a sin θ.

Case 1 Substitution
x = a sin θ,   dx = a cos θ dθ
√(a² − x²) = a cos θ  (for θ ∈ [−π/2, π/2])
Verification: a² − a²sin²θ = a²(1 − sin²θ) = a²cos²θ. Taking the positive root gives a cos θ.

Reference Triangle for Case 1

Draw a right triangle with hypotenuse a, opposite side x, and adjacent side √(a² − x²). Then sin θ = x/a and cos θ = √(a² − x²)/a. This triangle is essential for converting back at the end.

Key back-conversion identities — Case 1
sin θ = x/a,   cos θ = √(a² − x²)/a,   tan θ = x/√(a² − x²)

Also useful: θ = arcsin(x/a), so any leftover θ in the answer becomes arcsin(x/a).

Example 1 ∫ √(9 − x²) dx
Identify

We have √(a² − x²) with a = 3. Use x = 3 sin θ.

Substitute
dx = 3 cos θ dθ √(9 − x²) = √(9 − 9sin²θ) = 3 cos θ
Integrate
∫ 3 cos θ · 3 cos θ dθ = 9∫ cos²θ dθ

Apply the half-angle identity cos²θ = (1 + cos 2θ)/2:

= 9/2 ∫(1 + cos 2θ) dθ = 9/2 (θ + sin 2θ/2) + C = 9θ/2 + 9 sin 2θ/4 + C
Back-convert

θ = arcsin(x/3). For sin 2θ use sin 2θ = 2 sin θ cos θ = 2(x/3)(√(9−x²)/3):

= 9/2 · arcsin(x/3) + 9/4 · 2x√(9−x²)/9 + C
Answer
∫ √(9 − x²) dx = (9/2) arcsin(x/3) + (x/2)√(9 − x²) + C
Example 2 ∫ x²/√(4 − x²) dx
Substitution

a = 2, let x = 2 sin θ, dx = 2 cos θ dθ, √(4 − x²) = 2 cos θ.

Simplify
∫ (4sin²θ)/(2cos θ) · 2cos θ dθ = 4∫ sin²θ dθ = 4 · (θ/2 − sin 2θ/4) + C = 2θ − sin 2θ + C
Back-convert

θ = arcsin(x/2), sin 2θ = 2 sin θ cos θ = 2(x/2)(√(4−x²)/2) = x√(4−x²)/2:

Answer
= 2 arcsin(x/2) − x√(4−x²)/2 + C

§ 03Case 2 — The Tangent Substitution for √(a² + x²)

When the sum a² + x² appears, let x = a tan θ. The identity 1 + tan²θ = sec²θ removes the radical.

Case 2 Substitution
x = a tan θ,   dx = a sec²θ dθ
√(a² + x²) = a sec θ  (for θ ∈ (−π/2, π/2))
Verification: a² + a²tan²θ = a²(1 + tan²θ) = a²sec²θ. The positive root is a sec θ since sec θ > 0 on (−π/2, π/2).

Reference Triangle for Case 2

Draw a right triangle with opposite side x, adjacent side a, and hypotenuse √(a² + x²). Then tan θ = x/a and sec θ = √(a² + x²)/a.

Key back-conversion identities — Case 2
tan θ = x/a,   sec θ = √(a²+x²)/a,   sin θ = x/√(a²+x²)

θ = arctan(x/a).

Example 3 ∫ 1/√(1 + x²) dx
Substitution

a = 1, let x = tan θ, dx = sec²θ dθ, √(1 + x²) = sec θ.

Integrate
∫ sec²θ / sec θ dθ = ∫ sec θ dθ = ln|sec θ + tan θ| + C
Back-convert

sec θ = √(1+x²), tan θ = x:

Answer
= ln|√(1 + x²) + x| + C  (also written sinh⁻¹(x) + C)
Example 4 ∫ x²/√(x² + 16) dx
Substitution

a = 4, let x = 4 tan θ, dx = 4 sec²θ dθ, √(x²+16) = 4 sec θ.

Simplify
∫ 16tan²θ / (4sec θ) · 4sec²θ dθ = 16∫ tan²θ sec θ dθ

Write tan²θ = sec²θ − 1:

= 16∫ (sec²θ − 1) sec θ dθ = 16∫ (sec³θ − sec θ) dθ

Use reduction: ∫ sec³θ dθ = (1/2)(sec θ tan θ + ln|sec θ + tan θ|):

= 16[½ sec θ tan θ + ½ ln|sec θ + tan θ| − ln|sec θ + tan θ|] + C = 8 sec θ tan θ − 8 ln|sec θ + tan θ| + C
Back-convert

sec θ = √(x²+16)/4, tan θ = x/4:

Answer
= (x√(x²+16))/2 − 8 ln|√(x²+16)/4 + x/4| + C

§ 04Case 3 — The Secant Substitution for √(x² − a²)

When x² − a² appears, let x = a sec θ. The identity sec²θ − 1 = tan²θ clears the radical.

Case 3 Substitution
x = a sec θ,   dx = a sec θ tan θ dθ
√(x² − a²) = a tan θ  (for θ ∈ [0, π/2) ∪ (π/2, π])
Verification: a²sec²θ − a² = a²(sec²θ − 1) = a²tan²θ. We take the positive root a tan θ (assuming tan θ ≥ 0 in the first quadrant).

Reference Triangle for Case 3

Draw a right triangle with hypotenuse x, adjacent side a, and opposite side √(x² − a²). Then sec θ = x/a and tan θ = √(x² − a²)/a.

Key back-conversion identities — Case 3
sec θ = x/a,   tan θ = √(x²−a²)/a,   sin θ = √(x²−a²)/x

θ = arcsec(x/a).

Example 5 ∫ √(x² − 25)/x dx
Substitution

a = 5, let x = 5 sec θ, dx = 5 sec θ tan θ dθ, √(x²−25) = 5 tan θ.

Simplify
∫ (5 tan θ)/(5 sec θ) · 5 sec θ tan θ dθ = 5∫ tan²θ dθ = 5∫ (sec²θ − 1) dθ = 5(tan θ − θ) + C
Back-convert

tan θ = √(x²−25)/5, θ = arcsec(x/5):

Answer
= √(x² − 25) − 5 arcsec(x/5) + C
Example 6 ∫ 1/(x² √(x² − 1)) dx
Substitution

a = 1, let x = sec θ, dx = sec θ tan θ dθ, √(x²−1) = tan θ.

Simplify
∫ (sec θ tan θ) / (sec²θ · tan θ) dθ = ∫ cos θ dθ = sin θ + C
Back-convert

sin θ = √(x²−1)/x (from reference triangle):

Answer
= √(x² − 1)/x + C

§ 05Completing the Square Before Substituting

When the expression under the square root is a general quadratic Ax² + Bx + C, complete the square first to reveal one of the three standard forms.

The goal is to rewrite the quadratic in one of these shapes:

  • a² − (x − h)², use the sine sub with u = x − h
  • a² + (x − h)², use the tangent sub with u = x − h
  • (x − h)² − a², use the secant sub with u = x − h
Example 7 ∫ 1/√(−x² + 6x − 5) dx
Complete the square
−x² + 6x − 5 = −(x² − 6x) − 5 = −(x² − 6x + 9 − 9) − 5 = −(x − 3)² + 9 − 5 = 4 − (x − 3)²
Identify form

This is a² − u² with a = 2, u = x − 3. Let u = 2 sin θ, du = 2 cos θ dθ.

Integrate
∫ 1/(2 cos θ) · 2 cos θ dθ = ∫ dθ = θ + C
Back-convert

θ = arcsin(u/2) = arcsin((x−3)/2):

Answer
= arcsin((x − 3)/2) + C
Example 8 ∫ 1/(x² + 4x + 13) dx
Complete the square
x² + 4x + 13 = (x + 2)² + 9
Identify form

This is a² + u² with a = 3, u = x + 2. Let u = 3 tan θ, du = 3 sec²θ dθ.

Integrate
∫ 3sec²θ / (9sec²θ) dθ = (1/3)∫ dθ = θ/3 + C
Back-convert

θ = arctan(u/3) = arctan((x+2)/3):

Answer
= (1/3) arctan((x + 2)/3) + C

§ 06Further Worked Examples

Four more examples covering definite integrals, higher powers, and mixed cases: the kinds of problems that appear on exams.

Example 9 Definite integral ∫₀² x³/√(4 − x²) dx
Substitution

Let x = 2 sin θ, dx = 2 cos θ dθ. When x = 0: θ = 0. When x = 2: θ = π/2.

Transform limits
∫₀^(π/2) (8sin³θ)/(2cosθ) · 2cosθ dθ = 8∫₀^(π/2) sin³θ dθ

Use sin³θ = sin θ(1 − cos²θ). Let u = cos θ:

= 8∫₁⁰ (1 − u²)(−du) = 8∫₀¹ (1 − u²) du = 8[u − u³/3]₀¹
Answer
= 8(1 − 1/3) = 8 · 2/3 = 16/3
Example 10 ∫ 1/(9 + x²)² dx
Substitution

a = 3, let x = 3 tan θ, dx = 3 sec²θ dθ. Then 9 + x² = 9 sec²θ.

Simplify
∫ (3 sec²θ)/(81 sec⁴θ) dθ = (1/27) ∫ cos²θ dθ = (1/27) · (θ/2 + sin 2θ/4) + C = θ/54 + sin 2θ/108 + C
Back-convert

θ = arctan(x/3), sin 2θ = 2 sin θ cos θ = 2(x/3)·(3/√(9+x²))·(1/(√(9+x²)/3)), simplify using reference triangle: sin θ = x/√(9+x²), cos θ = 3/√(9+x²):

sin 2θ = 2 · (x/√(9+x²)) · (3/√(9+x²)) = 6x/(9 + x²)
Answer
= arctan(x/3)/54 + x/(18(9 + x²)) + C
Example 11 ∫ √(x² − 9)/x² dx
Substitution

a = 3, let x = 3 sec θ, dx = 3 sec θ tan θ dθ, √(x²−9) = 3 tan θ.

Simplify
∫ (3 tan θ)/(9 sec²θ) · 3 sec θ tan θ dθ = ∫ tan²θ/sec θ dθ = ∫ sin²θ/cos θ · cos θ dθ = ∫ sin²θ dθ = θ/2 − sin 2θ/4 + C
Back-convert

θ = arcsec(x/3), sin θ = √(x²−9)/x, cos θ = 3/x, sin 2θ = 2·(√(x²−9)/x)·(3/x) = 6√(x²−9)/x²:

Answer
= (1/2) arcsec(x/3) − 3√(x²−9)/(2x²) + C
Example 12 ∫ 1/(x² √(4 + x²)) dx
Substitution

a = 2, let x = 2 tan θ, dx = 2 sec²θ dθ, √(4+x²) = 2 sec θ.

Simplify
∫ (2 sec²θ)/(4 tan²θ · 2 sec θ) dθ = (1/4) ∫ sec θ/tan²θ dθ

Write sec θ/tan²θ = (1/cos θ)·(cos²θ/sin²θ) = cos θ/sin²θ. Let u = sin θ:

= (1/4) ∫ u⁻² du = (1/4)(−1/u) + C = −1/(4 sin θ) + C
Back-convert

sin θ = x/√(4+x²) from the reference triangle:

Answer
= −√(4 + x²)/(4x) + C

§ 07Quick-Reference Table

This table summarises all three cases. Keep it in mind whenever you spot a quadratic expression under a radical.

Expression Substitution dx Simplified radical Identity used
√(a² − x²) x = a sin θ a cos θ dθ a cos θ 1 − sin²θ = cos²θ
√(a² + x²) x = a tan θ a sec²θ dθ a sec θ 1 + tan²θ = sec²θ
√(x² − a²) x = a sec θ a sec θ tan θ dθ a tan θ sec²θ − 1 = tan²θ

The general workflow always follows four stages:

The Four-Step Process 1. Identify the form — which of the three cases does the integral match?
2. Substitute — replace x and dx, and simplify the radical using the relevant identity.
3. Integrate in θ — the θ-integral should involve only standard trig integrals.
4. Back-convert to x — draw the reference triangle and replace every θ-expression with an x-expression.

§ 08Common Mistakes

Trig substitution has predictable pitfalls. Here are the ones that cost the most marks.

Mistake 1 — Choosing the wrong case Confusing √(a² + x²) with √(a² − x²) is very common under time pressure. √(a² − x²) has the minus sign inside, so it matches the sine sub. √(a² + x²) has the plus sign, so it matches the tangent sub. If you pick the wrong one, the Pythagorean identity will not simplify cleanly.
Mistake 2 — Forgetting to change dx You must differentiate your substitution and replace dx. In x = a sin θ: dx = a cos θ dθ. Forgetting the dθ factor, or computing the derivative of the wrong function, ruins the whole integral.
Mistake 3 — Incorrect back-conversion Never write "θ + C" as your final answer — θ is not the original variable. Always draw the reference triangle and convert every θ-term back to an expression in x. Writing sin θ = x/a for a case-2 (tan) substitution is a frequent triangle error.
Mistake 4 — Sign errors with √(x² − a²) = a tan θ The secant substitution gives √(x² − a²) = a|tan θ|. When θ is in [0, π/2) the tangent is non-negative and |tan θ| = tan θ. For θ in (π/2, π] the tangent is non-positive and you need to track the sign carefully. On most exam problems x ≥ a > 0 so θ ∈ [0, π/2) and the issue does not arise, but be aware of it.
Mistake 5 — Applying trig sub when simpler methods work If the integrand is ∫ x/√(1 − x²) dx, a simple u-substitution u = 1 − x² is faster than trig sub. Always check whether an algebraic substitution or direct formula applies before committing to the more involved trig procedure.
Pro tip — Definite integrals: change limits, don't convert back For definite integrals, converting the limits of integration from x to θ (when x = a) is usually faster than back-converting the antiderivative. Once you have θ-limits, evaluate directly and skip the back-conversion step entirely.

§ 09Related Integration Topics

§ 10Test Your Knowledge

Ten questions covering all three substitution cases, completing the square, back-conversion, and common mistakes. Work through each one before checking the explanation.

Trigonometric Substitution Quiz

Question 1 of 10
Which substitution should you use to evaluate ∫ 1/√(9 − x²) dx?
Question 2 of 10
After applying x = 5 tan θ to an integral involving √(25 + x²), what does √(25 + x²) simplify to?
Question 3 of 10
Which substitution is correct for ∫ √(x² − 16) dx?
Question 4 of 10
When using x = a sin θ, what is dx in terms of θ?
Question 5 of 10
Using the sine substitution x = 2 sin θ in the reference triangle, what is tan θ in terms of x?
Question 6 of 10
To evaluate ∫ 1/(x² + 6x + 10) dx using trig substitution, what is the first step?
Question 7 of 10
Which Pythagorean identity is used to simplify the radical in the tangent substitution?
Question 8 of 10
What is ∫₀^(√3) x³/√(x² + 1) dx? (Hint: use x = tan θ, change limits.)
Question 9 of 10
After using x = 3 sec θ to compute ∫ √(x² − 9)/x dx, you obtain √(x²−9) − 3 arcsec(x/3) + C. What is the critical final step before writing this answer?
Question 10 of 10
Which of the following integrals does NOT require trigonometric substitution — a simpler method is more efficient?
0 out of 10

Cookie Settings