# Math Help - Integration by parts help

1. ## Integration by parts help

Hi all,

Can anybody show me how to get to this point I have tried a million different ways and don't know how it is done????

$
\frac{\pi}{2} \int_{0}^\pi x(\pi-x)\sin(nx) dx =
\frac{4}{n^3 \pi} [1-(-1)^n]
$

any help will be very greatly appreciated

2. Originally Posted by davefulton
Hi all,

Can anybody show me how to get to this point I have tried a million different ways and don't know how it is done????

$
\frac{\pi}{2} \int_{0}^\pi x(\pi-x)\sin(nx) dx =
\frac{4}{n^3 \pi} [1-(-1)^n]
$

any help will be very greatly appreciated
$\int x(\pi -x)\sin (nx)\cdot dx$

let v=x(\pi -x ) and du =sin(nx) , dv=(\pi -x ) -x .. u =-cos(nx)/n

$\int x(\pi -x)\sin (nx)\cdot dx =x(\pi -x )\left(\frac{-\cos nx}{n}\right) + \int ((\pi -x ) -x)\frac{\cos nx}{n} \cdot dx$

$\int x(\pi -x)\sin (nx)\cdot dx =x(\pi -x )\left(\frac{-\cos nx}{n}\right) + \int (\pi-x)\frac{\cos nx}{n} \cdot dx - \int x \frac{\cos nx}{n} \cdot dx$

the two integrals have the same idea by parts

let v=(\pi -x) and du=cos(nx) ...dv=-1 u=sin(nx)/n in the first integral
let v=x and du=cos(nx) ....dv=1 u=sin(nx)/n in the second integral