# Trigonometric Integrals: Powers of Sine and Cosine, Step by Step

> Learn how to integrate powers of sine and cosine: the odd-power trick, half-angle identities for even powers, and fully worked examples.

Source: https://practicecalculus.com/blog/trigonometric-integrals-powers-of-sine-and-cosine
Updated: 2026-12-03

## Key takeaways

- If either sine or cosine has an odd power, peel off one factor, convert the rest with $\sin^2 x + \cos^2 x = 1$, and use u-substitution.
- If both powers are even, lower them with the half-angle identities $\sin^2 x = \frac{1 - \cos 2x}{2}$ and $\cos^2 x = \frac{1 + \cos 2x}{2}$.
- The saved factor becomes $du$: save $\sin x$ when $u = \cos x$, and save $\cos x$ when $u = \sin x$.
- Always check your answer by differentiating; the chain rule factors from $\cos 2x$ and $\cos 4x$ are where most errors hide.

You know that $\int \sin x\,dx = -\cos x + C$. Then your homework asks for $\int \sin^3 x\,dx$ or $\int \sin^2 x \cos^2 x\,dx$, and none of the basic rules seem to fit. These **trigonometric integrals** show up constantly in Calculus 2, and the good news is that one quick look at the exponents tells you exactly which strategy to use.

This guide covers the two core methods for integrals of the form $\int \sin^m x \cos^n x\,dx$, with five fully worked examples, a decision table and the mistakes to avoid.

## What is a trigonometric integral?

A **trigonometric integral** is an integral whose integrand is built from products and powers of trig functions. The most common family is

$$\int \sin^m x\,\cos^n x\,dx$$

where $m$ and $n$ are whole numbers (either can be zero). Examples include $\int \cos^3 x\,dx$, $\int \sin^4 x\,dx$ and $\int \sin^2 x \cos^5 x\,dx$.

The idea behind every method is the same: rewrite the integrand with identities until it becomes something you already know how to integrate, usually by [u-substitution](/blog/u-substitution) or a basic antiderivative like $\int \cos(kx)\,dx = \frac{\sin(kx)}{k} + C$.

You need just three identities:

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

$$\sin^2 x = \frac{1 - \cos 2x}{2} \qquad \cos^2 x = \frac{1 + \cos 2x}{2}$$

The first is the Pythagorean identity. The other two are the **half-angle** (or power-reducing) identities. They trade a square for a cosine of a doubled angle, which lowers the power.

## The decision rule: odd or even?

Before doing any algebra, check the exponents $m$ (on sine) and $n$ (on cosine).

| Case | Strategy | Substitution |
| --- | --- | --- |
| Power of $\sin x$ is odd | Save one $\sin x$, convert the rest to cosines | $u = \cos x$ |
| Power of $\cos x$ is odd | Save one $\cos x$, convert the rest to sines | $u = \sin x$ |
| Both odd | Pick either (the smaller power is usually faster) | either |
| Both even | Use half-angle identities to lower the powers | none needed |

Why does an odd power help? Because the derivative of $\cos x$ is $-\sin x$, and the derivative of $\sin x$ is $\cos x$. When you save one factor, it becomes the $du$ for your substitution. What remains is an even power, which you can always rewrite with $\sin^2 x = 1 - \cos^2 x$ or $\cos^2 x = 1 - \sin^2 x$.

When both powers are even, there is no spare factor to save, so substitution fails. That is when the half-angle identities take over.

## How to integrate an odd power of sine

### Worked example 1: the integral of sin³ x

Evaluate $\int \sin^3 x\,dx$.

**Step 1. Save one sine.** The power 3 is odd, so split off one factor:

$$\int \sin^3 x\,dx = \int \sin^2 x \cdot \sin x\,dx$$

**Step 2. Convert the even power to cosines.** Use $\sin^2 x = 1 - \cos^2 x$:

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

**Step 3. Substitute.** Let $u = \cos x$, so $du = -\sin x\,dx$, which means $\sin x\,dx = -du$:

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

**Step 4. Substitute back.**

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

