OpenStax Calculus 2

Chapter 3: Techniques of Integration

3.3 Trigonometric Substitution

Study guide for Calculus Volume 2 (Gilbert Strang, 2016 edition)

Independent study guide. Not affiliated with OpenStax or Rice University.

Big idea

An integrand with a square root of a quadratic resists every method so far. Ordinary substitution needs the derivative of the inside to be sitting outside the root, and in $\int \frac{dx}{x^2\sqrt{9-x^2}}$ it is not. Parts makes the expression worse. What is needed is a change of variable that removes the root entirely, and trigonometry supplies one.

The mechanism is the Pythagorean identity used backwards. The expression $9 - x^2$ becomes a perfect square the moment $x = 3\sin\theta$, because $9 - 9\sin^2\theta = 9\cos^2\theta$ and the root evaluates to $3|\cos\theta|$. You have replaced an algebraic obstacle with a trigonometric integral, which the previous section taught you to handle. The same trade works for $a^2 + x^2$ using tangent and for $x^2 - a^2$ using secant.

Two details make the method rigorous rather than formal. First, a square root always returns a nonnegative value, so you must know the sign of $\cos\theta$ before you can drop the absolute value. That is why each substitution comes with a stated range for $\theta$: the range is chosen precisely so the relevant trigonometric function is nonnegative and the substitution is reversible.

Second, the answer has to come home. You started with a function of $x$, so you must end with one. Drawing a right triangle whose sides encode the substitution converts $\sin\theta$, $\tan\theta$, $\sec\theta$ and the rest back into algebraic expressions in $x$ with no guessing. That reference triangle is the step students skip, and it is the step the grader reads.

Decoder

Each of the three quadratic radical patterns becomes a single trigonometric function after a substitution that turns the expression under the root into a perfect square, with the substituting angle restricted so that the root is nonnegative.

The phrase carrying the content is perfect square. You are not approximating anything; $a^2 - a^2\sin^2\theta$ is exactly $a^2\cos^2\theta$, and the root of a perfect square is the absolute value of its base. The restriction on $\theta$ exists only to remove that absolute value honestly. For $x = a\sin\theta$ with $-\frac{\pi}{2}\le\theta\le\frac{\pi}{2}$, cosine is nonnegative, so $\sqrt{a^2-x^2} = a\cos\theta$ with no sign ambiguity.

Note also that the restriction is exactly the domain on which the sine, tangent or secant is one-to-one, which is what lets you invert the substitution at the end. The same interval does two jobs: it fixes the sign and it makes $\theta$ a genuine function of $x$.

The classic mistake is finishing in $\theta$. An answer of $-\frac{1}{9}\cot\theta + C$ is not an antiderivative of a function of $x$; it is an intermediate result. Build the triangle, read off the ratio, and substitute back.

Definitions and results

The sine pattern. For $\sqrt{a^2 - x^2}$, set $x = a\sin\theta$ with $-\frac{\pi}{2}\le\theta\le\frac{\pi}{2}$. Then $dx = a\cos\theta\,d\theta$ and

$$ \sqrt{a^2-x^2} = a\cos\theta $$

The tangent pattern. For $\sqrt{a^2 + x^2}$, set $x = a\tan\theta$ with $-\frac{\pi}{2} < \theta < \frac{\pi}{2}$. Then $dx = a\sec^2\theta\,d\theta$ and

$$ \sqrt{a^2+x^2} = a\sec\theta $$

The secant pattern. For $\sqrt{x^2 - a^2}$ with $x \ge a > 0$, set $x = a\sec\theta$ with $0 \le \theta < \frac{\pi}{2}$. Then $dx = a\sec\theta\tan\theta\,d\theta$ and

$$ \sqrt{x^2-a^2} = a\tan\theta $$

For $x \le -a$ the mirror-image range $\pi \le \theta < \frac{3\pi}{2}$ keeps $\tan\theta$ nonnegative.

The reference triangle. Each substitution states a ratio of two sides of a right triangle. For $x = a\sin\theta$, label the opposite side $x$ and the hypotenuse $a$; the third side is $\sqrt{a^2-x^2}$. For $x = a\tan\theta$, label opposite $x$ and adjacent $a$, hypotenuse $\sqrt{a^2+x^2}$. For $x = a\sec\theta$, label hypotenuse $x$ and adjacent $a$, opposite $\sqrt{x^2-a^2}$. Every trigonometric function of $\theta$ is then a ratio of labelled sides.

Powers of the root. The substitution handles $(a^2-x^2)^{3/2}$ and similar powers just as easily, since $(a^2\cos^2\theta)^{3/2} = a^3\cos^3\theta$ once the sign is settled. You do not need a visible square root to use the method; any half-integer power of a quadratic qualifies.

Completing the square first. A general quadratic $x^2 + bx + c$ becomes $\left(x + \frac{b}{2}\right)^2 + \left(c - \frac{b^2}{4}\right)$. Substituting $w = x + \frac{b}{2}$ turns it into one of the three standard patterns, so no quadratic is outside the method.

Definite integrals. Convert the limits to $\theta$ values inside the stated range and evaluate there. Doing so skips the back-substitution entirely, but only if both limits land in the allowed range.

When not to use it. If the derivative of the quadratic already appears as a factor, a plain substitution is faster. For instance $\int x\sqrt{9-x^2}\,dx$ wants $u = 9 - x^2$, not a trigonometric substitution.

Worked examples

