Unit 2, chapter 7

Use a half-angle identity for a squared sine

How the power-reducing form of the half-angle identity rewrites sine squared with the cosine of a doubled angle, and why the integral of sine squared from 0 to pi is pi over 2 by cancellation over a full period.

  • Chapter 7
  • Substitution, integration by parts and trigonometric identities

The graph of sin⁡2x\sin^2 x on [0,π][0, \pi] is a hump that starts at 00, rises to 11 at x=π/2x = \pi/2 and returns to 00 at x=πx = \pi. How large is the area under it? Here sin⁡2x\sin^2 x means (sin⁡x)2(\sin x)^2, not sin⁡(x2)\sin(x^2), and angles are in radians. The substitution u=sin⁡xu = \sin x would need a factor cos⁡x\cos x that is not there, so this page rewrites the square with the cosine of a doubled angle instead, integrates the two pieces that result, and shows why the exact area is π/2\pi/2.

Key terms

Cosine of a doubled angle

Definition For every real number xx,

cos⁡2x=cos⁡2x−sin⁡2x=1−2sin⁡2x=2cos⁡2x−1.\begin{aligned} \cos 2x &= \cos^2 x - \sin^2 x \\[0.4em] &= 1 - 2\sin^2 x \\[0.4em] &= 2\cos^2 x - 1. \end{aligned}

The first form is the angle addition formula cos⁡(a+b)=cos⁡acos⁡b−sin⁡asin⁡b\cos(a + b) = \cos a\cos b - \sin a\sin b with a=b=xa = b = x, and the other two follow from sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1. As with sine, cos⁡2x\cos^2 x means (cos⁡x)2(\cos x)^2.

In plain words Doubling the angle turns a difference of squares of sine and cosine into a single cosine. Read backwards, a square of sine or of cosine can be written with a cosine of twice the angle and no square at all.

Example At x=π/6x = \pi/6 the left side is cos⁡(π/3)=12\cos(\pi/3) = \tfrac12, and the second form gives 1−2sin⁡2(π/6)=1−2⋅14=121 - 2\sin^2(\pi/6) = 1 - 2\cdot\tfrac14 = \tfrac12. As xx runs from 00 to π\pi, the doubled angle 2x2x runs from 00 to 2π2\pi, so cos⁡2x\cos 2x goes through one full period, from 11 down to −1-1 at x=π/2x = \pi/2 and back to 11.

Power-reducing identity

Definition For every real number xx,

sin⁡2x=1−cos⁡2x2,cos⁡2x=1+cos⁡2x2.\begin{gathered} \sin^2 x = \frac{1 - \cos 2x}{2}, \\[0.4em] \cos^2 x = \frac{1 + \cos 2x}{2}. \end{gathered}

They come from solving cos⁡2x=1−2sin⁡2x\cos 2x = 1 - 2\sin^2 x and cos⁡2x=2cos⁡2x−1\cos 2x = 2\cos^2 x - 1 for the square. Both are exact at every xx, not approximations, and they replace a second power of sine or cosine by a first power of cosine.

In plain words A squared sine is a constant height 12\tfrac12 plus a wave −12cos⁡2x-\tfrac12\cos 2x that swings between −12-\tfrac12 and 12\tfrac12 with period π\pi. The square is gone, and both pieces have known antiderivatives.

Example In the form sin⁡2x=12−12cos⁡2x\sin^2 x = \tfrac12 - \tfrac12\cos 2x, at x=0x = 0 the wave is −12-\tfrac12 and the total is 00. At x=π/2x = \pi/2 the wave is 12\tfrac12, because cos⁡π=−1\cos\pi = -1, and the total is 11, matching sin⁡2(π/2)=1\sin^2(\pi/2) = 1. The hump lies below the height 12\tfrac12 for 0≤x<π/40 \le x < \pi/4 and for 3π/4<x≤π3\pi/4 < x \le \pi, and above it for π/4<x<3π/4\pi/4 < x < 3\pi/4.

Half-angle identity

Definition For every real number θ\theta,

sin⁡θ2=±1−cos⁡θ2,cos⁡θ2=±1+cos⁡θ2,\begin{aligned} \sin\frac{\theta}{2} &= \pm\sqrt{\frac{1 - \cos\theta}{2}}, \\[0.4em] \cos\frac{\theta}{2} &= \pm\sqrt{\frac{1 + \cos\theta}{2}}, \end{aligned}

where each sign is the sign of the left side, which depends on the quadrant of θ/2\theta/2. These are the power-reducing identities with x=θ/2x = \theta/2, solved for the sine or the cosine itself.

In plain words The same identity, read the other way, finds the sine or cosine of half an angle from the cosine of the whole angle. A square root is never negative, so the sign has to come from knowing where the half angle lies.

