Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Trig substitution

Trig substitution removes a square root by replacing x with a trig function. Use x = a sin θ for √(a² − x²), x = a tan θ for √(a² + x²), and x = a sec θ for √(x² − a²).

By the Calcist team · Updated October 26, 2026 · About a 6-minute read

The three forms

If the integral hasSubstitutedxIdentityThe root becomes
√(a² − x²)x = a sin θ, −π/2 ≤ θ ≤ π/2a cos θ dθ1 − sin²θ = cos²θa cos θ
√(a² + x²)x = a tan θ, −π/2 < θ < π/2a sec²θ dθ1 + tan²θ = sec²θa sec θ
√(x² − a²)x = a sec θ, θ in [0, π/2) or (π/2, π]a sec θ tan θ dθsec²θ − 1 = tan²θa |tan θ|

The θ restrictions make the substitution reversible and fix the sign of the root. For the third form, tan θ is positive when x ≥ a and negative when x ≤ −a, so handle each case separately.

The steps

  1. Check first whether a simpler method works, such as a basic formula or u-substitution.
  2. Match the root to a form and substitute for x and dx.
  3. Simplify with the identity so the root disappears.
  4. Integrate the trig integral.
  5. Convert back to x using a right triangle built from the substitution.

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

  1. Form √(a² − x²) with a = 3: let x = 3 sin θ, dx = 3 cos θ dθ. Then √(9 − x²) = 3 cos θ.
  2. The integral becomes ∫ 3 cos θ · 3 cos θ dθ = ∫ 9 cos²θ dθ.
  3. Use cos²θ = (1 + cos 2θ)/2: (9/2)θ + (9/4) sin 2θ + C.
  4. Convert back. θ = sin−1(x/3); sin 2θ = 2 sin θ cos θ = 2 · (x/3) · √(9 − x²)/3.
  5. Answer: (9/2) sin−1(x/3) + (x/2)√(9 − x²) + C.

Example 2: ∫ dx / √(1 + x²)

  1. Form √(a² + x²) with a = 1: let x = tan θ, dx = sec²θ dθ. Then √(1 + x²) = sec θ.
  2. The integral becomes ∫ sec²θ / sec θ dθ = ∫ sec θ dθ = ln|sec θ + tan θ| + C. (See the integral of sec x.)
  3. Convert back: tan θ = x and sec θ = √(1 + x²).
  4. Answer: ln|√(1 + x²) + x| + C.

Example 3: ∫ √(x² − 25) / x dx, for x ≥ 5

  1. Form √(x² − a²) with a = 5: let x = 5 sec θ, dx = 5 sec θ tan θ dθ. For x ≥ 5, √(x² − 25) = 5 tan θ.
  2. The integral becomes ∫ (5 tan θ / 5 sec θ) · 5 sec θ tan θ dθ = ∫ 5 tan²θ dθ.
  3. Use tan²θ = sec²θ − 1: 5 ∫ (sec²θ − 1) dθ = 5 tan θ − 5θ + C.
  4. Convert back: 5 tan θ = √(x² − 25) and θ = sec−1(x/5).
  5. Answer: √(x² − 25) − 5 sec−1(x/5) + C.

Example 4: a definite integral

The area under y = √(x² − 9) from x = 3 to x = 5 uses x = 3 sec θ. Working it through gives an exact area of 10 − (9/2) ln 3 ≈ 5.056. With definite integrals you can either change the limits to θ-values or convert back to x and use the original limits.

Example 5: ∫ √(4 − x²) / x dx

With x = 2 sin θ, the integral becomes ∫ (2 csc θ − 2 sin θ) dθ = 2 ln|csc θ − cot θ| + 2 cos θ + C. Converting back gives 2 ln|(2 − √(4 − x²))/x| + √(4 − x²) + C.

Tips

  • Complete the square first if you see something like √(x² + 2x + 5) = √((x + 1)² + 4).
  • Always draw the triangle: label the sides from the substitution, then read off the other trig ratios.
  • Check your answer by differentiating it.

Verify results with the integral calculator and the derivative calculator, or check angles with the inverse trig calculator.

Sources: OpenStax Calculus Volume 2, 3.3 Trigonometric Substitution; OpenStax Calculus Volume 2, Table of Integrals.

Every worked example on this page was checked with Calcist's own engine and an independent reference.

Questions people ask

What is trig substitution?

An integration technique that replaces x with a trig function so a square root like √(a² − x²) simplifies using a Pythagorean identity.

Which trig substitution should I use?

x = a sin θ for √(a² − x²), x = a tan θ for √(a² + x²), and x = a sec θ for √(x² − a²).

How do I convert back to x after trig substitution?

Draw a right triangle from the substitution, such as sin θ = x/a, find the missing side, and read off the other trig ratios.

When should I not use trig substitution?

When a simpler method works. For example, ∫ x√(a² − x²) dx is easier with u = a² − x².