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 ${\displaystyle {\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

${\displaystyle {\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 {\bigl |}\cos(\theta ){\bigr |}}$ 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

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

we can rewrite it as

${\displaystyle \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 )={\frac {1+\cos(2\theta )}{2}}}$ our original integral reduces to:

${\displaystyle {\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

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

For the second integral we do a substitution, namely ${\displaystyle u=2\theta ,du=2d\theta }$ to get:

${\displaystyle {\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:

${\displaystyle \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 ${\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:

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

So we arrive at our final answer

${\displaystyle \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 ${\displaystyle {\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 ${\displaystyle {\sqrt {a^{2}-x^{2}}}}$ let ${\displaystyle x=a\sin(\theta )}$ and use the identity ${\displaystyle 1-\sin ^{2}(\theta )=\cos ^{2}(\theta )}$ .
• If the integrand contains ${\displaystyle {\sqrt {a^{2}+x^{2}}}}$ let ${\displaystyle x=a\tan(\theta )}$ and use the identity ${\displaystyle 1+\tan ^{2}(\theta )=\sec ^{2}(\theta )}$ .
• If the integrand contains ${\displaystyle {\sqrt {x^{2}-a^{2}}}}$ let ${\displaystyle x=a\sec(\theta )}$ and use the identity ${\displaystyle \sec ^{2}(\theta )-1=\tan ^{2}(\theta )}$ .

Sine substitution

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

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

${\displaystyle 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 ${\displaystyle {\sqrt {1-x^{2}}}}$ ,

{\displaystyle {\begin{aligned}\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}}\end{aligned}}}

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

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

Then we can make the substitution

{\displaystyle {\begin{aligned}\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

Tangent substitution

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

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

${\displaystyle 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 ${\displaystyle (x^{2}+a^{2})^{-{\frac {3}{2}}}}$ then on making this substitution we find

{\displaystyle {\begin{aligned}\int \limits _{0}^{z}(x^{2}+a^{2})^{-{\frac {3}{2}}}dx&=a^{-2}\int \limits _{0}^{\alpha }\cos(\theta )d\theta &z>0\\&=a^{-2}{\Big [}\sin(\theta ){\Big ]}_{0}^{\alpha }&\alpha =\arctan \left({\tfrac {z}{a}}\right)\\&=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}}}}}\end{aligned}}}

If the integral is

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

then on making this substitution we find

${\displaystyle {\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

 ${\displaystyle I}$ ${\displaystyle ={\tfrac {a^{2}}{2}}{\Bigg (}\sec(\alpha )\tan(\alpha )+\int \limits _{0}^{\alpha }\sec(\theta )d\theta {\Bigg )}}$ ${\displaystyle ={\tfrac {a^{2}}{2}}{\Bigg (}\sec(\alpha )\tan(\alpha )+{\bigg [}\ln {\Big (}\sec(\theta )+\tan(\theta ){\Big )}{\bigg ]}_{0}^{\alpha }{\Bigg )}}$ ${\displaystyle ={\tfrac {a^{2}}{2}}{\bigg (}\sec(\alpha )\tan(\alpha )+a^{2}\ln {\Big (}\sec(\alpha )+\tan(\alpha ){\Big )}{\bigg )}}$ ${\displaystyle ={\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 )}}$ ${\displaystyle ={\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 ${\displaystyle {\frac {z^{2}}{2}}}$ for large ${\displaystyle z}$ .

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

Example

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

The denominator of this function is equal to ${\displaystyle {\bigl (}{\sqrt {1+x^{2}}}{\bigr )}^{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

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

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

${\displaystyle \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 \displaystyle {\sqrt {x^{2}-a^{2}}}}$ we use the substitution

${\displaystyle 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 \limits _{0}^{z}{\frac {\sqrt {x^{2}-1}}{x}}dx}$ .

 ${\displaystyle \int \limits _{0}^{z}{\frac {\sqrt {x^{2}-1}}{x}}dx}$ ${\displaystyle =\int \limits _{0}^{\alpha }{\frac {\tan(\theta )}{\sec(\theta )}}\sec(\theta )\tan(\theta )d\theta \qquad z>1}$ ${\displaystyle =\int \limits _{0}^{\alpha }\tan ^{2}(\theta )d\theta \qquad \qquad \qquad \qquad \alpha =\operatorname {arcsec} (z)}$ ${\displaystyle ={\bigg [}\tan(\theta )-\theta {\bigg ]}_{0}^{\alpha }\qquad \qquad \qquad \tan(\alpha )={\sqrt {\sec ^{2}(\alpha )-1}}}$ ${\displaystyle =\tan(\alpha )-\alpha \qquad \qquad \qquad \qquad \tan(\alpha )={\sqrt {z^{2}-1}}}$ ${\displaystyle ={\sqrt {z^{2}-1}}-\operatorname {arcsec} (z)}$

Example 2

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

 ${\displaystyle \int \limits _{1}^{z}{\frac {\sqrt {x^{2}-1}}{x^{2}}}dx}$ ${\displaystyle =\int \limits _{1}^{\alpha }{\frac {\tan(\theta )}{\sec ^{2}(\theta )}}\sec(\theta )\tan(\theta )d\theta \qquad z>1}$ ${\displaystyle =\int \limits _{0}^{\alpha }{\frac {\sin ^{2}(\theta )}{\cos(\theta )}}d\theta \qquad \qquad \qquad \alpha =\operatorname {arcsec} (z)}$

We can now integrate by parts

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

Exercise

Evaluate the following using an appropriate trigonometric substitution.

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

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

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