practicecalculus
Trigonometric integrals

Integral of cos² x: Formula, Derivation and Examples

The integral of cos² x is x/2 + sin(2x)/4 + C. See the power-reducing identity, a check, cos²(ax) and the area of a circle.

Trigonometric integrals Updated 2 min read

At a glance

\int \cos^2 x\,dx = \frac{x}{2} + \frac{\sin 2x}{4} + C
Antiderivative
\dfrac{x}{2} + \dfrac{\sin 2x}{4} + C
Identity used
\cos^2 x = \dfrac{1 + \cos 2x}{2}
Equivalent form
\dfrac{x + \sin x\cos x}{2} + C
From 0 to 2π
\pi
Check with sin²
\int(\sin^2 x + \cos^2 x)\,dx = x + C
On this page
  1. Graph of cos² x and its antiderivative
  2. Derivation, step by step
  3. Check by differentiating
  4. Definite integrals
  5. Substitution variants
  6. Where it shows up: the area of a circle
  7. Worked example: cos² x sin² x
  8. Common mistakes

The integral of \cos^2 x is \dfrac{x}{2} + \dfrac{\sin 2x}{4} + C. Like \sin^2 x, it needs a power-reducing identity before you integrate.

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

Graph of cos² x and its antiderivative

Area under y = cos² x from -π/2 to π/2, with the antiderivative y = x/2 + sin(2x)/4
The shaded area is \frac{\pi}{2} \approx 1.571. The dashed antiderivative rises fastest at x = 0, where \cos^2 x = 1, and flattens where \cos^2 x = 0.

Derivation, step by step

  1. Start from \cos 2x = 2\cos^2 x - 1.
  2. Solve for \cos^2 x: \cos^2 x = \dfrac{1 + \cos 2x}{2}.
  3. Substitute: \displaystyle\int\cos^2 x\,dx = \frac{1}{2}\int(1 + \cos 2x)\,dx.
  4. Integrate: \frac{1}{2}\left(x + \frac{\sin 2x}{2}\right) + C.
  5. Simplify: \frac{x}{2} + \frac{\sin 2x}{4} + C.

Step 4 uses the integral of cos x with a factor of \frac{1}{2} from the inside 2x.

Check by differentiating

\frac{d}{dx}\left(\frac{x}{2} + \frac{\sin 2x}{4}\right) = \frac{1}{2} + \frac{\cos 2x}{2} = \cos^2 x \checkmark

A second check: add this answer to the integral of sin² x:

\left(\frac{x}{2} + \frac{\sin 2x}{4}\right) + \left(\frac{x}{2} - \frac{\sin 2x}{4}\right) = x

That matches \int(\sin^2 x + \cos^2 x)\,dx = \int 1\,dx = x. The forward direction is on the derivative of cos² x page.

Definite integrals

\int_0^{\pi/2}\cos^2 x\,dx = \frac{\pi}{4}, \qquad \int_0^{\pi}\cos^2 x\,dx = \frac{\pi}{2}, \qquad \int_0^{2\pi}\cos^2 x\,dx = \pi
\int_0^{\pi/6}\cos^2 x\,dx = \frac{\pi}{12} + \frac{\sin(\pi/3)}{4} = \frac{\pi}{12} + \frac{\sqrt{3}}{8} \approx 0.478

Substitution variants

\int\cos^2(ax)\,dx = \frac{x}{2} + \frac{\sin(2ax)}{4a} + C

Example 1. \int\cos^2(5x)\,dx = \frac{x}{2} + \frac{\sin 10x}{20} + C.

Example 2. \int\cos^2\frac{x}{2}\,dx = \int\frac{1 + \cos x}{2}\,dx = \frac{x}{2} + \frac{\sin x}{2} + C.

Example 3: with a sin x factor. \int\cos^2 x\sin x\,dx = -\frac{\cos^3 x}{3} + C, using u = \cos x. No identity needed.

Where it shows up: the area of a circle

The area of a circle of radius 1 is 4\int_0^1\sqrt{1 - x^2}\,dx. Substitute x = \sin\theta, dx = \cos\theta\,d\theta:

4\int_0^{\pi/2}\cos\theta\cdot\cos\theta\,d\theta = 4\int_0^{\pi/2}\cos^2\theta\,d\theta = 4\cdot\frac{\pi}{4} = \pi

The same steps give the integral of √(1 - x²). See trig substitution for the method.

Worked example: cos² x sin² x

Use \sin x\cos x = \frac{\sin 2x}{2}, so \sin^2 x\cos^2 x = \frac{\sin^2 2x}{4} = \frac{1 - \cos 4x}{8}. Then

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

Common mistakes

  1. Answering \sin^2 x. Its derivative is 2\sin x\cos x.
  2. Answering \frac{\cos^3 x}{3}. That would need a -\sin x factor.
  3. Using 1 - \cos 2x. That identity is for \sin^2 x. A quick test: at x = 0, \cos^2 x = 1, and \frac{1 + \cos 0}{2} = 1.
  4. Writing \frac{\sin 2x}{2} instead of \frac{\sin 2x}{4}. Remember both halvings: one from the identity, one from the inside 2x.

Practise on trig integral problems.

Practice it now

Powers of sine and cosine

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the integral of cos² x?

It is \frac{x}{2} + \frac{\sin 2x}{4} + C, or equivalently \frac{1}{2}(x + \sin x\cos x) + C.

What is the integral of cos² x from 0 to 2π?

It is \pi. The \sin 2x term is 0 at both ends, leaving \frac{2\pi}{2}.

What is the integral of cos²(x/2)?

Since \cos^2\frac{x}{2} = \frac{1 + \cos x}{2}, the integral is \frac{x}{2} + \frac{\sin x}{2} + C.

What is the integral of cos² x sin x?

Use u = \cos x, du = -\sin x\,dx. The answer is -\frac{\cos^3 x}{3} + C.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.