# 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 $\displaystyle \sin ^{2}(\theta )+\cos ^{2}(\theta )=1$ for an arbitrary angle $\displaystyle \theta$. If we replace $\displaystyle x$ in this expression by $\displaystyle \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 $\displaystyle \theta =\arcsin(x)$ since we replaced $\displaystyle x^{2}$ with $\displaystyle \sin ^{2}(\theta )$.

We would like to mention that technically one should write the absolute value of $\displaystyle \cos(\theta )$, in other words $\displaystyle |\cos(\theta )|$ as our final answer since $\displaystyle {\sqrt {A^{2}}}=|A|$ for all possible $\displaystyle A$. But as long as we are careful about the domain of all possible $\displaystyle x$ and how $\displaystyle \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 $\displaystyle \cos(\theta )$ with the complicated $\displaystyle {\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 $\displaystyle dx=\cos(\theta )\,d\theta$, and to get a integral that only involves $\displaystyle \theta$ we need to also replace $\displaystyle dx$ by something in terms of $\displaystyle 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 $\displaystyle \cos \theta$ comes from replacing the $\displaystyle {\sqrt {1-x^{2}}}$ and the $\displaystyle \cos \theta \,d\theta$ comes from substituting for the $\displaystyle dx$.

Since $\displaystyle \cos ^{2}(\theta )={\tfrac {1}{2}}(1+\cos(2\theta ))$ 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 $\displaystyle u=2\theta$ (and $\displaystyle 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={\tfrac {1}{4}}\sin(2\theta )$

Finally we see that:

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

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

That is we worked out that:

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

So we arrive at our final answer

$\int {\sqrt {1-x^{2}}}dx={\tfrac {1}{2}}\arcsin(x)+{\tfrac {1}{2}}x{\sqrt {1-x^{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 √(1-x2),

${\begin{matrix}\int _{0}^{1}{\sqrt {1-x^{2}}}dx&=&\int _{0}^{{\pi /2}}{\sqrt {1-\sin ^{2}\theta }}\cos \theta \,d\theta \\&=&\int _{0}^{{\pi /2}}\cos ^{2}\theta \,d\theta \\&=&{\frac {1}{2}}\int _{0}^{{\pi /2}}1+\cos 2\theta \,d\theta \\&=&{\frac {\pi }{4}}\end{matrix}}$

If the integrand is √(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

${\begin{matrix}\int _{0}^{a}{\frac {1+x}{{\sqrt {1-x^{2}}}}}dx&=&\int _{0}^{\alpha }{\frac {1+\sin \theta }{\cos \theta }}\cos \theta \,d\theta &0

### 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 \quad {\sqrt {x^{2}+a^{2}}}=a\sec \theta \quad dx=a\sec ^{2}\theta d\theta$

E.g., if the integrand is (x2+a2)-3/2 then on making this substitution we find

${\begin{matrix}\int _{0}^{z}\left(x^{2}+a^{2}\right)^{{-{\frac {3}{2}}}}dx&=&a^{{-2}}\int _{0}^{\alpha }\cos \theta \,d\theta &z>0\\&=&a^{{-2}}\left[\sin \theta \right]_{0}^{\alpha }&\alpha =\tan ^{{-1}}(z/a)\\&=&a^{{-2}}\sin \alpha &\\&=&a^{{-2}}{\frac {z/a}{{\sqrt {1+z^{2}/a^{2}}}}}&={\frac {1}{a^{2}}}{\frac {z}{{\sqrt {a^{2}+z^{2}}}}}\\\end{matrix}}$

If the integral is

$I=\int _{0}^{z}{\sqrt {x^{2}+a^{2}}}\quad 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

${\begin{matrix}I&=&{\frac {1}{2}}a^{2}\sec \alpha \tan \alpha &+&{\frac {1}{2}}a^{2}\int _{0}^{\alpha }\sec \theta \,d\theta \\&=&{\frac {1}{2}}a^{2}\sec \alpha \tan \alpha &+&{\frac {1}{2}}a^{2}\left[\ln \left(\sec \theta +\tan \theta \right)\right]_{0}^{\alpha }\\&=&{\frac {1}{2}}a^{2}\sec \alpha \tan \alpha &+&{\frac {1}{2}}a^{2}\ln \left(\sec \alpha +\tan \alpha \right)\\&=&{\frac {1}{2}}a^{2}\left({\sqrt {1+{\frac {z^{2}}{a^{2}}}}}\right){\frac {z}{a}}&+&{\frac {1}{2}}a^{2}\ln \left({\sqrt {1+{\frac {z^{2}}{a^{2}}}}}+{\frac {z}{a}}\right)\\&=&{\frac {1}{2}}z{\sqrt {z^{2}+a^{2}}}&+&{\frac {1}{2}}a^{2}\ln \left({\frac {z}{a}}+{\sqrt {1+{\frac {z^{2}}{a^{2}}}}}\right)\\\end{matrix}}$

As we would expect from the integrand, this is approximately z2/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 {1}{x^{2}+1}}\,dx$

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

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

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

$\int {\frac {1}{x^{2}+1}}\,dx=\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 $\displaystyle \int _{1}^{z}{\frac {{\sqrt {x^{2}-1}}}{x}}dx.$

${\begin{matrix}\int _{1}^{z}{\frac {{\sqrt {x^{2}-1}}}{x}}dx&=&\int _{1}^{\alpha }{\frac {\tan \theta }{\sec \theta }}\sec \theta \tan \theta \,d\theta &z>1\\&=&\int _{0}^{\alpha }\tan ^{2}\theta \,d\theta &\alpha =\sec ^{{-1}}z\\&=&\left[\tan \theta -\theta \right]_{0}^{\alpha }&\tan \alpha ={\sqrt {\sec ^{2}\alpha -1}}\\&=&\tan \alpha -\alpha &\tan \alpha ={\sqrt {z^{2}-1}}\\&=&{\sqrt {z^{2}-1}}-\sec ^{{-1}}z&\\\end{matrix}}$

#### Example 2

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

${\begin{matrix}\int _{1}^{z}{\frac {{\sqrt {x^{2}-1}}}{x^{2}}}dx&=&\int _{1}^{\alpha }{\frac {\tan \theta }{\sec ^{2}\theta }}\sec \theta \tan \theta \,d\theta &z>1\\&=&\int _{0}^{\alpha }{\frac {\sin ^{2}\theta }{\cos \theta }}d\theta &\alpha =\sec ^{{-1}}z\\\end{matrix}}$

We can now integrate by parts

${\begin{matrix}\int _{1}^{z}{\frac {{\sqrt {x^{2}-1}}}{x^{2}}}dx&=&-\left[\tan \theta \cos \theta \right]_{0}^{\alpha }+\int _{0}^{\alpha }\sec \theta \,d\theta \\&=&-\sin \alpha +\left[\ln(\sec \theta +\tan \theta )\right]_{0}^{\alpha }\\&=&\ln(\sec \alpha +\tan \alpha )-\sin \alpha \\&=&\ln(z+{\sqrt {z^{2}-1}})-{\frac {{\sqrt {z^{2}-1}}}{z}}\\\end{matrix}}$

## Exercise

Evaluate the following using an appropriate trigonometric substitution.

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

$2\arctan(5x)+C$

Solution

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