User:Egm4313.s12.team1.wyattling/r6

Statement
Kreyszig pg 491 pbs 15,17 Is the given function even or odd or neither even not odd? Find its Fourier series. Show details of your work. -15)

-17)

- Plot the truncated Fourier series for n=2,4,8

Solution
By definition, a function, $$ f(x)\!$$ is even if $$ f(-x) = f(x)\!$$, and its Fourier series reduces to a Fourier cosine series:
 * {| style="width:100%" border="0"

$$\displaystyle{f(x) = a_{0} + \sum_{n=1}^{\infty}a_{n}cos{\frac{n\pi}{L}}x}$$ (3.0)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

A function, $$ f(x)\!$$ is odd if $$ f(-x) = -f(x)\!$$, and its Fourier series reduces to a Fourier sine series:
 * {| style="width:100%" border="0"

$$\displaystyle{f(x) = \sum_{n=1}^{\infty}b_{n}sin{\frac{n\pi}{L}}x}$$ (3.1) -15) By inspection, it is evident that the given function in problem 15 is odd because for every $$ x\!$$ value that is negative, $$ f(x)\!$$ is negative. Therefore, $$ f(-x) = -f(x)\!$$.
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

The following are the defining functions for the given graph:
 * {| style="width:100%" border="0"

$$\displaystyle{f(x) = \begin{cases} -\pi - x & \text{ if } x= -\pi < x < -\frac{\pi}{2}\\ x & \text{ if } x= -\frac{\pi}{2} < x < \frac{\pi}{2}\\ \pi - x & \text{ if } x= \frac{\pi}{2} < x < \pi \end{cases}}$$ (3.2)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Because the function is odd, we use equation (3.1) to develop the Fourier series, where the period is $$2\pi\!$$ and $$ L\!$$ equals $$\pi\!$$:
 * {| style="width:100%" border="0"

$$\displaystyle{f(x) = \sum_{n=1}^{\infty}b_{n}sin{\frac{n\pi}{L}}x = \sum_{n=1}^{\infty}b_{n}sin(nx)}$$ (3.3)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Now we need to find $$ b_{n}\!$$, which is of the following form for odd functions:
 * {| style="width:100%" border="0"

$$\displaystyle{b_{n} = \frac{2}{L}\int_{0}^{L}f(x)\sin{\frac{n{\pi}x}{L}}dx}$$ (3.4)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


 * {| style="width:100%" border="0"

$$\displaystyle{b_{n} = \frac{2}{\pi}\int_{0}^{\pi}sin(nx)dx = \frac{2}{\pi}[\int_{0}^{\pi/2}xsin(nx)dx + \int_{\pi/2}^{\pi}(\pi-x)sin(nx)dx]}$$ (3.5)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


 * {| style="width:100%" border="0"

$$\displaystyle{b_{n} = \frac{2}{\pi}[[\frac{sin(nx)-nxcos(nx)}{n^2}]_{0}^{\pi/2}+[\frac{-sin(nx)+n(\pi-x)cos(nx)}{n^2}]_{\pi/2}^{\pi}]}$$     (3.6)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Evaluating and simplifying the definite integral gives the following:


 * {| style="width:100%" border="0"

$$\displaystyle{b_{n} = \frac{2}{n^2\pi}[2sin(\frac{n\pi}{2})-sin(n\pi)]}$$ (3.7)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Evaluating equation (3.7) at $$ n = 1, 2, 3, 4, 5, 6, 7, 8\!$$


 * {| style="width:100%" border="0"

$$\displaystyle{b_{1} = \frac{4}{\pi}, b_{2} = 0, b_{3} = -\frac{4}{9\pi}, b_{4} = 0, b_{5} = \frac{4}{25\pi}, b_{6} = 0, b_{7} = -\frac{4}{49\pi}, b_{8} = 0}$$ (3.8)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Thus the Fourier series is:


 * {| style="width:100%" border="1"

$$ f(x) = \frac{4}{\pi}(sinx - \frac{1}{9}sin3x + \frac{1}{25}sin5x - \frac{1}{49}sin7x +...) $$
 * style="width:95%" |
 * style="width:95%" |

(3.9)
 * 
 * }

Plots of truncated Fourier series:

n = 2:



n = 4:



n = 8:



-17) By inspection, it is evident that the given function in problem 17 is even because for every $$ x\!$$ value that is negative, $$ f(x)\!$$ is positive. Therefore, $$ f(-x) = f(x)\!$$.

The following are the defining functions for the given graph:
 * {| style="width:100%" border="0"

$$\displaystyle{f(x)=\begin{cases}x+1 & \text{ if } -1
 * }

Because the function is even, we use equation (3.0) to develop the Fourier series, where the period is $$2\!$$ and $$ L = 1\!$$:


 * {| style="width:100%" border="0"

$$\displaystyle{f(x) = a_{0} + \sum_{n=1}^{\infty}a_{n}cos{\frac{n\pi}{L}x} = a_{0} + \sum_{n=1}^{\infty}a_{n}cos(n\pi x)}$$ (3.11)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Now we need to find $$a_{0}\!$$ using Euler's Formula:
 * {| style="width:100%" border="0"

$$\displaystyle{a_{0} = \frac{1}{2L}\int_{-L}^{L}f(x)dx}$$ (3.12)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


 * {| style="width:100%" border="0"

$$\displaystyle{a_{0} = \frac{1}{2}\int_{-1}^{1}f(x)dx = \frac{1}{2}[\int_{-1}^{0}(x+1)dx + \int_{0}^{1}(1-x)dx]}$$ (3.13)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


 * {| style="width:100%" border="0"

$$\displaystyle{a_{0} = \frac{1}{2}[[\frac{x^2}{2}+x]_{-1}^{0}+[x-\frac{x^2}{2}]_{0}^{1}]}$$     (3.14)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Evaluating the definite integral in equation (3.14) yields $$ a_{0}\!$$:


 * {| style="width:100%" border="0"

$$\displaystyle{a_{0} = \frac{1}{2}}$$ (3.15)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Now we find $$ a_{n}\!$$ using Euler's Formula:


 * {| style="width:100%" border="0"

$$\displaystyle{a_{n} = \frac{1}{L}\int_{-L}^{L}f(x)cos{\frac{n{\pi}x}{L}}dx = \int_{-1}^{1}f(x)cos(n\pi x)dx}$$ (3.16)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


 * {| style="width:100%" border="0"

$$\displaystyle{a_{n} = \int_{-1}^{0}(x+1)cos(n\pi x)dx + \int_{0}^{1}(1-x)cos(n\pi x)dx}$$ (3.17)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


 * {| style="width:100%" border="0"

$$\displaystyle{a_{n} = [\frac{\pi n(x+1)sin(\pi nx) + cos(\pi nx)}{n^2\pi^2}]_{-1}^{0} + [-\frac{\pi n(x-1)sin(\pi nx)+cos(\pi nx)}{n^2\pi^2}]_{0}^{1}}$$ (3.18)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Evaluating the definite integral in equation (3.18) yields the following equation for $$a_n\!$$:


 * {| style="width:100%" border="0"

$$\displaystyle{a_{n} = \frac{2(1-cos(\pi))}{n^2\pi^2}}$$ (3.19)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Evaluating equation (3.19) at $$ n = 1, 2, 3, 4, 5, 6, 7, 8\!$$ yields:


 * {| style="width:100%" border="0"

$$\displaystyle{a_{1} = \frac{4}{\pi^2}, a_{2} = 0, a_{3} = \frac{4}{9\pi^2}, a_{4} = 0, a_{5} = \frac{4}{25\pi^2}, a_{6} = 0, a_{7} = \frac{4}{49\pi^2}, a_{8} = 0}$$ (3.20)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Thus, the Fourier series is:


 * {| style="width:100%" border="1"

$$ f(x) = \frac{1}{2} + \frac{4}{\pi^2}(cos(\pi x) + \frac{1}{9}cos(3\pi x) + \frac{1}{25}cos(5\pi x) + \frac{1}{49}cos(7\pi x) + ...) $$
 * style="width:95%" |
 * style="width:95%" |

(3.21)
 * <p style="text-align:right">
 * }

Plots of truncated Fourier series:

n = 2:



n = 4:



n = 8:



Author
Solved and Typed By -

Reviewed By -