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

## R6.3

### Problem Statement

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

### Solution

15.

${\displaystyle f(x)=\left\{{\begin{matrix}-x-\pi ,-\pi

Since ${\displaystyle f(-x)=-f(x)}$, the function is odd.

${\displaystyle 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, ${\displaystyle a_{0}=0}$
. Using Equation (5) on page 490, the exapansion becomes;
${\displaystyle f(x)=8k/\pi ^{2}[sin(\pi *x/L)-sin(3\pi *x/L)/9...)}$
With ${\displaystyle L=\pi ,k=\pi /2}$ this becomes;
${\displaystyle f(x)=4/\pi (sinx-sin(3x)/9+sin(5x)/25-sin(6x)/36....)}$ for n is "odd".
This means when n is even, ${\displaystyle f(x)=0}$

17.
${\displaystyle f(x)=1-|x|,-1\leq x\leq 1}$

${\displaystyle f(x)=\left\{{\begin{matrix}1+x-\pi ,-1

${\displaystyle a_{0}=1/2[\int _{-1}^{0}(1+x)dx+\int _{0}^{1}(1-x)dx]}$
${\displaystyle a_{0}=1/2[1-1/2+1-1/2]}$

 ${\displaystyle a_{0}=1/2}$


${\displaystyle 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;
${\displaystyle a_{n}=2[1/(n^{2}\pi ^{2})_{(}-1)^{n}/(n^{2}\pi ^{2})]}$
So,

${\displaystyle a_{n}=4/(n^{2}\pi ^{2})}$


when n is odd.
${\displaystyle 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;

${\displaystyle b_{n}=0}$


${\displaystyle f(x)=1/2+\sum _{n=0}^{\infty }4/(n^{2}\pi ^{2})*cos(n\pi *x)}$

Since ${\displaystyle a_{n}=0}$ for even n, ${\displaystyle f(x)}$ becomes ${\displaystyle f(x)=1/2}$ for even n.