# Math Help - inegral with 2 sine fcns

1. ## inegral with 2 sine fcns

Hello! I am trying to expand the function $f(x)=sin|x|$ as Fourier series on the interval $|x|<\pi$
Since the function is even we can write
$a_{n}=\frac{2}{\pi}\int_{0}^{\pi}sinxcosnxdx$

but here my problem starts. I try to solve this integral as indefinite integral first but I am going in circles....

$\int sinxcosnxdx=\{u=cosnx,\ dv=sinx\}=\

-cosxcosnx-\frac{1}{n}\int sinnxcosxdx=\{u=sinnx,\ dv=cosx\}=

-cosxcosnx-\frac{1}{n}[sinnxsinx-\frac{1}{n}\int cosnxcosx]=.......$

Could someone show me how to compute this integral?

2. ## Re: inegral with 2 sine fcns

$\sin x \cos nx = 1/2\,\sin \left( x+nx \right) -1/2\,\sin \left( -x+nx \right)$