Graphical integration of \(\sin^2(x)\) and \(\cos^2(x)\)

Visualisation; beats using double angle formulas!

Here's a nice way of visualising the integration of \(\sin^2(x)\) and \(\cos^2(x)\) between \(\pi\) and \(2\pi\). Below the graphic is the algebraic version, which involves the use of double angle formulas. I don't like to condone "tricks" over understanding, but this is quite a nice demonstration I saw not long ago for speed of remembering!

Intergration of sin2(x) and cos2(x) using graphical visualisation.

...and now the slightly more gritty written solution

First use the double angle formula for \(\cos(2x)\) to express \(\sin^2(x)\) differently: \[\begin{align} \cos(2x)&=\cos^2(x)-\sin^2(x) \\[8pt] &=(1-\sin^2(x))-\sin^2(x) \\[8pt] &=1-2\sin^2(x) \\[8pt] 2\sin^2(x)&=1-\cos(2x) \\[8pt] \sin^2(x)&=\tfrac{1}{2}-\tfrac{1}{2}\cos(2x) \end{align}\] Then integrate using the substitution from above: \[\begin{align} &\int^{2\pi}_0 \sin^2(x)\,dx \\[12pt] &= \int^{2\pi}_0 \tfrac{1}{2}-\tfrac{1}{2}\cos(2x) \,dx \\[12pt] &= \left[\tfrac{1}{2}x-\tfrac{1}{4}\sin(2x)\right]^{2\pi}_0 \\[12pt] &= \left(\tfrac{1}{2}(2\pi)-\tfrac{1}{4}\sin(4\pi)\right)-\left(\tfrac{1}{2}(0)-\tfrac{1}{4}\sin(0)\right) \\[12pt] &= \pi \end{align}\]

Intergrating \(\cos^2(x)\) is equivalent, but you will need to substitute out the \(\sin^2(x)\) term instead on the second line. In case you didn't realise, this uses \(\sin^2(x)+\cos^2(x)=1\).