Integration

Trig Substitution

Square roots in integrands collapse under the Pythagorean identity

When integrands contain √(a²−x²), √(a²+x²), or √(x²−a²), substitute x = a·sin θ, a·tan θ, or a·sec θ respectively. The Pythagorean identity collapses the square root, turning algebraic integrals into trig integrals.

  • √(a²−x²)x = a·sin θ  →  a·cos θ
  • √(a²+x²)x = a·tan θ  →  a·sec θ
  • √(x²−a²)x = a·sec θ  →  a·tan θ
  • Enginesin² + cos² = 1 (and rearrangements)
  • After integratingConvert back to x via a right-triangle picture
  • Famous application∫√(1−x²)dx = (1/2)(arcsin x + x√(1−x²)) + C — area of a circle

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

The square-root barrier

Integrals like ∫√(a²−x²)dx and ∫dx/√(a²+x²) are stuck. Square roots of quadratic expressions don't yield to u-substitution (no inner-function-with-its-derivative pattern), and integration by parts only makes things messier. The square root has to disappear, and that requires an identity. The Pythagorean identity sin²θ + cos²θ = 1, rearranged in three ways, is the key.

The three substitutions

If you see…SubstituteThen dx becomesThe square root becomesIdentity used
√(a² − x²)x = a·sin θdx = a·cos θ dθa·cos θ1 − sin²θ = cos²θ
√(a² + x²)x = a·tan θdx = a·sec²θ dθa·sec θ1 + tan²θ = sec²θ
√(x² − a²)x = a·sec θdx = a·sec θ·tan θ dθa·tan θsec²θ − 1 = tan²θ

In each case the Pythagorean identity reduces the square root to a single trig function. The dx absorbs the trig differential. What remains is an integral in θ, usually a clean polynomial in sin, cos, sec, or tan.

How to apply it

  1. Identify which of the three square-root forms appears.
  2. Substitute x with the matching trig expression. Compute dx.
  3. Simplify the square root using the Pythagorean identity.
  4. Rewrite the entire integral in θ.
  5. Integrate (often a power of sin/cos/sec/tan).
  6. Convert back to x using a right-triangle picture matching the substitution.
  7. For definite integrals, change the limits to θ at the substitution step.

Worked example — ∫ √(1 − x²) dx (the area under a circle)

This is the canonical trig-sub. The factor √(1 − x²) is the upper half of the unit circle. We want its antiderivative.

x = sin θ         ⟹  dx = cos θ dθ
√(1 − x²) = √(1 − sin²θ) = √cos²θ = cos θ  (principal range)

∫ √(1 − x²) dx  =  ∫ cos θ · cos θ dθ
                =  ∫ cos²θ dθ
                =  ∫ (1 + cos 2θ)/2 dθ
                =  (1/2)θ + (1/4) sin 2θ + C
                =  (1/2)θ + (1/2) sin θ cos θ + C.

Now convert back. The right triangle for x = sin θ: opposite x, hypotenuse 1, adjacent √(1 − x²). So θ = arcsin x, sin θ = x, cos θ = √(1 − x²).

∫ √(1 − x²) dx  =  (1/2) arcsin(x)  +  (1/2) x √(1 − x²)  +  C.

Sanity check — differentiate: (1/2)·(1/√(1−x²)) + (1/2)(√(1−x²) + x·(−x/√(1−x²))) = (1/2)/√(1−x²) + (1/2)(1−x²)/√(1−x²) − (1/2)x²/√(1−x²) = (1/2)·(1 + 1 − x² − x²)/√(1−x²) = (1 − x²)/√(1−x²) = √(1−x²). Matches.

Evaluating from −1 to 1 gives π/2, the area of the upper unit semicircle. The full circle has area π. Trig substitution is how you derive this from first principles.

Worked example — ∫ dx / √(1 + x²)

The form √(a² + x²) with a = 1. Use x = tan θ.

x = tan θ         ⟹  dx = sec²θ dθ
√(1 + x²) = √(1 + tan²θ) = √sec²θ = sec θ

∫ dx / √(1 + x²)  =  ∫ sec²θ dθ / sec θ
                  =  ∫ sec θ dθ
                  =  ln|sec θ + tan θ| + C.

Triangle for x = tan θ — opposite x, adjacent 1, hypotenuse √(1 + x²). So sec θ = √(1 + x²) and tan θ = x.

∫ dx / √(1 + x²)  =  ln| √(1 + x²) + x | + C  =  arcsinh(x) + C.

The closed form is the inverse hyperbolic sine — the same as the answer from the hyperbolic substitution x = sinh u. Both methods land at the same place.

Worked example — ∫ dx / √(x² − 1)

The form √(x² − a²) with a = 1. Use x = sec θ.

x = sec θ         ⟹  dx = sec θ · tan θ dθ
√(x² − 1) = √(sec²θ − 1) = √tan²θ = tan θ  (principal range, x > 1)

∫ dx / √(x² − 1)  =  ∫ sec θ · tan θ dθ / tan θ
                  =  ∫ sec θ dθ
                  =  ln|sec θ + tan θ| + C
                  =  ln| x + √(x² − 1) | + C  =  arccosh(x) + C.

Trig substitution vs other techniques

Trig substitutionU-substitutionIntegration by partsHyperbolic substitution
Best when√(a²±x²) or √(x²−a²) presentInner function + its derivativeProduct of dissimilar factors√(a²+x²) or √(x²−a²)
Underlying identityPythagoreanChain ruleProduct rulecosh² − sinh² = 1
Order to tryAfter u-sub fails on a square rootFirst — fastestSecondAlternative to tan/sec sub
BookkeepingHigh — three triangles to rememberLowMediumHigh — fewer textbook examples
Closed forms producedarcsin, arctan, arcsec, logWhatever ∫f(u)du givesuv-style mixed formsarcsinh, arccosh
SpeedSlow (triangle setup)FastMediumMedium

