# Trigonometric substitution

In mathematics, trigonometric substitution is the substitution of trigonometric functions for other expressions. One may use the trigonometric identities to simplify certain integrals containing radical expressions:[1][2]

Substitution 1. If the integrand contains a2 − x2, let

${\displaystyle x=a\sin \theta }$

and use the identity

${\displaystyle 1-\sin ^{2}\theta =\cos ^{2}\theta .}$

Substitution 2. If the integrand contains a2 + x2, let

${\displaystyle x=a\tan \theta }$

and use the identity

${\displaystyle 1+\tan ^{2}\theta =\sec ^{2}\theta .}$

Substitution 3. If the integrand contains x2 − a2, let

${\displaystyle x=a\sec \theta }$

and use the identity

${\displaystyle \sec ^{2}\theta -1=\tan ^{2}\theta .}$

## Examples

### Integrals containing a2 − x2

In the integral

${\displaystyle \int {\frac {dx}{\sqrt {a^{2}-x^{2}}}},}$

we may use

${\displaystyle x=a\sin \theta ,\quad dx=a\cos \theta \,d\theta ,\quad \theta =\arcsin \left({\frac {x}{a}}\right).}$

Then,

{\displaystyle {\begin{aligned}\int {\frac {dx}{\sqrt {a^{2}-x^{2}}}}&=\int {\frac {a\cos \theta \,d\theta }{\sqrt {a^{2}-a^{2}\sin ^{2}\theta }}}\\&=\int {\frac {a\cos \theta \,d\theta }{\sqrt {a^{2}(1-\sin ^{2}\theta )}}}\\&=\int {\frac {a\cos \theta \,d\theta }{\sqrt {a^{2}\cos ^{2}\theta }}}\\&=\int d\theta \\&=\theta +C\\&=\arcsin \left({\frac {x}{a}}\right)+C.\end{aligned}}}

The above step requires that a > 0 and cos(θ) > 0; we can choose a to be the positive square root of a2, and we impose the restriction π/2 < θ < π/2 on θ by using the arcsin function.

For a definite integral, one must figure out how the bounds of integration change. For example, as x goes from 0 to a/2, then sin θ goes from 0 to 1/2, so θ goes from 0 to π/6. Then,

${\displaystyle \int _{0}^{a/2}{\frac {dx}{\sqrt {a^{2}-x^{2}}}}=\int _{0}^{\pi /6}d\theta ={\frac {\pi }{6}}.}$

Some care is needed when picking the bounds. The integration above requires that π/2 < θ < π/2, so θ going from 0 to π/6 is the only choice. Neglecting this restriction, one might have picked θ to go from π to 5π/6, which would have resulted in the negative of the actual value.

### Integrals containing a2 + x2

In the integral

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

we may write

${\displaystyle x=a\tan \theta ,\quad dx=a\sec ^{2}\theta \,d\theta ,\quad \theta =\arctan {\frac {x}{a}},}$

so that the integral becomes

{\displaystyle {\begin{aligned}\int {\frac {dx}{a^{2}+x^{2}}}&=\int {\frac {a\sec ^{2}\theta \,d\theta }{a^{2}+a^{2}\tan ^{2}\theta }}\\&=\int {\frac {a\sec ^{2}\theta \,d\theta }{a^{2}(1+\tan ^{2}\theta )}}\\&=\int {\frac {a\sec ^{2}\theta \,d\theta }{a^{2}\sec ^{2}\theta }}\\&=\int {\frac {d\theta }{a}}\\&={\frac {\theta }{a}}+C\\&={\frac {1}{a}}\arctan {\frac {x}{a}}+C,\end{aligned}}}

provided a ≠ 0.

### Integrals containing x2 − a2

Integrals like

${\displaystyle \int {\frac {dx}{x^{2}-a^{2}}}}$

can also be evaluated by partial fractions rather than trigonometric substitutions. However, the integral

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

