FS4

From Example Problems
Jump to: navigation, search

Find the Fourier series for f(x)={\begin{cases}1&-1\leq x<0\\{\frac  {1}{2}}&x=0\\x&0<x\leq 1\end{cases}} on [-1,1]\,

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,...\,

In the present problem,

  • a_{n}=\int _{{-1}}^{1}f(x)\cos(n\pi x)\,dx=\int _{{-1}}^{0}f(x)\cos(n\pi x)\,dx+\int _{0}^{1}f(x)\cos(n\pi x)\,dx\,

=\int _{{-1}}^{0}\cos(n\pi x)\,dx+\int _{0}^{1}x\cos(n\pi x)\,dx\,

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

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

  • a_{0}=\int _{{-1}}^{1}f(x)\,dx=\int _{{-1}}^{0}f(x)\,dx+\int _{0}^{1}f(x)\,dx\,

=\int _{{-1}}^{0}\,dx+\int _{0}^{1}x\,dx={\frac  {3}{2}}\,

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

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

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

=-\,{\frac  {1}{n\pi }}\,

So the Fourier series is:

f(x)={\frac  {3}{4}}+\sum _{{n=1}}^{\infty }{\frac  {(-1)^{n}-1}{n^{2}\pi ^{2}}}\cos(n\pi x)-{\frac  {1}{n\pi }}\sin(n\pi x)\,

Setting x=0 gives {\frac  {\pi ^{2}}{8}}=1+{\frac  {1}{3^{2}}}+{\frac  {1}{5^{2}}}+{\frac  {1}{7^{2}}}+...\,


Fourier Series

Main Page