**Check by differentiating.** The derivative of $-\cos x$ is $\sin x$. The derivative of $\frac{\cos^3 x}{3}$ is $\cos^2 x \cdot (-\sin x)$. Together: $\sin x - \sin x\cos^2 x = \sin x(1 - \cos^2 x) = \sin^3 x$. Correct.

Let us use this result on a definite integral. Over $[0, \pi]$:

$$\int_0^{\pi} \sin^3 x\,dx = \left[-\cos x + \frac{\cos^3 x}{3}\right]_0^{\pi} = \left(1 - \frac{1}{3}\right) - \left(-1 + \frac{1}{3}\right) = \frac{2}{3} + \frac{2}{3} = \frac{4}{3}$$

```graph
title: 'Area under y = sin³x from 0 to π'
caption: 'The shaded area is $\int_0^{\pi} \sin^3 x\,dx = \frac{4}{3}$, a bit less than the area under $\sin x$, which is 2.'
x: [-0.5, 3.6]
y: [-0.4, 1.3]
functions:
  - expr: sin(x)^3
    label: y = sin³x
  - expr: sin(x)
    label: y = sin x
    dashed: true
shade:
  expr: sin(x)^3
  from: 0
  to: 3.14159
```

The dashed curve is $\sin x$. Cubing a number between 0 and 1 makes it smaller, so $\sin^3 x$ hugs the axis more tightly and encloses less area: $\frac{4}{3}$ instead of $2$.

## How to integrate when cosine has the odd power

### Worked example 2: sin² x cos³ x

Evaluate $\int \sin^2 x\cos^3 x\,dx$.

The power of sine is even (2) and the power of cosine is odd (3). So we save a cosine and convert the rest to sines.

**Step 1. Save one cosine.**

$$\int \sin^2 x \cos^2 x \cdot \cos x\,dx$$

**Step 2. Convert $\cos^2 x$ to sines.** Use $\cos^2 x = 1 - \sin^2 x$:

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

**Step 3. Substitute.** Let $u = \sin x$, so $du = \cos x\,dx$:

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

**Step 4. Substitute back.**

$$\int \sin^2 x\cos^3 x\,dx = \frac{\sin^3 x}{3} - \frac{\sin^5 x}{5} + C$$

Notice the even power of sine never caused trouble. It just came along for the ride as $u^2$. Only the function you substitute for needs its odd power split.

> **Tip:** Remember the pairing. Save $\sin x$ when $u = \cos x$. Save $\cos x$ when $u = \sin x$. The saved factor is always the derivative (up to sign) of $u$.

## How to integrate even powers of sine and cosine

When every power is even, try the odd-power trick and you will get stuck: there is no lone factor left to act as $du$. Instead, use the half-angle identities to cut the powers in half.

### Worked example 3: the integral of cos² x

Evaluate $\int \cos^2 x\,dx$.

**Step 1. Apply the half-angle identity.**

$$\int \cos^2 x\,dx = \int \frac{1 + \cos 2x}{2}\,dx = \int \left(\frac{1}{2} + \frac{1}{2}\cos 2x\right)dx$$

**Step 2. Integrate term by term.** Since $\int \cos 2x\,dx = \frac{\sin 2x}{2}$:

$$\int \cos^2 x\,dx = \frac{x}{2} + \frac{\sin 2x}{4} + C$$

The same steps with $\sin^2 x = \frac{1 - \cos 2x}{2}$ give $\int \sin^2 x\,dx = \frac{x}{2} - \frac{\sin 2x}{4} + C$. You can see both on our reference pages for the [integral of sin² x](/integrals/sin-squared-x) and the [integral of cos² x](/integrals/cos-squared-x).

Over one full hump, $\int_0^{\pi} \sin^2 x\,dx = \left[\frac{x}{2} - \frac{\sin 2x}{4}\right]_0^{\pi} = \frac{\pi}{2}$. The graph shows why this number is so clean.

```graph
title: 'y = sin²x oscillates around its average value 1/2'
caption: 'Since $\sin^2 x = \frac{1}{2} - \frac{1}{2}\cos 2x$, the curve wobbles evenly around $y = \frac{1}{2}$, so the area from 0 to π is $\frac{\pi}{2}$.'
x: [-0.5, 6.6]
y: [-0.3, 1.3]
functions:
  - expr: sin(x)^2
    label: y = sin²x
  - expr: '0.5'
    label: y = 1/2
    dashed: true
shade:
  expr: sin(x)^2
  from: 0
  to: 3.14159
```

