User:Egm4313.s12.team17/Report 6

=Problem R6.1--Finding the smallest period=

Given

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

$$  \displaystyle f(x)=cos(n \omega x) $$ (Eq.6.1)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle f(x)=sin(n \omega x) $$ (Eq.6.2)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle f(x)=a_0 + \sum_{n=1}^{\infin}[a_n cos (n \omega x) + b_n sin (n \omega x)] $$     (Eq.6.3)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Part 1 Problem Statement
Find the smallest period of equations 6.1 and 6.2. Show that equations 6.1 and 6.2 have a period $$ p $$.

Part 1 Solution
Equations 6.1 and 6.2 are said to be periodic with a period $$ p $$ if:
 * {| style="width:100%" border="0"

$$  \displaystyle f(x+n_1p)=f(x) $$     (Eq.6.1.1)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Using equation 6.1.1 for equation 6.1 results in the following:
 * {| style="width:100%" border="0"

$$  \displaystyle f(x+n_1p)=cos(n \omega x + n \omega n_1p) $$     (Eq.6.1.2)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle cos(n \omega x + n \omega n_1p)=cos(n \omega x) $$ (Eq.6.1.3)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Use the double angle formula to expand equation 6.1.3:
 * {| style="width:100%" border="0"

$$  \displaystyle cos(n \omega x)cos(n \omega n_1p)-sin(n \omega x)sin(n \omega n_1p)=cos(n \omega x) $$ (Eq.6.1.4)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

In order for equation 6.1.4 to be true, the following conditions must be satisfied:
 * {| style="width:100%" border="0"

$$  \displaystyle cos(n \omega n_1p)=1 $$     (Eq.6.1.5)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle sin(n \omega n_1p)=0 $$     (Eq.6.1.6)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

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

$$  \displaystyle n \omega n_1p=2 \pi $$     (Eq.6.1.7)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle p=\frac{2 \pi}{n \omega n_1} $$, $$  \displaystyle n=1,2,3,.... $$, $$  \displaystyle n_1=1,2,3,.... $$     (Eq.6.1.8)
 * style="width:30%; padding:10px; border:2px solid #8888aa" |
 * style="width:30%; padding:10px; border:2px solid #8888aa" |
 * 
 * }

Equation 6.1.8 shows that the smallest period $$ p $$ is when n_1=1 for equation 6.1.

n_1 is the number of periods and by setting n_1=1 will result in a single periodic function.

The work shown above also shows that equation 6.1 has a period $$ p $$.

Using equation 6.1.1 for equation 6.2 results in the following:
 * {| style="width:100%" border="0"

$$  \displaystyle f(x+n_1p)=sin(n \omega x +n \omega n_1p) $$     (Eq.6.1.9)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle sin(n \omega x +n \omega n_1p)=sin(n \omega x) $$ (Eq.6.1.10)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Use the double angle formula to expand equation 6.1.10:
 * {| style="width:100%" border="0"

$$  \displaystyle sin(n \omega x)cos(n \omega n_1p)+cos(n \omega x)sin(n \omega n_1p)=sin(n \omega x) $$ (Eq.6.1.11)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

In order for equation 6.1.11 to be true, the following conditions must be satisfied:
 * {| style="width:100%" border="0"

$$  \displaystyle cos(n \omega n_1p)=1 $$     (Eq.6.1.12)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle sin(n \omega n_1p)=0 $$     (Eq.6.1.13)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

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

$$  \displaystyle n \omega n_1p=2 \pi $$     (Eq.6.1.14)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle p=\frac{2 \pi}{ n \omega n_1} $$, $$  \displaystyle n=1,2,3,.... $$, $$  \displaystyle n_1=1,2,3,.... $$     (Eq.6.1.15)
 * style="width:30%; padding:10px; border:2px solid #8888aa" |
 * style="width:30%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Equation 6.1.15 shows that the smallest period $$ p $$ is when n_1=1 for equation 6.2.

n_1 is the number of periods and by setting n_1=1 will result in a single periodic function.

The work shown above also shows that equation 6.2 has a period $$ p $$.

In order, to achieve the standard period for a trigonometric wave function, n_1 must equal 1.

Therefore, the period for a trigonometric wave function is the following:
 * {| style="width:100%" border="0"

$$  \displaystyle p=\frac{2 \pi}{ n \omega} $$, $$  \displaystyle n=1,2,3,.... $$     (Eq.6.1.16)
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Part 2 Problem Statement
Show that constant $$ a_0 $$ is a periodic function with period $$ p $$.

Part 2 Solution
The equation for $$ a_0 $$ is the following:
 * {| style="width:100%" border="0"

$$  \displaystyle a_0=\frac{1}{2 \pi} \int^{\infin}_{-\infin}f(x)dx $$     (Eq.6.2.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

For a_0 to be a periodic function of period $$ p $$, the following must be satisfy:
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{1}{2 \pi} \int^{\infin}_{-\infin}f(x+n_1p)dx=\frac{1}{2 \pi} \int^{\infin}_{-\infin}f(x)dx $$     (Eq.6.2.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle \int^{\infin}_{-\infin}f(x+n_1p)dx= \int^{\infin}_{-\infin}f(x)dx $$     (Eq.6.2.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Take the derivative of equation 6.2.3 with respect to $$ x $$:
 * {| style="width:100%" border="0"

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

The work shown in part 1 is proof that equation 6.1 and 6.2 obeys equation 6.2.4; therefore, a_0 is a periodic function of period $$ p $$.

Part 3 Problem Statement
Show that both lhs and rhs of equation 6.3 are period functions with period $$ p $$.

Part 3 Solution
Use equation 6.1.1 with equation 6.3 will result in the following:
 * {| style="width:100%" border="0"

$$  \displaystyle a_0+\sum^{\infin}_{n=1}[a_n cos(n \omega x +n \omega n_1p)+b_n sin(n \omega x +n \omega n_1p)]= a_0+\sum^{\infin}_{n=1}[a_n cos(n \omega x )+b_n sin(n \omega x)] $$     (Eq.6.3.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

In order for equation 6.3.1 to be true, the following condition must be satisfied:
 * {| style="width:100%" border="0"

$$  \displaystyle a_n cos(n \omega x +n \omega n_1p)+b_n sin(n \omega x +n \omega n_1p)= a_n cos(n \omega x )+b_n sin(n \omega x) $$ (Eq.6.3.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Using the double angle formula will expand equation 6.3.2 as shown below:
 * {| style="width:100%" border="0"

$$  \displaystyle a_n[cos(n \omega x)cos(n \omega n_1p)-sin(n \omega x)sin(n \omega n_1p)]+b_n[sin(n \omega x)cos(n \omega n_1p)+cos(n \omega x)sin(n \omega n_1p)]= a_n cos(n \omega x )+b_n sin(n \omega x) $$ (Eq.6.3.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Substitute equation 6.1.8 or 6.1.15 into equation 6.3.3:
 * {| style="width:100%" border="0"

$$  \displaystyle a_n cos(n \omega x)+b_n sin(n \omega x)= a_n cos(n \omega x )+b_n sin(n \omega x) $$ (Eq.6.3.4)
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Therefore, equation 6.3 has a period $$ p $$.

Author & Proofreaders
Author: Egm4313.s12.team17.deaver.md 03:20, 11 April 2012 (UTC)

Proofreader: Egm4313.s12.team17.Li 04:10, 11 April 2012 (UTC)

Editor: Egm4313.s12.team17.deaver.md 03:20, 11 April 2012 (UTC)

=Problem R6.2--Fourier Series Expansion=

Given
Assume a period such that p=4 for the below.
 * {| style="width:100%" border="0"

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

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

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

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

$$  \displaystyle \omega =\frac{\pi}{L}=\frac{2\pi}{p} $$     (Eq.2.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

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

$$  \displaystyle \bar a_n=\frac{1}{L} \int_{-L}^{L} f(\bar x) \cos n \omega \bar x d \bar x $$ (Eq.2.7)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \bar b_n=\frac{1}{L} \int_{-L}^{L} f(\bar x) \sin n \omega \bar x d \bar x $$ (Eq.2.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

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

$$  \displaystyle \tilde a_n = \frac{1}{2L} \int_{0}^{2L} f(\tilde x ) cos(n\omega \tilde x) d \tilde x $$ (Eq.2.10)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \tilde b_n = \frac{1}{2L} \int_{0}^{2L} f(\tilde x ) sin(n\omega \tilde x) d \tilde x $$ (Eq.2.11)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

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

Part 1 Problem Statement
Determine a Fourier series expansion of $$f(\bar x)$$. Plot $$f(\bar x)$$ and the truncated Fourier series $$f_n(\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)$$ for $$n=0,1$$

Part 1 Solution
$$f( \bar x )$$ is symmetric about the y axis and is therefore symmetric (see below graph for $$f( \bar x )$$). Since $$f( \bar x )$$ is an even function we can simplify Eq.2.6 to the following:
 * {| style="width:100%" border="0"

$$  \displaystyle f(\bar x)_n=\bar a_0 + \sum_{k=1}^n [\bar a_n \cos n \omega \bar x] $$ (Eq.2.13) Expanding Eq.2.13 for $$n=0$$ gives us:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle f(\bar x)=\bar a_0 $$     (Eq.2.14) Expanding Eq.2.13 for $$n=1$$ gives us:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle f(\bar x)=\bar a_0+\bar a_n \cos n \omega \bar x $$ (Eq.2.15) Using Eq.2.5 we can find $$L$$ and $$\omega$$ so that we may then solve for $$ \bar a_0 $$:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{ \pi}{L}=\frac{2 \pi}{p} $$     (Eq.2.16) Inserting values gives us:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{\pi}{L}=\frac{2 \pi}{4} $$     (Eq.2.17) Which simplifies to:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{1}{L}=\frac{1}{2} $$     (Eq.2.18) Therefore $$L=2$$ and $$ \omega = \frac { \pi}{2} $$. Inserting these values into Eq.2.7 gives us:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

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

$$  \displaystyle \bar a_n= \frac { \pi}{4} \sin n \frac { \pi}{2} \bar x $$ (Eq.2.20) Applying the conditions of Eq.2.14 to Eq.2.20 yields:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \bar a_0= \frac { \pi}{4} \sin [0* \frac { \pi}{2} \bar x ] $$     (Eq.2.21)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The below is a graph of

Part 2 Problem Statement
Repeat the Solution 1 but using $$f(\tilde x)$$ instead of $$ f(\bar x)$$ to obtain the Fourier series expansion of $$ f(x) $$ for $$ n=0,1 $$.

Author & Proofreaders
Author: Egm4313.s12.team17.axelrod.a 13:47, 11 April 2012 (UTC)

Proofreader: Egm4313.s12.team17.Li 13:55, 11 April 2012 (UTC)

Editor: Egm4313.s12.team17.deaver.md 14:00, 11 April 2012 (UTC)

=Problem R6.3--Truncated Fourier Series=

Part 1 Given
Information from problem 15 in Advanced Engineering Mathematics by Erwin Kreyszig on page 491.

Part 1 Problem Statement
Define whether each function is even or odd, and find it's Fourier series. Plot the functions for n=2,4,8.

Part 1 Solution
Analyzing the graph gives the following piecewise function:
 * {| style="width:100%" border="0"

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

f(x) = \begin{cases} -x - \pi & -\pi \le x < \frac{-\pi}{2} \\ x & \frac{-\pi}{2} < x < \frac{\pi}{2} \\ -x + \pi & \frac{\pi}{2} < x < \pi \end{cases}

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

It is also evident from looking at the graph that the function is odd, when taking the integral of the whole function, the integral is 0, making the function odd. Lastly,the graph shows the period is $$ 2 \pi $$ so L = $$ \pi $$. Since the function is odd and the cosine function is even, the $$ a_n $$ terms drop out and the Fourier series is left as:


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

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

f(x) = \sum_{n=1}^{\infin} b_n sin(nx)

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

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

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

b_n = \frac{2}{\pi} \int^{\pi}_0 f(x) sin(nx)dx

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

Substituting equation 3.1.1 into 3.1.3:


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

$$  \displaystyle b_n = \frac{2}{\pi} \int^{\frac{\pi}{2}}_0 x sin(nx)dx + \frac{2}{\pi} \int^{\pi}_{\frac{\pi}{2}}(\pi-x)sin(nx)dx $$     (Eq.3.1.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Therefore, the Fourier series is the following:


 * {| 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(x) = \sum_{n=1,5,9,..}^{\infin} \frac{4}{n^2\pi} sin(nx)-\sum_{n=3,7,11,..}^{\infin} \frac{4}{n^2\pi} sin(nx)

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

The graph of the different scenarios is as follows:

Part 2 Given
Information from problem 17 in Advanced Engineering Mathematics by Erwin Kreyszig on page 491.

Part 2 Problem Statement
Define whether each function is even or odd, and find it's Fourier series. Plot the functions for n=2,4,8.

Part 2 Solution
Assembling the piecewise function gives:
 * {| style="width:100%" border="0"

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

f(x) = \begin{cases} x+1 & -1 \le x < 0 \\ 1-x & 0 < x < 1 \\ \end{cases}

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

From looking at this graph it is evident that the function is even and the period for this function is 2, so therefore L=1. Since it is even, when applying it to the Fourier series, the sin function will drop out leaving the general format of the Fourier series as:


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

$$  \displaystyle f(x)=a_0+\sum_{n=1}^{\infin}a_n cos(n\pi x) $$ (Eq.3.2.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solve for the coefficients:
 * {| style="width:100%" border="0"

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


 * {| 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+\frac{1}{2}\int_{0}^1 (1-x)dx $$     (Eq.3.2.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

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


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

$$  \displaystyle a_n=\frac{1}{L}\int^L_{-L}f(x) cos\bigg(\frac{n\pi x}{L}\bigg)dx $$     (Eq.3.2.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle a_n=\int^1_{-1}f(x) cos(n\pi x)dx $$     (Eq.3.2.7)
 * 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 $$     (Eq.3.2.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle a_n=\sum^{\infin}_{n=1,3,5,..}\frac{4}{(n\pi)^2} $$     (Eq.3.2.9)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Therefore, the Fourier series is the following:


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

$$  \displaystyle f(x)=0.5+\sum_{n=1,3,5,..}^{\infin}\frac{4}{(n\pi)^2} cos(n\pi x) $$ (Eq.3.2.10)
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

The graph of f(x) for the various cases stated is shown below

Author & Proofreaders
Author: Egm4313.s12.team17.deaver.md 00:02, 9 April 2012 (UTC)

Proofreader: Egm4313.s12.team17.axelrod.a 12:00, 10 April 2012 (UTC)

Editor: Egm4313.s12.team17.deaver.md 16:52, 11 April 2012 (UTC)

=Problem R6.4--Excitation of Fourier Series=

Given

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

$$  \displaystyle f(x)=\begin{cases} 0, & \mbox{if }-1.75<x<0.25 \\ A, & \mbox{if }0.25<x<2.25 \\ 0, & \mbox{if }2.25<x<4.25 \\ \end{cases} $$     (Eq.4.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

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


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

$$  \displaystyle y(0)=1\mbox{, }y^\prime(0)=0 $$     (Eq.4.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Part 1 Problem Statement
Solve equation 4.2 for n=0,1 \,. Also, plot the solution for x\, in [0,10]\,.

Part 1 Solution
First, find the Fourier series for equation 4.1.

The coefficients for the Fourier series are the following:
 * {| style="width:100%" border="0"

$$  \displaystyle a_0=\frac{1}{2L}\int^L_{-L}f(x)dx $$     (Eq.4.1.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle a_n=\frac{1}{L}\int^L_{-L}f(x) cos\bigg(\frac{n\pi x}{L}\bigg)dx $$     (Eq.4.1.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_n=\frac{1}{L}\int^L_{-L}f(x) sin\bigg(\frac{n\pi x}{L}\bigg)dx $$     (Eq.4.1.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The value of L is 2.

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

$$  \displaystyle a_0=\frac{1}{4}\int^{2.25}_{-1.75}f(x)dx $$     (Eq.4.1.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle a_0=\frac{1}{4}\int^{2.25}_{0.25}Adx $$     (Eq.4.1.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle a_0=\frac{A}{2} $$     (Eq.4.1.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle a_n=\frac{1}{2}\int^{2.25}_{-1.75}f(x) cos\bigg(\frac{n\pi x}{2}\bigg)dx $$     (Eq.4.1.7)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle a_n=\frac{1}{2}\int^{2.25}_{0.25}A cos\bigg(\frac{n\pi x}{2}\bigg)dx $$     (Eq.4.1.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle a_1=\frac{-A\sqrt{2-\sqrt{2}}}{\pi}=-0.244A $$     (Eq.4.1.9)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_n=\frac{1}{2}\int^{2.25}_{-1.75}f(x) sin\bigg(\frac{n\pi x}{2}\bigg)dx $$     (Eq.4.1.10)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_n=\frac{1}{2}\int^{2.25}_{0.25}A sin\bigg(\frac{n\pi x}{2}\bigg)dx $$     (Eq.4.1.11)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_1=\frac{A\sqrt{\sqrt{2}+2}}{\pi}=0.588A $$     (Eq.4.1.12)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle f(x)=\frac{A}{2}+\sum^{\infin}_{n=1}\bigg[a_n cos\bigg(\frac{n\pi x}{2}\bigg)+b_n sin\bigg(\frac{n\pi x}{2}\bigg)\bigg] $$     (Eq.4.1.13)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

n = 0

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

$$  \displaystyle y_0''-3y_0'+2y_0= f_0(x) $$     (Eq.4.1.14)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle y_0=y_{0,h}+y_{0,p} $$     (Eq.4.1.15)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The homogenous solution must satisfy the following:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{0,h}''-3y_{0,h}'+2y_{0,h}= 0 $$     (Eq.4.1.16)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Therefore, the characteristic equation is:
 * {| style="width:100%" border="0"

$$  \displaystyle \lambda^2-3\lambda+2= 0 $$     (Eq.4.1.17)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

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


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

$$  \displaystyle \lambda_1=2,\lambda_2=1 $$     (Eq.4.1.19)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Distinct real roots makes the general solution of the homogenous take the following form:
 * {| style="width:100%" border="0"

$$  \displaystyle y_h=d_1e^{\lambda_1 x}+d_2e^{\lambda_2 x} $$ (Eq.4.1.20)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle y_{0,h}=d_1e^{2 x}+d_2e^{ x} $$ (Eq.4.1.21)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The particular solution must satisfy the following:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{0,p}''-3y_{0,p}'+2y_{0,p}= \frac{A}{2} $$     (Eq.4.1.22)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Using Method of Undetermined Coefficients, the particular solution will have the form:
 * {| style="width:100%" border="0"

$$  \displaystyle y_p=\sum^n_{j=0}c_jx^j $$     (Eq.4.1.23)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle y_{0,p}=c_0x^0 $$     (Eq.4.1.24)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Take the first and second derivative of equation 4.1.24:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{0,p}^\prime=0 $$     (Eq.4.1.25)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle y_{0,p}^{\prime\prime}=0 $$     (Eq.4.1.26)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Substitute equations 4.1.24, 4.1.25, and 4.1.26 into equation 4.1.22:
 * {| style="width:100%" border="0"

$$  \displaystyle 2c_0= \frac{A}{2} $$     (Eq.4.1.27)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle c_0= \frac{A}{4} $$     (Eq.4.1.28)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The particular solution will be:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{0,p}=\frac{A}{4} $$     (Eq.4.1.29)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Superimpose equation 4.1.21 and 4.1.29:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{0}=d_1e^{2 x}+d_2e^{ x}+\frac{A}{4} $$     (Eq.4.1.30)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Take the first of equation 4.1.30:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{0}^\prime=2d_1e^{2 x}+d_2e^{ x} $$ (Eq.4.1.31)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Use equation 4.3 to solve for the unknowns:
 * {| style="width:100%" border="0"

$$  \displaystyle 1=d_1+d_2+\frac{A}{4} $$     (Eq.4.1.32)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle 0=2d_1+d_2 $$     (Eq.4.1.33)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle d_1=\frac{A-4}{4} $$     (Eq.4.1.34)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle d_2=\frac{4-A}{2} $$     (Eq.4.1.35)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The final solution for n=0 \,:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{0}=\frac{(A-4)e^{2 x}}{4}+\frac{(4-A)e^{ x}}{2}+\frac{A}{2} $$     (Eq.4.1.36)
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

n = 1

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

$$  \displaystyle y_1''-3y_1'+2y_1= f_1(x) $$     (Eq.4.1.37)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle y_1=y_{1,h}+y_{1,p} $$     (Eq.4.1.38)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The homogenous solution will be the same has equation 4.1.21:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{1,h}=d_1e^{2 x}+d_2e^{ x} $$ (Eq.4.1.39)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The particular solution must satisfy the following:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{1,p}''-3y_{1,p}'+2y_{1,p}= 0.5A-0.244A cos\bigg(\frac{\pi x}{2}\bigg)+0.588A sin\bigg(\frac{\pi x}{2}\bigg) $$     (Eq.4.1.40)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Using Method of Undetermined Coefficients, the particular solution will take the form shown below:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{1,p}=y_{0,p}+K cos\bigg(\frac{\pi x}{2}\bigg) +M sin\bigg(\frac{\pi x}{2}\bigg) $$     (Eq.4.1.41)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Take the first and second derivative of equation 4.1.41:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{1,p}^\prime=y_{0,p}^\prime - \frac{K\pi}{2} sin\bigg(\frac{\pi x}{2}\bigg) +\frac{M\pi}{2} cos\bigg(\frac{\pi x}{2}\bigg) $$     (Eq.4.1.42)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle y_{1,p}^{\prime\prime}=y_{0,p}^{\prime\prime}- \frac{K\pi ^2}{4} cos\bigg(\frac{\pi x}{2}\bigg) -\frac{M\pi ^2}{4} sin\bigg(\frac{\pi x}{2}\bigg) $$     (Eq.4.1.43)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Substitute equations 4.1.41, 4.1.42, and 4.1.43 into equation 4.1.40:
 * {| style="width:100%" border="0"

$$  \displaystyle cos\bigg(\frac{\pi x}{2}\bigg)\bigg[-0.4674K-4.7124M\bigg]+sin\bigg(\frac{\pi x}{2}\bigg)\bigg[-0.4674M+4.7124K\bigg]+0.5A=0.5A-0.244A cos\bigg(\frac{\pi x}{2}\bigg)+0.588A sin\bigg(\frac{\pi x}{2}\bigg) $$     (Eq.4.1.44)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solve the coefficients by setting like terms equal to one another.

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

$$  \displaystyle -0.4674K-4.7124M=-0.244A $$     (Eq.4.1.45)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle -0.4674M+4.7124K=0.588A $$     (Eq.4.1.46)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle K=0.129A $$     (Eq.4.1.47)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle M=0.0389A $$     (Eq.4.1.48)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The particular solution will be:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{1,p}=0.25A+0.129A cos\bigg(\frac{\pi x}{2}\bigg) +0.0389A sin\bigg(\frac{\pi x}{2}\bigg) $$     (Eq.4.1.49)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Superimpose equation 4.1.39 and 4.1.49:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{1}=d_1e^{2 x}+d_2e^{ x}+0.25A+0.129A cos\bigg(\frac{\pi x}{2}\bigg) +0.0389A sin\bigg(\frac{\pi x}{2}\bigg) $$     (Eq.4.1.50)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Take the first of equation 9.2.38:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{1}^\prime=2d_1e^{2 x}+d_2e^{ x}-0.203A sin\bigg(\frac{\pi x}{2}\bigg) +0.0611A cos\bigg(\frac{\pi x}{2}\bigg) $$     (Eq.4.1.51)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Use equation 4.3 to solve for the unknowns:
 * {| style="width:100%" border="0"

$$  \displaystyle 1=d_1+d_2+0.25A+0.129A $$     (Eq.4.1.52)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle 0=2d_1+d_2+0.0611A $$     (Eq.4.1.53)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle d_1=0.3179A-1 $$     (Eq.4.1.54)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

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

The final solution for n=1 \,:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{1}=(0.3179A-1)e^{2 x}+(2-0.6969A)e^{ x}+0.25A+0.129A cos\bigg(\frac{\pi x}{2}\bigg) +0.0389A sin\bigg(\frac{\pi x}{2}\bigg) $$     (Eq.4.1.56)
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Plot
The value of the unknown was set to be one.



Part 2 Problem Statement
Use MATLAB command ode45 to integrate the ODE. Then plot the numerical and analytical solution for comparison.

Part 2 Solution
The unknown is assumed to be one.





Below is the MATLAB code used to generate the above graph:

Author & Proofreaders
Author: Egm4313.s12.team17.deaver.md 11:28, 11 April 2012 (UTC)

Proofreader 1: Egm4313.s12.team17.ying 12:30, 11 April 2012 (UTC)

Proofreader 2: Egm4313.s12.team17.hintz 13:01, 11 April 2012 (UTC)

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

=Problem R6.5--Taylor Series Expansion of an Excitation=

Given

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

$$  \displaystyle y_n(x) = y_{h,n}(x) + y_{p,n}(x) $$     (Eq.5.1.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle y(x) = y_{h}(x) + y_{p}(x) $$     (Eq.5.1.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Problem Statement
For each value of n=3,5,9, redisplay the expressions for the 3 functions $$y_{p,n}(x), y_{h,n}(x), y_{n}(x)$$ and plot these 3 functions separately over the interval $$[0,20\pi]$$

Redisplay the expressions for $$y_{p,n}(x), y_{h,n}(x), y_{n}(x)$$.

Superpose each of the above plot with that of the exact solution.

Solution
The exact solution using the form of Eq.5.6.2 and based on the report 4 solutions provided is:
 * {| style="width:100%" border="0"

$$  \displaystyle y(x) = 1.5e^x + 0.8e^{2x}+0.3\cos(x) + 0.1\sin(x) $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

This solution will plotted with each of the below plots

n = 3
From the report solutions provided in Sakai.


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

$$  \displaystyle y_{h,3}(x) = 2e^x - 0.8008e^{2x} $$     (Eq.5.1.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{p,3}(x) = -9.9206 \times 10^{-5}x^7 - 0.0010x^6-0.0031x^5-0.0078x^4-0.0990x^3-0.3984x^2-0.3984x -0.1992 $$     (Eq.5.1.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The final solution, based on Eq.5.1.1 is then:


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

$$  \displaystyle y_3(x) = 2e^x - 0.8008e^{2x} -9.9206 \times 10^{-5}x^7 - 0.0010x^6-0.0031x^5-0.0078x^4-0.0990x^3-0.3984x^2-0.3984x -0.1992 $$     (Eq.5.1.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The following is the matlab code used to generate the Eq.5.1.5 over the interval $$[0,20\pi]$$


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

$$  \displaystyle y_{h,3}(x) $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle y_{p,3}(x) $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle y_{3}(x) $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

n = 5
From the report solutions provided in Sakai.


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

$$  \displaystyle y_{h,5}(x) = 2.0001e^x - 0.8001e^{2x} $$     (Eq.5.1.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{p,5}(x) = -1.2526 \times 10^{-8}x^{11} - 2.0668 \times 10^{-7}x^{10} -1.0334\times10^{-6}x^9-4.6503\times10^{-6}x^8-1.1781\times10^{-4}x^7 $$     (Eq.5.1.7)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -0.0011x^6-0.0033x^5-0.0083x^4-0.0999x^3-0.3999x^2-0.3999x-0.200 $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The final solution, based on Eq.5.1.1 is then:


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

$$  \displaystyle y_5(x) = 2.0001e^x - 0.8001e^{2x}-1.2526 \times 10^{-8}x^{11} - 2.0668 \times 10^{-7}x^{10} -1.0334\times10^{-6}x^9-4.6503\times10^{-6}x^8 $$     (Eq.5.1.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -1.1781\times10^{-4}x^7-0.0011x^6-0.0033x^5-0.0083x^4-0.0999x^3-0.3999x^2-0.3999x-0.200 $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The following is the matlab code used to generate the Eq.5.1.9 over the interval $$[0,20\pi]$$


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

$$  \displaystyle y_{h,5}(x) $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle y_{p,5}(x) $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle y_{5}(x) $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

n = 9
From the report solutions provided in Sakai.


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

$$  \displaystyle y_{h,9}(x) = 2e^x - 0.8e^{2x} $$     (Eq.5.1.9)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{p,9}(x) = -4.1103 \times 10^{-18}x^{19} - 1.1714 \times 10^{-16}x^{18} -1.0543\times10^{-15}x^{17}-8.9615\times10^{-15}x^{16}-4.5405\times10^{-13}x^{15} $$     (Eq.5.1.10)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -9.1408\times10^{-12}x^{14}-6.3985\times10^{-11}x^{13}-4.1590\times10^{-10}x^{12}-1.5021\times10^{-8}x^{11}-2.2040\times10^{-7}x^{10}-1.1020\times10^{-6}x^9 $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -4.9591\times10^{-6}x^8-1.1904\times10^{-4}x^7-0.0011x^6-0.0033x^5 $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The final solution, based on Eq.5.1.1 is then:


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

$$  \displaystyle y_9(x) = 2e^x - 0.8e^{2x}-4.1103 \times 10^{-18}x^{19} - 1.1714 \times 10^{-16}x^{18} -1.0543\times10^{-15}x^{17}-8.9615\times10^{-15}x^{16}-4.5405\times10^{-13}x^{15} $$     (Eq.5.1.11)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -9.1408\times10^{-12}x^{14}-6.3985\times10^{-11}x^{13}-4.1590\times10^{-10}x^{12}-1.5021\times10^{-8}x^{11}-2.2040\times10^{-7}x^{10}-1.1020\times10^{-6}x^9 $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -4.9591\times10^{-6}x^8-1.1904\times10^{-4}x^7-0.0011x^6-0.0033x^5 $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The following is the matlab code used to generate the Eq.5.1.11 over the interval $$[0,20\pi]$$


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

$$  \displaystyle y_{h,9}(x) $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle y_{p,9}(x) $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle y_{9}(x) $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Part 2 Problem Statement
Understand and run the TA's code to produce a similar plot, but over a larger interval $$[0,10]$$. Do zoom in plots about poiints x = -0.5, 0, 0.5 and comment on the accuracy of different approximations.

Part 2 Solution
From the report 4 solution, the following is the matlab code the TAs used to generate the graphs.



$$x = -0.5$$



$$x = 0$$



$$x = +0.5$$



In the first diagram, one can note that the accuracy of each plot increases as the value of n increases. The plot for n = 11, which is the blue line, lines up perfectly with the cyan line, which is the exact solution.

In the second diagram, the only visible plot is the exact solution or the cyan color. In this region, the plots of all the formulas lie on the same line making it not possible to see the other plots.

In the third diagram, you can see a similar pattern from the first diagram,however, this time the blue line is slightly off from the cyan line. As the value of n decreases, the accuracy of the approximations falls from the cyan plot.

Part 3 Problem Statement
Understand and run the TA's code to produce a similar plot, but over a larger interval $$[0.9,10]$$ and for n = 4,7. Do zoom in plots about points x = 1,1.5,2,2.5 and comment on the accuracy of different approximations.

Part 3 Solution


$$x = 1$$



$$x = 1.5$$



$$x = 2$$



$$x = 2.5$$



In the diagram where the graph is focused about x = 1, there is not much difference in the accuracy of the approximations.

The diagram with x = 1.5, you can see the deviation in the accuracy of the approximations near the end of the graph.

As the focus changes to x = 2.0, there is clearly more deviation in the approximation. N = 4 is the furthest from the exact compared to n = 11.

Author & Proofreaders
Author: Egm4313.s12.team17.ying 23:10, 8 April 2012 (UTC)

Proofreader: Egm4313.s12.team17.wheeler.tw 11:00, 10 April 2012 (UTC)

Editor: Egm4313.s12.team17.deaver.md 17:00, 11 April 2012 (UTC)

=Problem R6.6--Symbolic Computation=

Given

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

$$  \displaystyle y_{p}''+4y_{p}'+13y_{p}=2e^{-2x}cos(3x) $$     (Eq.6.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Problem Statement

 * 1) Simplify the first term $$ y_{p}'' $$ on the lhs.
 * 2) Simplify the second term $$  4y_{p}' $$ and combine with the simplified first term.
 * 3) Finally, add the third term $$  13y_{p} $$.

Solution
From Lecture Notes Sec.10 p.10-3:

Particular solution is of the form:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{p}(x)=xe^{-2x}[Mcos(3x)+Nsin(3x)] $$     (Eq.6.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From Lecture Notes Sec.10 p.10-3:
 * {| style="width:100%" border="0"

$$  \displaystyle y^{'}_{p}(x)=e^{-2x}[sin(3x)(-3mx-2nx+n)+cos(3x)(-2mx+m+3nx)] $$    (Eq.6.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle y^{''}_{p}(x)=e^{-2x}[sin(3x)[6m(2x-1)-n(5x+4)]-cos(3x)[m(5x+4)+6n(2x-1)]] $$      (Eq.6.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Now substitute these derivatives back into the original ODE and verify that Wolfram Alpha's solution of:
 * {| style="width:100%" border="0"

$$  \displaystyle y_p=6e^{-2x}[ncos(3x)-msin(3x)] $$      (Eq.6.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Simplifying y^{''}_{p}:
 * {| style="width:100%" border="0"

$$  \displaystyle y^{''}_{p}=e^{-2x}[sin(3x)[6m(2x-1)-n(5x+4)]-cos(3x)[m(5x+4)+6n(2x-1)]] $$      (Eq.6.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y''_{p}=e^{-2x}[12mxsin(3x)-6msin(3x)-5nxsin(3x)-4nsin(3x)-5mxcos(3x)-4mcos(3x)-12nxcos(3x)+6ncos(3x)] $$      (Eq.6.7)
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Now to simplify 4y_{p}' and combine with equation 6.7.
 * {| style="width:100%" border="0"

$$  \displaystyle y^{'}_{p}=e^{-2x}[sin(3x)(-3mx-2nx+n)+cos(3x)(-2mx+m+3nx)] $$      (Eq.6.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 4y'p=4e^{-2x}[sin(3x)(-3mx-2nx+n)+cos(3x)(-2mx+m+3nx)] $$      (Eq.6.9) Distributing the 4 we have:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 4y'p=e^{-2x}[-12mxsin(3x)-8nxsin(3x)+4nsin(3x)-8mxcos(3x)+4mcos(3x)+12nxcos(3x)] $$      (Eq.6.10)
 * style="width:80%" |
 * style="width:80%" |
 * <p style="text-align:right">
 * }

Combining with equation 6.7:
 * {| style="width:100%" border="0"

$$  \displaystyle y''_{p}+4y'_{p}=e^{-2x}[12mxsin(3x)-6msin(3x)-5nxsin(3x)-4nsin(3x)-5mxcos(3x)-4mcos(3x)-12nxcos(3x)+6ncos(3x)] $$
 * style="width:80%" |
 * style="width:80%" |

$$  \displaystyle +e^{-2x}[-12mxsin(3x)-8nxsin(3x)+4nsin(3x)-8mxcos(3x)+4mcos(3x)+12nxcos(3x)] $$      (Eq.6.11)
 * <p style="text-align:right">
 * }

Simplifying we eventually get:
 * {| style="width:100%" border="0"

$$  \displaystyle y''_{p}+4y'_{p}=e^{-2x}[-6msin(3x)-13nxsin(3x)-13mxcos(3x)+6ncos(3x)] $$      (Eq.6.12)
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Before adding the term $$ 13y_{p} $$, we need to find out what it equals to:
 * {| style="width:100%" border="0"

$$  \displaystyle 13y_{p}=13xe^{-2x}[Mcos(3x)+Nsin(3x)] $$      (Eq.6.13) After distributing the 13 and simplifying we arrive at:
 * style="width:80%" |
 * style="width:80%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 13y_{p}=e^{-2x}[13mxcos(3x)+13nxcos(3x)] $$      (Eq.6.14) Now adding $$ 13y_{p} $$ with equation 6.12:
 * style="width:80%" |
 * style="width:80%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y''_{p}+4y'_{p}+13y_{p}=e^{-2x}[-6msin(3x)-13nxsin(3x)-13mxcos(3x)+6ncos(3x)]+e^{-2x}[13mxcos(3x)+13nxcos(3x)] $$      (Eq.6.15) After simplifying we arrive at:
 * style="width:80%" |
 * style="width:80%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y''_{p}+4y'_{p}+13y_{p}= e^{-2x}[-6msin(3x)+6ncos(3x)] $$      (Eq.6.16)
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * style="width:5%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Comparing this to Wolfram Alpha's answer, we see that they are essentially the same once the "6" is factored out from equation 6.16:


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

$$  \displaystyle 6e^{-2x}[ncos(3x)-msin(3x)]=6e^{-2x}[ncos(3x)-msin(3x)] $$      (Eq.6.17)
 * style="width:80%" |
 * style="width:80%" |
 * <p style="text-align:right">
 * }

Author & Proofreaders
Author: Egm4313.s12.team17.Li 07:03, 9 April 2012 (UTC)

Proofreader 1: Egm4313.s12.team17.ying 05:23, 10 April 2012 (UTC)

Proofreader 2: Egm4313.s12.team17.wheeler.tw 15:50, 10 April 2012 (UTC)

Editor: Egm4313.s12.team17.deaver.md 17:10, 11 April 2012 (UTC)

=Problem R6.7--Separated ODES of Heat Equation=

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

$$  \displaystyle \frac{\partial \mu }{\partial t}=\kappa\frac{\partial ^{2}\mu }{\partial x^2} $$     (Eq.7.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Problem Statement
Find the seperated ODEs for the Heat equation (Equation 7.1)

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

$$  \displaystyle \mu (x,t)=F(x)\cdot G(t) $$     (Eq.7.2) Where $$F(x)$$ is only a function of x (position) and $$G(t)$$ is only a function of t (time).
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$  \displaystyle \frac{\partial^2 \mu (x,t)}{\partial x^2}=F''(x)\cdot G(t) $$     (Eq.7.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle \frac{\partial \mu (x,t)}{\partial t}=F(x)\cdot \dot{G}(t) $$     (Eq.7.4) Plugging equations 7.3 and 7.4 into 7.1:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle F(x)\cdot \dot{G}(t)=\kappa F''(x)\cdot G(t) $$     (Eq.7.5) Rearranging equation 7.5:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{\dot{G(t)}}{\kappa G(t)}=\frac{F''(x)}{F(x)} $$     (Eq.7.6) Since $$F(x)$$ is only a function of x and $$G(t)$$ is only a function of t, in order for the above equality to be true, the following must also be true:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{\dot{G(t)}}{\kappa G(t)}=\frac{F''(x)}{F(x)}=K $$     (Eq.7.7) Where $$K$$ is a constant. Separating equation 7.7:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{\dot{G(t)}}{\kappa G(t)}=K $$     (Eq.7.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{F''(x)}{F(x)}=K $$     (Eq.7.9) Rearranging equation 7.8 results:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \dot{G(t)} - \kappa \cdot K \cdot G(t) = 0 $$     (Eq.7.10) Rearranging equation 7.9:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle F''(x)-K \cdot F(x) = 0 $$     (Eq.7.11) Therefore, the separated ODEs of the Heat equation are:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \dot{G(t)} - \kappa \cdot K \cdot G(t) = 0 $$     (Eq.7.10)
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle F''(x)-K \cdot F(x) = 0 $$     (Eq.7.11)
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Author & Proofreaders
Author: Egm4313.s12.team17.wheeler.tw 19:10, 9 April 2012 (UTC)

Proofreader: Egm4313.s12.team17.hintz 00:05, 10 April 2012 (UTC)

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

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