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

Exercise 7.8 · Q18: ∫0π(sin⁡2x2−cos⁡2x2)dx\int_0^{\pi}\left(\sin^2\frac{x}{2} - \cos^2\frac{x}{2}\right)dx

Exercise 7.8Fundamental theorem of calculus · Section 7.8
The question

Evaluate the definite integral

∫0π(sin⁡2x2−cos⁡2x2)dx.\int_0^{\pi}\left(\sin^2\frac{x}{2} - \cos^2\frac{x}{2}\right)dx.
Exam answer

Let I=∫0π(sin⁡2x2−cos⁡2x2)dxI = \displaystyle\int_0^{\pi}\left(\sin^2\frac{x}{2} - \cos^2\frac{x}{2}\right)dx⁠.

Since cos⁡2θ=cos⁡2θ−sin⁡2θ\cos 2\theta = \cos^2\theta - \sin^2\theta⁠,

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

∴ I=0\therefore\ I = 0⁠.

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

The one idea this problem is built on

The integrand is a double-angle expression in disguise: cos⁡2θ−sin⁡2θ=cos⁡2θ\cos^2\theta - \sin^2\theta = \cos 2\theta⁠, so with θ=x2\theta = \frac{x}{2} the integrand is −cos⁡x-\cos x⁠. Its antiderivative is −sin⁡x-\sin x⁠, which is 0 at both limits, so the integral is 0. A zero answer does not mean "no area": the part below the axis cancels the part above it.

Given, to find, and the plan
Given
The integrand f(x)=sin⁡2x2−cos⁡2x2f(x) = \sin^2\frac{x}{2} - \cos^2\frac{x}{2} on [0,π][0, \pi]⁠.
To find
The exact value of the integral.
Plan
(1) Check continuity. (2) Simplify with the double-angle identity. (3) Find FF and differentiate it back. (4) Compute F(π)−F(0)F(\pi) - F(0)⁠. (5) Read the answer as a signed area.

Basics you need

1Second fundamental theorem

∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a) when ff is continuous on [a,b][a, b] and F′=fF' = f⁠. Lesson: definite integrals and the fundamental theorem

2Double-angle identity

cos⁡2θ=cos⁡2θ−sin⁡2θ\cos 2\theta = \cos^2\theta - \sin^2\theta for every real θ\theta⁠. Basics: trigonometric identities for integrals

3Signed area

A definite integral counts area above the x-axis as positive and area below it as negative. Basics: area as a sum of thin strips

Solution

  1. Check continuity on [0,π][0, \pi]

    sin⁡x2\sin\frac{x}{2} and cos⁡x2\cos\frac{x}{2} are continuous for every real xx⁠, so their squares and the difference of the squares are continuous on [0,π][0, \pi]⁠.

    Theorem 2 needs a continuous integrand on the closed interval. Sines and cosines have no breaks.
    Compositions, products and differences of continuous functions are continuous (Chapter 5). Lesson: the fundamental theorem
  2. Simplify with the double-angle identity

    Put θ=x2\theta = \frac{x}{2} in cos⁡2θ=cos⁡2θ−sin⁡2θ\cos 2\theta = \cos^2\theta - \sin^2\theta⁠. Since 2θ=x2\theta = x⁠,

    cos⁡x=cos⁡2x2−sin⁡2x2,\cos x = \cos^2\frac{x}{2} - \sin^2\frac{x}{2},

    and the integrand is the negative of this:

    sin⁡2x2−cos⁡2x2=−cos⁡x.\sin^2\frac{x}{2} - \cos^2\frac{x}{2} = -\cos x.
    The integrand has the two squares in the opposite order to the identity, which is why a minus sign appears. Integrating sin⁡2\sin^2 and cos⁡2\cos^2 separately would also work, but the identity does it in one line.
    cos⁡2θ=cos⁡2θ−sin⁡2θ\cos 2\theta = \cos^2\theta - \sin^2\theta⁠, valid for all θ\theta⁠. Basics: trigonometric identities
  3. An antiderivative, and the check

    ∫(−cos⁡x) dx=−sin⁡x+C,F(x)=−sin⁡x.\int(-\cos x)\,dx = -\sin x + C, \quad F(x) = -\sin x.

    Check: F′(x)=−cos⁡x=sin⁡2x2−cos⁡2x2F'(x) = -\cos x = \sin^2\frac{x}{2} - \cos^2\frac{x}{2}⁠. ✓

    ∫cos⁡x dx=sin⁡x\int\cos x\,dx = \sin x⁠, and the constant factor −1-1 comes outside. Differentiating FF returns the simplified integrand, which Step 2 showed equals the original one.
    Standard formula (ii), Section 7.2; Property (IV), Section 7.2.1. Basics: integration undoes differentiation
  4. Evaluate F(π)−F(0)F(\pi) - F(0)

    I=(−sin⁡π)−(−sin⁡0)=0−0=0.I = (-\sin\pi) - (-\sin 0) = 0 - 0 = 0.
    sin⁡π=0\sin\pi = 0 and sin⁡0=0\sin 0 = 0⁠: the antiderivative has the same value at both ends, so the definite integral is 0.
    sin⁡0=sin⁡π=0\sin 0 = \sin\pi = 0⁠. Basics: trigonometric values
  5. Why 0 makes sense: signed area

    On [0,π2)\left[0, \frac{\pi}{2}\right)⁠, cos⁡x>0\cos x > 0⁠, so −cos⁡x<0-\cos x < 0⁠: the graph is below the axis. On (π2,π]\left(\frac{\pi}{2}, \pi\right]⁠, cos⁡x<0\cos x < 0⁠, so the graph is above the axis. Each piece has area 1:

    ∫0π/2(−cos⁡x) dx=−sin⁡π2+sin⁡0=−1,∫π/2π(−cos⁡x) dx=−sin⁡π+sin⁡π2=1.\begin{aligned}\int_0^{\pi/2}(-\cos x)\,dx &= -\sin\tfrac{\pi}{2} + \sin 0 = -1, \\ \int_{\pi/2}^{\pi}(-\cos x)\,dx &= -\sin\pi + \sin\tfrac{\pi}{2} = 1.\end{aligned}

    Their sum is −1+1=0-1 + 1 = 0⁠.

    π/2 π −1 1 x y y = −cos x area 1 below (counts −1) area 1 above (counts +1)
    The integrand sin⁡2x2−cos⁡2x2=−cos⁡x\sin^2\frac{x}{2} - \cos^2\frac{x}{2} = -\cos x⁠. The region below the axis on [0,π2]\left[0, \frac{\pi}{2}\right] (shaded in a second colour) counts as −1-1⁠; the region above the axis on [π2,π]\left[\frac{\pi}{2}, \pi\right] counts as +1+1⁠. The total signed area is 0.
    The two regions are mirror images in the point (π2,0)\left(\frac{\pi}{2}, 0\right)⁠: with f(x)=−cos⁡xf(x) = -\cos x⁠, f(π−x)=cos⁡x=−f(x)f(\pi - x) = \cos x = -f(x)⁠. So they have equal areas of opposite sign. This is property P6 of Section 7.10 with 2a=π2a = \pi⁠: when f(2a−x)=−f(x)f(2a - x) = -f(x)⁠, ∫02af(x) dx=0\int_0^{2a}f(x)\,dx = 0⁠. The geometric area enclosed (counting both parts as positive) is 2, not 0.
    Splitting the interval at π2\frac{\pi}{2} is property P2, Section 7.10. Lesson: properties of definite integrals
