Class 12 Maths, Worked in Full Past papersGet updates
Chapter 7 · Integrals

Exercise 7.8 · Q12: ∫0π/2cos⁡2x dx\int_0^{\pi/2}\cos^2 x\,dx

Exercise 7.8Fundamental theorem of calculus · Section 7.8
The question

Evaluate the definite integral

∫0π2cos⁡2x dx.\int_0^{\frac{\pi}{2}} \cos^2 x\,dx.
Exam answer

Let I=∫0π2cos⁡2x dxI = \displaystyle\int_0^{\frac{\pi}{2}}\cos^2 x\,dx⁠.

Using cos⁡2x=1+cos⁡2x2,\cos^2 x = \frac{1 + \cos 2x}{2},

I=12∫0π2(1+cos⁡2x) dx=12[x+sin⁡2x2]0π2=12[(π2+sin⁡π2)−0]\begin{aligned} I &= \frac12\int_0^{\frac{\pi}{2}}(1 + \cos 2x)\,dx \\ &= \frac12\left[x + \frac{\sin 2x}{2}\right]_0^{\frac{\pi}{2}} \\ &= \frac12\left[\left(\frac{\pi}{2} + \frac{\sin\pi}{2}\right) - 0\right] \end{aligned}

∴ I=π4\therefore\ I = \dfrac{\pi}{4}⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

There is no standard formula for cos⁡2x\cos^2 x directly, but the double-angle identity cos⁡2x=2cos⁡2x−1\cos 2x = 2\cos^2 x - 1 rewrites it as 12+12cos⁡2x\frac12 + \frac12\cos 2x⁠, and each of those has a known antiderivative. Then the second fundamental theorem (Theorem 2, Section 7.8.3) gives the value as F(π2)−F(0)F\left(\frac{\pi}{2}\right) - F(0)⁠.

Given, to find, and the plan
Given
The integrand f(x)=cos⁡2xf(x) = \cos^2 x on the interval [0,π2]\left[0, \frac{\pi}{2}\right]⁠.
To find
The exact value of ∫0π/2cos⁡2x dx\int_0^{\pi/2}\cos^2 x\,dx⁠, and a decimal.
Plan
(1) Check continuity on [0,π2]\left[0, \frac{\pi}{2}\right]⁠. (2) Lower the power with the double-angle identity. (3) Integrate term by term to get FF⁠. (4) Differentiate FF back. (5) Compute F(π2)−F(0)F\left(\frac{\pi}{2}\right) - F(0)⁠.

Basics you need

1Second fundamental theorem

If ff is continuous on [a,b][a, b] and F′=fF' = f⁠, then ∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a)⁠. No "+ C" is needed: it cancels in the subtraction. Lesson: definite integrals and the fundamental theorem

2Double-angle identity

cos⁡2x=2cos⁡2x−1\cos 2x = 2\cos^2 x - 1⁠, so cos⁡2x=1+cos⁡2x2\cos^2 x = \frac{1 + \cos 2x}{2}⁠. Basics: trigonometric identities for integrals

3Integral of cos⁡kx\cos kx

∫cos⁡kx dx=sin⁡kxk+C\int\cos kx\,dx = \frac{\sin kx}{k} + C for a constant k≠0k \ne 0⁠, because ddxsin⁡kx=kcos⁡kx\frac{d}{dx}\sin kx = k\cos kx (chain rule). Basics: substitution (the chain rule backwards)

