Trigonometric Substitution

Trigonometric substitution replaces x with a trig function to get rid of a square root. Use x = a sin θ for \sqrt{a^2 - x^2}, x = a tan θ for \sqrt{a^2 + x^2} and x = a sec θ for \sqrt{x^2 - a^2}. A Pythagorean identity then turns the root into a single trig term.

Before this lesson: Trigonometric Integrals, U-Substitution and Fundamental Trig Identities

Why it works

A root like √(9 − x²) has no simple antiderivative pattern. But if x = 3 sin θ, then 9 − x² = 9 − 9 sin²θ = 9 cos²θ, and the root is just 3 cos θ. The identity sin²θ + cos²θ = 1 does the work.

Each root form matches one identity: 1 − sin²θ = cos²θ, 1 + tan²θ = sec²θ and sec²θ − 1 = tan²θ. After you integrate in θ, a right triangle built from the substitution gives every trig value in terms of x.

Three right triangles. For x = a sin θ: hypotenuse a, opposite side x, adjacent side the square root of a squared minus x squared. For x = a tan θ: opposite x, adjacent a, hypotenuse the square root of a squared plus x squared. For x = a sec θ: hypotenuse x, adjacent a, opposite the square root of x squared minus a squared.
Draw the triangle that matches your substitution, then read sin θ, cos θ or tan θ in terms of x.

Trigonometric substitution formulas

ExpressionSubstitutionIdentityRoot becomes
\sqrt{a^2 - x^2}x = a\sin\theta,\; dx = a\cos\theta\,d\theta1 - \sin^2\theta = \cos^2\thetaa\cos\theta
\sqrt{a^2 + x^2}x = a\tan\theta,\; dx = a\sec^2\theta\,d\theta1 + \tan^2\theta = \sec^2\thetaa\sec\theta
\sqrt{x^2 - a^2}x = a\sec\theta,\; dx = a\sec\theta\tan\theta\,d\theta\sec^2\theta - 1 = \tan^2\thetaa\tan\theta

Steps:

  1. Match the root to a form and write x and dx in terms of θ.
  2. Simplify the root with the identity.
  3. Integrate in θ (often a trigonometric integral).
  4. Draw the reference triangle and write the answer in terms of x.

Trigonometric substitution examples

Example 1: A sine substitution

Find \int \dfrac{1}{x^2\sqrt{4 - x^2}}\,dx.

x = 2\sin\theta

The root is √(a² − x²) with a = 2.

dx = 2\cos\theta\,d\theta

Differentiate x.

\sqrt{4 - 4\sin^2\theta} = 2\cos\theta

Use 1 − sin²θ = cos²θ (see fundamental trig identities).

\int \dfrac{1}{x^2\sqrt{4 - x^2}}\,dx = \int \dfrac{2\cos\theta}{4\sin^2\theta\cdot 2\cos\theta}\,d\theta

Replace x, dx and the root.

= \int \dfrac{1}{4}\csc^2\theta\,d\theta

Cancel 2 cos θ; 1/sin²θ is csc²θ.

= -\dfrac{1}{4}\cot\theta + C

An antiderivative of csc²θ is −cot θ.

= -\dfrac{\sqrt{4 - x^2}}{4x} + C

From the triangle: cot θ = adjacent/opposite = √(4 − x²)/x.

Answer: -\dfrac{\sqrt{4 - x^2}}{4x} + C

Example 2: The area under a circle

Find \int \sqrt{9 - x^2}\,dx.

x = 3\sin\theta, \; dx = 3\cos\theta\,d\theta

a = 3.

\int \sqrt{9 - x^2}\,dx = \int 3\cos\theta\cdot 3\cos\theta\,d\theta = \int 9\cos^2\theta\,d\theta

The root is 3 cos θ.

= \dfrac{9}{2}\int (1 + \cos 2\theta)\,d\theta

Half-angle identity (see half-angle formulas).

= \dfrac{9}{2}\left(\theta + \dfrac{\sin 2\theta}{2}\right) + C = \dfrac{9}{2}(\theta + \sin\theta\cos\theta) + C

Integrate; sin 2θ = 2 sin θ cos θ.

= \dfrac{9}{2}\arcsin\dfrac{x}{3} + \dfrac{9}{2}\cdot\dfrac{x}{3}\cdot\dfrac{\sqrt{9 - x^2}}{3} + C

