University of Florida/Egm4313/s12.team11.gooding/R6

Problem Statement
Page 491, #15,17. Plot the truncated Fourier series for n=2,4,8.

Solution
15.

$$f(x)=\left\{\begin{matrix} -x-\pi, -\pi<x<-\pi/2\\ x, -\pi/2<x<\pi/2\\ \pi-x, \pi/2<x<\pi \end{matrix}\right.$$

Since $$f(-x)=-f(x)$$, the function is odd.

$$a_0=(1/\pi)*[-1 \int_{-\pi}^{-\pi/2}(x+\pi)dx+ \int_{-\pi/2}^{\pi/2}(x)dx+ \int_{\pi/2}^{\pi}(\pi-x)dx]$$ After simplification, $$a_0=0$$. Using Equation (5) on page 490, the exapansion becomes; $$f(x)=8k/\pi^2[sin(\pi*x/L)-sin(3\pi*x/L)/9...)$$ With $$L=\pi,k=\pi/2$$ this becomes; $$f(x)=4/\pi(sinx-sin(3x)/9+sin(5x)/25-sin(6x)/36....)$$ for n is "odd". This means when n is even, $$f(x) =0$$

17. $$f(x)=1-|x|, -1\leq x \leq1$$

$$f(x)=\left\{\begin{matrix} 1+x-\pi, -1<x<0\\ 1-x, 0<x<1\\ \end{matrix}\right.$$

$$a_0=1/2[\int_{-1}^{0}(1+x)dx + \int_{0}^{1}(1-x)dx]$$ $$a_0=1/2[1-1/2+1-1/2]$$ $$a_0=1/2$$

$$a_n=1/1[\int_{-1}^{0}(1+x)cos(n\pi*x/1)dx+ \int_{0}^{1}(1-x)cos(n\pi*x/1)dx]$$ Simplifying results in; $$a_n=2[1/(n^2\pi^2)_(-1)^n/(n^2\pi^2)]$$ So, $$ a_n=4/(n^2\pi^2)$$ when n is odd. $$ b_n=1/1[\int_{-1}^{0}(1+x)sin(n\pi*x/1)dx+ \int_{0}^{1}(1-x)sin(n\pi*x/1)dx]$$ Simplifying results in; $$b_n=0$$ $$f(x)=1/2+ \sum_{n=0}^{\infty }4/(n^2\pi^2)*cos(n\pi*x)$$

Since $$a_n=0$$ for even n, $$f(x)$$ becomes $$f(x)=1/2$$ for even n.