Solution

  1. Check continuity on [0,π2]\left[0, \frac{\pi}{2}\right]

    cos⁡x\cos x is continuous for every real xx⁠, and cos⁡2x=cos⁡x⋅cos⁡x\cos^2 x = \cos x\cdot\cos x is a product of continuous functions, so it is continuous on all of R\mathbb{R}⁠, in particular on [0,π2]\left[0, \frac{\pi}{2}\right]⁠.

    Theorem 2 may only be used when the integrand is continuous on the whole closed interval (Remark (iv), Section 7.8.3). Here there are no denominators, roots or logarithms, so nothing can go wrong.
    A product of continuous functions is continuous (Chapter 5). Lesson: the fundamental theorem
  2. Lower the power with the double-angle identity

    Start from cos⁡2x=2cos⁡2x−1\cos 2x = 2\cos^2 x - 1⁠. Add 1 to both sides and divide by 2:

    cos⁡2x=1+cos⁡2x2=12+12cos⁡2x.\cos^2 x = \frac{1 + \cos 2x}{2} = \frac12 + \frac12\cos 2x.
    The square of a cosine has no formula in the book's list, but a constant and cos⁡2x\cos 2x do. The identity trades the square for a doubled angle, which is exactly what Example 7(i), Section 7.3.2, does.
    cos⁡2x=cos⁡2x−sin⁡2x=2cos⁡2x−1\cos 2x = \cos^2 x - \sin^2 x = 2\cos^2 x - 1⁠, using sin⁡2x=1−cos⁡2x\sin^2 x = 1 - \cos^2 x⁠. Basics: trigonometric identities
  3. Integrate term by term

    ∫cos⁡2x dx=12∫dx+12∫cos⁡2x dx=x2+12⋅sin⁡2x2+C=x2+sin⁡2x4+C.\begin{aligned}\int\cos^2 x\,dx &= \frac12\int dx + \frac12\int\cos 2x\,dx \\ &= \frac{x}{2} + \frac12\cdot\frac{\sin 2x}{2} + C \\ &= \frac{x}{2} + \frac{\sin 2x}{4} + C.\end{aligned}

    Take F(x)=x2+sin⁡2x4F(x) = \frac{x}{2} + \frac{\sin 2x}{4}⁠.

    The integral of a sum is the sum of the integrals and constants come outside (Properties (III) and (IV), Section 7.2.1). For ∫cos⁡2x dx\int\cos 2x\,dx⁠, put u=2xu = 2x⁠, du=2 dxdu = 2\,dx⁠: it becomes 12∫cos⁡u du=12sin⁡u=12sin⁡2x\frac12\int\cos u\,du = \frac12\sin u = \frac12\sin 2x⁠.
    Standard formula (ii), Section 7.2: ∫cos⁡x dx=sin⁡x+C\int\cos x\,dx = \sin x + C⁠. Lesson: integration by substitution
  4. Check: differentiate FF back

    F′(x)=12+2cos⁡2x4=1+cos⁡2x2=1+(2cos⁡2x−1)2=cos⁡2x. ✓\begin{aligned}F'(x) &= \frac12 + \frac{2\cos 2x}{4} = \frac{1 + \cos 2x}{2} \\ &= \frac{1 + (2\cos^2 x - 1)}{2} = \cos^2 x.\ \checkmark\end{aligned}
    Differentiating returns the integrand, so FF really is an antiderivative of cos⁡2x\cos^2 x for every real xx⁠. The factor 2 from the chain rule cancels the 4 down to 2.
    Property (I), Section 7.2.1: differentiation undoes integration. Basics: integration undoes differentiation
  5. Evaluate F(π2)−F(0)F\left(\frac{\pi}{2}\right) - F(0)

    At the upper limit, 2x=π2x = \pi and sin⁡π=0\sin\pi = 0⁠; at the lower limit, sin⁡0=0\sin 0 = 0⁠:

    I=[π4+sin⁡π4]−[0+sin⁡04]=[π4+0]−[0+0]=π4≈0.7853982.\begin{aligned}I &= \left[\frac{\pi}{4} + \frac{\sin\pi}{4}\right] - \left[0 + \frac{\sin 0}{4}\right] \\ &= \left[\frac{\pi}{4} + 0\right] - [0 + 0] \\ &= \frac{\pi}{4} \approx 0.7853982.\end{aligned}
    π/4 π/2 1/2 1 x y y = cos²x area π/4 ≈ 0.785 average height 1/2
    The shaded region under y=cos⁡2xy = \cos^2 x from 0 to π2\frac{\pi}{2} has area π4\frac{\pi}{4}⁠. It equals the area of a rectangle of height 12\frac12 on the same base: the part of the curve above the dashed line exactly fills the gap below it.
    Theorem 2: value of the antiderivative at the upper limit minus its value at the lower limit. The sine term vanishes at both ends, so only x2\frac{x}{2} contributes. The figure explains why: cos⁡2x=12+12cos⁡2x\cos^2 x = \frac12 + \frac12\cos 2x⁠, and cos⁡2x\cos 2x has equal areas above and below the axis on [0,π2]\left[0, \frac{\pi}{2}\right]⁠, so the average height is 12\frac12 and the area is 12⋅π2\frac12\cdot\frac{\pi}{2}⁠.
    sin⁡π=0\sin\pi = 0⁠, sin⁡0=0\sin 0 = 0⁠. Basics: area as a sum of thin strips
