xaktly | Calculus

Trigonometric integrals

Trigonometric integrals span two sections, this one on integrals containing only trigonometric functions, and another on integration of specific functions by substitution of variables for trig. functions. Both are useful, so make sure to check out the second, too.

Two ways to use trigonometry in integrals


We use trigonometric functions quite often in integration, even when there are no trig. functions explicitly in the integral. In this section we'll look at integrals that contain only trigonometric functions, such as

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

Trigonometric integrals like these are very important throughout science and engineering. The field of Fourier analysis, which includes fourier series and the "fourier transform", is based upon series of terms that include trig. functions,

and we often have to integrate complicated trigonometric expressions. You couldn't get an MRI image of your aching knee, for example, if it weren't for the Fourier transform and trigonometric integrals.

We'll develop some tricks for making these complicated integrals possible. This section will build heavily on your knowledge of analytical trigonometry (trig. identities), integration by u-substitution and integration by parts.

In another section, we'll cover how it's possible to integrate some pretty tricky functions by substituting trig. functions for variables, taking advantage of some of the special algebra of trig functions, such as the Pythagorean identity,

$$\bf \sin^2(x) + \cos^2(x) = 1$$


First some important trig. identities


First we recall the Pythagorean identity:

$$\sin^2(x) + \cos^2(x) = 1$$

If we begin with the co\sine double angle formula (derived here),

$$\cos(2\theta) = \cos^2(\theta) - \sin^2(\theta)$$

we can use the Pythagorean identity to substitute $1 - \cos^2(\theta)$ for $\sin^2(\theta)$ to obtain one of the power-reduction identities:

$$ \begin{align} \cos(2\theta) &= \cos^2(\theta)-\sin^2(\theta) \\[5pt] \cos(2\theta) &= \cos^2(\theta)-(1-\cos^2(\theta)) \\[5pt] \cos(2\theta) &= 2 \cos^2(\theta) - 1 \\[5pt] \cos^2(\theta) &= \frac{1+\cos(2\theta)}{2} \end{align}$$

Notice that this identity allows us down-convert the power of the cosine function from 2 to 1. And it's easy to integrate a function like $\cos(2\theta)$ or $\sin(2\theta)$ by simple u-substitution.

This will be very valuable in doing trig. integrals. Likewise, we can develop a sine-power conversion formula:

$$ \begin{align} \cos(2\theta) &= \cos^2(\theta)-\sin^2(\theta) \\[5pt] \cos(2\theta) &= (1-\sin^2(\theta)) - \sin^2(\theta) \\[5pt] \cos(2\theta) &= 1-2 \sin^2(\theta) \\[5pt] \sin^2(\theta) &= \frac{1-\cos(2\theta)}{2} \end{align}$$

In a similar way, we can take the Pythagorean identity for secant and tangent,

$$\sec^2(\theta) = 1 + \tan^2(\theta)$$

