### Using the unique algebra of trig. functions to solve integrals

In another section we looked at integrals containing only powers of trigonometric functions, such as

\begin{align} &\int sin^3(x) \, dx \\ &\int sin^2(x) \, tan(x) \, dx \\ &\int cos^4(x) \, sin^2(x) \, dx \end{align}

We developed a couple of techniques, relying on key trigonometric identities, to solve them. These are an important class of integrals in certain fields of mathematics, particularly in the field of Fourier series and the Fourier transform.

In this section, we'll look at quite a different set of integrands, functions that look like this:

\begin{align} &\sqrt{a^2 - x^2} \\[5pt] &\sqrt{a^2 + x^2} \\[5pt] &\sqrt{x^2 - a^2} \end{align}

The particular algebraic properties of the trigonometric functions, mainly the Pythagorean identities,

\begin{align} sin^2(\theta) + cos^2(\theta) &= 1 \\[5pt] tan^2(\theta) + 1 &= sec^2(\theta) \\[5pt] cot^2(\theta) + 1 &= csc^2(\theta) \end{align}

will give us the hook we need to solve some otherwise very tricky integrals.

### How it works

Let's start with the first radical expression in the list above, (a2 - x2)1/2. We begin by introducing a dummy variable, t, and making the substitution x = a sin(t). We'll get rid of the t later when we're done with it, so hang in there. Here's the process:

The substitution has reduced a radical to a simple trigonometric expression, the integral of which we know, so there's hope for this kind of substitution.

In a similar way we can substitute x = a tan(t) for the x in the second radical and x = a sec(t) for the x in the third. Each substitution leads to a simple trigonometric function.

See the table below for a summary of integration by trig. substitution. Afterward, the best way to learn is by example, so read through the examples below and check out the video examples.

### Example 1   $\int \sqrt{81 - x^2} \, dx$

To begin, consult the table above and make the substitution x = a sin(t), where a = 9 (the square root of 81):

\begin{align} \text{let } \; x &= 9 \, sin(t) \\[5pt] \text{then } \; x^2 &= 81 \, sin^2(t) \\[5pt] \text{and } \; dx &= 9 \, cos(t) \, dt \end{align}

The integral is

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

The integrand under the radical is 92(1 - sin2(t)), which is a perfect square:

\begin{align} 81 - 81 sin^2(t) &= 81[1 - sin^2(t)] \\ &= 81 cos^2(t) \end{align}

That last step uses the Pythagorean identity, sin2t + cos2t = 1. Now the integrand, including dx, can be written:

$$\int \sqrt{81 cos^2(t)} \cdot 9 cos(t) \, dt$$

The substitution allows us to take the square root:

$$\int 9 cos(t) \cdot 9 cos(t) \, dt$$

Now move the constant outside of the integral and use our cosine power-reduction formula to change the cos2(t) term into something we can integrate, just as in the examples above. Integrate the cos(2t) integrand with simple u-substitution.

The integral in terms of the dummy variable t is now easy to write, and we can substitute expressions containing x for t and sin(t). We also remember here that sin(2x) = 2 sin(x) cos(x) is another of our double-angle identities:

Now let's go back to the definition of t that we started with, namely that sin(t) = x/9, and construct the right triangle (angles not to scale) that goes with it. Note that we use the Pythagorean theorem to get the length of the lower side of the triangle.

That gives us cos(t), so we can plug sin(t) and cos(t) into the previous result to get

$$= \frac{81}{2} sin^{-1}\left( \frac{x}{9}\right) + \frac{81}{4} \cdot 2 sin(t) cos(t)$$

And finally, using our triangle to replace sin(t) and cos(t) with functions of x gives:

$$= \frac{81}{2} sin^{-1}\left(\frac{x}{9}\right) + \frac{81}{4} \frac{2x}{9} \frac{\sqrt{81 - x^2}}{9}$$

Now some easy cancellation gives us the final integral:

$$\frac{81}{2} sin^{-1}\left(\frac{x}{9}\right) + \frac{1}{2} x \sqrt{81 - x^2} + C$$

This solution is probably not what you might have guessed from a look at the integral. Integration by substitution is a powerful technique that can get us these solutions.

### Example 2   $\int \sqrt{4 + 9x^2} \, dx$

This integral looks like the form

$$\int \sqrt{a^2 + b^2} \, dx$$

except for the number (9) in front of the x2. We can remove that temporarily by dividing by the square root of 9, and multiplying outside the integrand by 3. We'll have to keep that 3 around, but that's OK:

$$3 \int \frac{\sqrt{4 + 9x^2}}{\sqrt{9}} \, dx$$

The new integral now has the form we'd like:

$$3 \int \sqrt{\frac{4}{9} + x^2} \, dx$$

Consulting the table above, we see that this substitution works:

\begin{align} \text{let } \; x &= \frac{2}{3} \, tan(t), \\[5pt] \text{then } \; x^2 &= \frac{4}{9} \, tan^2(t) \\[5pt] \text{and } \; dx &= \frac{2}{3} \, sec^2(t) \, dt \end{align}

The radical in the integrand now reduced to

\begin{align} \sqrt{\frac{4}{9} + x^2} &= \sqrt{\frac{4}{9} + \frac{4}{9} tan^2(t)} \\ \\ &= \sqrt{\frac{4}{9}[1 + tan^2(t)]} \\ \\ &= \sqrt{\frac{4}{9} sec^2(t)} \\ \\ &= \frac{2}{3} sec(t) \end{align}

