# Calculus/Integration techniques/Trigonometric Substitution

 ← Integration techniques/Integration by Parts Calculus Integration techniques/Trigonometric Integrals → Integration techniques/Trigonometric Substitution

The idea behind the trigonometric substitution is quite simple: to replace expressions involving square roots with expressions that involve standard trigonometric functions, but no square roots. Integrals involving trigonometric functions are often easier to solve than integrals involving square roots.

Let us demonstrate this idea in practice. Consider the expression $\sqrt{1-x^2}$ . Probably the most basic trigonometric identity is $\sin^2(\theta)+\cos^2(\theta)=1$ for an arbitrary angle $\theta$ . If we replace $x$ in this expression by $\sin(\theta)$ , with the help of this trigonometric identity we see

$\sqrt{1-x^2}=\sqrt{1-\sin^2(\theta)}=\sqrt{\cos^2(\theta)}=\cos(\theta)$

Note that we could write $\theta=\arcsin(x)$ since we replaced $x^2$ with $\sin^2(\theta)$ .

We would like to mention that technically one should write the absolute value of $\cos(\theta)$ , in other words $\bigl|\cos(\theta)\bigr|$ as our final answer since $\sqrt{a^2}=|a|$ for all possible $a$ . But as long as we are careful about the domain of all possible $x$ and how $\cos(\theta)$ is used in the final computation, omitting the absolute value signs does not constitute a problem. However, we cannot directly interchange the simple expression $\cos(\theta)$ with the complicated $\sqrt{1-x^2}$ wherever it may appear, we must remember when integrating by substitution we need to take the derivative into account. That is we need to remember that $dx=\cos(\theta)d\theta$ , and to get a integral that only involves $\theta$ we need to also replace $dx$ by something in terms of $d\theta$ . Thus, if we see an integral of the form

$\int\sqrt{1-x^2}dx$

we can rewrite it as

$\int\cos(\theta)\cos(\theta)d\theta=\int\cos^2(\theta)d\theta.$

Notice in the expression on the left that the first $\cos(\theta)$ comes from replacing the $\sqrt{1-x^2}$ and the $\cos(\theta)d\theta$ comes from substituting for the $dx$ .

Since $\cos^2(\theta)=\frac{1+\cos(2\theta)}{2}$ our original integral reduces to:

$\tfrac{1}{2}\int d\theta+\tfrac{1}{2}\int\cos(2\theta)d\theta$ .

These last two integrals are easily handled. For the first integral we get

$\tfrac{1}{2}\int d\theta=\tfrac{1}{2}\theta$

For the second integral we do a substitution, namely $u=2\theta$ (and $du=2d\theta$) to get:

$\tfrac{1}{2}\int\cos(2\theta)d\theta=\tfrac{1}{2}\int\cos(u)\tfrac{1}{2}du=\tfrac{1}{4}\sin(u)=\frac{\sin(2\theta)}{4}$

Finally we see that:

$\int\cos^2(\theta)d\theta=\frac{\theta}{2}+\frac{\sin(2\theta)}{4}=\frac{\theta+\sin(\theta)cos(\theta)}{2}$

However, this is in terms of $\theta$ and not in terms of $x$ , so we must substitute back in order to rewrite the answer in terms of $x$ .

That is we worked out that:

$\sin(\theta)=x\qquad \cos(\theta)=\sqrt{1-x^2}\qquad\theta=\arcsin(x)$

So we arrive at our final answer

$\int\sqrt{1-x^2}dx=\frac{\arcsin(x)+x\sqrt{1-x^2}}{2}$

As you can see, even for a fairly harmless looking integral this technique can involve quite a lot of calculation. Often it is helpful to see if a simpler method will suffice before turning to trigonometric substitution. On the other hand, frequently in the case of integrands involving square roots, this is the most tractable way to solve the problem. We begin with giving some rules of thumb to help you decide which trigonometric substitutions might be helpful.

If the integrand contains a single factor of one of the forms $\sqrt{a^2-x^2} \mbox{ or } \sqrt{a^2+x^2} \mbox{ or } \sqrt{x^2-a^2}$ we can try a trigonometric substitution.

• If the integrand contains $\sqrt{a^2-x^2}$ let $x=a\sin(\theta)$ and use the identity $1-\sin^2(\theta)=\cos^2(\theta)$ .
• If the integrand contains $\sqrt{a^2+x^2}$ let $x=a\tan(\theta)$ and use the identity $1+\tan^2(\theta)=\sec^2(\theta)$ .
• If the integrand contains $\sqrt{x^2-a^2}$ let $x=a\sec(\theta)$ and use the identity $\sec^2(\theta-1)=\tan^2(\theta)$ .

