Quick answer:
$$\int\sin^2 x\,dx = \frac{x}{2} - \frac{\sin 2x}{4} + C$$
The integral of sin²x is a standard step in physics, signal processing and trig substitution, and it’s a favorite on calculus exams because the obvious guess is wrong. This guide shows the identity that makes it easy, a second derivation by parts, seven worked examples, the most common mistakes, and practice problems with answers.
Why it works: sin²x is a shifted cosine wave
Graph \( \sin^2 x \) and you’ll see something surprising: it’s a perfectly smooth wave that bounces between 0 and 1, centered on the line \( y = \frac12 \), and it repeats every \( \pi \) instead of every \( 2\pi \). That’s exactly the graph of \( \frac12 - \frac12\cos 2x \).
This picture explains the answer before you compute anything. The steady part, \( \frac12 \), piles up area at a constant rate, which gives the \( \frac{x}{2} \) term. The wiggle, \( -\frac12\cos 2x \), adds as much area as it removes over each cycle, so its contribution \( -\frac{\sin 2x}{4} \) never grows; it just oscillates. Over a long interval, the area under \( \sin^2 x \) is about half the length of the interval.
Step 1: use the power-reduction identity
You can’t integrate \( \sin^2 x \) directly, but you can lower the power with
$$\sin^2 x = \frac{1 - \cos 2x}{2}$$
(It comes from the double-angle formula \( \cos 2x = 1 - 2\sin^2 x \).) Solve that formula for \( \sin^2 x \) and you have the identity. You don’t need to memorize it separately if you remember the double-angle formula.
Step 2: integrate term by term
$$\begin{aligned} \int\frac{1 - \cos 2x}{2}\,dx &= \frac12\int 1\,dx - \frac12\int\cos 2x\,dx \\ &= \frac{x}{2} - \frac12\cdot\frac{\sin 2x}{2} + C \end{aligned}$$
which gives \( \frac{x}{2} - \frac{\sin 2x}{4} + C \). The extra factor of \( \frac12 \) in the second term comes from the inner \( 2x \): the integral of \( \cos 2x \) is \( \frac{\sin 2x}{2} \), a reverse chain rule step.
An equivalent form, using \( \sin 2x = 2\sin x\cos x \), is \( \frac{x - \sin x\cos x}{2} + C \).
Method 2: integration by parts
If you forget the identity, integration by parts still gets you there. Call the integral \( I \) and let \( u = \sin x \), \( dv = \sin x\,dx \), so \( du = \cos x\,dx \) and \( v = -\cos x \):
$$\begin{aligned} I &= -\sin x\cos x + \int\cos^2 x\,dx \\ &= -\sin x\cos x + \int(1 - \sin^2 x)\,dx \\ &= -\sin x\cos x + x - I \end{aligned}$$
The original integral came back with a minus sign. Add \( I \) to both sides and divide by 2 to get \( I = \frac{x - \sin x\cos x}{2} + C \), the same answer in its alternate form.
Check by differentiating
$$\frac{d}{dx}\left(\frac x2 - \frac{\sin 2x}{4}\right) = \frac12 - \frac{\cos 2x}{2} = \frac{1 - \cos 2x}{2} = \sin^2 x \checkmark$$
The cosine version
With \( \cos^2 x = \frac{1 + \cos 2x}{2} \):
$$\int\cos^2 x\,dx = \frac x2 + \frac{\sin 2x}{4} + C$$
The only difference is the sign in front of the oscillating term. A quick sanity check: adding the two results gives \( x \), which is exactly the integral of \( \sin^2 x + \cos^2 x = 1 \).
Definite integrals
$$\int_0^{\pi}\sin^2 x\,dx = \frac{\pi}{2}, \qquad \int_0^{2\pi}\sin^2 x\,dx = \pi$$
A shortcut worth knowing: over any whole number of half-periods, \( \sin^2 \) and \( \cos^2 \) have the same area, and they add up to the length of the interval (because \( \sin^2 + \cos^2 = 1 \)). So each gets half. This is why the average value of \( \sin^2 x \) is \( \frac12 \), a fact used constantly in physics (RMS voltage, wave energy).
Worked examples
Example 1 (inner coefficient). For \( \int\sin^2(3x)\,dx \), the identity becomes \( \sin^2 3x = \frac{1 - \cos 6x}{2} \); double the angle, don’t square it. Integrating \( \cos 6x \) introduces a factor of \( \frac16 \):
$$\int\sin^2(3x)\,dx = \frac x2 - \frac{\sin 6x}{12} + C$$
Example 2 (a full hump). From 0 to \( \pi \), the \( \sin 2x \) term is 0 at both ends, so only \( \frac x2 \) matters and the area is \( \frac{\pi}{2} \).
Example 3 (a partial interval). From 0 to \( \frac{\pi}{4} \), the oscillating term no longer vanishes. At \( \frac{\pi}{4} \), \( \sin 2x = 1 \):
$$\int_0^{\pi/4}\sin^2 x\,dx = \frac{\pi}{8} - \frac14 \approx 0.1427$$
This is much less than half the interval length, because \( \sin^2 x \) is small near 0. Compare the graph: on \( [0, \frac{\pi}{4}] \), the curve rises from 0 only to \( \frac12 \), so the average height is well below one half.
Example 4 (half angle). For \( \int\sin^2\frac x2\,dx \), the identity gives \( \frac{1 - \cos x}{2} \), so
$$\int\sin^2\frac x2\,dx = \frac x2 - \frac{\sin x}{2} + C$$
Example 5 (fourth power). For \( \sin^4 x \), apply the identity twice. Square \( \frac{1 - \cos 2x}{2} \), then reduce the \( \cos^2 2x \) that appears:
$$\begin{aligned} \sin^4 x &= \frac{1 - 2\cos 2x + \cos^2 2x}{4} \\ &= \frac38 - \frac{\cos 2x}{2} + \frac{\cos 4x}{8} \end{aligned}$$
Integrating term by term:
$$\int\sin^4 x\,dx = \frac{3x}{8} - \frac{\sin 2x}{4} + \frac{\sin 4x}{32} + C$$
Example 6 (volume). Rotate one hump of \( y = \sin x \), from 0 to \( \pi \), about the x-axis. Each cross-section is a disk of radius \( \sin x \) and area \( \pi\sin^2 x \). By the disk method, the volume is \( \pi \) times the integral of \( \sin^2 x \), which is \( \pi\cdot\frac{\pi}{2} = \frac{\pi^2}{2} \approx 4.935 \).
Example 7 (a product). For \( \int_0^{2\pi}\sin^2x\cos^2x\,dx \), use \( \sin^2x\cos^2x = \frac{\sin^2 2x}{4} \). Over \( [0, 2\pi] \), the average of \( \sin^2 2x \) is again \( \frac12 \), so the integral is \( \frac14\cdot\frac12\cdot 2\pi = \frac{\pi}{4} \).
You can type any of these into the integral calculator to compare.
Variations
- \( \int\sin^2(3x)\,dx = \frac x2 - \frac{\sin 6x}{12} + C \)
- \( \int\sin x\cos x\,dx = \frac{\sin^2 x}{2} + C \) (a u-substitution, no identity needed)
- \( \int_0^{2\pi}\sin^2x\cos^2x\,dx = \frac{\pi}{4} \), using \( \sin^2x\cos^2x = \frac{\sin^2 2x}{4} \)
A strategy for any power of sine and cosine
The integral of sin²x is one case of a general plan for integrals of the form \( \int\sin^m x\cos^n x\,dx \). Decide based on which exponents are odd:
- If the power of sine is odd, save one \( \sin x \), convert the remaining even power to cosines with \( \sin^2 x = 1 - \cos^2 x \), and substitute \( u = \cos x \).
- If the power of cosine is odd, do the mirror image: save one \( \cos x \), convert the rest to sines, and substitute \( u = \sin x \).
- If both powers are even (including zero, as in \( \sin^2 x \) alone), there’s nothing to save for a substitution. Use the power-reduction identities, possibly more than once, as in Example 5.
So the reason sin²x needs an identity is precisely that its exponent is even. The odd powers are, surprisingly, the easier ones. Once you recognize which case you’re in, the rest is routine algebra.
Common mistakes
- Using the power rule. \( \frac{\sin^3 x}{3} \) is wrong, because its derivative has an extra factor of \( \cos x \).
- Mixing up the identities. \( \sin^2 x \) goes with \( 1 - \cos 2x \); \( \cos^2 x \) goes with \( 1 + \cos 2x \). Test at \( x = 0 \): \( \sin^2 0 = 0 \), and only \( \frac{1 - \cos 0}{2} \) gives 0.
- Dropping the inner factor. Writing \( \frac x2 - \frac{\sin 2x}{2} \) forgets that integrating \( \cos 2x \) divides by 2.
- Confusing \( \sin^2 x \) with \( \sin(x^2) \). The first is \( (\sin x)^2 \) and has the neat answer above. The second has no elementary antiderivative at all.
- Evaluating in degrees. Definite integrals like \( \frac{\pi}{8} - \frac14 \) assume radians. A calculator set to degrees will give nonsense.
Where it’s used
In electricity, power is proportional to the square of voltage, so the average of \( \sin^2 \) sets the root-mean-square value: a sine wave with peak \( V \) has RMS value \( \frac{V}{\sqrt2} \). The same integral measures the energy of waves, and it’s the basic computation behind Fourier series. In calculus itself, it appears in volumes of revolution (Example 6) and in trig substitution, where the integral of √(1−x²) turns into \( \int\cos^2\theta\,d\theta \).
Try it yourself
Step-by-step solver·Exact symbolic engine
Interactive Calculus Problem Solver
Derivatives, antiderivatives, definite and improper integrals, and limits. Every answer comes with the rules used, and antiderivatives are verified by differentiating them back.
Input syntax
- Powers
x^2, rootssqrt(x),cbrt(x), absolute value|x| - Implicit multiplication works:
3x sin(2x) sin cos tan sec csc cot,asin acos atan,sinh cosh tanhe^xorexp(x);ln(x)andlog(x)are both the natural log- Constants
piande; bounds acceptinfand-inf
Practice problems
Try these before checking the answers.
- \( \int\cos^2(2x)\,dx \)
- \( \int_0^{\pi/2}\sin^2x\,dx \)
- \( \int\sin^3x\,dx \)
- \( \int_0^{\pi}\cos^2x\,dx \)
- \( \int_0^{\pi/2}\sin^2(2x)\,dx \)
- \( \int\cos^3x\,dx \)
Answers: (1) \( \frac x2 + \frac{\sin 4x}{8} + C \); (2) \( \frac\pi4 \); (3) \( -\cos x + \frac{\cos^3x}{3} + C \); (4) \( \frac\pi2 \); (5) \( \frac\pi4 \); (6) \( \sin x - \frac{\sin^3x}{3} + C \).
FAQ
Is the integral of sin²x equal to sin³x/3?
No. That would require an extra factor of \( \cos x \) (the chain rule). \( \frac{d}{dx}\frac{\sin^3 x}{3} = \sin^2 x\cos x \).
What about higher powers like sin³x?
For odd powers, save one \( \sin x \) and turn the rest into cosines: \( \sin^3 x = (1 - \cos^2 x)\sin x \), then substitute \( u = \cos x \).
Is (x − sin x cos x)/2 also correct?
Yes. Since \( \sin 2x = 2\sin x\cos x \), it’s the same function as \( \frac x2 - \frac{\sin 2x}{4} \), just written differently.
What is the integral of sin²x from 0 to 2π?
It’s \( \pi \). Over a full period the \( \sin 2x \) term returns to 0, leaving half the interval length.
How do I integrate sin²x cos²x?
Rewrite it as \( \frac{\sin^2 2x}{4} \), then apply the power-reduction identity once more with angle \( 4x \).
Why do I need an identity at all?
Because \( \sin^2 x \) is not the derivative of any simple power of sine. The power-reduction identity trades the square for a first power of cosine at double the angle, and first powers are easy to integrate.
Related: derivative of cos²x, integral of tan x.
Further reading
- Integrals Involving Trig Functions (Paul’s Online Math Notes) — the full strategy for products of sine and cosine powers, odd and even.
- Average Function Value (Paul’s Online Math Notes) — the formula behind the “average of sin² is one half” shortcut.
Calculators for this topic
Keep learning
Fundamental Theorem of Calculus (Parts 1 and 2) Explained
The Fundamental Theorem of Calculus links derivatives and integrals. Both parts explained with intuition, formulas and worked examples.
Improper Integrals: How to Tell If They Converge or Diverge
Improper integrals have infinite limits or infinite integrands. Learn the limit definition, the p-integral test, comparison, and 6 worked examples.