The half-angle identity is really a statement about this picture: $\sin^2 x$ is a cosine wave with half the height, twice the frequency, flipped and shifted up to sit on $y = \frac{1}{2}$. Its [average value](/blog/average-value-of-a-function) over any full period is exactly $\frac{1}{2}$.

### Worked example 4: the integral of sin⁴ x

Evaluate $\int \sin^4 x\,dx$. Higher even powers need the identity more than once.

**Step 1. Write as a square and apply half-angle.**

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

**Step 2. Apply half-angle again to $\cos^2 2x$.** The angle doubles again:

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

**Step 3. Simplify.**

$$\sin^4 x = \frac{1}{4} - \frac{1}{2}\cos 2x + \frac{1}{8} + \frac{1}{8}\cos 4x = \frac{3}{8} - \frac{1}{2}\cos 2x + \frac{1}{8}\cos 4x$$

**Step 4. Integrate term by term.**

$$\int \sin^4 x\,dx = \frac{3x}{8} - \frac{\sin 2x}{4} + \frac{\sin 4x}{32} + C$$

**Check.** Differentiating gives $\frac{3}{8} - \frac{2\cos 2x}{4} + \frac{4\cos 4x}{32} = \frac{3}{8} - \frac{1}{2}\cos 2x + \frac{1}{8}\cos 4x$, which matches Step 3.

### Worked example 5: sin² x cos² x

Evaluate $\int \sin^2 x\cos^2 x\,dx$. Both powers are even.

You could expand $\frac{1 - \cos 2x}{2} \cdot \frac{1 + \cos 2x}{2}$, but there is a shortcut. Use the double-angle identity $\sin 2x = 2\sin x\cos x$, so $\sin x\cos x = \frac{1}{2}\sin 2x$:

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

Now apply half-angle with angle $2x$: $\sin^2 2x = \frac{1 - \cos 4x}{2}$.

$$\sin^2 x\cos^2 x = \frac{1}{4} \cdot \frac{1 - \cos 4x}{2} = \frac{1}{8} - \frac{1}{8}\cos 4x$$

Integrate:

$$\int \sin^2 x\cos^2 x\,dx = \frac{x}{8} - \frac{\sin 4x}{32} + C$$

Expanding the product instead gives $\frac{1 - \cos^2 2x}{4}$, which leads to the same answer after one more half-angle step. Pick whichever path feels cleaner.

## What about both powers odd?

For something like $\int \sin^3 x\cos^5 x\,dx$, both methods for odd powers work. Saving a sine and using $u = \cos x$ gives

$$\int (1 - u^2)u^5(-du) = \int (u^7 - u^5)\,du = \frac{\cos^8 x}{8} - \frac{\cos^6 x}{6} + C$$

Saving a cosine instead would require expanding $(1 - \sin^2 x)^2$, which is more work. A good rule: save a factor from the **smaller** odd power, since that leaves the less complicated expansion.

## Common mistakes with trig integrals

1. **Dropping the minus sign.** With $u = \cos x$, $du = -\sin x\,dx$. Forgetting the negative flips the sign of your whole answer. Since the [derivative of sin x](/derivatives/sin-x) is positive $\cos x$ but the derivative of $\cos x$ is $-\sin x$, only the cosine substitution carries this sign.
2. **Trying u-substitution on even powers.** Setting $u = \sin x$ in $\int \sin^2 x\,dx$ leaves you needing a $\cos x$ that is not there. Even powers need half-angle identities.
3. **Mixing up the half-angle signs.** Sine gets the minus: $\sin^2 x = \frac{1 - \cos 2x}{2}$. A quick check: at $x = 0$, $\sin^2 0 = 0$, and $\frac{1 - 1}{2} = 0$. Good.
4. **Losing the chain rule factor.** $\int \cos 2x\,dx = \frac{\sin 2x}{2}$, not $\sin 2x$. Likewise $\int \cos 4x\,dx = \frac{\sin 4x}{4}$.
5. **Squaring incorrectly.** $(1 - \cos 2x)^2 = 1 - 2\cos 2x + \cos^2 2x$. Forgetting the middle term or the final $\cos^2 2x$ is a frequent algebra slip.
6. **Writing $\sin^2 x$ as $\sin(x^2)$.** The notation $\sin^2 x$ means $(\sin x)^2$. These are completely different functions.