When trig substitution is the right tool

  • Area-of-circle integrals. ∫√(r² − x²) dx — the upper half of a circle of radius r. x = r·sin θ.
  • Arc length integrals. The arc-length formula ∫√(1 + (dy/dx)²) dx often produces √(1 + x²) forms that yield to x = tan θ.
  • Surfaces of revolution. Surface-area integrals around hyperbolic curves create √(x² − 1) forms — x = sec θ.
  • Physics — electric field of a charged rod. Coulomb's-law integrals along a finite line yield exactly the √(a² + x²) form.
  • Definite integrals with circular or hyperbolic limits. Changing limits to θ-values simplifies bounded evaluations.
  • Probability — Cauchy and circular distributions. Distributions with density 1/(1+x²) come up; arctan is their integral.

Common mistakes

  • Picking the wrong substitution. Memorize the three rules. Wrong sub means the square root doesn't simplify.
  • Forgetting dx. The dx contributes a·cos θ dθ, a·sec²θ dθ, or a·sec θ·tan θ dθ. Missing this factor is the most common arithmetic error.
  • Sign and absolute-value sloppiness. √cos²θ = |cos θ|, not always cos θ. On the principal range of arcsin (−π/2 ≤ θ ≤ π/2), cos θ ≥ 0, so |cos θ| = cos θ. Stay on the principal range and you avoid absolute values; range-cross and you must handle them.
  • Not converting back. The answer in θ isn't the final answer — you need to express it in x via the right triangle.
  • Wrong triangle. Each substitution has its own triangle (opposite = ?, hypotenuse = ?, adjacent = ?). Mismatched triangles produce wrong arctrig answers.
  • Mixing limits and substitutions on definite integrals. Convert limits to θ at the substitution step. Don't evaluate θ-limits with an x-form, or vice versa.

Connections to other techniques

U-substitution. Trig sub is a u-sub where u is a trig function. The framework is identical; only the recognition pattern differs.

Integration by parts. After trig substitution, the resulting trig integral sometimes still requires parts (e.g. ∫sec³θ dθ uses sec·sec² with parts).

Hyperbolic substitution. For √(a²+x²) and √(x²−a²), x = a·sinh u or a·cosh u works in parallel. Hyperbolic sub stays in elementary exponentials, avoiding inverse trig.

Partial fractions. After trig sub yields a rational trig integrand, the Weierstrass substitution t = tan(θ/2) converts it back to a rational function in t, then partial fractions finish the job.

Complex analysis. Many trig-sub problems have shorter solutions via contour integration once you know complex methods; trig sub remains the elementary route.

Frequently asked questions

Which trig substitution do I pick for which square root?

Three rules, all driven by Pythagorean identities. For √(a² − x²) use x = a·sin θ — then 1 − sin² θ = cos² θ, and √(a² − x²) = a·cos θ. For √(a² + x²) use x = a·tan θ — then 1 + tan² θ = sec² θ, and √(a² + x²) = a·sec θ. For √(x² − a²) use x = a·sec θ — then sec² θ − 1 = tan² θ, and √(x² − a²) = a·tan θ. In every case the Pythagorean identity converts the square root into a single trig function.

How do I convert back from θ to x after integrating?

Draw a right triangle reflecting the substitution. For x = a·sin θ — opposite side x, hypotenuse a, adjacent √(a² − x²). Read off any trig function you need from the triangle — sin θ = x/a, cos θ = √(a² − x²)/a, tan θ = x/√(a² − x²). For x = a·tan θ — opposite x, adjacent a, hypotenuse √(a² + x²). For x = a·sec θ — hypotenuse x, adjacent a, opposite √(x² − a²). The triangle is the bookkeeping.

Why does the Pythagorean identity make the square root vanish?

Because √(1 − sin² θ) = √cos² θ = |cos θ|, which is just cos θ on the principal range of arcsine. Same for the other two — they all reduce square roots of quadratic-in-θ expressions to single trig functions. The Pythagorean identity sin² + cos² = 1 is the entire engine; the other two identities (1 + tan² = sec², sec² − 1 = tan²) are rearrangements of the same equation.

What's an example where trig substitution is the only good approach?

∫ √(1 − x²) dx — the area under a unit circle's upper half. No u-substitution or integration by parts dislodges the square root. Set x = sin θ. Then √(1 − x²) = cos θ and dx = cos θ dθ. The integral becomes ∫ cos² θ dθ = (1/2)(θ + sin θ cos θ) + C. Convert back — θ = arcsin x, sin θ = x, cos θ = √(1 − x²). Final answer — (1/2)(arcsin x + x√(1 − x²)) + C. This is the closed-form for circular area, and trig substitution is the only elementary way to derive it.

What does dx become under x = a·sin θ?

Differentiate the substitution. x = a·sin θ gives dx = a·cos θ dθ. Similarly, x = a·tan θ gives dx = a·sec² θ dθ, and x = a·sec θ gives dx = a·sec θ tan θ dθ. The dx contributes a factor that often combines nicely with the simplified square root — usually cancelling powers and leaving a clean trig integral.

Are there alternatives to trig substitution?

Yes — hyperbolic substitution is the modern alternative. For √(a² + x²), use x = a·sinh u; then a² + x² = a²·cosh² u and √(a² + x²) = a·cosh u. The algebra is parallel to tangent substitution but stays in elementary exponential functions. For √(x² − a²), use x = a·cosh u; for √(a² − x²), trig substitution is usually still cleaner. Some textbooks prefer Euler substitutions for full generality.