A root of a difference in the denominator

Evaluate $\int \frac{dx}{x^2\sqrt{9-x^2}}$.

Here $a = 3$, so set $x = 3\sin\theta$ with $-\frac{\pi}{2}\le\theta\le\frac{\pi}{2}$. Then $dx = 3\cos\theta\,d\theta$, $x^2 = 9\sin^2\theta$, and $\sqrt{9-x^2} = 3\cos\theta$:

$$ \int \frac{3\cos\theta\,d\theta}{9\sin^2\theta\cdot 3\cos\theta} = \frac{1}{9}\int \csc^2\theta\,d\theta = -\frac{1}{9}\cot\theta + C $$

Now the triangle. Opposite side $x$, hypotenuse $3$, adjacent side $\sqrt{9-x^2}$, so $\cot\theta = \frac{\sqrt{9-x^2}}{x}$ and

$$ \int \frac{dx}{x^2\sqrt{9-x^2}} = -\frac{\sqrt{9-x^2}}{9x} + C $$

Check by differentiating the answer. The quotient rule gives $-\frac{1}{9}\left[\frac{-x/\sqrt{9-x^2}\cdot x - \sqrt{9-x^2}}{x^2}\right]$, and combining the numerator over $\sqrt{9-x^2}$ produces $\frac{1}{9}\cdot\frac{x^2 + (9-x^2)}{x^2\sqrt{9-x^2}} = \frac{1}{x^2\sqrt{9-x^2}}$.

A power of a sum

Evaluate $\int \frac{dx}{(x^2+4)^{3/2}}$.

The sum pattern with $a = 2$ calls for $x = 2\tan\theta$, $-\frac{\pi}{2}<\theta<\frac{\pi}{2}$, so $dx = 2\sec^2\theta\,d\theta$ and $(x^2+4)^{3/2} = (4\sec^2\theta)^{3/2} = 8\sec^3\theta$:

$$ \int \frac{2\sec^2\theta}{8\sec^3\theta}\,d\theta = \frac{1}{4}\int\cos\theta\,d\theta = \frac{1}{4}\sin\theta + C $$

The triangle has opposite $x$, adjacent $2$, hypotenuse $\sqrt{x^2+4}$, so $\sin\theta = \frac{x}{\sqrt{x^2+4}}$ and

$$ \int \frac{dx}{(x^2+4)^{3/2}} = \frac{x}{4\sqrt{x^2+4}} + C $$

As $x$ grows the answer approaches $\frac14$, which is consistent: the integrand decays like $x^{-3}$, so the accumulated area is finite.

A root of a difference of squares

Evaluate $\int \frac{\sqrt{x^2-25}}{x}\,dx$ for $x \ge 5$.

Set $x = 5\sec\theta$ with $0 \le \theta < \frac{\pi}{2}$, so $dx = 5\sec\theta\tan\theta\,d\theta$ and $\sqrt{x^2-25} = 5\tan\theta$:

$$ \int \frac{5\tan\theta}{5\sec\theta}\cdot 5\sec\theta\tan\theta\,d\theta = 5\int \tan^2\theta\,d\theta = 5\int\big(\sec^2\theta - 1\big)\,d\theta $$

That evaluates to $5\tan\theta - 5\theta + C$. From the triangle, $\tan\theta = \frac{\sqrt{x^2-25}}{5}$ and $\theta = \sec^{-1}\!\left(\frac{x}{5}\right)$, so

$$ \int \frac{\sqrt{x^2-25}}{x}\,dx = \sqrt{x^2-25} - 5\sec^{-1}\!\left(\frac{x}{5}\right) + C $$

Differentiating gives $\frac{x}{\sqrt{x^2-25}} - \frac{25}{x\sqrt{x^2-25}}$, and combining over the common denominator yields $\frac{x^2-25}{x\sqrt{x^2-25}} = \frac{\sqrt{x^2-25}}{x}$.

Completing the square first

Evaluate $\int \frac{dx}{\sqrt{x^2+6x+13}}$.

The quadratic is not one of the three patterns, but $x^2+6x+13 = (x+3)^2 + 4$ is, after the shift $w = x+3$. Then $w = 2\tan\theta$ gives $\sqrt{w^2+4} = 2\sec\theta$ and $dw = 2\sec^2\theta\,d\theta$:

$$ \int \frac{2\sec^2\theta}{2\sec\theta}\,d\theta = \int \sec\theta\,d\theta = \ln\big|\sec\theta + \tan\theta\big| + C $$

The triangle gives $\sec\theta = \frac{\sqrt{w^2+4}}{2}$ and $\tan\theta = \frac{w}{2}$. Absorbing the constant $\ln 2$ into $C$,

$$ \int \frac{dx}{\sqrt{x^2+6x+13}} = \ln\left(\sqrt{x^2+6x+13} + x + 3\right) + C $$

Practice

First the substitution mechanics. These problems ask you to choose a change of variable, convert $dx$, and rewrite the whole integrand in the new variable, which is exactly the first half of every trigonometric substitution.

Practice

Generated problems for this section, graded instantly.

Then the trigonometric integrals the substitution leaves behind. After the root disappears you are always looking at powers of sine, cosine, secant or tangent, so the antiderivatives in this block are the ones you finish with.

Practice

Generated problems for this section, graded instantly.

Quiz

Five items on recognizing the three radical patterns, choosing the angle range, and converting back to $x$ with a reference triangle.

Quiz

5 problems with a score at the end.