Trigonometric Substitution
The area of an ellipse, the electric field around a charged wire, the length of a cable slung
between two poles — each ends in an integral jammed shut by the square root of a quadratic.
Trig substitution is the standard key to that lock, and it turns out to be Pythagoras in
disguise.
Stare at \sqrt{a^2 - x^2} for a moment. Where have you seen
"square, minus another square, under a root" before? Pythagoras. If a right
triangle has hypotenuse a and one leg x,
the other leg is exactly \sqrt{a^2 - x^2}. Every one of the three
awkward roots — \sqrt{a^2 - x^2},
\sqrt{a^2 + x^2}, \sqrt{x^2 - a^2} —
is a right triangle in disguise: it is the missing side, waiting to be found.
That matters because these roots are poison to ordinary
substitution:
setting u = a^2 - x^2 demands a spare factor of
x in the integrand, and usually there isn't one. So we run the
trick backwards. Instead of hunting for an inner function, we volunteer
one: replace x by a trig function chosen so that a Pythagorean
identity collapses the root into a single, root-free trig function.
-
\sqrt{a^2 - x^2} → x = a\sin\theta,
using 1 - \sin^2\theta = \cos^2\theta.
-
\sqrt{a^2 + x^2} → x = a\tan\theta,
using 1 + \tan^2\theta = \sec^2\theta.
-
\sqrt{x^2 - a^2} → x = a\sec\theta,
using \sec^2\theta - 1 = \tan^2\theta.
Each substitution is engineered so the quadratic under the root becomes a perfect square and
the root dissolves. What is left is a pure trig integral — exactly the kind you already know
how to handle from
trig integrals.
Three roots, three triangles
You never need to memorise the table blindly — draw the triangle and it
rebuilds itself. Place the angle \theta, decide which two sides you
know, and Pythagoras hands you the third — which is always the root you are trying to kill:
-
a^2 - x^2 (sine): x is
smaller than a, so x is a leg
and a the hypotenuse. Then
\sin\theta = x/a and the remaining leg is
\sqrt{a^2 - x^2}.
-
a^2 + x^2 (tangent): a sum of squares is
a hypotenuse-squared, so a and x are the
two legs. Then \tan\theta = x/a and the hypotenuse is
\sqrt{a^2 + x^2}.
-
x^2 - a^2 (secant): now x
is the big one, so x is the hypotenuse and
a a leg. Then \sec\theta = x/a and the
remaining leg is \sqrt{x^2 - a^2}.
For an integrand containing a root of a quadratic (here a > 0):
-
\sqrt{a^2 - x^2}: substitute
x = a\sin\theta, giving
\sqrt{a^2 - x^2} = a\cos\theta and
dx = a\cos\theta\, d\theta.
-
\sqrt{a^2 + x^2}: substitute
x = a\tan\theta, giving
\sqrt{a^2 + x^2} = a\sec\theta and
dx = a\sec^2\theta\, d\theta.
-
\sqrt{x^2 - a^2}: substitute
x = a\sec\theta, giving
\sqrt{x^2 - a^2} = a\tan\theta and
dx = a\sec\theta\tan\theta\, d\theta.
A quadratic that isn't in one of these tidy shapes usually can be coaxed into one:
\sqrt{x^2 + 4x + 13} = \sqrt{(x+2)^2 + 9} after completing the
square, and the shift u = x + 2 hands you a clean
\sqrt{u^2 + a^2} with a = 3.
Worked example: \displaystyle\int \frac{dx}{\sqrt{a^2 - x^2}}
The root is \sqrt{a^2 - x^2}, so we reach for
x = a\sin\theta.
Step 1 — substitute x = a\sin\theta and differentiate.
Then dx = a\cos\theta\, d\theta:
x = a\sin\theta, \qquad dx = a\cos\theta\, d\theta.
Step 2 — simplify the root. Factor out
a^2 and apply 1 - \sin^2\theta = \cos^2\theta:
\sqrt{a^2 - x^2} = \sqrt{a^2 - a^2\sin^2\theta} = \sqrt{a^2(1 - \sin^2\theta)} = \sqrt{a^2\cos^2\theta} = a\cos\theta.
The root is gone — that is the whole point. (We take
\theta \in [-\tfrac{\pi}{2}, \tfrac{\pi}{2}], where
\cos\theta \ge 0, so \sqrt{\cos^2\theta} = \cos\theta
with no absolute value.)
Step 3 — assemble the new integral. Put the
dx from Step 1 over the simplified root from Step 2:
\int \frac{dx}{\sqrt{a^2 - x^2}} = \int \frac{a\cos\theta\, d\theta}{a\cos\theta}.
Step 4 — cancel. The a\cos\theta top and bottom
annihilate, leaving the easiest integral there is:
\int \frac{a\cos\theta\, d\theta}{a\cos\theta} = \int 1\, d\theta = \theta + C.
Step 5 — back-substitute to x. From
x = a\sin\theta we get
\sin\theta = x/a, hence
\theta = \arcsin(x/a):
\int \frac{dx}{\sqrt{a^2 - x^2}} = \arcsin\!\left(\frac{x}{a}\right) + C.
This one finished politely — the answer was \theta itself, so one
arcsine did the job. The next example is the more typical (and more famous) case, where the
answer comes out tangled in \sin\theta and
\cos\theta and the triangle has to untangle it.
The star example: \displaystyle\int \sqrt{a^2 - x^2}\, dx
Same root, but now it sits upstairs — this is the integrand whose graph
y = \sqrt{a^2 - x^2} is the top half of a circle of radius
a. Substitute x = a\sin\theta,
dx = a\cos\theta\, d\theta, and use
\sqrt{a^2 - x^2} = a\cos\theta from before:
\int \sqrt{a^2 - x^2}\, dx = \int (a\cos\theta)(a\cos\theta\, d\theta) = a^2 \int \cos^2\theta\, d\theta.
A \cos^2 integral is
bread and butter:
power-reduce with \cos^2\theta = \tfrac{1}{2}(1 + \cos 2\theta):
a^2 \int \frac{1 + \cos 2\theta}{2}\, d\theta = \frac{a^2}{2}\left(\theta + \frac{\sin 2\theta}{2}\right) + C = \frac{a^2}{2}\big(\theta + \sin\theta\cos\theta\big) + C,
where we expanded \sin 2\theta = 2\sin\theta\cos\theta — always do
this before converting back, so every piece is a plain trig function of
\theta. Now the reference triangle (hypotenuse
a, opposite x) reads off everything:
\theta = \arcsin(x/a), \sin\theta = x/a,
and \cos\theta = \sqrt{a^2 - x^2}/a. Substitute all three:
\int \sqrt{a^2 - x^2}\, dx = \frac{a^2}{2}\arcsin\!\left(\frac{x}{a}\right) + \frac{x}{2}\sqrt{a^2 - x^2} + C.
The payoff. Run it across the whole semicircle, from
-a to a. The
\tfrac{x}{2}\sqrt{a^2 - x^2} term vanishes at both ends (the root is
zero there), leaving only the arcsine term:
\int_{-a}^{a} \sqrt{a^2 - x^2}\, dx = \frac{a^2}{2}\Big[\arcsin(1) - \arcsin(-1)\Big] = \frac{a^2}{2}\left(\frac{\pi}{2} + \frac{\pi}{2}\right) = \frac{\pi a^2}{2}.
Half a circle of radius a has area
\tfrac{1}{2}\pi a^2 — calculus agreeing perfectly with geometry.
Double it and there it is: \pi a^2, the area of the full circle.
Pretty much, yes. At school the formula A = \pi r^2 is handed to
you as a fact; the computation you just did is one of the standard ways mathematics
earns it. Define \pi through the circle's circumference
(or through the trig functions), write the circle as the graph
y = \pm\sqrt{r^2 - x^2}, integrate — and out falls
\pi r^2, with the trig substitution doing the heavy lifting.
Archimedes got there 2,200 years earlier without calculus, by squeezing the circle between
polygons with more and more sides — an argument that is secretly a limit, which is why he is
often called the grandfather of integration. The circle even repays the favour: whenever an
integrand is the top half of a circle, the known area
\tfrac{1}{2}\pi a^2 is a free sanity check on your algebra.
A tangent case: \displaystyle\int \frac{dx}{(x^2 + a^2)^{3/2}}
No square root in sight? Look again: a power of \tfrac{3}{2} is a
root cubed — (x^2 + a^2)^{3/2} = \left(\sqrt{x^2 + a^2}\right)^3 —
so the sum of squares still calls for x = a\tan\theta. (This exact
integral appears all over physics: it is the shape of the field of a charged wire and the
gravity of a ring.)
Substitute. With x = a\tan\theta we get
dx = a\sec^2\theta\, d\theta, and the identity
1 + \tan^2\theta = \sec^2\theta collapses the bracket:
x^2 + a^2 = a^2\tan^2\theta + a^2 = a^2\sec^2\theta, \qquad (x^2 + a^2)^{3/2} = a^3\sec^3\theta,
taking \theta \in (-\tfrac{\pi}{2}, \tfrac{\pi}{2}) where
\sec\theta > 0. The integral turns friendly:
\int \frac{a\sec^2\theta\, d\theta}{a^3\sec^3\theta} = \frac{1}{a^2}\int \frac{d\theta}{\sec\theta} = \frac{1}{a^2}\int \cos\theta\, d\theta = \frac{\sin\theta}{a^2} + C.
Back to x — draw the triangle. For the tangent case
the legs are a (adjacent) and x
(opposite), so the hypotenuse is \sqrt{x^2 + a^2}. Reading straight
off it, \sin\theta = \dfrac{x}{\sqrt{x^2 + a^2}}, and therefore:
\int \frac{dx}{(x^2 + a^2)^{3/2}} = \frac{x}{a^2\sqrt{x^2 + a^2}} + C.
Notice what the triangle did: it converted a trig function of \theta
back into pure algebra in x, with no inverse-trig gymnastics at all.
That final triangle step is not optional decoration — it is the second half of the
method.
Three classic ways this method goes wrong:
-
Substituting x alone is half a substitution. If
x = a\sin\theta, then dx = a\cos\theta\, d\theta
must come along too — forgetting the a\cos\theta factor silently
changes the integral. Sanity check before integrating: the new integrand must contain
only \theta and d\theta, with
every x and dx gone.
-
An answer left in \theta isn't an answer. The
question was asked in x, so finish in x:
expand doubled angles first (\sin 2\theta = 2\sin\theta\cos\theta),
then draw the reference triangle and read each trig function off it. (For a definite
integral you may instead convert the limits to \theta and never
come back — as we did for the semicircle.)
-
Mind the \theta-range and absolute values.
Strictly, \sqrt{\cos^2\theta} = |\cos\theta|. The standard ranges —
[-\tfrac{\pi}{2}, \tfrac{\pi}{2}] for sine and tangent,
[0, \tfrac{\pi}{2}) for secant with x \ge a —
are chosen precisely so the bars can be dropped. The secant case is the booby-trapped one: on
the branch x \le -a, \tan\theta goes
negative and signs need genuine care in definite integrals.
The identity \cosh^2 t - \sinh^2 t = 1 is Pythagoras's hyperbolic
twin, and it powers a rival substitution kit: x = a\sinh t turns
\sqrt{a^2 + x^2} into a\cosh t, and
x = a\cosh t turns \sqrt{x^2 - a^2} into
a\sinh t. Sometimes it is genuinely slicker:
\int \frac{dx}{\sqrt{x^2 + a^2}} = \int \frac{a\cosh t\, dt}{a\cosh t} = t + C = \operatorname{arsinh}\frac{x}{a} + C = \ln\!\left(x + \sqrt{x^2 + a^2}\right) + C',
with no secant integral and no absolute-value headaches (\cosh t is
always positive). The same integral done with x = a\tan\theta forces
you through \int \sec\theta\, d\theta — famously fiddly. UK exam
boards love the hyperbolic route; US textbooks lean trig. Both are the same geometry: sine and
cosine parametrise a circle, sinh and cosh parametrise a hyperbola.
The reference triangle, step by step
This is the triangle that turns \theta back into
x for the sine case. From
x = a\sin\theta, read
\sin\theta = \tfrac{x}{a} = \tfrac{\text{opposite}}{\text{hypotenuse}}:
hypotenuse a, opposite side x. Pythagoras
fills in the adjacent side as \sqrt{a^2 - x^2} — and then
every trig function of \theta can be read straight off the
picture: \cos\theta = \tfrac{\sqrt{a^2 - x^2}}{a},
\tan\theta = \tfrac{x}{\sqrt{a^2 - x^2}}, and so on. That is exactly
how the \tfrac{x}{2}\sqrt{a^2 - x^2} term re-materialised in the
circle-area answer. Step through the construction:
See it explained