Find $\displaystyle \int_{0}^{\pi }{x\cos ^{2}x\,dx}.$
It seems pretty trivial, but find a quick solution.
Ok I owe it at least that much...
$\displaystyle \cos(x)^2=\frac{1+\cos(2x)}{2}\therefore{x\cos(x)^ 2=x\bigg(\frac{1+\cos(2x)}{2}\bigg)}=\frac{x}{2}+\ frac{x\cos(2x)}{2}$
Now using integration by parts on the second and standard techniques on the first we obtain the antiderivative
O...and just because I know you love it
$\displaystyle \frac{x}{2}+\frac{x\cos(2x)}{2}=\frac{x}{2}+\sum_{ n=0}^{\infty}\frac{(-1)^{n}2^{2n}x^{2n+1}}{(2n)!}$
Integrating we get
$\displaystyle \int{x\cos(x)^2}dx=\frac{x^2}{4}+\sum_{n=0}^{\inft y}\frac{(-1)^{n}2^{2n}x^{2n+2}}{(2n+2)(2n)!}+C$
That was obviously a stupid joke^...me attempting to be funny
Let: $\displaystyle
u = \pi - x
$
Then: $\displaystyle
I = \int_0^\pi {x \cdot \cos ^2 \left( x \right) \cdot dx} = \int_0^\pi {\left( {\pi - u} \right) \cdot \cos ^2 \left( u \right)du}
$
Summing the expressions above : $\displaystyle
I = \left( {\tfrac{\pi }
{2}} \right) \cdot \int_0^\pi {\cos ^2 \left( x \right) \cdot dx}
$
And: $\displaystyle
\int_0^\pi {\cos ^2 \left( x \right) \cdot dx} = \int_0^\pi {\tfrac{{1 + \cos \left( {2x} \right)}}
{2} \cdot dx} = \tfrac{\pi }
{2}
$
Thus: $\displaystyle
I = {\tfrac{\pi^2 }
{4}}
$
I got confused with the method shown. here's another:
note that $\displaystyle \int_0^\pi \cos^2 x ~dx = \int_0^\pi \sin^2 x ~dx$
Thus, $\displaystyle \int_0^\pi x \cos^2 x ~dx = \frac 12 \left[ \int_0^\pi x \sin^2 x ~dx + \int_0^\pi x \cos^2 x~dx \right]$
$\displaystyle = \frac 12 \left[ \int_0^\pi x ~dx\right]$
$\displaystyle = \frac 12 \cdot \frac {x^2}2 \bigg|_0^\pi$
$\displaystyle = \frac {\pi^2}4$
Hi
What conditions have to be respected so that one can say "if $\displaystyle \int_a^b f(x)\,\mathrm{d}x = \int_a^b g(x)\,\mathrm{d}x$ then $\displaystyle \int_a^b f(x)\cdot h(x)\,\mathrm{d}x=\int_a^b g(x)\cdot h(x)\,\mathrm{d}x$" ?
I ask this question because there are some cases in which it does not work. For example :
$\displaystyle \int_0^{2\pi} \sin x\,\mathrm{d}x= \int_0^{2\pi}\cos x\,\mathrm{d}x=0$ but $\displaystyle \int_0^{2\pi} \sin^2x\,\mathrm{d}x=\pi$ and $\displaystyle \int_0^{2\pi} \cos x \cdot \sin x\,\mathrm{d}x=\left[\frac{sin^2x}{2}\right]_0^{2\pi}=0\neq \pi$
Here's my solution:
Let $\displaystyle \lambda =\int_{0}^{\pi }{x\cos ^{2}x\,dx}.$ Substitute $\displaystyle x\to x-\frac{\pi }{2}\implies \lambda =\pi \int_{0}^{\pi /2}{\sin ^{2}x\,dx}.$ In general $\displaystyle \int_{0}^{\pi /2}{f(\sin x)\,dx}=\int_{0}^{\pi /2}{f(\cos x)\,dx},$ hence $\displaystyle \lambda =\frac{\pi ^{2}}{4}.$