Example With θ=π/4\theta = \pi/4 we have cos⁡θ=2/2\cos\theta = \sqrt2/2, and since π/8\pi/8 lies in the first quadrant the sign is plus,

sin⁡π8=1−2/22=2−22≈0.3827.\begin{aligned} \sin\frac{\pi}{8} &= \sqrt{\frac{1 - \sqrt2/2}{2}} \\[0.4em] &= \frac{\sqrt{2 - \sqrt2}}{2} \approx 0.3827. \end{aligned}

With θ=5π/4\theta = 5\pi/4 we have cos⁡θ=−2/2\cos\theta = -\sqrt2/2, and the cosine formula gives the same root, 2−2/2\sqrt{2 - \sqrt2}/2. But 5π/85\pi/8 lies in the second quadrant, where cosine is negative, so cos⁡(5π/8)=−2−2/2≈−0.3827\cos(5\pi/8) = -\sqrt{2 - \sqrt2}/2 \approx -0.3827.

Integral of sine squared

Definition With angles in radians, the power-reducing identity and linearity give, on the whole real line,

∫sin⁡2x dx=x2−sin⁡2x4+C,∫cos⁡2x dx=x2+sin⁡2x4+C.\begin{gathered} \int \sin^2 x\,dx = \frac{x}{2} - \frac{\sin 2x}{4} + C, \\[0.4em] \int \cos^2 x\,dx = \frac{x}{2} + \frac{\sin 2x}{4} + C. \end{gathered}

The 14\tfrac14 combines the 12\tfrac12 in front of cos⁡2x\cos 2x in the identity with the 12\tfrac12 in the antiderivative 12sin⁡2x\tfrac12\sin 2x of cos⁡2x\cos 2x, which compensates for the inner derivative 22. Radians matter because the derivative of sin⁡x\sin x is cos⁡x\cos x only when xx is measured in radians.

In plain words Split the square into the constant 12\tfrac12 and the wave −12cos⁡2x-\tfrac12\cos 2x, integrate each piece, and keep both factors of 12\tfrac12 in the coefficient of the wave.

Example For the hump on [0,π][0, \pi],

∫0πsin⁡2x dx=[x2−sin⁡2x4]0π=π2−sin⁡2π4+sin⁡04=π2.\begin{aligned} \int_0^\pi \sin^2 x\,dx &= \Bigl[\frac{x}{2} - \frac{\sin 2x}{4}\Bigr]_0^\pi \\[0.4em] &= \frac{\pi}{2} - \frac{\sin 2\pi}{4} + \frac{\sin 0}{4} \\[0.4em] &= \frac{\pi}{2}. \end{aligned}

Both sine values are 00, so the wave contributes nothing and the area is π/2≈1.571\pi/2 \approx 1.571, the same as a rectangle of height 12\tfrac12 and width π\pi. In other words, the average value of sin⁡2x\sin^2 x on [0,π][0, \pi] is 12\tfrac12. Differentiating gives 12−12cos⁡2x=sin⁡2x\tfrac12 - \tfrac12\cos 2x = \sin^2 x, which checks the coefficient, the sign and the doubled angle at once. Since sin⁡2x≥0\sin^2 x \ge 0, the value π/2\pi/2 is an ordinary area. The function sin⁡(x2)\sin(x^2) is a different integrand, and its integral over [0,π][0, \pi] is about 0.7730.773.

Cancellation over a full period

Definition Let gg be continuous on the real line and periodic with period T>0T > 0, so g(x+T)=g(x)g(x + T) = g(x) for every xx. Then the integral of gg over an interval of length TT does not depend on where the interval starts, ∫aa+Tg(x) dx=∫0Tg(x) dx\int_a^{a+T} g(x)\,dx = \int_0^T g(x)\,dx for every real aa. For g(x)=cos⁡(kx)g(x) = \cos(kx) with k≠0k \ne 0 the period is 2π/∣k∣2\pi/\lvert k \rvert and that common value is 00,

∫aa+2π/∣k∣cos⁡(kx) dx=0.\int_a^{a + 2\pi/\lvert k \rvert} \cos(kx)\,dx = 0.

The same holds for sin⁡(kx)\sin(kx), and for any whole number of periods. Over an interval that is not a whole number of periods the integral may or may not be 00.

In plain words Over one full cycle a cosine wave encloses as much area above the axis as below it, so its signed contributions cancel. That is why the hump of sin⁡2x\sin^2 x on [0,π][0, \pi] has the same area as the flat height 12\tfrac12. The parts of the hump below 12\tfrac12 near the ends balance the part above 12\tfrac12 in the middle. The cancellation happens in the wave −12cos⁡2x-\tfrac12\cos 2x, which has signed parts, not in sin⁡2x\sin^2 x, which is never negative.

Example On [0,π][0, \pi] the doubled angle makes exactly one period, and

