From Example Problems
Jump to: navigation, search

Find the Fourier series for f(x)=1+x\, on [-\pi ,\pi ]\,

The general Fourier series on [-L,L]\, is:

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

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

b_{n}={\frac  {1}{L}}\int _{{-L}}^{L}f(x)\sin({\frac  {n\pi x}{L}})\,dx,\,\,\,n=1,2,3,...\,

The n=0 case is not needed since the integrand in the formula for b_{0}\, is \sin(0)\,.

In the present problem, a_{n}={\frac  {1}{\pi }}\int _{{-\pi }}^{\pi }(1+x)\cos({\frac  {n\pi x}{\pi }})\,dx={\frac  {1}{\pi }}\left(\left[{\frac  {(1+x)\sin(nx)}{n}}\right]_{{-\pi }}^{\pi }-\int _{{-\pi }}^{\pi }{\frac  {(1+x)\cos(nx)}{n^{2}}}\,dx\right)=0\,

But since the right hand side is not defined if n=0, the 0 index for a will have to be calculated seperately.

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

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

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

So the Fourier series is

f(x)=1+x\sim 1+\sum _{{n=1}}^{\infty }{\frac  {2(-1)^{{n+1}}}{n}}\sin(nx)\, for [-\pi ,\pi ]\,

Fourier Series

Main Page