How do you integrate:
sin(x)sin(nx)dx between Pi and Pi/2 when n doesnt equal 1
by parts doesnt work does it?
any help would be great
Remember that:
$\displaystyle \cos(A+B) = \cos(A)\cos(B) - \sin(A)\sin(B) $ (1)
$\displaystyle \cos(A-B) = \cos(A)\cos(B) + \sin(A)\sin(B) $ (2)
Now (2)-(1) gives:
$\displaystyle \cos(A-B) - \cos(A+B) = 2\sin(A)\sin(B) $
Hence:
$\displaystyle \sin(A)\sin(B) = \frac{ \cos(A-B) - \cos(A+B)}{2} $
Which means
$\displaystyle \sin(x)\sin(nx) = \frac{ \cos(x - nx) - \cos(x+nx)}{2} = \frac{ \cos(x(1-n)) - \cos(x(1+n))}{2} $
So your integral becomes
$\displaystyle \int_{\frac{\pi}{2}}^{\pi} \frac{ \cos(x(1-n)) - \cos(x(1+n))}{2}\,dx = \frac{1}{2} \int_{\frac{\pi}{2}}^{\pi} \cos(x(1-n))\,dx - \frac{1}{2}\int_{\frac{\pi}{2}}^{\pi} \cos(x(1+n)) \,dx$
Which should be fairly simple if you remember that $\displaystyle \int \cos(kx) \,dx = \frac{\sin(kx)}{k} + C $