User:Egm4313.s12.team17/Report 7

=Problem R7.1 - Verification of the Orthogonality of Given Basis Function=

Given

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

$$  \displaystyle \left \langle \phi_i,\phi_j \right \rangle=0 $$ for $$  \displaystyle i\not\equiv j $$ (Eq.1.1)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \left \langle \phi_j,\phi_j \right \rangle=\frac{L}{2} $$ for $$  \displaystyle i=j $$     (Eq.1.2)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \phi_i=sin_i(n x) $$
 * style="width:95%" |
 * style="width:95%" |

$$  \displaystyle \phi_j=sin_j(m x) $$ (Eq.1.3)
 * 
 * }

Problem Statement
Verify that the equations 1.1 and 1.2 are true.

Solution
Using the Orthogonality relations:
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{-\pi}^{\pi}cos(nx)cos(mx)dx=0 $$     (Eq.1.4)
 * style="width:80%" |
 * style="width:80%" |
 * 
 * }


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

$$  \displaystyle \int_{-\pi}^{\pi}sin(nx)sin(mx)dx=0 $$     (Eq.1.5)
 * style="width:80%" |
 * style="width:80%" |
 * 
 * }


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

$$  \displaystyle \int_{-\pi}^{\pi}sin(nx)cos(mx)dx=0 $$     (Eq.1.6)
 * style="width:80%" |
 * style="width:80%" |
 * 
 * }

To verify that $$\left \langle \phi_i,\phi_j \right \rangle=0$$ for $$i\not\equiv j$$ is true, we change the form to:
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{L}sin_i(nx)sin_j(mx)dx=0 $$     (Eq.1.7)
 * style="width:80%" |
 * style="width:80%" |
 * 
 * }

Simplifying Eq.1.7:
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{-cos_i(nL)sin_j(mL)}{2n}+\frac{sin_i(nL)cos_j(mL)}{2m}-\frac{-cos_i(0)sin_j(0)}{2n}-\frac{sin_i(0)cos_j(0)}{2m}=0 $$     (Eq.1.8)
 * style="width:80%" |
 * style="width:80%" |
 * 
 * }


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

$$  \displaystyle 0+0-0-0=0 $$     (Eq.1.9)
 * style="width:80%" |
 * style="width:80%" |
 * 
 * }

To verify that $$\left \langle \phi_j,\phi_j \right \rangle=\frac{L}{2}$$ for $$i=j$$ is true the following is done:
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{L}sin_j^2(mx)dx=\frac{L}{2} $$     (Eq.1.10)
 * style="width:80%" |
 * style="width:80%" |
 * 
 * }


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

$$  \displaystyle \int_{0}^{L}\frac{1-cos(2mx)}{2}dx=\frac{L}{2} $$     (Eq.1.11)
 * style="width:80%" |
 * style="width:80%" |
 * 
 * }


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

$$  \displaystyle \frac{L}{2}-\frac{sin(2mL)}{4}-\frac{0}{2}+\frac{sin(2m0)}{4}=\frac{L}{2} $$     (Eq.1.12)
 * style="width:80%" |
 * style="width:80%" |
 * 
 * }


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

$$  \displaystyle \frac{L}{2}=\frac{L}{2} $$     (Eq.1.13)
 * style="width:80%" |
 * style="width:80%" |
 * 
 * }

Author & Proofreaders
Author: Egm4313.s12.team17.axelrod.a 17:39, 24 April 2012 (UTC)

Proofreader: Egm4313.s12.team17.hintz 18:20, 24 April 2012 (UTC)

Editor: Egm4313.s12.team17.deaver.md 09:01, 25 April 2012 (UTC)

=Problem R7.2 - Plotting the Motion of the Wave=

Given

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

$$  \displaystyle u(x,t)=\sum_{j=1}^{n}a_j\cos c\omega_j t \sin \omega_j x $$ (Eq.2.1)
 * style="width:80%" |
 * style="width:80%" |
 * 
 * }