Result ∫0π(sin⁡2x2−cos⁡2x2)dx=0.\int_0^{\pi}\left(\sin^2\frac{x}{2} - \cos^2\frac{x}{2}\right)dx = 0.

(Textbook answer: 0.)

Check it with numbers

A numerical integration of sin⁡2x2−cos⁡2x2\sin^2\frac{x}{2} - \cos^2\frac{x}{2} over [0,π][0, \pi] gives 0 to more than 12 decimal places.

Identity spot check at x=1x = 1⁠: sin⁡20.5≈0.229848847\sin^2 0.5 \approx 0.229848847 and cos⁡20.5≈0.770151153\cos^2 0.5 \approx 0.770151153⁠, so the integrand is about 0.229848847−0.7701511530.229848847 - 0.770151153 =−0.540302306= -0.540302306⁠; and −cos⁡1≈−0.540302306-\cos 1 \approx -0.540302306⁠.

Common mistakes
  1. Getting the sign of the identity wrong. cos⁡2θ−sin⁡2θ=cos⁡2θ\cos^2\theta - \sin^2\theta = \cos 2\theta⁠; the integrand is the other way round, so it equals −cos⁡x-\cos x⁠, not cos⁡x\cos x⁠. (Here the final answer would still be 0, but the sign matters in other limits.)
  2. Using cos⁡x2\cos\frac{x}{2} instead of cos⁡x\cos x⁠. With θ=x2\theta = \frac{x}{2}⁠, the double angle is 2θ=x2\theta = x⁠.
  3. Saying "the integral is 0, so there is no area". The integral is a signed area; the enclosed area is 2.
What to take away
  1. Before integrating squares of sines and cosines, look for a double-angle identity that removes them.
  2. A definite integral can be 0 even when the graph is not: parts below the axis cancel parts above.
  3. To find an enclosed area, split the interval where the integrand changes sign.

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, 4, 5Theorem 2, Section 7.8.3 (Lesson)
cos⁡2θ=cos⁡2θ−sin⁡2θ\cos 2\theta = \cos^2\theta - \sin^2\thetaStep 2Double-angle formula (Class XI trigonometry; used the same way in Section 7.3.2) (Basics)
∫cos⁡x dx=sin⁡x+C\int\cos x\,dx = \sin x + CStep 3Standard formula (ii), Section 7.2
Constant-multiple ruleStep 3Property (IV), Section 7.2.1 (Basics)
∫ab=∫ac+∫cb\int_a^b = \int_a^c + \int_c^bStep 5Property P2, Section 7.10 (Lesson)
∫02af=0\int_0^{2a}f = 0 if f(2a−x)=−f(x)f(2a - x) = -f(x)Step 5Property P6, Section 7.10 (Lesson)
Area below the axis counts as negativeStep 5, figureSigned area (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 →