Integral of $\int_0^{ \pi/2} \cos^2 x \, dx$
Matthew Barrera
This seems really simple but I can't get it $$\int_0^{ \pi/2} \cos^2 x \,dx$$
$u = \cos^ 2 x$, $du = -2 \cos x \sin x$
$dv = dx$, $v = x$
$$x \cos x + 2 \int x \cos x \sin x$$
$t = \sin x$, $dt = \cos x dx$
$$2\int x \cos x t \, dt/ \cos x$$
$$2\int xt \, dt$$
$$2\int xt \, dt$$
This is where I am stuck and I do not know what to do. I guess I can do the integration by parts again but it doesnt seem to help. I do not know if it is legal to work with two variables like that.
$\endgroup$ 64 Answers
$\begingroup$This is one of those tricks to file away in your head (and no, you don't want 2 variables floating around in an integral like that). Utilize $$\cos^2 x = \frac{1}{2} + \frac{\cos (2x)}{2},$$ which is the standard half (or double?) angle formula from trig. After this initial substitution, you should be able to integrate.
$\endgroup$ 3 $\begingroup$You really don't need an antiderivative for this one if you use a simpler way to do it. Notice that$$ \int_0^{\pi/2} \cos^2 x\,dx $$must be the same as$$ \int_0^{\pi/2} \sin^2 x\,dx $$because both graphs have the same size and shape; one of them is a mirror-image of the other, with the "mirror" at $x=\pi/4$.
Then notice that
\begin{align} & \int_0^{\pi/2} \cos^2 x\,dx + \int_0^{\pi/2} \sin^2 x\,dx \\[8pt] = {} & \int_0^{\pi/2} \left(\cos^2 x + \sin^2 x\right)\,dx \\[8pt] = {} & \int_0^{\pi/2} 1\,dx = \frac\pi 2. \end{align}
Therefore either integral separately is $\pi/4$.
$\endgroup$ 8 $\begingroup$Try the reduction formula I showed in the answer to your question.
$\endgroup$ $\begingroup$An overkill. Since the Beta function can be written as $$\int_{0}^{\pi/2}\sin^{m}\left(x\right)\cos^{n}\left(x\right)dx=\frac{B\left(\frac{n+1}{2},\frac{m+1}{2}\right)}{2}$$ we have $$\int_{0}^{\pi/2}\cos^{2}\left(x\right)dx=\frac{B\left(\frac{1}{2},\frac{3}{2}\right)}{2}=\frac{\Gamma\left(\frac{1}{2}\right)\Gamma\left(\frac{3}{2}\right)}{2\Gamma\left(2\right)}=\color{red}{\frac{\pi}{4}}.$$
$\endgroup$ 1