User:Egm4313.s12.team11.arrieta/Report 6

Problem R6.2
Solved by Francisco Arrieta

Problem Statement
Find the Fourier series expansion for $$ f(x) \!$$ on p. 9.8 as follows:

Part 1
Develop the Fourier series expansion of $$ f(\bar x) \!$$

Plot $$ f(\bar x) \!$$ and the truncated Fourier series $$ f_n(\bar x) \!$$

$$ f_n(\bar x):=\bar a_0 +\sum_{k=1}^{n}[\bar a_k\cos k \omega \bar x+\bar b_k\sin k \omega \bar x] \!$$

for n=0,1,2,4,8. Observe the values of $$ f_n(\bar x) \!$$ at the points of discontinuities, and the Gibbs phenomenon. Transform the variable so to obtain the Fourier series expansion of $$ f(x) \!$$

Solution

 * $$ p=2L=4 \!$$


 * $$ L=2 \!$$


 * $$ \omega =\frac{2\pi}{p} \!$$

$$ \bar a_0=\frac{1}{2L}\int_{-L}^{L}f(\bar x)d\bar x \!$$


 * $$ \bar a_0=\frac{1}{4}\int_{-2}^{2}f(\bar x)d\bar x \!$$


 * $$ \bar a_0=\frac{A}{2} \!$$

$$ \bar a_k=\frac{1}{L}\int_{-L}^{L}f(\bar x)\cos k\omega \bar xd\bar x \!$$


 * $$ \bar a_k=\frac{1}{2}\int_{-2}^{2}f(\bar x)\cos \frac{k\pi \bar x}{2}d\bar x \!$$


 * $$ \bar a_k=\frac{2A}{k\pi}\sin \frac{k\pi}{2} \!$$

Note:

If k is even $$ \bar a_k=0 \!$$

If k=1, 5, 9... $$ \bar a_k=\frac{2A}{k\pi} \!$$

If k=3, 7, 11... $$ \bar a_k=\frac{-2A}{k\pi} \!$$

$$ \bar b_k=\frac{1}{L}\int_{-L}^{L}f(\bar x)\sin k\omega \bar xd\bar x \!$$

Note:

$$ \bar b_k=0 \!$$ for n=1, 2...

Then Fourier series becomes a Fourier cosine series:

$$ f_k(\bar x)=\frac{A}{2}+\sum_{k=1}^{n}(\frac{2A}{k\pi}\cos \frac{k\pi}{2}\bar x)\!$$

For n=0

$$ f_k(\bar x)=\frac{A}{2}\!$$

For n=1

$$ f_k(\bar x)=\frac{A}{2}+(\frac{2A}{\pi}\cos \frac{\pi}{2}\bar x)\!$$

For n=5

$$ f_k(\bar x)=\frac{A}{2}+\frac{2A}{\pi}(\cos \frac{\pi}{2}\bar x-\frac{1}{3}\cos \frac{3\pi}{2}\bar x+\frac{1}{5}\cos \frac{5\pi}{2}\bar x)\!$$



After transforming the variable of $$ f(\bar x) \!$$

$$ f_k(x)=\frac{A}{2}+\sum_{k=1}^{n}(\frac{2A}{k\pi}\cos \frac{k\pi}{2}(x-1.25))\!$$

Part 2
Do the same as above, but using $$ f(\tilde x) \!$$ to obtain the Fourier expansion of $$ f(x) \!$$ ; compare to the result obtained above

Solution

 * $$ p=2L=4 \!$$


 * $$ L=2 \!$$


 * $$ \omega =\frac{2\pi}{p} \!$$

$$ \tilde a_0=\frac{1}{2L}\int_{0}^{2L}f(\tilde x)d\tilde x \!$$


 * $$ \tilde a_0=\frac{1}{4}\int_{0}^{4}f(\tilde x)d\tilde x \!$$


 * $$ \tilde a_0=\frac{A}{2} \!$$

$$ \tilde a_k=\frac{1}{L}\int_{0}^{2L}f(\tilde x)\cos k \omega \tilde x d\tilde x \!$$


 * $$ \tilde a_k=\frac{1}{2}\int_{0}^{4}f(\tilde x)\cos k \omega \tilde x d\tilde x \!$$


 * $$ \tilde a_k=\frac{A}{k\pi}\sin \pi k \!$$

Note:

$$ \bar b_k=0 \!$$ for n=1, 2..

$$ \tilde b_k=\frac{1}{L}\int_{0}^{2L}f(\tilde x)\sin k \omega \tilde x d\tilde x \!$$


 * $$ \tilde b_k=\frac{1}{2}\int_{0}^{4}f(\tilde x)\sin k \frac{\pi}{2} \tilde x d\tilde x \!$$


 * $$ \tilde b_k=\frac{-A}{\pi k}(\cos \pi k -1) \!$$

Note:

If k is even $$ \bar a_k=0 \!$$

If k=1, 3, 5... $$ \bar a_k=\frac{2A}{k\pi} \!$$

Then Fourier series becomes a Fourier sine series:

$$ f_k(\tilde x)=\frac{A}{2}+\sum_{k=1}^{n}(\frac{2A}{k\pi}\sin \frac{k\pi}{2}\tilde x)\!$$

For n=0:

$$ f_k(\tilde x)=\frac{A}{2}\!$$

For n=1:

$$ f_k(\tilde x)=\frac{A}{2}+(\frac{2A}{\pi}\sin \frac{\pi}{2}\tilde x) \!$$

For n=5:

$$ f_k(\tilde x)=\frac{A}{2}+\frac{2A}{\pi}(\sin \frac{\pi}{2}\tilde x+\frac{1}{3}\sin \frac{3\pi}{2}\tilde x+\frac{1}{5}\sin \frac{5\pi}{2}\tilde x) \!$$

After transforming the variable of $$ f(\bar x) \!$$

$$ f_k(x)=\frac{A}{2}+\sum_{k=1}^{n}(\frac{2A}{k\pi}\sin \frac{k\pi}{2}(x-.25))\!$$