cannot. In this case, an appropriate substitution is:

${\displaystyle x=a\sec \theta ,\quad dx=a\sec \theta \tan \theta \,d\theta ,\quad \theta =\operatorname {arcsec} {\frac {x}{a}}.}$

Then,

{\displaystyle {\begin{aligned}\int {\sqrt {x^{2}-a^{2}}}\,dx&=\int {\sqrt {a^{2}\sec ^{2}\theta -a^{2}}}\cdot a\sec \theta \tan \theta \,d\theta \\&=\int {\sqrt {a^{2}(\sec ^{2}\theta -1)}}\cdot a\sec \theta \tan \theta \,d\theta \\&=\int {\sqrt {a^{2}\tan ^{2}\theta }}\cdot a\sec \theta \tan \theta \,d\theta \\&=\int a^{2}\sec \theta \tan ^{2}\theta \,d\theta \\&=a^{2}\int (\sec \theta )(\sec ^{2}\theta -1)\,d\theta \\&=a^{2}\int (\sec ^{3}\theta -\sec \theta )\,d\theta .\end{aligned}}}

We can then solve this using the formula for the integral of secant cubed.

## Substitutions that eliminate trigonometric functions

Substitution can be used to remove trigonometric functions. In particular, see Tangent half-angle substitution.

For instance,

{\displaystyle {\begin{aligned}\int f(\sin(x),\cos(x))\,dx&=\int {\frac {1}{\pm {\sqrt {1-u^{2}}}}}f\left(u,\pm {\sqrt {1-u^{2}}}\right)\,du&&u=\sin(x)\\\int f(\sin(x),\cos(x))\,dx&=\int {\frac {1}{\mp {\sqrt {1-u^{2}}}}}f\left(\pm {\sqrt {1-u^{2}}},u\right)\,du&&u=\cos(x)\\\int f(\sin(x),\cos(x))\,dx&=\int {\frac {2}{1+u^{2}}}f\left({\frac {2u}{1+u^{2}}},{\frac {1-u^{2}}{1+u^{2}}}\right)\,du&&u=\tan \left({\tfrac {x}{2}}\right)\\\int {\frac {\cos x}{(1+\cos x)^{3}}}\,dx&=\int {\frac {2}{1+u^{2}}}{\frac {\frac {1-u^{2}}{1+u^{2}}}{\left(1+{\frac {1-u^{2}}{1+u^{2}}}\right)^{3}}}\,du=\int (1-u^{2})(1+u^{2})\,du\end{aligned}}}

## Hyperbolic substitution

Substitutions of hyperbolic functions can also be used to simplify integrals.[3]

In the integral ${\displaystyle \int {\frac {1}{\sqrt {a^{2}+x^{2}}}}\,dx}$ , make the substitution ${\displaystyle x=a\sinh {u}}$ , ${\displaystyle dx=a\cosh u\,du.}$

Then, using the identities ${\displaystyle \cosh ^{2}(x)-\sinh ^{2}(x)=1}$  and ${\displaystyle \sinh ^{-1}{x}=\ln(x+{\sqrt {x^{2}+1}}),}$

{\displaystyle {\begin{aligned}\int {\frac {1}{\sqrt {a^{2}+x^{2}}}}\,dx&=\int {\frac {a\cosh u}{\sqrt {a^{2}+a^{2}\sinh ^{2}u}}}\,du\\&=\int {\frac {a\cosh {u}}{a{\sqrt {1+\sinh ^{2}{u}}}}}\,du\\&=\int {\frac {a\cosh {u}}{a\cosh u}}\,du\\&=u+C\\&=\sinh ^{-1}{\frac {x}{a}}+C\\&=\ln \left({\sqrt {{\frac {x^{2}}{a^{2}}}+1}}+{\frac {x}{a}}\right)+C\\&=\ln \left({\frac {{\sqrt {x^{2}+a^{2}}}+x}{a}}\right)+C\end{aligned}}}