# Math Help - Definite integral

1. ## Definite integral

Find

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

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

My working:

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

$=\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]$

$=\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]$

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

$=\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)$

$=\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}]$

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

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

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

2. ## Re: Definite integral

Originally Posted by alexmahone
$=\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}]$

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

$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:

$\frac{1}{\pi} \left[ \int_{-\pi}^0 (\pi+t) \sin(nt) dt + \int_0^\pi (\pi-t) \sin(nt) dt \right]$
$= \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]$
$= 0 + \frac{1}{\pi} \left[ \int_0^\pi t \sin(nt) dt - \int_0^\pi t \sin(nt) dt \right]$
$= 0$