FS1

From Example Problems
Jump to: navigation, search

Find the Fourier series for |x|\,, -\pi <x<\pi \,.

Following the rules from the link above,

f(x)={\frac  {a_{0}}{2}}+\sum _{{n=1}}^{\infty }(a_{n}\cos(nx)+b_{n}\sin(nx))\,

a_{0}={\frac  {1}{\pi }}\int _{{-\pi }}^{\pi }|x|\,dx={\frac  {2}{\pi }}\int _{0}^{\pi }x\,dx=\pi \,

a_{n}={\frac  {1}{\pi }}\int _{{-\pi }}^{\pi }|x|\cos(nx)\,dx={\frac  {2}{\pi }}\int _{0}^{\pi }x\cos(nx)\,dx\,

={\frac  {2}{\pi }}\left(\left[{\frac  {x\sin(nx)}{n}}\right]_{0}^{\pi }-\int _{0}^{\pi }{\frac  {\sin(nx)}{n}}\,dx\right)={\frac  {2}{\pi }}\left[{\frac  {\cos(nx)}{n^{2}}}\right]_{0}^{\pi }\,


={\frac  {2(-1)^{n}}{\pi n^{2}}}-{\frac  {2}{\pi n^{2}}}={\frac  {2((-1)^{n}-1)}{\pi n^{2}}}\,.

b_{n}={\frac  {1}{\pi }}\int _{{-\pi }}^{\pi }|x|\sin(nx)\,dx={\frac  {1}{\pi }}\int _{{-\pi }}^{{0}}-x\sin(nx)\,dx+{\frac  {1}{\pi }}\int _{{0}}^{{\pi }}x\sin(nx)\,dx\,

={\frac  {1}{\pi }}\left[\left[{\frac  {x\cos(nx)}{n}}\right]_{{-\pi }}^{0}-\int _{{-\pi }}^{0}{\frac  {\cos(nx)}{n}}\,dx\right]+{\frac  {1}{n}}\left[\left[{\frac  {-x\cos(nx)}{n}}\right]_{0}^{\pi }+\int _{0}^{\pi }{\frac  {\cos(nx)}{n}}\,dx\right]\,

={\frac  {1}{\pi }}\left[{\frac  {\pi (-1)^{n}}{n}}-\left[{\frac  {\sin(nx)}{n^{2}}}\right]_{{-\pi }}^{0}\right]+{\frac  {1}{\pi }}\left[{\frac  {-\pi (-1)^{n}}{n}}+\left[{\frac  {\sin(nx)}{n^{2}}}\right]_{0}^{\pi }\right]\,

={\frac  {1}{\pi }}{\frac  {\pi (-1)^{n}}{n}}+{\frac  {1}{\pi }}{\frac  {-\pi (-1)^{n}}{n}}=0\,.

So,

|x|={\frac  {\pi }{2}}+{\frac  {2}{\pi }}\sum _{{n=1}}^{\infty }{\frac  {(-1)^{n}-1}{n^{2}}}\cos(nx)={\frac  {\pi }{2}}+{\frac  {2}{\pi }}\sum _{{n=0}}^{\infty }{\frac  {-2}{(2n+1)^{2}}}\cos \left((2n+1)x\right)\,

={\frac  {\pi }{2}}-{\frac  {4}{\pi }}\left(\cos x+{\frac  {1}{9}}\cos(3x)+{\frac  {1}{25}}\cos(5x)+...\right)\,

Fourier Series

Main Page