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.
By the PracticeCalculus team Published 9 min read
Try it yourself
On this page
- What is a trigonometric integral?
- The decision rule: odd or even?
- How to integrate an odd power of sine
- How to integrate when cosine has the odd power
- How to integrate even powers of sine and cosine
- What about both powers odd?
- Common mistakes with trig integrals
- Quick reference: powers of sine and cosine
- Where trig integrals lead next
- Practice until the first glance is enough
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
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 or a basic antiderivative like \int \cos(kx)\,dx = \frac{\sin(kx)}{k} + C.
You need just three identities:
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:
Step 2. Convert the even power to cosines. Use \sin^2 x = 1 - \cos^2 x:
Step 3. Substitute. Let u = \cos x, so du = -\sin x\,dx, which means \sin x\,dx = -du:
Step 4. Substitute back.
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]:
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.
Step 2. Convert \cos^2 x to sines. Use \cos^2 x = 1 - \sin^2 x:
Step 3. Substitute. Let u = \sin x, so du = \cos x\,dx:
Step 4. Substitute back.
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.
Step 2. Integrate term by term. Since \int \cos 2x\,dx = \frac{\sin 2x}{2}:
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 and the integral of cos² 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.
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 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.
Step 2. Apply half-angle again to \cos^2 2x. The angle doubles again:
Step 3. Simplify.
Step 4. Integrate term by term.
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:
Now apply half-angle with angle 2x: \sin^2 2x = \frac{1 - \cos 4x}{2}.
Integrate:
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
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
- 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 is positive \cos x but the derivative of \cos x is -\sin x, only the cosine substitution carries this sign.
- 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.
- 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.
- 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}.
- 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.
- 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.
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 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 needs 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.