So the integral can now be rewritten in terms of trig functions:

$$3 \int \sqrt{\frac{4}{9} + x^2} \; \rightarrow \; 3 \int \frac{2}{3} sec(t) \frac{2}{3} sec^2(t) \, dt$$

It simplifies to

$$= \frac{4}{3} \int sec^3 (t) \, dt$$

Our strategy to solve it is to divide the cubed term into two terms. (I'm omitting the 4/3 for now and I'll hopefully remember to put it back later.)

$$\int sec^3(t) \, dt = \int sec(t) sec^2(t) \, dt$$

We can do this integral by parts. Here are the substitutions:

$$\begin{matrix} \text{let } \; u = sec(t) && dv = sec^2(t) \, dt \\[5pt] du = sec(t) \, tan(t) \, dt && v = tan(t) \end{matrix}$$

The new expression, including a new integral to tackle, is

$$\int sec^3(t) \, dt = sec(t) tan(t) - \int sec(t)\cdot tan^2(t) \, dt$$

Now we can do the second integral by replacing tan2(t) with sec2(t) - 1, which is one form of the Pythagorean identity.

\begin{align} &\int sec^3(t) \, dt \\ \\ &= sec(t) tan(t) - \int sec(t) [sec^2(t) - 1] \, dt \end{align}

Multiplying through by sec(t) on the right side gives us two integrals. Notice that the integral of sec3(t) reappears, but with opposite sign, so we can move it to the left side by addition (arrow).

Now the integral of sec(t) was worked out elsewhere, it is ln|sec(t) + tan(t)|:

$$2 \int sec^3(t) \, dt = sect*t) \cdot tan(t) - ln|sec(t) + tan(t)| + C$$

We can finally solve for the original integral, remembering to bring our factor of 4/3 back in:

$$\int sec^3(t) \, dt = \frac{4}{3}\frac{1}{2}\left[ sec(t) \cdot tan(t) - ln|sec(t) + tan(t) + C \right]$$

The solution, in terms of the dummy variable t is:

$$= \frac{2}{3} \left[ sec(t) \cdot tan(t) = ln|sec(t) + tan(t)| + C\right]$$

Now we can construct a triangle based on our initial assumption, $tan(t) = \frac{3x}{2}$

The hypotenuse was found using the Pythagorean theorem. We can now use the triangle to find tan(t) and sec(t) in terms of the original variable x:

$$= \frac{\sqrt{4 + 9x^2}}{2} \frac{3x}{2} - ln \left| \frac{\sqrt{4 + 9x^2}}{2} + \frac{3x}{2} \right| + C$$

OK, so that was a long slog, but hopefully you can see that there's just no other way to do that integral on paper. Our only other choice would have been to estimate a definite integral by numerical integration.

### Example 3:   $\int \frac{e^x}{7 + e^{2x}} \, dx$

The first thing to do is make a substitution for the ex terms. This one fits nicely:

$$\text{Let } u = e^x, \; \text{ then } u^2 = e^{2x}$$

(remember the laws of logs: (ex)2 = e2x). We also need the differential in terms of u:

$$\text{and } du = e^x \, dx$$

The new integral is

$$\int \frac{du}{7 + u^2}$$

Now this has a form for which we can use the x = a·tan(t) substitution:

\begin{align} \text{Let } u = \sqrt{7} \, tan(t) \\[5pt] du = \sqrt{7} \, sec^2(t) \end{align}

The denominator gets substituted like this:

\begin{align} u^2 &= 7 \, tan^2(t) \\[5pt] 7 + u^2 &= 7 + 7 \, tan^2(t) \\[5pt] &= 7(1 + tan^2(t)) \\[5pt] &= 7 \, sec^2(t) \end{align}

Now substituting our expressions for du and for 7 + u2, we get the integral in terms of t:

$$\int \frac{\sqrt{7} sec^2(t)}{7 sec^2(t)} \, dt$$

There's a nice cancellation, yielding the simplest of integrals:

$$\int \frac{\sqrt{7} sec^2(t)}{7 sec^2(t)} \, dt = \int \frac{dt}{\sqrt{7}}$$

The solution, in terms of the dummy variable t is

$$= \frac{1}{\sqrt{7}} t$$

Now we begin to walk the solution backward through our two substitutions; first to u:

$$\frac{1}{\sqrt{7}} tan^{-1} \left() \frac{u}{7} \right)$$

That inverse tangent term comes directly from our substitution u = √7 tan(t). Then re-substituting ex for u, we get.

$$= \frac{1}{\sqrt{7}} tan^{-1} \left( \frac{e^x}{7} \right) + C$$

### Practice problems

Try doing these integrals by trig. substitution. Some of them are tricky. Try using the solutions as hints to get you going when you stall. You'll learn more that way.

 1 $$\int \frac{1}{\sqrt{x^2 - 25}} \, dx$$ 2 $$\int \frac{x}{\sqrt{16 - x^2}} \, dx$$ 3 $$\int \frac{x}{\sqrt{x^2 + 1}} \, dx$$ 4 $$\int \frac{x^2}{\sqrt{x^2 + 9}} \, dx$$
 5 $$\int \sqrt{1 - x^2} \, dx$$ 6 $$\int \frac{1}{x^2 \sqrt{x^2 + 4}} \, dx$$ 7 $$\int \frac{1}{(x^2 + 2x + 2)^2} \, dx$$ 8 $$\int \frac{x}{(9 - x^2)^{3/2}} \, dx$$

xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.© 2012-2019, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.