1. ## Definite integral

Find

$\displaystyle \frac{1}{\pi}\left[\int_{-\pi}^0(\pi+t)\sin ntdt+\int_0^\pi(\pi-t)\sin ntdt\right]$

for $\displaystyle n=1, 2, 3,\ldots$.

My working:

$\displaystyle =\frac{1}{\pi}\left[\int_{-\pi}^0(\pi+t)\sin ntdt+\int_0^\pi(\pi-t)\sin ntdt\right]$

$\displaystyle =\frac{1}{\pi}\left[\left.\left(-\frac{\pi}{n}\cos nt\right)\right|_{-\pi}^0+\int_{-\pi}^0 t\sin ntdt+\left.\left(-\frac{\pi}{n}\cos nt\right)\right|_0^\pi-\int_0^\pi t\sin ntdt\right]$

$\displaystyle =\frac{1}{\pi}\left[-\frac{\pi}{n}\{1-(-1)^n\}+\int_{-\pi}^0 t\sin ntdt-\frac{\pi}{n}\{(-1)^n-1\}-\int_0^\pi t\sin ntdt\right]$

$\displaystyle =\frac{1}{\pi}\left[\int_{-\pi}^0 t\sin ntdt-\int_0^\pi t\sin ntdt\right]$

$\displaystyle =\frac{1}{n^2\pi}\left[\int_{-n\pi}^0u\sin udu-\int_0^{n\pi} u\sin udu\right]\hspace{5 mm}\left(u=nt, t=\frac{u}{n}\right)$

$\displaystyle =\frac{1}{n^2\pi}[\left.(\sin u-u\cos u)\right|_{-n\pi}^0-\left.(\sin u-u\cos u)\right|_0^{n\pi}]$

$\displaystyle =\frac{1}{n^2\pi}[n\pi(-1)^n+n\pi(-1)^n]$

$\displaystyle =\frac{2(-1)^n}{n}$

However, the answer given in the book is $\displaystyle 0$. Where have I gone wrong?

2. ## Re: Definite integral

Originally Posted by alexmahone
$\displaystyle =\frac{1}{n^2\pi}[\left.(\sin u-u\cos u)\right|_{-n\pi}^0-\left.(\sin u-u\cos u)\right|_0^{n\pi}]$

$\displaystyle =\frac{1}{n^2\pi}[n\pi(-1)^n+n\pi(-1)^n]$
It should be:

$\displaystyle 0-(-(-n\pi)\cos(-n\pi)) = -n\pi(-1)^n$

3. ## Re: Definite integral

I suggest that, instead of actually computing the integral, you exploit the symmetries. That's much faster and less error-prone:

$\displaystyle \frac{1}{\pi} \left[ \int_{-\pi}^0 (\pi+t) \sin(nt) dt + \int_0^\pi (\pi-t) \sin(nt) dt \right]$
$\displaystyle = \int_{-\pi}^\pi \sin(nt) dt + \frac{1}{\pi} \left[ \int_{-\pi}^0 t \sin(nt) dt - \int_0^\pi t \sin(nt) dt \right]$
$\displaystyle = 0 + \frac{1}{\pi} \left[ \int_0^\pi t \sin(nt) dt - \int_0^\pi t \sin(nt) dt \right]$
$\displaystyle = 0$