Result ∫0π2cos⁡2x dx=π4≈0.7853982.\int_0^{\frac{\pi}{2}}\cos^2 x\,dx = \frac{\pi}{4} \approx 0.7853982.

(Textbook answer: π4\frac{\pi}{4}⁠.)

Check it with numbers

A numerical integration of cos⁡2x\cos^2 x over [0,π2]\left[0, \frac{\pi}{2}\right] (no antiderivative used) gives about 0.7853982, and π4≈0.7853982\frac{\pi}{4} \approx 0.7853982⁠. They agree.

Spot check of the identity at x=0.5x = 0.5⁠: cos⁡20.5≈0.7701512\cos^2 0.5 \approx 0.7701512 and 1+cos⁡12≈0.7701512\frac{1 + \cos 1}{2} \approx 0.7701512⁠.

Common mistakes
  1. Writing ∫cos⁡2x dx=cos⁡3x3\int\cos^2 x\,dx = \frac{\cos^3 x}{3}⁠. The power rule needs the derivative of the inside as a factor; differentiating cos⁡3x3\frac{\cos^3 x}{3} gives −cos⁡2xsin⁡x-\cos^2 x\sin x⁠, not cos⁡2x\cos^2 x⁠.
  2. Using cos⁡2x=1−cos⁡2x2\cos^2 x = \frac{1 - \cos 2x}{2}⁠. That is sin⁡2x\sin^2 x⁠. The sign is "+" for cosine.
  3. Forgetting the 12\frac12 in ∫cos⁡2x dx=sin⁡2x2\int\cos 2x\,dx = \frac{\sin 2x}{2}⁠. It would give x2+sin⁡2x2\frac{x}{2} + \frac{\sin 2x}{2}⁠, whose derivative is 12+cos⁡2x\frac12 + \cos 2x⁠.
What to take away
  1. Even powers of sine and cosine are integrated by lowering the power with a double-angle identity.
  2. Over a quarter period, cos⁡2x\cos^2 x and sin⁡2x\sin^2 x both have average value 12\frac12⁠, so each integral over [0,π2]\left[0, \frac{\pi}{2}\right] is π4\frac{\pi}{4}⁠.
  3. Always differentiate the antiderivative back before substituting the limits.

Every fact used, and where it comes from

FactUsed inSource
∫abf=F(b)−F(a)\int_a^b f = F(b) - F(a) for continuous ffSteps 1, 5Theorem 2 and Remark (iv), Section 7.8.3 (Lesson)
cos⁡2x=1+cos⁡2x2\cos^2 x = \frac{1 + \cos 2x}{2}Step 2Example 7(i), Section 7.3.2 (Basics)
Sum and constant-multiple rulesStep 3Properties (III), (IV), Section 7.2.1
∫cos⁡x dx=sin⁡x+C\int\cos x\,dx = \sin x + CStep 3Standard formula (ii), Section 7.2
Substitution u=2xu = 2xStep 3Section 7.3.1 (Lesson)
Differentiating an integral returns the integrandStep 4Property (I), Section 7.2.1 (Basics)
Definite integral as areaFigureSection 7.8.1 (Basics)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →