Find the Fourier series for the function:

24 Views Asked by At

Function $f(x)=\frac{ \pi -x }{ 2 }$$,x $$\ \in \left( - \pi, \pi \right)$

As I understand the formula looks like this: $$\boldsymbol{ƒ}(x) \sim \frac{ a_{0} }{ 2 }+\sum\limits_{n=1}^{ \infty }\left( a_{n} \cos{nx}+b_{n}\sin{nx} \right)$$

All three necessary coefficients look like this:

1)$$a_{0} = \frac{ 1 }{ \pi } \int\limits_{- \pi }^{ \pi }ƒ(x)$$ 2)$$a_{n} = \frac{ 1 }{ \pi } \int\limits_{- \pi }^{ \pi }ƒ(x)\cos{nx} dx$$ 3)$$b_{n} = \frac{ 1 }{ \pi } \int\limits_{- \pi }^{ \pi }ƒ(x)\sin{nx} dx$$

I solved:

$a_{0} = \pi$, $a_{n} = \frac{ \sin{ \pi n} }{ n }$, $b_{n} = \frac{ \pi n \cos{ \pi n} - \sin{ \pi n} }{ \pi n^{2} }$

Were $a_{n}$ and $b_{n}$ found correctly? If not how to solve this correctly, If it's not hard can you please provide whole step-by-step solution.