How to calculate $\int_0^\pi x\,\cos^4x\, dx$ Assume that $$\int_{0}^\pi x\,f(\sin(x))dx=\frac{\pi}2 \int_{0}^\pi f(\sin(x))dx$$
and use it to calculate $$\int_{0}^\pi x\,\cos^{4}(x)\, dx$$
Can anyone help me with that? I proved the identity but I am stuck with the rest.
 A: $$I = \int_{0}^{\pi} x \cos ^4 (x) = \int^{\pi}_{0}(\pi-x) \cos^4(\pi-x) = \int^{\pi}_{0}(\pi-x) \cos^4(x)$$
Thus $$I = \frac{\pi}{2}\int_0^{\pi} \cos^4(x)$$
I hope you can handle this
A: 
Answer: We get $$ \color{red}{\int_{0}^\pi x\,cos^4x\, dx =\frac{3\pi^2}{16} }$$

We know that , $$\int_a^bf(x)dx = \int_a^bf(a+b-x)dx $$
Taking $a=0$ $b=\pi$ we have 
$$\color{blue}{\int_{0}^\pi x\,cos^4x\, dx =\int_{0}^\pi (\pi-x)\,cos^4x\, dx}$$
that is $$\int_{0}^\pi x\,cos^4x\, dx =\frac\pi2\int_{0}^\pi \,cos^4x\, dx = \frac\pi2\int_{0}^{\pi/2} \,cos^4x\, dx+\frac\pi2\int_{\pi/2}^\pi \,cos^4x\, dx \\=\pi \int^{\pi/2}_0 \,cos^{2*\frac52-1}(x) \sin^{2*\frac12-1}(x) =\frac\pi2B\left(\frac52,\frac12\right)$$
Where we used the definition of Beta Function and Gamma function.
Finaly, $$\int_{0}^\pi x\,cos^4x\, dx =\frac\pi2B\left(\frac52,\frac12\right)=\frac\pi2\frac{\Gamma(\frac52)\Gamma(\frac12)}{\Gamma(\frac52+\frac12)} =\frac\pi4\Gamma(\frac52)\Gamma(\frac12).$$
Since $\Gamma(3)= 2$ and $\Gamma(\frac12)=\sqrt\pi$ and $$\Gamma(\frac52)=\Gamma(1+\frac32) = \frac32\Gamma(\frac32)=\frac32\frac12\Gamma(\frac12)=\frac34\sqrt\pi$$ 
We get $$ \color{red}{\int_{0}^\pi x\,cos^4x\, dx =\frac{3\pi^2}{16} }$$
A: To compute $\displaystyle{\int{\cos^{4}(x)}\,dx}$ use the identity:
$$ \cos(2x)=\cos^{2}(x)-\sin^{2}(x)=2\cos^{2}(x)-1 $$
and isolate from there $\ \cos^{2}(x)$ as:
$$\cos^{2}(x)=\frac{\cos(2x)+1}{2}$$ then
$$ \int{\cos^{4}(x)}\,dx=\int{\big(\cos^{2}(x)}\big)^{2}\,dx=\int{\bigg(\frac{\cos(2x)+1}{2}\bigg)^{2}}\,dx$$
$$=\frac{1}{4}\int{\left(\cos^{2}(2x)+2\cos(2x)+1\right)}\,dx $$
and use again the identity above to write $\ \cos^{2}(2x)$ as:
$$ \cos^{2}(2x)=\frac{\cos(4x)+1}{2}.$$
A: A simple way is to exploit Fourier (cosine) series. It is well-known (and not difficult to prove) that over the interval $(-\pi,\pi)$ we have
$$ |x| = \frac{\pi}{2}-\frac{4}{\pi}\sum_{n\geq 0}\frac{\cos((2n+1) x)}{(2n+1)^2}\tag{A} $$
(This identity can be used for proving Weierstrass approximation theorem, see page 33 of my notes)
and by De Moivre's formula we have
$$ \cos^4(x) = \frac{3}{8}+\frac{1}{2}\cos(2x)+\frac{1}{8}\cos(4x).\tag{B}$$
We may immediately notice that $|x|$ and $\cos^4(x)$, except for the coefficients associated with their mean values, are orthogonal over $(-\pi,\pi)$. In particular:
$$ \int_{0}^{\pi}x\cos(x)^4\,dx = \frac{1}{2}\int_{-\pi}^{\pi}|x|\cos(x)^4\,dx = \frac{1}{2}\cdot 2\pi\cdot\frac{\pi}{2}\cdot\frac{3}{8}=\color{red}{\frac{3\pi^2}{16}}\tag{C}$$
nice and easy.
A: With different approach. First note:
\begin{align}
I=\int_0^\pi \cos^4(x) dx = 2 \int_0^{\pi/2} \cos^4(x)dx
\end{align}
Substitute $z=\tan(x)$ so that $\cos^4(x)= \frac{1}{(1+z^2)^2}$ and $dx=\frac{dz}{1+z^2}$. So we get:
\begin{align}
I=2\int^\infty_0 \frac{1}{(1+z^2)^3}dz = \int_{-\infty}^\infty \frac{1}{(1+z^2)^3} dz
\end{align}
Use a semi circle contour in the upperhalf plane and by the Residue Theorem we get:
\begin{align}
I= 2\pi i\text{Res}_{z=i} \frac{1}{(1+z^2)^3} = 2\pi i \cdot \left( -i\frac{3}{16} \right) = \frac{3\pi}{8}
\end{align}
Finally use the formula you stated and get:
\begin{align}
\int^\pi_0 x\cos^4(x)dx = \frac{\pi}{2} I =\frac{3\pi^2}{16}
\end{align}
A: To use the result you were given in the question, write the integral as
\begin{align*}
\int^\pi_0 x \cos^4 x \, dx &= \int^\pi_0 x(\cos^2 x)^2 \, dx\\
&= \int^\pi_0 x (1 - \sin^2 x)^2 \, dx\\
&= \int^\pi_0 x (1 - 2 \sin^2 x + \sin^4 x) \, dx.
\end{align*}
Now on applying the result
$$\int^\pi_0 x f(\sin x) \, dx = \frac{\pi}{2} \int^\pi_0 f(\sin x) \, dx,$$
this reduces the integral to
$$\int^\pi_0 x \cos^4 x \, dx = \frac{\pi}{2} \int^\pi_0 (1 - 2 \sin^2 x + \sin^4 x) \, dx = \frac{\pi}{2} \int^\pi_0 \cos^4 x \, dx.$$