Problem Statement
Plot the truncated series with n=5 and for
 * {| style="width:100%" border="0"

$$  \displaystyle t=\alpha P_1=\alpha \frac{2\pi}{c\omega_1}=\alpha \frac{2L}{c} $$     (Eq.2.2)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \alpha=0.5, 1, 1.5, 2 $$     (Eq.2.3)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Solution
Using the following information to solve the problem:
 * {| style="width:100%" border="0"

$$  \displaystyle f(x)=x(x-2) $$     (Eq.2.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle g(x)=0 $$     (Eq.2.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle c=3 $$     (Eq.2.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle L=2 $$     (Eq.2.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle a_j=\frac{2}{L}\int_{0}^{L}f(x)\sin \omega_j x dx=2\left [ \frac{(-1)^j-1}{\pi^3j^3} \right ] $$     (Eq.2.7)
 * style="width:80%" |
 * style="width:80%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle a_j=\begin{cases} 0, & \mbox{for }j=2m\mbox{ (even)} \\ -4/(\pi^3 j^3), & \mbox{for }j=2m+1\mbox{ (odd)} \end{cases} $$     (Eq.2.8)
 * style="width:80%" |
 * style="width:80%" |
 * <p style="text-align:right">
 * }

Substituting equation 2.8 into the equation 2.1, we have,
 * {| style="width:100%" border="0"

$$  \displaystyle u(x,t)=\sum_{j=1}^{n}2\left [ \frac{(-1)^j-1}{\pi^3j^3} \right ]\cos \bigg(c \frac{j\pi}{L} \alpha \frac{2L}{c} \bigg) \sin \bigg(\frac{j\pi}{L}x \bigg)=\sum_{j=1}^{n}2\left [ \frac{(-1)^j-1}{\pi^3j^3} \right ]\cos (\alpha j2\pi) \sin \bigg(\frac{j\pi}{2}x \bigg) $$     (Eq.2.9)
 * style="width:80%" |
 * style="width:80%" |
 * <p style="text-align:right">
 * }

Expanding with n=5:
 * {| style="width:100%" border="0"

$$  \displaystyle u(x,t)=\bigg[\frac{-4}{\pi^3}\cos (2\pi \alpha) \sin \bigg(\frac{\pi x}{2}\bigg)\bigg]+\bigg[\frac{-4}{27\pi^3}\cos (6\pi \alpha) \sin \bigg(\frac{3\pi x}{2}\bigg)\bigg]+\bigg[\frac{-4}{125\pi^3}\cos (10\pi \alpha) \sin \bigg(\frac{5\pi x}{2}\bigg)\bigg] $$     (Eq.2.10)
 * style="width:80%" |
 * style="width:80%" |
 * <p style="text-align:right">
 * }

Plotting equation 2.10 from 0 to 2\pi,we have:

When \alpha=0.5:

When \alpha=1:

When \alpha=1.5:

When \alpha=2:

Author & Proofreaders
Author: Egm4313.s12.team17.Li 17:39, 24 April 2012 (UTC)

Proofreader: Egm4313.s12.team17.axelrod.a 12:30, 24 April 2012 (UTC)

Editor: Egm4313.s12.team17.deaver.md 09:32, 25 April 2012 (UTC)

=Problem R7.3 - Various Properties Derived from Functions=

Part 1 Given

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

$$  \displaystyle f(x) = cos(x) $$     (Eq.3.1.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

g(x) = x $$ (Eq.3.1.2)
 * <p style="text-align:right">
 * }


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

$$  \displaystyle -2 \le x \le 10 $$     (Eq.3.1.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Part 1 Problem Statement
Find the scalar product of, the magnitude of, and the angle between $$f(x)$$ and $$g(x)$$.

Scalar Product

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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

\left \langle f,g \right \rangle = \int_b^a f(x)g(x)

$$     (Eq.3.1.4)
 * <p style="text-align:right">
 * }

Substituting the given functions gives:
 * {| style="width:100%" border="0"

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

\left \langle cos(x),x \right \rangle = \int_{-2}^{10} x cos(x)

$$     (Eq.3.1.5)
 * <p style="text-align:right">
 * }

Using integration by parts with:
 * {| style="width:100%" border="0"

$$  \displaystyle u = x $$
 * style="width:95%" |
 * style="width:95%" |

$$  \displaystyle du = dx $$

$$  \displaystyle dv = cos(x) $$

$$  \displaystyle v = sin(x) $$     (Eq.3.1.6)
 * <p style="text-align:right">
 * }

Yields the following result:
 * {| style="width:100%" border="0"

$$  \displaystyle \left \langle f,g \right \rangle=\bigg[x sin(x) + cos(x)\bigg]^{10}_{-2} $$     (Eq.3.1.7)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle \left \langle f,g \right \rangle=(10)sin(10) + cos(10) + (2)sin(-2) - cos(-2) $$     (Eq.3.1.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle \left \langle f,g \right \rangle= -7.68173 $$     (Eq.3.1.9)
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Magnitude

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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

\left \langle f(x),f(x) \right \rangle ^\frac{1}{2} = \sqrt{\int_{-2}^{10} cos^2(x)}

$$     (Eq.3.1.10)
 * <p style="text-align:right">
 * }

Solving this integral gives:
 * {| style="width:100%" border="0"

$$  \displaystyle $$     (Eq.3.1.11)
 * style="width:95%" |
 * style="width:95%" |
 * f||=\sqrt{\frac{1}{4} ( 24 + sin(4) + sin(20)}
 * <p style="text-align:right">
 * }


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

$$  \displaystyle $$     (Eq.3.1.12)
 * style="width:95%" |
 * style="width:95%" |
 * f||=\sqrt{6.039}
 * <p style="text-align:right">
 * }


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

$$  \displaystyle $$     (Eq.3.1.13)
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * f||=2.45744
 * <p style="text-align:right">
 * }


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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

\left \langle g(x),g(x) \right \rangle ^\frac{1}{2} = \sqrt{\int_{-2}^{10} x^2}

$$     (Eq.3.1.14)
 * <p style="text-align:right">
 * }


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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |


 * g||=\sqrt{336}

$$     (Eq.3.1.15)
 * <p style="text-align:right">
 * }


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

$$  \displaystyle
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |


 * g||=18.33

$$     (Eq.3.1.16)
 * <p style="text-align:right">
 * }

Angle

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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

cos(\theta) = \frac{\left \langle f(x),g(x) \right \rangle}{(||f||)(||g||)}

$$     (Eq.3.1.17)
 * <p style="text-align:right">
 * }

Substituting equations 3.1.9, 3.1.13, and 3.1.16 into equation 3.1.17:
 * {| style="width:100%" border="0"

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

cos(\theta) = \frac{-7.68}{(2.45744)(18.33)}

$$     (Eq.3.1.18)
 * <p style="text-align:right">
 * }


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

$$  \displaystyle
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |

\theta = 99.817^o

$$     (Eq.3.1.19)
 * <p style="text-align:right">
 * }