From the triangle: θ = arcsin(x/3), sin θ = x/3, cos θ = √(9 − x²)/3.

= \dfrac{9}{2}\arcsin\dfrac{x}{3} + \dfrac{x}{2}\sqrt{9 - x^2} + C

Simplify.

Answer: \dfrac{9}{2}\arcsin\dfrac{x}{3} + \dfrac{x}{2}\sqrt{9 - x^2} + C

Example 3: A tangent substitution

Find \int \dfrac{1}{(x^2 + 4)^{3/2}}\,dx.

x = 2\tan\theta, \; dx = 2\sec^2\theta\,d\theta

The form is a² + x² with a = 2.

(x^2 + 4)^{3/2} = (4\sec^2\theta)^{3/2} = 8\sec^3\theta

Use 1 + tan²θ = sec²θ, then 4^(3/2) = 8.

\int \dfrac{1}{(x^2 + 4)^{3/2}}\,dx = \int \dfrac{2\sec^2\theta}{8\sec^3\theta}\,d\theta = \int \dfrac{1}{4}\cos\theta\,d\theta

Replace and simplify: 1/sec θ = cos θ.

= \dfrac{1}{4}\sin\theta + C

Integrate.

= \dfrac{x}{4\sqrt{x^2 + 4}} + C

From the triangle: sin θ = x/√(x² + 4).

Answer: \dfrac{x}{4\sqrt{x^2 + 4}} + C

Example 4: A secant substitution

Find \int \dfrac{\sqrt{x^2 - 9}}{x}\,dx for x greater than 3.

x = 3\sec\theta, \; dx = 3\sec\theta\tan\theta\,d\theta

The form is x² − a² with a = 3.

\sqrt{9\sec^2\theta - 9} = 3\tan\theta

Use sec²θ − 1 = tan²θ.

\int \dfrac{\sqrt{x^2 - 9}}{x}\,dx = \int \dfrac{3\tan\theta}{3\sec\theta}\cdot 3\sec\theta\tan\theta\,d\theta = \int 3\tan^2\theta\,d\theta

Replace and cancel.

= \int 3(\sec^2\theta - 1)\,d\theta = 3\tan\theta - 3\theta + C

Use tan²θ = sec²θ − 1 and integrate.

= \sqrt{x^2 - 9} - 3\operatorname{arcsec}\dfrac{x}{3} + C

From the triangle: tan θ = √(x² − 9)/3 and θ = arcsec(x/3).

Answer: \sqrt{x^2 - 9} - 3\operatorname{arcsec}\dfrac{x}{3} + C

Example 5: Part of a circular garden

A circular garden has radius 5 m, centered at the origin. How much of its area lies within 3 m east of the north–south line through the center, that is, from x = 0 to x = 3?

A = \int_0^3 2\sqrt{25 - x^2}\,dx

Each vertical strip runs from the bottom of the circle to the top (see area between curves).

\int \sqrt{25 - x^2}\,dx = \dfrac{25}{2}\arcsin\dfrac{x}{5} + \dfrac{x}{2}\sqrt{25 - x^2} + C

Same steps as Example 2 with a = 5.

A = 2\Big[\dfrac{25}{2}\arcsin\dfrac{x}{5} + \dfrac{x}{2}\sqrt{25 - x^2}\Big]_0^3

Evaluate from 0 to 3.

= 2\left(\dfrac{25}{2}\arcsin\dfrac{3}{5} + \dfrac{3}{2}(4)\right) - 0

√(25 − 9) = 4; both terms are 0 at x = 0.

= 25\arcsin 0.6 + 12

Multiply.

\approx 28.09

arcsin 0.6 ≈ 0.6435.

Answer: about 28.1 m², a bit more than a third of the whole garden (25π ≈ 78.5 m²).

Common mistakes

MistakeExample of the errorFix
Forgetting to change dxWriting \int 9\cos\theta\,dxReplace dx too: dx = 3 cos θ dθ.
Picking the wrong substitutionx = 2 sin θ for √(x² + 4)A sum a² + x² needs x = a tan θ.
Leaving θ in the answerFinal answer -\dfrac{1}{4}\cot\theta + CUse the triangle to write everything in x.
Using a² instead of ax = 9 sin θ for √(9 − x²)a is the square root of the constant: x = 3 sin θ.
Trying trig substitution when u-substitution worksx = 2 sin θ for \int x\sqrt{4 - x^2}\,dxThe x outside is half of du for u = 4 − x². Use u-substitution.

