Consider the integral
\[\int \frac{dx}{\sqrt{9-x^2}}.\]
At first glance, we might try the substitution $u=9-x^2$, but this
will actually make the integral even more complicated!

Let's try a different approach:

The radical $\displaystyle\sqrt{9-x^2}$ represents the length of the
base of a right triangle with height $x$ and hypotenuse of length $3$:

$\qquad\qquad$

For this triangle, $\displaystyle\sin \theta =\frac{x}{3}$, suggesting
the substitution $x=3\sin\theta$. Then $\displaystyle\theta
=\arcsin\left(\frac{x}{3}\right)$, where we specify $-\pi/2\leq
\theta\leq \pi/2$. Note that $dx=3\cos \theta\, d\theta$ and that
$\sqrt{9-x^2}=3\cos\theta$.

The sketch of the triangle is very useful for determining what
substitution should be made. Note, though, that the sketch only has
meaning for $x > 0$ and $\theta > 0$.

It is important to be careful about how the angle $\theta$ is
defined. With the restrictions on $\theta$ mentioned in the examples
here, we avoid sign difficulties even when $x < 0$.

There are two other trigonometric substitutions useful in integrals
with different forms:

Example

Let's evaluate
\[\int \frac{dx}{x^2\sqrt{x^2-4}}.\]
The radical $\sqrt{x^2-4}$ suggests a triangle with hypotenuse of length
$x$ and base of length $2$:

$\qquad\qquad$

For this triangle, $\displaystyle\sec \theta =\frac{x}{2}$, we will
try the substitution $x=2\sec \theta$. Then
$\displaystyle\theta=\sec^{-1} \left(\frac{x}{2}\right)$, where we
specify $0\leq\theta

Then
\[\int \frac{dx}{x^2\sqrt{x^2-4}}=\int\frac{2\sec\theta\tan\theta}
{(2\sec\theta)^2(2\tan\theta)}\,d\theta=\int\frac{1}{4}\cos\theta\,
d\theta=\frac{1}{4}\sin\theta+C.\]
But we see from the sketch that $\displaystyle
\sin\theta=\frac{\sqrt{x^2-4}}{x}$, so
\[\int \frac{dx}{x^2\sqrt{x^2-4}}=\frac{\sqrt{x^2-4}}{4x}+C.\]

We may also use a trigonometric substitution to evaluate a
definite integral, as long as care is taken in working with
the limits of integration:

Example

We will evaluate
\[\int^1_{-1}\frac{dx}{(1+x^2)^2}.\]
The factor $(1+x^2)$ suggests a triangle with base of length $1$ and
height $x$:

$\qquad\qquad$

For this triangle, $\tan \theta =x$, so we will try the substitution
$x=\tan \theta$. Then $\theta =\tan^{-1}(x)$, where we specify
$-\pi/2

There is often more than one way to solve a particular integral. A
trigonometric substitution will not always be necessary, even when the
types of factors seen above appear. With practice, you will gain
insight into what kind of substitution will work best for a particular
integral.

Key Concepts

Trigonometric substitutions are often useful for integrals containing
factors of the form
\[(a^2-x^2)^n,\qquad\qquad (x^2+a^2)^n,\qquad {\small\textrm{or}}\qquad
(x^2-a^2)^n.\]
The exact substitution used depends on the form of the integral: