Calculating coefficient of a Fourier Series: problem with an integral

52 Views Asked by At

I'm calculating coefficients of a Fourier Series. I'm seeing a solved problem and I don't understand the following equality

$\int_{0}^{\pi} \sin(x)\cos(nx) dx = \frac{1+(-1)^n}{1-n^2}$

I tried to compute the integral but I'm not getting there. Can someone give a hint on how to proceed. Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

HINT:

$$\sin(x)\cos(nx)=\frac{\sin((n+1)x)-\sin((n-1)x)}{2}$$