Related methods

Completing the square first

A root like √(x² + 6x + 13) becomes √((x + 3)² + 4) after you complete the square. Then let x + 3 = 2 tan θ.

Definite integrals

With limits, change them to θ-values: for x = 3 sin θ, x = 0 gives θ = 0 and x = 3 gives θ = π/2. Then you skip the triangle step.

Inverse trig integrals

Some trig substitution answers are basic formulas you already know, such as \int \dfrac{1}{\sqrt{a^2 - x^2}}\,dx = \arcsin\dfrac{x}{a} + C from integrals that give inverse trig functions.

Practice problems

  1. Use x = 3 sin θ to find \int \dfrac{1}{\sqrt{9 - x^2}}\,dx.
  2. Find \int \dfrac{x^2}{\sqrt{1 - x^2}}\,dx.
  3. Find \int \dfrac{1}{x^2\sqrt{9 - x^2}}\,dx.
  4. Find \int \dfrac{1}{\sqrt{x^2 + 16}}\,dx.
  5. Find \int \dfrac{1}{(x^2 + 1)^{3/2}}\,dx.
  6. Find \int \dfrac{1}{x^2\sqrt{x^2 + 4}}\,dx.
  7. Find \int \dfrac{1}{\sqrt{x^2 - 4}}\,dx for x greater than 2.
  8. Find \int \dfrac{\sqrt{x^2 - 1}}{x}\,dx for x greater than 1.
  9. Evaluate \int_0^2 \sqrt{4 - x^2}\,dx.
  10. Find the area of the ellipse \dfrac{x^2}{9} + \dfrac{y^2}{4} = 1.
Show answers

1.

x = 3\sin\theta, \; dx = 3\cos\theta\,d\theta, \; \sqrt{9 - x^2} = 3\cos\theta

Substitute.

\int \dfrac{3\cos\theta}{3\cos\theta}\,d\theta = \int 1\,d\theta = \theta + C

Simplify and integrate.

= \arcsin\dfrac{x}{3} + C

θ = arcsin(x/3).

Answer: \arcsin\dfrac{x}{3} + C, matching the inverse trig formula.

2.

\int \dfrac{x^2}{\sqrt{1 - x^2}}\,dx = \int \dfrac{\sin^2\theta\cos\theta}{\cos\theta}\,d\theta = \int \sin^2\theta\,d\theta

x = sin θ, dx = cos θ dθ, root = cos θ.

= \dfrac{\theta}{2} - \dfrac{\sin\theta\cos\theta}{2} + C

Half-angle identity, then sin 2θ = 2 sin θ cos θ.

= \dfrac{1}{2}\arcsin x - \dfrac{x\sqrt{1 - x^2}}{2} + C

sin θ = x and cos θ = √(1 − x²).

Answer: \dfrac{1}{2}\arcsin x - \dfrac{x\sqrt{1 - x^2}}{2} + C

3.

\int \dfrac{3\cos\theta}{9\sin^2\theta\cdot 3\cos\theta}\,d\theta = \int \dfrac{1}{9}\csc^2\theta\,d\theta

x = 3 sin θ; same steps as Example 1.

= -\dfrac{1}{9}\cot\theta + C = -\dfrac{\sqrt{9 - x^2}}{9x} + C

Integrate; cot θ = √(9 − x²)/x.

Answer: -\dfrac{\sqrt{9 - x^2}}{9x} + C

4.

\int \dfrac{4\sec^2\theta}{4\sec\theta}\,d\theta = \int \sec\theta\,d\theta

x = 4 tan θ, dx = 4 sec²θ dθ, root = 4 sec θ.

= \ln|\sec\theta + \tan\theta| + C

The integral of sec θ (see integrals that give natural logarithms).

= \ln\left|\dfrac{\sqrt{x^2 + 16} + x}{4}\right| + C

sec θ = √(x² + 16)/4 and tan θ = x/4.

= \ln\left(x + \sqrt{x^2 + 16}\right) + C

ln(A/4) = ln A − ln 4; the constant −ln 4 joins C.

Answer: \ln\left(x + \sqrt{x^2 + 16}\right) + C

5.

\int \dfrac{\sec^2\theta}{\sec^3\theta}\,d\theta = \int \cos\theta\,d\theta = \sin\theta + C

