Integral of cos²x
Updated 6 November 2026 · Checked numerically by the ihateDesmos engine
The integral of cos²x
∫
cos(x)2
dx =x2+sin(2x)4+C
The integral of cos²x is x/2 + sin(2x)/4 + C. It uses the same identity as sin²x, with a plus sign in place of the minus.
y=cos(x)2
in blue and its integral y=x2+sin(2x)4
(with C = 0) in red.How to integrate cos²x
Method: double angle identity.
- 1Use the identity: cos²x = (1 + cos 2x)/2.
- 2Split it: ∫(1/2) dx + (1/2) ∫cos 2x dx.
- 3The first part is x/2.
- 4The second part is (1/2) · sin(2x)/2 = sin(2x)/4.
- 5So the result is x/2 + sin(2x)/4 + C.
What it means
Add this to the integral of sin²x and the sin(2x)/4 terms cancel, leaving x, the integral of 1. That matches sin²x + cos²x = 1.
The integral from 0 to π
Using the antiderivative: F(π) − F(0) = π/2, which is about π/2. A direct numerical integration of cos²x gives π/2, which agrees.
Check by differentiating
The derivative of the answer should give back the original function. The last column measures that slope directly from the answer, and it matches.
| x | cos²x | Slope of the answer |
|---|---|---|
| −2.51 | 0.651391 | 0.651391 |
| −1.57 | 6.34136 × 10⁻⁷ | 6.34217 × 10⁻⁷ |
| −0.628 | 0.654811 | 0.654811 |
| 0 | 1 | 1 |
| 0.942 | 0.345946 | 0.345946 |
| 1.88 | 0.0925986 | 0.0925986 |
| 2.51 | 0.651391 | 0.651391 |
Common mistakes
- Using the power rule to get cos³x/3.
Frequently asked questions
What is the integral of cos²x?
The integral of cos²x is x/2 + sin(2x)/4 + C.
What is the integral of cos²x from 0 to π?
π/2, which is about π/2.
Keep going
Integrate any function
Type your own function into the integral calculator for the steps, the answer and a graph.