## Contents

### Sine substitution

This substitution is easily derived from a triangle, using the Pythagorean Theorem.

If the integrand contains a piece of the form $\sqrt{a^2-x^2}$ we use the substitution

$x=a\sin(\theta)\quad dx=a\cos(\theta)d\theta$

This will transform the integrand to a trigonometric function. If the new integrand can't be integrated on sight then the tan-half-angle substitution described below will generally transform it into a more tractable algebraic integrand.

E.g., if the integrand is $\sqrt{1-x^2}$ ,

 $\int\limits_0^1 \sqrt{1-x^2}dx$ $=\int\limits_0^\frac{\pi}{2} \sqrt{1-\sin^2(\theta)}\cos(\theta)d\theta$ $=\int\limits_0^\frac{\pi}{2} \cos^2(\theta)d\theta$ $=\tfrac{1}{2}\int\limits_0^\frac{\pi}{2} \bigl(1+\cos(2\theta)\bigr)d\theta$ $=\frac{\pi}{4}$

If the integrand is $\sqrt{\frac{1+x}{1-x}}$ , we can rewrite it as

$\sqrt{\frac{1+x}{1-x}}=\sqrt{\frac{1+x}{1+x}\frac{1+x}{1-x}}=\frac{1+x}{\sqrt{1-x^2}}$

Then we can make the substitution

 $\int\limits_0^a \frac{1+x}{\sqrt{1-x^2}}dx$ $=\int\limits_0^\alpha \frac{1+\sin(\theta)}{\cos(\theta)}\cos(\theta)d\theta$ $0 $=\int_0^\alpha \bigl(1+\sin(\theta)\bigr)d\theta$ $\alpha=\arcsin(a)$ $=\alpha+\bigg[-\cos(\theta)\bigg]_0^\alpha$ $=\alpha+1-\cos(\alpha)$ $=1+\arcsin(a)-\sqrt{1-a^2}$

### Tangent substitution

This substitution is easily derived from a triangle, using the Pythagorean Theorem.

When the integrand contains a piece of the form $\sqrt{a^2+x^2}$ we use the substitution

$x=a\tan(\theta)\qquad\sqrt{x^2+a^2}=a\sec(\theta)\qquad dx=a\sec^2(\theta)d\theta$

E.g., if the integrand is $(x^2+a^2)^{-\frac32}$ then on making this substitution we find

 $\int\limits_0^z (x^2+a^2)^{-\frac32}dx$ $=a^{-2}\int\limits_0^\alpha \cos(\theta)d\theta\qquad z>0$ $=a^{-2}\bigg[\sin(\theta)\bigg]_0^\alpha\qquad\alpha=\arctan\bigl(\tfrac{z}{a}\bigr)$ $=a^{-2}\sin(\alpha)$ $=a^{-2}\frac{\frac{z}{a}}{\sqrt{1+\frac{z^2}{a^2}}}$ $=\frac{z}{a^2\sqrt{a^2+z^2}}$

If the integral is

$I=\int\limits_0^z \sqrt{x^2+a^2}\qquad z>0$

then on making this substitution we find

$\begin{matrix} I & = & a^2 \int_0^\alpha \sec^3 \theta \, d\theta & & & \alpha = \tan^{-1} (z/a) \\ & = & a^2 \int_0^\alpha \sec \theta \, d\tan \theta & & & \\ & = & a^2 [ \sec \theta \tan \theta ]_0^\alpha & - & a^2 \int_0^\alpha \sec \theta \tan^2 \theta \, d\theta & \\ & = & a^2 \sec \alpha \tan \alpha & - & a^2 \int_0^\alpha \sec^3 \theta \, d\theta & + a^2 \int_0^\alpha \sec \theta \, d\theta \\ & = & a^2 \sec \alpha \tan \alpha & - & I & + a^2 \int_0^\alpha \sec \theta \, d\theta \\ \end{matrix}$