Part 2 Given

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

$$  \displaystyle f(x) = \frac{1}{2} (3x^2 - 1) $$     (Eq.3.2.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

g(x) = \frac{1}{2} (5x^3 - 3x)

$$     (Eq.3.2.2)
 * <p style="text-align:right">
 * }


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

$$  \displaystyle -1 \le x \le 1 $$     (Eq.3.2.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Part 2 Problem Statement
Find the scalar product of, the magnitude of, and the angle between $$f(x)$$ and $$g(x)$$.

Scalar Product

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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

\left \langle f,g \right \rangle = \int_b^a f(x)g(x)

$$     (Eq.3.2.4)
 * <p style="text-align:right">
 * }

Substituting the given functions gives:


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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

\left \langle \frac{3x^2 - 1}{2},\frac{5x^3 - 3x}{2} \right \rangle = \frac{1}{4} \int_{-1}^{1} 15x^5 - 14x^3 + 3x

$$     (Eq.3.2.5)
 * <p style="text-align:right">
 * }

Integrating gives:


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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

\left \langle f,g \right \rangle=\frac{1}{4} \bigg[ \frac{15}{6} x^6 - \frac{14}{4} x^4 + \frac{3}{2} x^2 \bigg]^{1}_{-1}

$$     (Eq.3.2.6)
 * <p style="text-align:right">
 * }


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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

\left \langle f,g \right \rangle=\frac{1}{4} \Bigg[ \bigg[ \frac{15}{6} (1^6) - \frac{14}{4} (1^4) + \frac{3}{2}(1^2) \bigg] - \bigg[ \frac{15}{6} (-1^6) - \frac{14}{4} (-1^4) + \frac{3}{2} (-1^2) \bigg] \Bigg]

$$     (Eq.3.2.7)
 * <p style="text-align:right">
 * }


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

$$  \displaystyle
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |

\left \langle f,g \right \rangle=0

$$     (Eq.3.2.8)
 * <p style="text-align:right">
 * }

Magnitude

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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

\left \langle f(x),f(x) \right \rangle ^\frac{1}{2} = \sqrt{\frac{1}{4} \int_{-1}^{1} (3x^2-1)^2dx}

$$     (Eq.3.2.9)
 * <p style="text-align:right">
 * }