∫0πcos⁡2x dx=[sin⁡2x2]0π=0.\int_0^\pi \cos 2x\,dx = \Bigl[\frac{\sin 2x}{2}\Bigr]_0^\pi = 0.

On [0,π/2][0, \pi/2], half a period, the integral is also 00, because the positive part on [0,π/4][0, \pi/4] and the negative part on [π/4,π/2][\pi/4, \pi/2] happen to balance. On [0,π/4][0, \pi/4] there is nothing to balance the positive part, and ∫0π/4cos⁡2x dx=12sin⁡(π/2)=12\int_0^{\pi/4} \cos 2x\,dx = \tfrac12\sin(\pi/2) = \tfrac12. A full period is a reliable reason for cancellation, but it has to be checked for the bounds at hand.

Check yourself

  1. Evaluate the integral
∫0π/2cos⁡2x dx.\int_0^{\pi/2} \cos^2 x\,dx.
Show the answer

Use cos⁡2x=12+12cos⁡2x\cos^2 x = \tfrac12 + \tfrac12\cos 2x. Then

∫0π/2cos⁡2x dx=[x2+sin⁡2x4]0π/2=π4+sin⁡π4−0=π4.\begin{aligned} &\int_0^{\pi/2} \cos^2 x\,dx \\[0.4em] &\quad = \Bigl[\frac{x}{2} + \frac{\sin 2x}{4}\Bigr]_0^{\pi/2} \\[0.4em] &\quad = \frac{\pi}{4} + \frac{\sin\pi}{4} - 0 = \frac{\pi}{4}. \end{aligned}

The wave contributes nothing because sin⁡π=sin⁡0=0\sin\pi = \sin 0 = 0. As a check, sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1 means the integrals of sin⁡2x\sin^2 x and cos⁡2x\cos^2 x over [0,π/2][0, \pi/2] add to π/2\pi/2, and the same calculation gives π/4\pi/4 for each.

  1. Evaluate the integral below. A classmate answers π/6\pi/6, half the length of the interval. What did the classmate assume, and why does it fail here?
∫0π/3sin⁡2x dx\int_0^{\pi/3} \sin^2 x\,dx
Show the answer

The antiderivative gives

∫0π/3sin⁡2x dx=[x2−sin⁡2x4]0π/3=π6−38≈0.307,\begin{aligned} \int_0^{\pi/3} \sin^2 x\,dx &= \Bigl[\frac{x}{2} - \frac{\sin 2x}{4}\Bigr]_0^{\pi/3} \\[0.4em] &= \frac{\pi}{6} - \frac{\sqrt3}{8} \approx 0.307, \end{aligned}

because sin⁡(2π/3)=3/2\sin(2\pi/3) = \sqrt3/2. The classmate assumed that the wave −12cos⁡2x-\tfrac12\cos 2x cancels. As xx runs from 00 to π/3\pi/3, the doubled angle runs only from 00 to 2π/32\pi/3, a third of a period, and the wave leaves the contribution −3/8-\sqrt3/8. In general ∫0bsin⁡2x dx=b2−14sin⁡2b\int_0^b \sin^2 x\,dx = \tfrac{b}{2} - \tfrac14\sin 2b, which equals b/2b/2 exactly when bb is a whole-number multiple of π/2\pi/2. The smaller value also fits the graph, since the hump stays below 12\tfrac12 on [0,π/4][0, \pi/4], three quarters of this interval.

  1. Evaluate the integral below by applying the power-reducing identity twice. Is the answer the square of π/2\pi/2?
∫0πsin⁡4x dx\int_0^\pi \sin^4 x\,dx
Show the answer

Square the identity for sin⁡2x\sin^2 x, then use cos⁡22x=12+12cos⁡4x\cos^2 2x = \tfrac12 + \tfrac12\cos 4x,

sin⁡4x=(1−cos⁡2x2)2=14−cos⁡2x2+cos⁡22x4=38−cos⁡2x2+cos⁡4x8.\begin{aligned} \sin^4 x &= \Bigl(\frac{1 - \cos 2x}{2}\Bigr)^2 \\[0.4em] &= \frac14 - \frac{\cos 2x}{2} + \frac{\cos^2 2x}{4} \\[0.4em] &= \frac38 - \frac{\cos 2x}{2} + \frac{\cos 4x}{8}. \end{aligned}

On [0,π][0, \pi] the function cos⁡2x\cos 2x makes one full period and cos⁡4x\cos 4x makes two, so both integrate to 00, and

∫0πsin⁡4x dx=3π8≈1.178.\int_0^\pi \sin^4 x\,dx = \frac{3\pi}{8} \approx 1.178.

It is not (π/2)2≈2.467(\pi/2)^2 \approx 2.467. The integrand sin⁡4x\sin^4 x is the square of sin⁡2x\sin^2 x, but the integral of a square is not the square of the integral.

How this lesson connects

It also uses the Pythagorean identity and the double-angle formula for cosine.