x = tan θ; (x² + 1)^(3/2) = sec³θ.

= \dfrac{x}{\sqrt{x^2 + 1}} + C

sin θ = x/√(x² + 1).

Answer: \dfrac{x}{\sqrt{x^2 + 1}} + C

6.

\int \dfrac{2\sec^2\theta}{4\tan^2\theta\cdot 2\sec\theta}\,d\theta = \int \dfrac{\cos\theta}{4\sin^2\theta}\,d\theta

x = 2 tan θ; sec θ/tan²θ = cos θ/sin²θ.

= -\dfrac{1}{4\sin\theta} + C

Let w = sin θ: the integral of (1/4)w⁻² is −1/(4w).

= -\dfrac{\sqrt{x^2 + 4}}{4x} + C

sin θ = x/√(x² + 4).

Answer: -\dfrac{\sqrt{x^2 + 4}}{4x} + C

7.

\int \dfrac{2\sec\theta\tan\theta}{2\tan\theta}\,d\theta = \int \sec\theta\,d\theta

x = 2 sec θ, dx = 2 sec θ tan θ dθ, root = 2 tan θ.

= \ln|\sec\theta + \tan\theta| + C = \ln\left|\dfrac{x + \sqrt{x^2 - 4}}{2}\right| + C

sec θ = x/2 and tan θ = √(x² − 4)/2.

= \ln\left(x + \sqrt{x^2 - 4}\right) + C

The constant −ln 2 joins C.

Answer: \ln\left(x + \sqrt{x^2 - 4}\right) + C

8.

\int \dfrac{\tan\theta}{\sec\theta}\sec\theta\tan\theta\,d\theta = \int \tan^2\theta\,d\theta

x = sec θ; same steps as Example 4 with a = 1.

= \tan\theta - \theta + C = \sqrt{x^2 - 1} - \operatorname{arcsec} x + C

tan θ = √(x² − 1).

Answer: \sqrt{x^2 - 1} - \operatorname{arcsec} x + C

9.

\int_0^2 \sqrt{4 - x^2}\,dx = \Big[2\arcsin\dfrac{x}{2} + \dfrac{x}{2}\sqrt{4 - x^2}\Big]_0^2

Example 2’s formula with a = 2.

= \left(2\cdot\dfrac{\pi}{2} + 0\right) - 0 = \pi

arcsin 1 = π/2.

Answer: \pi, a quarter of the area of a circle of radius 2.

10.

A = 4\int_0^3 \dfrac{2}{3}\sqrt{9 - x^2}\,dx

Solve for y: y = (2/3)√(9 − x²); use four times the first-quadrant area.

\int_0^3 \sqrt{9 - x^2}\,dx = \Big[\dfrac{9}{2}\arcsin\dfrac{x}{3} + \dfrac{x}{2}\sqrt{9 - x^2}\Big]_0^3 = \dfrac{9\pi}{4}

Use Example 2; arcsin 1 = π/2.

A = \dfrac{8}{3}\cdot\dfrac{9\pi}{4} = 6\pi

Multiply.

Answer: 6\pi \approx 18.85. In general an ellipse has area πab; here 3 · 2 = 6.

Trigonometric substitution FAQ

When do you use trigonometric substitution?

Use it for integrals with √(a² − x²), √(a² + x²) or √(x² − a²) when u-substitution doesn’t work, usually because there is no x outside the root to make du.

Which substitution goes with which form?

a² − x² uses x = a sin θ, a² + x² uses x = a tan θ, and x² − a² uses x = a sec θ. Each one matches a Pythagorean identity.

How do you get back to x?

Draw a right triangle from the substitution. For x = a sin θ, the opposite side is x and the hypotenuse is a. Find the third side with the Pythagorean theorem, then read off any trig value.

Why is the root always positive after substitution?

The substitutions use θ-values where cos θ (or tan θ) is positive, such as −π/2 to π/2 for sine. So the root simplifies without an absolute value.

Summary

  • √(a² − x²): x = a sin θ. √(a² + x²): x = a tan θ. √(x² − a²): x = a sec θ.
  • Replace x, dx and the root, then simplify with an identity.
  • Integrate in θ, often with a trig integral.
  • Use a reference triangle to write the answer in x.
  • Complete the square first when the quadratic has an x term.

Previous lesson: Trigonometric Integrals

Next lesson: Integration by Partial Fractions

Back to the Calculus 2 Index