(obtained by dividing the Pythagorean identity through by $\cos^2(\theta)$, to obtain the tangent power-reduction formula:

$$\tan^2(\theta) = 1 - \frac{2 \tan(\theta)}{\tan(2 \theta)}$$

Here is a recap of the most important trig. identities we'll use to do trigonometric integrals:



In the examples that follow, we'll first do integrals in which at least one of the exponents of a trig. function is odd. These will turn out only to need the Pythagorean identities. When all exponents of trig. functions are even, we'll need to use the power-reduction formulae to create an odd exponent, then proceed as before.


Example 1

Odd powers only   $\int \sin^3(x) \, dx$


Solution: To do this integral, recognize that $\sin^3(x) = \sin(x)\cdot \sin^2(x)$, and write an equivalent integral:

$$\int \sin(x) \sin^2(x) \, dx$$

Now use the Pythagorean identity

$$\sin^2(x) = 1 - \cos^2(x)$$

to replace $\sin^2(x)$ and rewrite the integral:

$$\int \sin(x)(1 - \cos^2(x)) \, dx$$

Now if we distribute the $\sin(x)$ into the parenthesis, this new integral is a sum of two integrals, the last of which can be evaluated easily using the substitution $u = \cos(x)$, like this:

$$\int \sin(x) - \sin(x)\cos^2(x) \, dx$$

Let $u=\cos(x)$, then $du=-\sin(x) \, dx$

The first integral is easy, it's just $-\cos(x)$. The second is relatively easy because of the substitution.

$$\int \sin(x) \, dx + \int u^2 \, du = -\cos(x) + \frac{u^3}{3}$$

Now we just back substitute $\cos(x)$ for $u$ to get the solution (don't forget the constant).

$$\int \sin^3(x) \, dx = \frac{1}{3} \cos^3 (x) - \cos (x) + C$$

We were able to do the integral above with simple substitutions using the Pythagorean identity because the coefficient of the sine function was odd. In order for a substitution like this to work in a trigonometric integral, at least one of the exponents of a trig. function must be odd.


Example 2

$\int \tan^3(x) \, dx$


Solution: This is an example very similar to the first, but it will be a little more complicated to integrate. First use the Pythagorean identity for tangent and secant

$$\tan^2(x) = \sec^2(x) - 1 \; \longrightarrow \; \int \tan(x)\tan^2(x) \, dx$$

From this, multiplying through by $\tan(x)$, we get two integrals (We'll call them 1 and 2), each of which can be solved by simple substitution (u-substitution). Here's what it looks like:

$$ \begin{align} \int \tan(x)(&\sec^2(x)-1) \, dx = \\[5pt] &\int \tan(x) \sec^2(x) \tag{1} \\[5pt] &-\int\tan(x) \, dx \tag{2} \end{align}$$

Integral 1: The first integral suggests a substitution because $\tan(x)$ and $\sec(x)$ are related by a derivative.

$$\int \tan(x) \sec^2(x) \, dx$$

One substitution is

let $u = \sec(x)$,
then $du = \sec(x)\tan(x) \, dx$

Then our new integral can be done very simply:

$$\int u\, du = \frac{u^2}{2} + C$$

Re-substitution of $\sec(x)$ for $u$ gives:

$$\int tan(x) sec^2(x) \, dx = \frac{1}{2} sec^2(x) + C$$

Integral 2: The second integral is one you might just remember, but in case you've forgotten, expand tangent into sine/cosine:

$$\int tan(x) \, dx = \int \frac{\sin(x)}{\cos(x)} \, dx$$

Then make the substitution

let $u = \cos(x)$,
then $du = -\sin(x) \, dx$

That gives us a new integral that's easy to solve:

$$-\int \frac{du}{u} = -|ln|u| + C$$

Back-substituting for $u$ gives

$$\int tan(x) \, dx = -ln|\cos(x)| + C$$

Putting both parts together gives us the solution:

$$\int tan^3(x) \, dx = \frac{1}{2} sec^2(x) + ln|\cos(x)| + C$$


Example 3

A mixed sine-cosine integral:   $\int \sin^3(x) \cos^2(x) \, dx$


Solution: Using the Pythagorean identity, we can take advantage of the odd power of the sine part to reduce it to $\sin(x)$, which will come in handy later.

$$\int \sin(x) (1 - \cos^2(x)) \cos^2(x) \, dx$$

Expand the integral to get the integral of a sum.

$$\int [\sin(x) \cos^2(x) - \sin(x) \cos^4(x)] \, dx$$

Each of these is now easy to do with the same simple substitution:

let $u = \cos(x)$, then $du = -\sin(x) \, dx$

to get these integrals:

$$-\int u^2 \, du + \int u^4 \, du$$

Evaluation of these and re-substitution of $\cos(x)$ for $u$ gives the final integral:

$$-\frac{1}{3} \cos^3(x) + \frac{1}{5} \cos^5(x) + C$$

The only thing that remains is to do an example in which the powers of the trig. functions are higher.


Example 4

Larger powers   $\int \sin^4(x) \cos^5(x) \, dx$


Solution: This integral is clearly more complicated simply because of the large powers of the trig. functions. But the fact that one of them is odd presents us with the handle we need to integrate it by hand

$$\int \sin^4(x) \cos^5(x) \, dx =$$

We use the Pythagorean identity for sine and cosine to re-express $\cos^4(x)$ in terms of sines:

$$= \int \sin^4(x) (1 - \sin^2(x))^2 \cos(x) \, dx$$

Expanding the binomial $(1 - \sin^2(x))^2$ gives:

$$= \int \sin^4(x) [1 - 2 \sin^2(x) + \sin^4(x)] \cos(x) dx$$

and multiplying through by sin4(x) gives us three separate terms which can be integrated separately.

$$ \begin{align} = \int \sin^4(&x) \cos(x) \, dx \\[5pt] &- 2 \int \sin^6(x) \cos(x) \, dx \\[5pt] &+ \int \sin^8(x) \cos(x) \, dx \end{align}$$

But now each of our terms contains cos(x), whcih we can make use of in a u-substitution:

let $u = \sin(x)$, then $du = \cos(x) \, dx$

Notice that $\cos(x) \, dx$ is in each of our integrals, so the substitution gives integrals that are easy to evaluate:

$$ \begin{align} &\int u^4 \, du - 2 \int u^6 \, du + \int u^8 \, du \\ \\ &= \frac{1}{5} u^5 = \frac{2}{7} u^7 + \frac{1}{9} u^9 + C \end{align}$$

Finally, we can substitute sin(x) back in for u to get the result:

$$ \begin{align} \int &\sin^4(x) \cos^5(x) \, dx \\ &= \frac{1}{5} \sin^5(x) - \frac{2}{7} \sin^7(x) + \frac{1}{9} \sin^9(x) + C \end{align}$$

Just so we don't leave the tangent function out, we'll do another example below with a mixed tangent-secant integrand.


Example 5

A mixed tan-sec integrand   $\int tan^3(x) sec^2(x) \, dx$


Solution: By now I hope you're getting the hang of these. Focus on the odd power on the tangent by replacing $\tan^2(x)$ with $\sec^2(x) - 1$.

$$\int \tan(x) (\sec^2(x) - 1) \sec^2(x) \, dx$$

Now expand to get the integral of a sum (which is the sum of integrals):

$$\int [\tan(x) \sec^4(x) - \tan(x) \sec^2(x) \, dx$$

Then make the same substitution in both,

let $u = \sec(x)$,

then $du = \sec(x)\tan(x) dx$

and solve the easy power integrals:

$$\int u^3 \, du - \int u \, du = \frac{1}{4} u^4 - \frac{1}{2} u^2 + C$$

Finally, back substitute to get the solution.

$$ \begin{align} \int \tan^3(x) &\sec^2(x) \, dx \\ &= \frac{1}{4} \sec^4(x) - \frac{1}{2} \sec^2(x) + C \end{align}$$



Solving integrals of the form   $\int \sin^m(x) \cos^n(x) dx$   when both m and n are even


Example 6

Evaluate   $\int \sin^2(x) \, dx$


Solution: For integrals with only even powers of trigonometric functions, we use the power-reduction formulae,

$$\sin^2(x) = \frac{1 - \cos(2x)}{2}$$

to make the simple substitution

$$int \sin^2(x) \, dx = \frac{1}{2} \int [1 - \cos(2x)] \, dx$$

Then we can separate this integral of a sum into the sum of integrals. The first is trivial, and the second can be don by u-substitution.

$$= \frac{1}{2} \left[ \int dx - \int \cos(2x) \, dx \right]$$

Both integrals are easy now (the first is already done below). The second can be done with the substitution

Let $u = 2x$, then $\frac{du}{2} = dx$.

giving the integral

$$\frac{x}{2} - \frac{1}{4} \int \cos(u) \, du$$

We then take the result,

$$= \frac{x}{2} - \frac{1}{4} \sin(u) + C$$

and back substitute $u = 2x$ to arrive at the solution to the integral:

$$\int \sin^2(x) \, dx = \frac{x}{2} - \frac{1}{4} \sin(2x) + C$$


Example 7

Even exponents:   $\int \sin^2(x) \cos^2(x) \, dx$


Solution: First we use our sine and cosine power-reduction formulas in this simple substitution:

$$\int \sin^2(x) \cos^2(x) \, dx$$

$$\sin^2(x)=\frac{1-\cos(2x)}{2}$$

$$\cos^2(x)=\frac{1+\cos(2x)}{2}$$

to get a new integral:

$$ \begin{align} \frac{1}{4} \int (1 - &\cos(2x))(1 + \cos(2x) \, dx) \\ &= \frac{1}{4} \int (1 - \cos^2(2x)) \, dx \end{align}$$

Now this integral contains a cos2 term. We can use the power reduction formula again here, this time with $2x$ substituted for $x$:

$$\cos^2(2x) = \frac{1 + \cos(4x)}{2}$$

Make the substitution and carry out the integration. To integrate the last term, we use the u-substitution $u = 4x$, then $du = 4dx$. Be careful with all of the various fractional factors that result.

$$ \begin{align} &= \frac{1}{4} \int 1-\frac{1}{2} + \frac{1}{2} \cos(4x) \, dx \\[5pt] &= \frac{1}{4} \left[x-\frac{x}{2} + \frac{1}{8} \sin(4x) \right] \\[5pt] &= \frac{x}{4} - \frac{x}{8} + \frac{1}{32} \sin(4x) \end{align}$$

Finally, the integral is

$$\int \sin^2(x) \cos^2(x) dx = \frac{x}{8} + \frac{1}{32} \sin(4x) + C$$

That should be enough examples for you to try some on your own.


Practice problems

Find the following indefinite integrals:


$\leftarrow$ narrow screens: scroll L↔R $\rightarrow$


  1. $$\int \sin^4(x) \, dx$$

    Solution

    First rewrite the integral using algebra and trig identities, in this case the sine double-angle identity:

    $$ \begin{align} \int \sin^4(x) \, dx &= \int \sin^2(x) \sin^2(x) \, dx \\[5pt] &= \int \left( \frac{1 - \cos(2x)}{2} \right) \left( \frac{1 - \cos(2x)}{2} \right) \, dx \\[5pt] &= \int \left[ \frac{1}{4} - \frac{2 \cos(2x)}{4} + \frac{\cos^2(2x)}{4} \right] \, dx \end{align}$$

    Now we can use the \cosine double-angle identity on the fraction on the right of the integrand, remembering that our angle will go from 2x to 4x.

    $$ \begin{align} &= \int \left[ \frac{1}{4} - \frac{1}{2} \cos(2x) + \frac{1}{8} + \frac{1}{8} \cos(4x) \right] \, dx \\[5pt] &= \int \left[ \frac{3}{8} - \frac{1}{2} \cos(2x) + \frac{1}{8} \cos(4x) \right] \, dx \\[5pt] &= \frac{3}{8} x + \frac{1}{4} \sin(2x) - \frac{1}{32} \sin(4x) + C \end{align}$$


  2. $$\int \cos^2(x) \tan^3(x) \, dx$$

    Solution

    Integrals like this can take some trial-and-error rearrangements, but eventually you'll land on something like this:

    $$ \begin{align} \int \cos^2(x) tan^3(x) \, dx &= \int \cos^2(x) tan(x) tan^2(x) \, dx \\[5pt] &= \int \cos^2(x) \frac{\sin(x)}{\cos(x)} [sec^2(x) - 1]\, dx \\[5pt] &= \int \cos(x) \sin(x) [sec^2(x) - 1] \, dx \\[5pt] &= \int [\sin(x) \cos(x) sec^2(x) - \sin(x) \cos(x)] \, dx \\[5pt] &= \int \left[ \frac{\sin(x) \cos(x)}{\cos^2(x)} - \sin(x) \cos(x) \right] \, dx \\[5pt] &= \int [tan(x) - \sin(x) \cos(x)] \, dx \\[5pt] &= -ln|\cos(x)| - \frac{1}{2} \sin^2(x) + C \end{align}$$

    The second part of the integral was done by making the substitution $u = \sin(x), \; du = \cos(x) \, dx,$ and so on. The first part was done in example 2.


  3. $$\int \sin^2(x) \cos^4(x) \, dx$$

    Solution

    There is a lot of algebra and trig. in this one. Hang on ...

    $$ \begin{align} \int \sin^2(x) \cos^4(x) \, dx &= \int \left( \frac{1 - \cos(2x)}{2} \right)\left( \frac{1 + \cos(2x)}{2} \right) \cos^2(x) \\[5pt] &= \int \frac{1 - \cos^2(2x)}{4} \cos^2(x) \, dx \\[5pt] &= \int \left[ \frac{1}{4} - \frac{1}{4} \left( \frac{1 + \cos(4x)}{2} \right)\right] \cos^2(x) \, dx \\[5pt] &= \int \frac{1}{4} \cos^2(x) - \frac{1}{8} \cos^2(x) - \frac{1}{8}\cos(4x) \cos^2(x) \, dx \\[5pt] &= \int \frac{1}{8} \cos^2(x) - \frac{1}{8} \cos(4x) \cos^2(x) \, dx \\[5pt] &= \int \frac{1}{8} \left( \frac{1 + \cos(2x)}{2} \right) - \frac{1}{8} \cos(4x) \left( \frac{1 + \cos(2x)}{2} \right)\, dx \\[5pt] &= \int \frac{1}{16} + \frac{1}{16} \cos(2x) - \frac{1}{16} \cos(4x) - \frac{1}{16} \cos(4x) \cos (2x) \, dx \\[5pt] &= \frac{x}{16} + \frac{1}{32} \sin(2x) - \frac{1}{64} \sin(4x) - \frac{1}{16} \int \cos(4x) \cos(2x) \, dx \end{align}$$

    The remaining integral on the right can be done using two rounds of integration by parts, to yield:

    $$= \frac{x}{16} + \frac{1}{32} \sin(2x) - \frac{1}{64} \sin(4x) - \frac{1}{32} \cos(2x) \sin(4x) + \frac{1}{64} \sin(2x) \cos(4x) + C$$

    $$= \frac{1}{64}[4x + 2 \sin(2x) - \sin(4x) - 2 \cos(2x)\sin(4x) + \sin(2x) \cos(4x)]$$

  1. $$\int \tan^3(x) \, dx$$

    Solution

    First break $\tan^3(x)$ down into $\tan(x)$ and $\tan^2(x)$ components.

    $$ \begin{align} \int \tan^3(x) \, dx &= \int \tan(x) (\sec^2(x) - 1) \, dx \\[5pt] &= \int \tan(x) \sec^2(x) \, dx - \int \tan(x) \, dx \end{align}$$

    The first integral can be done by u-substitution, letting $u = \tan(x)$ and du = sec2(x) dx. The second was done in example 2 above. The solution is

    $$= \int \tan^3(x) = \frac{1}{2} \tan^2(x) + ln|\cos(x)| + C$$


  2. $$\int \cos^2(x) \tan^3(x) \sec^2(x) \, dx$$

    Solution

    This integral looks complicated, but the lesson here is that if you can break it down into sin and cos components, it gets pretty simple.

    $$ \begin{align} \int &[\cos^2(x) \tan^3(x) sec^2(x)] \, dx \\[5pt] &= \int \cos^2(x) \frac{\sin^3(x)}{\cos^3(x)} \frac{1}{\cos^2(x)} \, dx \\[5pt] &= \int \frac{\sin^3(x)}{\cos^3(x)} \, dx \\[5pt] &= \int \tan^3(x) \, dx \end{align},$$

    which is just the integral from problem 4.

    $$= \int \tan^3(x) = \frac{1}{2} \tan^2(x) + ln|\cos(x)| + C$$


  3. $$\int \sin^5(x) \cos^2(x) \, dx$$

    Solution

    Odd powers of trig functions make an integral a little easier because they set up well for u-substitution. First, recall that

    $$\sin^2(x) = 1 - \cos^2(x), \; so \; \sin^4(x) = (1 - \cos^2(x))^2$$

    So our integral is

    $$\int \sin^5(x) \cos^2(x) \, dx = \int (1 - \cos^2(x))^2 \cos^2(x) \sin(x) dx$$

    Now let u = \cos(x), then u2 = cos2(x), and du = -sin2(x) dx

    $$ \begin{align} \int &(1 - u^2) u^2 \, du \\[5pt] &= \int (1 0 2u^2 + u^4) u^2 \, du \\[5pt] &= \int [u^2 - 2u^4 + u^6] \, du \\[5pt] &= \frac{1}{3} u^3 - \frac{2}{5} u^5 + \frac{1}{7} u^7 \\[5pt] &\rightarrow \frac{1}{3} \cos^3(x) - \frac{2}{3} \cos^5(x) + \frac{1}{7} \cos^7(x) + C \end{align},$$


Video examples


Example 1

Itegration of tan(x)·cos2(x) dx. Requires integration by parts.

Minutes of your life: 2:38


Example 2

...

Minutes of your life: 0:00



Creative Commons License   optimized for firefox
xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2012-2025, 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.