After integrating by parts, and using trigonometric identities, we've ended up with an expression involving the original integral. In cases like this we must now rearrange the equation so that the original integral is on one side only

 $I$ $=\tfrac{a^2}{2}\Bigg(\sec(\alpha)\tan(\alpha)+\int\limits_0^\alpha \sec(\theta)d\theta\Bigg)$ $=\tfrac{a^2}{2}\Bigg(\sec(\alpha)\tan(\alpha)+\bigg[\ln\Big(\sec(\theta)+\tan(\theta)\Big)\bigg]_0^\alpha\Bigg)$ $=\tfrac{a^2}{2}\bigg(\sec(\alpha)\tan(\alpha)+a^2\ln\Big(\sec(\alpha)+\tan(\alpha)\Big)\bigg)$ $=\tfrac{a^2}{2}\bigg(\tfrac{z}{a^2}\sqrt{a^2+z^2}+\ln\left(\tfrac{z+\sqrt{a^2+z^2}}{a}\right)\bigg)$ $=\tfrac{1}{2}\bigg(z\sqrt{z^2+a^2}+a^2\ln\left(\tfrac{z+\sqrt{a^2+z^2}}{a}\right)\bigg)$

As we would expect from the integrand, this is approximately $\frac{z^2}{2}$ for large $z$ .

In some cases it is possible to do trigonometric substitution in cases when there is no $\sqrt{\ \ }$ appearing in the integral.

Example

$\int\frac{dx}{x^2+1}$

The denominator of this function is equal to $\bigl(\sqrt{1+x^2}\bigr)^2$ . This suggests that we try to substitute $x=\tan(u)$ and use the identity $1+\tan^2(u)=\sec^2(u)$ . With this substitution, we obtain that $dx=\sec^2(u)du$ and thus

$\int\frac{dx}{x^2+1}=\int\frac{\sec^2(u)}{\tan^2(u)+1}du$
$=\int\frac{\sec^2(u)}{\sec^2(u)}du$
$=\int du$
$=u+c$

Using the initial substitution $u=\arctan(x)$ gives

$\int\frac{dx}{x^2+1}=\arctan(x)+C$

### Secant substitution

This substitution is easily derived from a triangle, using the Pythagorean Theorem.

If the integrand contains a factor of the form $\displaystyle\sqrt{x^2-a^2}$ we use the substitution

$x=a\sec(\theta)\quad dx=a\sec(\theta)\tan(\theta)d\theta\quad\sqrt{x^2-a^2}=a\tan(\theta)$

#### Example 1

Find $\int\limits_1^z \frac{\sqrt{x^2-1}}{x}dx$ .

 $\int\limits_1^z \frac{\sqrt{x^2-1}}{x}dx$ $=\int\limits_1^\alpha \frac{\tan(\theta)}{\sec(\theta)}\sec(\theta)\tan(\theta)d\theta\qquad z>1$ $=\int\limits_0^\alpha \tan^2(\theta)d\theta\qquad\qquad\qquad\qquad\alpha=\arcsec(z)$ $=\bigg[\tan(\theta)-\theta\bigg]_0^\alpha\qquad\qquad\qquad\tan(\alpha)=\sqrt{\sec^2(\alpha)-1}$ $=\tan(\alpha)-\alpha\qquad\qquad\qquad\qquad\tan(\alpha)=\sqrt{z^2-1}$ $=\sqrt{z^2-1}-\arcsec(z)$

#### Example 2

Find $\int\limits_1^z \frac{\sqrt{x^2-1}}{x^2}dx$ .

 $\int\limits_1^z \frac{\sqrt{x^2-1}}{x^2}dx$ $=\int\limits_1^\alpha \frac{\tan(\theta)}{\sec^2(\theta)}\sec(\theta)\tan(\theta)d\theta\qquad z>1$ $=\int\limits_0^\alpha \frac{\sin^2(\theta)}{\cos(\theta)}d\theta\qquad\qquad\qquad\alpha=\arcsec(z)$

We can now integrate by parts

 $\int\limits_1^z \frac{\sqrt{x^2-1}}{x^2}dx$ $=-\bigg[\tan(\theta)\cos(\theta)\bigg]_0^\alpha+\int\limits_0^\alpha \sec(\theta)d\theta$ $=-\sin(\alpha)+\bigg[\ln\bigl(\sec(\theta)+ \tan(\theta)\bigr)\bigg]_0^\alpha$ $=\ln\bigl(\sec(\alpha)+\tan(\alpha)\bigr)-\sin(\alpha)$ $=\ln\bigl(z+\sqrt{z^2-1}\bigr)-\frac{\sqrt{z^2-1}}{z}$

## Exercise

Evaluate the following using an appropriate trigonometric substitution.

1. $\int\frac{10}{25x^{2}+a}dx$

$\frac{2}{\sqrt a\arctan\Big(\tfrac{5x}{\sqrt a}\Big)}+C$

Solution

 ← Integration techniques/Integration by Parts Calculus Integration techniques/Trigonometric Integrals → Integration techniques/Trigonometric Substitution