Trigonometric Substitution Calculator

Published on: June 8, 2025

This Trigonometric Substitution Calculator helps you solve integrals using trigonometric substitution and shows each step clearly. It is useful for integrals involving expressions such as sqrt(a^2-x^2), sqrt(a^2+x^2), or sqrt(x^2-a^2), where a suitable trigonometric substitution can simplify the integrand. This makes it useful for checking answers, understanding how the method works, and practising calculus step by step.

Step-by-step method

  1. Identify the √(a² − x²), √(a² + x²), or √(x² − a²) pattern.
  2. Pick the matching trigonometric substitution.
  3. Compute dx and rewrite the radical using trig identities.
  4. Rewrite the entire integral in θ.
  5. Integrate in θ.
  6. Convert back to x using a right-triangle identity.
  7. Write the final answer (+ C).

Formula bank:

√(a2 − u2) : u = a sin(θ), du = a cos(θ) dθ, √(a2 − u2) = a cos(θ)
√(a2 + u2) : u = a tan(θ), du = a sec2(θ) dθ, √(a2 + u2) = a sec(θ)
√(u2 − a2) : u = a sec(θ), du = a sec(θ)tan(θ) dθ, √(u2 − a2) = a tan(θ)

Example 1: sqrt(25-x^2), x

Step 1 - Write the integral.

In this problem: Start with the given integrand.

(25 − x2)
1
2
dx

Step 2 - Pick the trigonometric substitution.

In this problem: Match the radical to a standard trig-sub form.

√(a2 − u2) : u = a sin(θ), du = a cos(θ) dθ, √(a2 − u2) = a cos(θ)

Step 3 - Plug in the substitution.

In this problem: Use u = x to match the pattern cleanly.

x = 5sin(θ), dx = 5cos(θ) dθ

Step 4 - Rewrite in θ.

In this problem: Substitute x and dx and simplify (principal θ-range removes | |).

25cos(θ)2dθ

Step 5 - Integrate in θ.

In this problem: Integrate the θ-expression (kept non-piecewise).

25cos(θ)2dθ =
25
2
θ +
25
4
sin(2θ)
+ C

Step 6 - Convert back to x.

In this problem: Use trig identities to replace θ.

sin(θ) = x/5 , cos(θ) = √(52 − x2)/5

Step 7 - Final answer.

In this problem: Write the result in terms of x (+ C).

1
2
x(25 − x2)
1
2
+
25
2
asin(x/5)
+ C

Final answer: xsqrt(25 - x^2)/2 + 25asin(x/5)/2 + C

Example 2: sqrt(9+x^2), x

Step 1 - Write the integral.

In this problem: Start with the given integrand.

(x2 + 9)
1
2
dx

Step 2 - Pick the trigonometric substitution.

In this problem: Match the radical to a standard trig-sub form.

√(a2 + u2) : u = a tan(θ), du = a sec2(θ) dθ, √(a2 + u2) = a sec(θ)

Step 3 - Plug in the substitution.

In this problem: Use u = x to match the pattern cleanly.

x = 3tan(θ), dx = 3tan(θ)2 + 3 dθ

Step 4 - Rewrite in θ.

In this problem: Substitute x and dx and simplify (principal θ-range removes | |).

9
1
cos(θ)3
dθ

Step 5 - Integrate in θ.

In this problem: Integrate the θ-expression (kept non-piecewise).

9
1
cos(θ)3
dθ
=
9
4
ln(sin(θ) − 1) +
9
4
ln(sin(θ) + 1) +
9
2
1
cos(θ)2
sin(θ)
+ C

Step 6 - Convert back to x.

In this problem: Use trig identities to replace θ.

tan(θ) = x/3 , sec(θ) = √(32 + x2)/3

Step 7 - Final answer.

In this problem: Write the result in terms of x (+ C).

1
2
x(x2 + 9)
1
2
+
9
2
asinh(x/3)
+ C

Final answer: xsqrt(x^2 + 9)/2 + 9asinh(x/3)/2 + C

Example 3: sqrt(x^2-16), x

Step 1 - Write the integral.

In this problem: Start with the given integrand.

(x2 − 16)
1
2
dx

Step 2 - Pick the trigonometric substitution.

In this problem: Match the radical to a standard trig-sub form.

√(u2 − a2) : u = a sec(θ), du = a sec(θ)tan(θ) dθ, √(u2 − a2) = a tan(θ)

Step 3 - Plug in the substitution.

In this problem: Use u = x to match the pattern cleanly.

x = 4sec(θ), dx = 4sec(θ)tan(θ) dθ

Step 4 - Rewrite in θ.

In this problem: Substitute x and dx and simplify (principal θ-range removes | |).

16tan(θ)2sec(θ)dθ

Step 5 - Integrate in θ.

In this problem: Integrate the θ-expression (kept non-piecewise).

16tan(θ)2sec(θ)dθ = 4ln(sin(θ) − 1) − 4ln(sin(θ) + 1) + 8
1
cos(θ)2
sin(θ)
+ C

Step 6 - Convert back to x.

In this problem: Use trig identities to replace θ.

sec(θ) = x/4 , tan(θ) = √(x2 − 42)/4

Step 7 - Final answer.

In this problem: Write the result in terms of x (+ C).

1
2
x(x2 − 16)
1
2
− 8ln(x + (x2 − 16)
1
2
)
+ C

Final answer: xsqrt(x^2 - 16)/2 - 8log(x + sqrt(x^2 - 16)) + C