Calculus

Trigonometric Substitution as an Integration Technique

Use sine, tangent and secant substitutions to clear square roots, with triangle diagrams, domains and worked integrals.

Key takeaways

  • Use x = a sin θ for √(a² − x²), x = a tan θ for √(a² + x²), and x = a sec θ for √(x² − a²).
  • Restrict θ to a standard range so the substitution can be reversed and the sign of the square root is clear.
  • Remember to replace dx as well, and convert the final answer back to x with a right triangle.
  • Check first whether an ordinary substitution works, since it is often much shorter.

Trigonometric substitution removes an awkward square root by replacing x with a trigonometric function of a new angle θ. A Pythagorean identity then turns the quantity under the root into a perfect square, and the root disappears.

You reach for it when an integral contains √(a² − x²), √(a² + x²) or √(x² − a²), where a is a positive constant, and simpler methods do not apply. The price of removing the root is that you end up integrating trigonometric functions and translating back.

Why a trigonometric function helps

The identity sin²θ + cos²θ = 1 can be rearranged to 1 − sin²θ = cos²θ. So if x = a sin θ:

a² − x² = a² − a² sin²θ = a² cos²θ
√(a² − x²) = a |cos θ|

If you choose θ between −π/2 and π/2, cos θ is never negative and the root is just a cos θ.

This is a substitution run in the opposite direction from the usual u-substitution. Instead of naming a part of the integrand with a new letter, you declare that x itself is a function of the new variable. Angles are in radians throughout.

The three standard cases

Root Substitution Range of θ Root becomes
√(a² − x²) x = a sin θ −π/2 to π/2 a cos θ
√(a² + x²) x = a tan θ strictly between −π/2 and π/2 a sec θ
√(x² − a²), with x ≥ a x = a sec θ from 0 up to, not including, π/2 a tan θ

For the third case with x ≤ −a, θ lies between π/2 and π, where tan θ is negative or zero, so the root equals −a tan θ. Handle the two sides of the domain separately.

Sine case: the area of a circle

Evaluate ∫ √(4 − x²) dx for −2 ≤ x ≤ 2. Put x = 2 sin θ, so dx = 2 cos θ dθ and the root is 2 cos θ.

∫ (2 cos θ)(2 cos θ) dθ = ∫ 4 cos²θ dθ
                        = ∫ (2 + 2 cos 2θ) dθ      (half-angle identity)
                        = 2θ + sin 2θ + C
                        = 2θ + 2 sin θ cos θ + C

Now return to x. Since sin θ = x/2, θ = arcsin(x/2) and cos θ = √(4 − x²)/2. The result is:

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

Evaluate from 0 to 2: the second term is zero at both ends, and 2 arcsin 1 = π. That is a quarter of the area of a circle of radius 2, which is π·4/4 = π. The agreement is a satisfying check.

A second sine example has no root in the numerator at all. For ∫ x²/√(1 − x²) dx on −1 < x < 1, set x = sin θ, so dx = cos θ dθ and the root is cos θ.

∫ (sin²θ / cos θ) cos θ dθ = ∫ sin²θ dθ
                           = θ/2 − (sin θ cos θ)/2 + C
                           = (arcsin x)/2 − x√(1 − x²)/2 + C

The cosines canceled completely, which is typical when the root sits in the denominator.

Reading back with a triangle

Converting an answer from θ to x is easiest with a sketch. Draw a right triangle with angle θ and label two sides to match your substitution.

  • For x = a sin θ, the opposite side is x and the hypotenuse is a, so the adjacent side is √(a² − x²).
  • For x = a tan θ, the opposite side is x and the adjacent side is a, so the hypotenuse is √(a² + x²).
  • For x = a sec θ, the hypotenuse is x and the adjacent side is a, so the opposite side is √(x² − a²).

Every trigonometric function of θ can then be read as a ratio of sides. The triangle is drawn for positive x, but with the ranges in the table the resulting formulas carry the right signs in the first two cases.

Match the root to the substitution
a² − x² x = a sin θ dx = a cos θ dθ root = a cos θ a² + x² x = a tan θ dx = a sec²θ dθ root = a sec θ x² − a² (x ≥ a) x = a sec θ dx = a sec θ tan θ dθ root = a tan θ a² − x² x = a sin θ dx = a cos θ dθ root = a cos θ a² + x² x = a tan θ dx = a sec²θ dθ root = a sec θ x² − a² (x ≥ a) x = a sec θ dx = a sec θ tan θ dθ root = a tan θ

Tangent case

Evaluate ∫ dx/√(x² + 9). Let x = 3 tan θ, so dx = 3 sec²θ dθ and the root is 3 sec θ.

∫ 3 sec²θ/(3 sec θ) dθ = ∫ sec θ dθ
                       = ln|sec θ + tan θ| + C
                       = ln(√(x² + 9)/3 + x/3) + C
                       = ln(x + √(x² + 9)) + C′

The last step absorbs −ln 3 into the constant. The argument of the logarithm is always positive, because the root is larger than |x|.

