Q:

Construct the first three Fourier approximations to the square wave function:f(x) =-1 [-pi,0)1 [0,pi)

Accepted Solution

A:
Answer:

[tex]f(x)\approx \frac{4}{\pi} \sin(x)+0+\frac{4}{3\pi} \sin(3x)+...[/tex]

Step-by-step explanation:

The given square wave function is:

[tex]f(x)=\left \{ {{-1,-\pi \le x}\:<\:0 \atop {1,0\le x\:<\:\pi}} \right.[/tex].

The Fourier series approximation on the interval;

[tex][-\pi,\pi][/tex]

is given by;

[tex]f(x)\approx\frac{a_0}{2}+\sum_{n=1}^{\infty}(a_n \cos(nx)+b_n \sin(nx))[/tex]

where

[tex]a_0=\frac{1}{\pi}\int\limits^\pi_ {-\pi} {f(x)} \, dx[/tex]

We can see from the graph that, the square wave function is odd on the given interval.

This implies that;

[tex]a_0=\frac{1}{\pi}\int\limits^\pi_ {-\pi} {f(x)} \, dx=0[/tex]

[tex]a_n=\frac{1}{\pi}\int\limits^\pi_ {-\pi} {f(x) \cos(nx)} \, dx[/tex]

The product of an odd function and an even function gives an odd function.

This implies that;

[tex]a_n=\frac{1}{\pi}\int\limits^\pi_ {-\pi} {f(x) \cos(nx)} \, dx=0[/tex]

Also,

[tex]b_n=\frac{1}{\pi}\int\limits^\pi_ {-\pi} {f(x) \sin(nx)} \, dx[/tex]

[tex]b_n=\frac{2}{\pi}\int\limits^\pi_ {0} {1\bullet\sin(nx)} \, dx[/tex]

[tex]b_n=-\frac{2}{\pi}[\frac{1}{n}\cos(nx)]_{0}^{\pi}[/tex]

[tex]b_n=-\frac{2}{n\pi} (\cos(n\pi)-1)[/tex]

[tex]b_n=-\frac{2}{n\pi}((-1)^n-1)[/tex]

We substitute these values into the above formula to get;

[tex]f(x)\approx -\frac{2}{\pi}\sum_{n=1}^{\infty} [\frac{(-1)^n-1}{n}] \sin(nx)[/tex]

To construct the first three Fourier approximation we substitute

[tex]n=1,2,3[/tex]

The first three approximations are;

[tex]f(x)\approx \frac{4}{\pi} \sin(x)+0+\frac{4}{3\pi} \sin(3x)+...[/tex]