Solving this integral gives:
 * {| style="width:100%" border="0"

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |


 * f||=\sqrt{\frac{1}{20} \bigg[ x(9x^4-10x^2+5) \bigg]^{1}_{-1} }

$$     (Eq.3.2.10)
 * <p style="text-align:right">
 * }


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

$$  \displaystyle
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |


 * f||=0.63246

$$     (Eq.3.2.11)
 * <p style="text-align:right">
 * }


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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

\left \langle g(x),g(x) \right \rangle ^\frac{1}{2} = \sqrt{\frac{1}{4} \int_{-1}^{1} (5x^3-3x)^2dx}

$$     (Eq.3.2.12)
 * <p style="text-align:right">
 * }


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

$$  \displaystyle $$     (Eq.3.2.13)
 * style="width:95%" |
 * style="width:95%" |
 * g||=\sqrt{\frac{1}{28} \bigg[ x^3(25x^4-42x^2+21) \bigg]^{1}_{-1} }
 * <p style="text-align:right">
 * }


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

$$  \displaystyle $$     (Eq.3.2.14)
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * g||=0.53452
 * <p style="text-align:right">
 * }

Angle

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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

cos(\theta) = \frac{\left \langle f(x),g(x) \right \rangle}{(||f||)(||g||)}

$$     (Eq.3.2.15)
 * <p style="text-align:right">
 * }

Substituting equations 3.2.8, 3.2.11, and 3.2.14 into equation 3.2.15:


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

$$  \displaystyle
 * style="width:95%" |
 * style="width:95%" |

cos(\theta) = \frac{0}{(0.63256)(0.53452)}

$$     (Eq.3.2.16)
 * <p style="text-align:right">
 * }


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

$$  \displaystyle
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |

\theta= 90^o

$$     (Eq.3.2.17)
 * <p style="text-align:right">
 * }

Author & Proofreaders
Author: Egm4313.s12.team17.hintz 17:51, 20 April 2012 (UTC)

Proofreader 1: Egm4313.s12.team17.wheeler.tw 16:00, 24 April 2012 (UTC)

Proofreader 2: Egm4313.s12.team17.deaver.md 09:40, 25 April 2012 (UTC)

Editor: Egm4313.s12.team17.deaver.md 09:40, 25 April 2012 (UTC)

=Problem R7.4 - Graphing Functions and Deriving Their Fourier Series=

Given
Information from problem 6,9,12,13 in Advanced Engineering Mathematics by Erwin Kreyszig on page 482.

Part 1 Problem Statement
Sketch or graph $$f(x)$$ which for $$-\pi<x<\pi$$ is given as follows:


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