A second example needs no root at all in the final integral. For ∫ dx/(x² + a²)^(3/2), the same substitution reduces the integrand to cos θ/a². Integrating and reading sin θ from the triangle gives x/(a²√(x² + a²)) + C.

The secant integral you will keep needing

The tangent case often ends at ∫ sec θ dθ, so it is worth seeing where that formula comes from. Multiply the integrand by a fraction equal to 1:

sec θ = sec θ (sec θ + tan θ)/(sec θ + tan θ)
      = (sec²θ + sec θ tan θ)/(sec θ + tan θ)

The numerator is now exactly the derivative of the denominator, so the integral is ln|sec θ + tan θ| + C. The trick looks like it came from nowhere, but you only need to learn it once.

Here is one more tangent problem where the trigonometry does most of the work. For ∫ dx/(x²√(x² + 4)) with x ≠ 0, let x = 2 tan θ. Then dx = 2 sec²θ dθ and the root is 2 sec θ.

integrand·dx = sec θ/(4 tan²θ) dθ = cos θ/(4 sin²θ) dθ
integral     = −1/(4 sin θ) + C
             = −√(x² + 4)/(4x) + C

The middle step is a small u-substitution with u = sin θ. The last uses the triangle, where sin θ is x divided by √(x² + 4).

Secant case

For x ≥ 2, evaluate ∫ √(x² − 4)/x dx. Let x = 2 sec θ, so dx = 2 sec θ tan θ dθ and the root is 2 tan θ.

∫ (2 tan θ)/(2 sec θ) · 2 sec θ tan θ dθ = ∫ 2 tan²θ dθ
                                         = ∫ 2(sec²θ − 1) dθ
                                         = 2 tan θ − 2θ + C
                                         = √(x² − 4) − 2 arccos(2/x) + C

Here θ = arccos(2/x), because sec θ = x/2 means cos θ = 2/x. At x = 2 both terms vanish.

Completing the square

The root may not arrive in standard form. Completing the square often puts it there. For example:

5 + 4x − x² = 9 − (x − 2)²

So √(5 + 4x − x²) matches the sine case with x − 2 = 3 sin θ. The same preparation helps with powers of irreducible quadratics that come out of partial fraction decompositions, where x = tan θ is the usual finishing move.

Where these roots come from

Square roots of sums and differences of squares are not textbook inventions. They arrive whenever distance enters a problem, because the Pythagorean theorem puts squares under a root.

The ellipse with half-widths a and b has upper half y = (b/a)√(a² − x²). Doubling the integral of that expression from −a to a gives the full area. The integral of the root alone is a half disk of area πa²/2, so the ellipse has area πab.

In physics, the field produced by a straight charged wire at a distance d involves the integral of 1/(x² + d²)^(3/2), a pure tangent case. The length of a parabola involves √(1 + 4x²), as shown in arc length by integration. Areas of circular segments, such as the liquid cross-section in a partly filled round tank lying on its side, need the sine case.

In each setting, the angle θ often has a physical meaning, such as the direction from the observation point to a piece of the wire.

When not to use it

Look before you substitute. ∫ x√(4 − x²) dx yields at once to u = 4 − x², since x dx is nearly du. And ∫ dx/√(1 − x²) is simply arcsin x + C, straight from the table of derivatives.

Roots of the tangent and secant types can also be handled with hyperbolic functions. Setting x = a sinh t turns √(x² + a²) into a cosh t, which often gives shorter work. Both routes are correct, and their answers differ at most by a constant.

If the polynomial under the root has degree three or higher, these substitutions generally fail. Such integrals are often not expressible in elementary terms.

A routine for unfamiliar problems

When you face a new integral with a quadratic under a root, work in this order.

  1. Look for a derivative of the inside sitting outside the root. If it is there, use u-substitution and stop.
  2. Complete the square if there is a middle term, and rename the shifted variable.
  3. Factor out any coefficient of x². For example, √(9 − 4x²) equals 2√(9/4 − x²), so a = 3/2 and x = (3/2) sin θ.
  4. Pick the substitution from the sign pattern, and note the allowed range of x.
  5. Replace x, dx and the root, then simplify completely before integrating.
  6. Use identities to reduce powers, integrate, and read the answer back from the triangle.

Step five is where problems become easy or stay hard. If a root or a mixed expression survives the simplification, recheck which identity matches the sign pattern.

Definite integrals and common errors

With limits, convert them to angles and skip the return trip. For the integral from 0 to 3 of dx/(9 + x²), put x = 3 tan θ. The limits become 0 and π/4, the integrand collapses to dθ/3, and the value is π/12.

Watch for these slips:

  1. Replacing the root but leaving dx unchanged.
  2. Using limits in x with an integrand in θ.
  3. Writing a² − x² = cos²θ and losing the factor a².
  4. Ignoring the domain. In the sine case, x must satisfy −a ≤ x ≤ a, and if the root sits in a denominator, the endpoints need improper-integral treatment.

Differentiating the final answer remains the surest test. It takes a minute, and trigonometric back-substitution offers plenty of places to drop a factor.

Written for 4Mathematics with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 39 articles in Calculus →

Latest news on this topic