# Definite integral $\int_{-\pi/2}^{\pi/2}\cos^{2}\left(\theta\right)\,{\rm d}{\theta}$

Please help me to evaluate definite integral $$\int_{^{-\pi}/_2}^{^\pi/_2}\cos^{2}\left(\theta\right)\,{\rm d}{\theta}$$ Also there was a hint: Use the double angle formula $\cos\left(2x\right)=2\cos^{2}\left(x\right) - 1$.

I know how to do an integral, but I don't know how to evaluate it with this hint. Please help me.

• If $\cos 2x = 2\cos^2 x-1$, what is $\cos^2 x$ equal to? Try making this substitution in the integral and see if that helps. – rogerl Jul 27 '14 at 18:59
• The hint is to help you rewrite $\cos^2\theta$ in terms of $\cos 2\theta$ – MPW Jul 27 '14 at 19:02
• – Lucian Jul 27 '14 at 19:14
• oh, now i remember, 5 years after math lessons, forgot all i've learned. – aine Jul 27 '14 at 19:15
• @aine : Maybe you're too quick to "accept" an answer and run away. The question has more interesting answers than the one you "accepted". – Michael Hardy Jul 27 '14 at 19:33

From the hint, $\cos^2 x= \frac{1}{2}(\cos 2x+1)$ so our integral becomes $$\int_{-\pi/2}^{\pi/2} \frac{1}{2}(\cos 2x+1)dx= \left. \left (\frac{1}{4}\sin 2x+\frac{1}{2}x \right ) \right |_{-\pi/2}^{\pi/2}=\pi/2$$

• great, thanks for detailed explanation. – aine Jul 27 '14 at 19:16
• Not the slickest was to do it. You don't need antiderivatives at all to evaluate this integral. – Michael Hardy Jul 27 '14 at 19:32

Note that $$\int_{- \pi /2}^{\pi / 2} \cos^2 \theta d \theta= \int_{- \pi /2}^{\pi / 2} \sin^2 \theta d \theta \$$ and that $$\pi = \int_{- \pi /2}^{\pi / 2} 1 d \theta = \int_{- \pi /2}^{\pi / 2} (\cos^2 \theta +\sin^2 \theta) d \theta = 2 \int_{- \pi /2}^{\pi / 2} \cos^2 \theta d \theta$$ hence $$\int_{- \pi /2}^{\pi / 2} \cos^2 \theta d \theta= \frac{\pi}{2}$$

$$\int_{-\pi/2}^{\pi/2} \cos^2\theta\,d\theta + \int_{-\pi/2}^{\pi/2} \sin^2\theta\,d\theta = \int_{-\pi/2}^{\pi/2} 1\,d\theta=\pi.$$ If you can show the two integrals are equal, then they each have to be $\pi/2$.

But they have to be equal since the graph of $\sin^2$ has the same size and shape as that of $\cos^2$ and the interval from $-\pi/2$ to $\pi/2$ is a full period.

• yeah thats nice, thank you very much, i'll know that for future, but i need to use the hint in the task...but i could have some interesting discussion with my teacher ;) – aine Jul 27 '14 at 19:42
• I love this. __ – Kaj Hansen Jul 27 '14 at 21:46

Here's yet another way: \begin{align} & \int \cos^2\theta\,d\theta = \int(\cos\theta) \Big(\cos\theta\,d\theta\Big) = \int u\,dv = uv-\int v\,du \\[10pt] = {} & -\cos\theta\sin\theta -\int(\sin\theta)\, \Big( -\sin\theta\, d\theta\Big) \\[10pt] = {} & -\cos\theta\sin\theta + \int \sin^2\theta\,d\theta = -\cos^2\theta + \int(1-\cos^2\theta)\,d\theta \\[10pt] = {} & -\cos\theta\sin\theta + \theta -\int\cos^2\theta\,d\theta. \end{align} So we have shown that $$\int \cos^2\theta\,d\theta = -\cos\theta\sin\theta + \theta -\int\cos^2\theta\,d\theta.$$ Now add the same thing to both sides: \begin{align} & \phantom{{}+{}}\int \cos^2\theta\,d\theta = -\cos\theta\sin\theta + \theta -\int\cos^2\theta\,d\theta. \\[12pt] & {} + \int \cos^2\theta\,d\theta \phantom{{}= -\cos\theta\sin\theta + \theta }{} + \int\cos^2\theta\,d\theta \\[15pt] & \phantom{+{}}2\int\cos^2\theta\,d\theta = -\cos\theta\sin\theta + \theta + \text{constant} \end{align} and then divide both sides by $2$.

• Vaguely reminds me of this thread: math.stackexchange.com/questions/798215/… – Kaj Hansen Jul 27 '14 at 21:47
• @KajHansen : I don't think this argument fits into that thread. This argument is straightforward and not more involved than the other ones that establish this result. – Michael Hardy Jul 28 '14 at 13:22

If you look at the plot of $y=\cos^2x$, you will notice that the curve is perfectly symmetric around $y=\frac12$ and has period $\pi$, as confirmed by $\cos^2x=\frac12\cos2x+\frac12$.

For this reason, the average value over a period is $\frac12$, and the area under the curve is $\frac\pi2$.