$$  \displaystyle f(x)=\left | x \right | $$     (Eq.4.1.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Part 1 Solution


The Matlab code is included below:

Part 2 Problem Statement
Sketch or graph $$f(x)$$ which for $$-\pi<x<\pi$$ is given as follows:


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

$$  \displaystyle f(x)=\begin{cases} x & \text{ if }-\pi < x< 0 \\ \pi-x & \text{ if } 0<x<\pi \end{cases} $$     (Eq.4.2.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Part 2 Solution


The Matlab code is included below:

Part 3 Problem Statement
Find the Fourier series of the function $$f(x)$$, which is assumed to have the period 2 \pi. Show the details of your work. Sketch or graph the partial sums up to that including cos5x and sin5x.
 * {| style="width:100%" border="0"

$$  \displaystyle f(x)=\left | x \right | $$     (Eq.4.3.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Part 3 Solution
From Kreyszig 10th edition, 2011, page 476, for a Fourier series of period $$2\pi$$:
 * {| style="width:100%" border="0"

$$  \displaystyle f(x)=a_0+\sum_{n=1}^\infty[a_n\cos n x+b_n\sin n x] $$ (Eq.4.3.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle a_0=\frac{1}{2\pi}\int_{-\pi}^{\pi}f(x)dx $$     (Eq.4.3.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle a_n=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos(nx)dx $$     (Eq.4.3.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\sin(nx)dx $$     (Eq.4.3.5) Solving for $$a_{0}$$ using equations 4.3.3:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle a_0=\frac{1}{2\pi}\int_{-\pi}^{\pi}\left | x \right | dx = \frac{1}{\pi}\int_{0}^{\pi}x dx = \frac{1}{\pi}\bigg[ \frac{x^2}{2}\bigg]_{0}^{\pi}=\frac{\pi}{2} $$     (Eq.4.3.6) Solving for $$a_n$$ using equation 4.3.4:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle a_n=\frac{1}{\pi}\int_{-\pi}^{\pi}\left | x \right |\cos(nx)dx = \frac{2}{\pi}\int_{0}^{\pi} x \cos(nx)dx = \frac{2}{\pi}\bigg[\frac{nxsin(nx)+cos(nx)}{n^2}\bigg]_{0}^{\pi} $$     (Eq.4.3.7) Since $$n$$ is an integer, the sine term drops out of the equation, and equation 4.3.7 becomes: :{| style="width:100%" border="0" $$  \displaystyle a_n=\frac{2}{\pi}\bigg[\frac{cos(nx)}{n^2}\bigg]_{0}^{\pi} = \frac{2}{\pi}(\frac{cos(n \pi)-1}{n^2})=\frac{2}{\pi}(\frac{(-1)^{n}-1}{n^2})=\frac{2(-1)^n-2}{\pi n^2} $$     (Eq.4.3.8) Solving for $$b_n$$ using equation 4.3.5:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}\left | x \right |\sin(nx)dx $$     (Eq.4.3.9) Since $$\left | x \right |$$ is and even function and $$\sin(nx)$$ is an odd function, the result of equation 4.3.9 is 0:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}\left | x \right |\sin(nx)dx = 0 $$     (Eq.4.3.10) Plugging equations 4.3.6, 4.3.8, and 4.3.9 into equation 4.3.2:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle f(x)= \frac{\pi}{2}+\sum_{n=1}^\infty[\frac{2(-1)^n-2}{\pi n^2} \cos n x] $$ (Eq.4.3.11) Expanding equation 4.3.11 to $$\cos(5x)$$:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle f(x)= \frac{\pi}{2}- \frac{4}{\pi}\cos(x) - \frac{4}{9 \pi}\cos(3x)-\frac{4}{25 \pi} \cos(5x) $$     (Eq.4.3.12)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The Matlab code is included below:

Comparing the plot to the one in part 1:



The Matlab code is included below:

Part 4 Problem Statement
Find the Fourier series of the function $$f(x)$$, which is assumed to have the period 2 \pi. Show the details of your work. Sketch or graph the partial sums up to that including cos5x and sin5x.
 * {| style="width:100%" border="0"

$$  \displaystyle f(x)=\begin{cases} x & \text{ if }-\pi < x< 0 \\ \pi-x & \text{ if } 0<x<\pi \end{cases} $$     (Eq.4.4.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Part 4 Solution
Solving for $$a_{0}$$ using equations 4.3.3:
 * {| style="width:100%" border="0"

$$  \displaystyle a_0=\frac{1}{2\pi}\bigg(\int_{-\pi}^{0}x dx + \int_{0}^{\pi}(\pi -x) dx \bigg)=\frac{1}{2 \pi}\bigg( \bigg[\frac{x^2}{2}\bigg]_{-\pi}^{0} +\bigg[\pi x\bigg]_{0}^{\pi}-\bigg[\frac{x^2}{2}\bigg]_{0}^{\pi}\bigg)= \frac{1}{2 \pi}\bigg(\frac{-\pi^2}{2}+\pi^2-\frac{\pi^2}{2}\bigg)=0 $$     (Eq.4.4.2) Solving for $$a_n$$ using equation 4.3.4:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

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


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

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


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

$$  \displaystyle =\frac{1}{\pi}\bigg(\frac{2}{n^2}-\frac{2(-1)^n}{n^2}\bigg) $$     (Eq.4.4.3) $$a_n$$ can be simplified to:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle a_n=\begin{cases} \frac{4}{\pi n^2} & \text{ if }n \text{ is an odd integer} \\ 0 & \text{ if } n \text{ is an even integer} \end{cases} $$     (Eq.4.4.4) Solving for $$b_n$$ using equation 4.3.5:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

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

$$  \displaystyle =\frac{-(\cos(\pi n)-1)}{n}=\frac{-((-1)^n-1)}{n} $$     (Eq.4.4.5) $$b_n$$ can be simplified to:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_n=\begin{cases} \frac{2}{n} & \text{ if }n \text{ is an odd integer} \\ 0 & \text{ if } n \text{ is an even integer} \end{cases} $$     (Eq.4.4.6) Plugging equations 4.4.2, 4.4.4, and 4.4.6 into equation 4.3.2:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle f(x)=0+\sum_{\text{odd n}}^{\infty}\frac{4}{\pi n^2}\cos(nx)+\frac{2}{n}\sin(nx) $$     (Eq.4.4.7) Expanding equation 4.4.7 to sin(5x) and cos(5x):
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle f(x)=\frac{4}{\pi}\cos(x)+2\sin(x)+\frac{4}{9 \pi}\cos(3x)+\frac{2}{3}\sin(3x)+\frac{4}{25 \pi}\cos(5x)+\frac{2}{5}\sin(5x) $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle =\frac{4}{\pi}(\cos(x)+\frac{1}{9}\cos(3x)+\frac{1}{25}\cos(5x))+2(\sin(x)+\frac{1}{3}\sin(3x)+\frac{1}{5}\sin(5x)) $$     (Eq.4.4.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The Matlab code is included below:

Comparing the plot to the one in part 2:



The Matlab code is included below:

Author & Proofreaders
Author: Egm4313.s12.team17.wheeler.tw 03:38, 17 April 2012 (UTC)

Proofreader 1: Egm4313.s12.team17.ying 04:10, 18 April 2012 (UTC)

Proofreader 2: Egm4313.s12.team17.deaver.md 11:35, 25 April 2012 (UTC)

Editor: Egm4313.s12.team17.deaver.md 11:35, 25 April 2012 (UTC)

=Problem R7.5 - Odd-Periodic dot Odd-Periodic Exact Solution=

Given

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

$$  \displaystyle \int_0^p \sin j \omega x \cdot \sin k \omega x\, dx = 0 $$     (Eq.5.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle p = 2 \pi, \ j = 2, \ k = 3 $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Part 1 Problem Statement
Find the exact integration of equation 5.1 with the given values as data.

Part 1 Solution
With the given values, equations 5.1 becomes:
 * {| style="width:100%" border="0"

$$  \displaystyle \int_0^{2 \pi} \sin 2 \omega x \cdot \sin 3 \omega x\, dx = 0 $$     (Eq.5.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Using the following identities given below, it is:
 * {| style="width:100%" border="0"

$$  \displaystyle \sin 2 \omega x = 2 \sin \omega x \cos \omega x $$ (Eq.5.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \sin 3 \omega x = 3 \sin \omega x - 4 \sin^3 \omega x $$ (Eq.5.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Substituting equations 5.4 and 5.3 into equation 5.2 yields:
 * {| style="width:100%" border="0"

$$  \displaystyle \int_0^{2 \pi} 2 \sin \omega x \cos \omega x (3 \sin \omega x - 4 \sin^3 \omega x) = 0 $$     (Eq.5.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Realizing that $$\cos$$ is the only different term, u substitution is used:
 * {| style="width:100%" border="0"

$$  \displaystyle u = \sin \omega x $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle du = \frac{\cos \omega x}{\omega} $$ Equation 5.5 then becomes:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{1}{\omega}\int_0^{0} 2u(3u-4u^3) $$     (Eq.5.6) Where the interval that is being integrated has been changed by substituting $$2 \pi$$ into u.
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

Therefore the final value of the integral then becomes 0.
 * style="width:25%; padding:10px; border:2px solid #8888aa" |
 * style="width:25%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Part 2 Problem Statement
Confirm the result with matlab's trapz command for the trapezoidal rule.

Part 2 Solution
Below is the matlab code used to generate the answer:

where Z = -4.2785e-17 approximating to 0, confirming part 1 solution.

Author & Proofreaders
Author: Egm4313.s12.team17.ying 16:41, 15 April 2012 (UTC)

Proofreader: Egm4313.s12.team17.Li 04:18, 17 April 2012 (UTC)

Editor: Egm4313.s12.team17.deaver.md 14:06, 25 April 2012 (UTC)

= Contributing Team Members = {| border="1" cellspacing="0" cellpadding="5" align="center" ! Team Member ! Contribute ! Proofread
 * Allan Axelrod
 * Problem 1
 * Problem 2
 * Michael Deaver
 * Formatting
 * Problem 3 and 4
 * Max Hintz
 * Problem 3
 * Problem 1
 * Kelvin Li
 * Problem 2
 * Problem 5
 * Thomas Wheeler
 * Problem 4
 * Problem 3
 * Chen Ying
 * Problem 5
 * Problem 4
 * Problem 4
 * Problem 3
 * Chen Ying
 * Problem 5
 * Problem 4
 * Problem 4