
8.4: Trigonometric Substitutions


So far we have seen that it sometimes helps to replace a subexpression of a function by a single variable. Occasionally it can help to replace the original variable by something more complicated. This seems like a "reverse'' substitution, but it is really no different in principle than ordinary substitution.

Example $$\PageIndex{1}$$

Evaluate

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

Solution

Let $$x=\sin u$$ so $$dx=\cos u\,du$$. Then

$\int \sqrt{1-x^2}\,dx=\int\sqrt{1-\sin^2 u}\cos u\,du= \int\sqrt{\cos^2 u}\cos u\,du.$

We would like to replace $$\sqrt{\cos^2 u}$$ by $$\cos u$$, but this is valid only if $$\cos u$$ is positive, since $$\sqrt{\cos^2 u}$$ is positive. Consider again the substitution $$x=\sin u$$. We could just as well think of this as $$u=\arcsin x$$. If we do, then by the definition of the arcsine, $$-\pi/2\le u\le\pi/2$$, so $$\cos u\ge0$$. Then we continue:

\eqalign{ \int\sqrt{\cos^2 u}\cos u\,du&=\int\cos^2u\,du=\int {1+\cos 2u\over2}\,du = {u\over 2}+{\sin 2u\over4}+C\cr &={\arcsin x\over2}+{\sin(2\arcsin x)\over4}+C.\cr }

This is a perfectly good answer, though the term $$\sin(2\arcsin x)$$ is a bit unpleasant. It is possible to simplify this. Using the identity $$\sin 2x=2\sin x\cos x$$, we can write

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

Then the full antiderivative is

${\arcsin x\over2}+{2x\sqrt{1-x^2}\over4}= {\arcsin x\over2}+{x\sqrt{1-x^2}\over2}+C.$

This type of substitution is usually indicated when the function you wish to integrate contains a polynomial expression that might allow you to use the fundamental identity $$\sin^2x+\cos^2x=1$$ in one of three forms:

$\cos^2 x=1-\sin^2x,$

$\sec^2x=1+\tan^2x,$

or

$\tan^2x=\sec^2x-1.$

If your function contains $$1-x^2$$, as in the example above, try $$x=\sin u$$; if it contains $$1+x^2$$ try $$x=\tan u$$; and if it contains $$x^2-1$$, try $$x=\sec u$$. Sometimes you will need to try something a bit different to handle constants other than one.

Example $$\PageIndex{2}$$

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

Solution

We start by rewriting this so that it looks more like the previous example:

$\int\sqrt{4-9x^2}\,dx=\int\sqrt{4(1-(3x/2)^2)}\,dx =\int 2\sqrt{1-(3x/2)^2}\,dx.$

Now let $$3x/2=\sin u$$ so $$(3/2)\,dx=\cos u \,du$$ or $$dx=(2/3)\cos u\,du$$. Then

\eqalign{ \int 2\sqrt{1-(3x/2)^2}\,dx&=\int 2\sqrt{1-\sin^2u}\,(2/3)\cos u\,du ={4\over3}\int \cos^2u\,du\cr &={4u\over 6}+{4\sin 2u\over12}+C\cr &={2\arcsin(3x/2)\over3}+{2\sin u \cos u\over3}+C\cr &={2\arcsin(3x/2)\over3}+{2\sin(\arcsin(3x/2))\cos(\arcsin(3x/2))\over3}+C\cr &={2\arcsin(3x/2)\over3}+{2(3x/2)\sqrt{1-(3x/2)^2}\over3}+C\cr &={2\arcsin(3x/2)\over3}+{x\sqrt{4-9x^2}\over2}+C,\cr }

using some of the work fromExample$$\PageIndex{1}$$,

Example $$\PageIndex{3}$$

Evaluate $\int\sqrt{1+x^2}\,dx.$

Solution

Let $$x=\tan u$$, $$dx=\sec^2 u\,du$$, so

$$\int\sqrt{1+x^2}\,dx=\int \sqrt{1+\tan^2 u}\sec^2u\,du= \int\sqrt{\sec^2u}\sec^2u\,du. \] Since $$u=\arctan(x)$$, $$-\pi/2\le u\le\pi/2$$ and $$\sec u\ge0$$, so $$\sqrt{\sec^2u}=\sec u$$. Then$$\int\sqrt{\sec^2u}\sec^2u\,du=\int \sec^3 u \,du.$$In problems of this type, two integrals come up frequently: $$\int\sec^3u\,du$$ and $$\int\sec u\,du$$. Both have relatively nice expressions but they are a bit tricky to discover. First we do $$\int\sec u\,du$$, which we will need to compute $$\int\sec^3u\,du$$:$$\eqalign{ \int\sec u\,du&=\int\sec u\,{\sec u +\tan u\over \sec u +\tan u}\,du\cr &=\int{\sec^2 u +\sec u\tan u\over \sec u +\tan u}\,du.\cr }\]

Now let $$w=\sec u +\tan u$$, $$dw=\sec u \tan u + \sec^2u\,du$$, exactly the numerator of the function we are integrating. Thus

\eqalign{ \int\sec u\,du=\int{\sec^2 u +\sec u\tan u\over \sec u +\tan u}\,du&= \int{1\over w}\,dw=\ln |w|+C\cr &=\ln|\sec u +\tan u|+C.\cr }\] Now for $$\int\sec^3 u\,du$$:\eqalign{ \sec^3u&={\sec^3u\over2}+{\sec^3u\over2}={\sec^3u\over2}+{(\tan^2u+1)\sec u\over 2}\cr &={\sec^3u\over2}+{\sec u \tan^2 u\over2}+{\sec u\over 2}= {\sec^3u+\sec u \tan^2u\over 2}+{\sec u\over 2}.\cr }\]

We already know how to integrate $$\sec u$$, so we just need the first quotient. This is "simply'' a matter of recognizing the product rule in action: $$\int \sec^3u+\sec u \tan^2u\,du=\sec u \tan u.\] So putting these together we get$$ \int\sec^3u\,du={\sec u \tan u\over2}+{\ln|\sec u +\tan u| \over2}+C, \]

and reverting to the original variable $$x$$:

\eqalign{ \int\sqrt{1+x^2}\,dx&={\sec u \tan u\over2}+{\ln|\sec u +\tan u|\over2}+C\cr &={\sec(\arctan x) \tan(\arctan x)\over2} +{\ln|\sec(\arctan x) +\tan(\arctan x)|\over2}+C\cr &={ x\sqrt{1+x^2}\over2} +{\ln|\sqrt{1+x^2} +x|\over2}+C,\cr }\]

using $$\tan(\arctan x)=x$$ and $$\sec(\arctan x)=\sqrt{1+\tan^2(\arctan x)}=\sqrt{1+x^2}$$.