For more traps like these, see our list of [common calculus mistakes](/blog/common-calculus-mistakes).

## Quick reference: powers of sine and cosine

| Integral | Result |
| --- | --- |
| $\int \sin^2 x\,dx$ | $\frac{x}{2} - \frac{\sin 2x}{4} + C$ |
| $\int \cos^2 x\,dx$ | $\frac{x}{2} + \frac{\sin 2x}{4} + C$ |
| $\int \sin^3 x\,dx$ | $-\cos x + \frac{\cos^3 x}{3} + C$ |
| $\int \cos^3 x\,dx$ | $\sin x - \frac{\sin^3 x}{3} + C$ |
| $\int \sin^4 x\,dx$ | $\frac{3x}{8} - \frac{\sin 2x}{4} + \frac{\sin 4x}{32} + C$ |
| $\int \sin^2 x\cos^2 x\,dx$ | $\frac{x}{8} - \frac{\sin 4x}{32} + C$ |
| $\int \sin x \cos x\,dx$ | $\frac{\sin^2 x}{2} + C$ |

The last row is a good reminder that equivalent answers abound: $-\frac{\cos^2 x}{2} + C$ and $-\frac{\cos 2x}{4} + C$ are also correct, because they differ from $\frac{\sin^2 x}{2}$ only by constants.

## Where trig integrals lead next

Powers of sine and cosine are the foundation for the rest of the integration techniques unit. [Trig substitution](/blog/trig-substitution) turns integrals like $\int \sqrt{1 - x^2}\,dx$ into exactly the kind of $\cos^2\theta$ integral you just learned to handle. Integrals of $\tan x$ and $\sec x$ powers use the same odd and even thinking with the identity $\tan^2 x + 1 = \sec^2 x$, and the stubborn [integral of sec³ x](/integrals/sec-cubed-x) needs [integration by parts](/blog/integration-by-parts) on top.

## Practice until the first glance is enough

The whole skill comes down to one glance at the exponents: odd means save a factor and substitute, even means reduce with half-angle identities. After a dozen problems that glance becomes automatic, and the algebra is all that is left. Work through the interactive lesson below, where each problem checks your answer instantly and shows you which step went wrong, so you can build speed and accuracy before your next exam.

## Frequently asked questions

### How do you integrate powers of sine and cosine?

Look at the exponents first. If one of them is odd, save one factor of that function, rewrite the remaining even power using $\sin^2 x + \cos^2 x = 1$, and substitute $u$ = the other function. If both exponents are even, use the half-angle identities to lower the powers and integrate term by term.

### What is the integral of sin^2 x?

Using $\sin^2 x = \frac{1 - \cos 2x}{2}$, the integral is $\frac{x}{2} - \frac{\sin 2x}{4} + C$. You cannot integrate $\sin^2 x$ with a simple u-substitution because there is no extra $\cos x$ factor to serve as $du$.

### What is the integral of sin^3 x?

Write $\sin^3 x = (1 - \cos^2 x)\sin x$ and let $u = \cos x$, so $du = -\sin x\,dx$. The result is $-\cos x + \frac{\cos^3 x}{3} + C$.

### What if both powers of sine and cosine are odd?

Then you can choose either one to save. Saving a factor of the function with the smaller odd power usually gives the shortest algebra. Both choices give correct answers, although they may look different and differ by a constant.

### Why do my trig integral answers look different from the answer key?

Trig antiderivatives can be written in many equivalent forms because of identities like $\sin^2 x + \cos^2 x = 1$ and $\sin 2x = 2\sin x \cos x$. Two answers that differ only by a constant are both correct. Differentiate your answer to confirm it gives back the integrand.
