Skip to content
ihateDesmos

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.

−3−2−1123−110
Open in calculator
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.

  1. 1
    Use the identity: cos²x = (1 + cos 2x)/2.
  2. 2
    Split it: ∫(1/2) dx + (1/2) ∫cos 2x dx.
  3. 3
    The first part is x/2.
  4. 4
    The second part is (1/2) · sin(2x)/2 = sin(2x)/4.
  5. 5
    So 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.

−3−2.5−2−1.5−1−0.50.511.522.53−2−1.5−1−0.50.511.52

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.

Checking the integral
xcos²xSlope of the answer
−2.510.6513910.651391
−1.576.34136 × 10⁻⁷6.34217 × 10⁻⁷
−0.6280.6548110.654811
011
0.9420.3459460.345946
1.880.09259860.0925986
2.510.6513910.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.

Open the integral calculator