University of Florida/Egm4313/IEA-f13-team10/R6

Report 6

Problem 1

Problem Statement

ODE: ${\displaystyle y''-3y'-10y=3cos7x}$

Part 1: show that cos7x and sin7x are linearly independent using the Wronskian and Gramian.

Part 2: Find 2 equations for the two unknowns M, N, and solve for M, N.

Part 3: Find the overall solution y(x) that corresponds to the initial conditions: ${\displaystyle y(0)=1,y'(0)=0}$

Plot the solution over 3 periods

Solution

Part 1

Wronskian: Function is linearly independent if ${\displaystyle W(f,g)\neq 0}$
${\displaystyle W(f,g):={\begin{bmatrix}f&g\\f'&g'\end{bmatrix}}=fg'-gf'}$

${\displaystyle f=cos7x,f'=-7sin7x}$

${\displaystyle g=sin7x,g'=7cos7x}$

${\displaystyle W(cos7x,sin7x):={\begin{bmatrix}cos7x&sin7x\\-7sin7x&7cos7x\end{bmatrix}}=7cos^{2}7x+7sin^{2}7x=1}$

g(x) and f(x) are linearly independent

Gramian: Function is linearly independent if ${\displaystyle \Gamma (f,g)\neq 0}$
${\displaystyle \Gamma (f,g):={\begin{bmatrix}&\\&\end{bmatrix}}}$

${\displaystyle f(x)=cos7x,g(x)=sin7x}$
${\displaystyle =\int _{-1}^{1}cos7x*cos7xdx=1.07}$
${\displaystyle =\int _{-1}^{1}cos7x*sin7xdx=0}$
${\displaystyle =\int _{-1}^{1}sin7x*cos7xdx=0}$
${\displaystyle =\int _{-1}^{1}sin7x*sin7xdx=0.93}$

${\displaystyle \Gamma (f,g):={\begin{bmatrix}1.07&0\\0&0.93\end{bmatrix}}=0.9951}$

g(x) and f(x) are linearly independent

Part 2

The particular solution for a ${\displaystyle r(x)=3cos7x}$ will be:

${\displaystyle y_{p}(x)=Mcos7x+Nsin7x}$

Differentiate to get:

${\displaystyle y_{p}'(x)=-M7sin7x+N7cos7x}$

${\displaystyle y_{p}''(x)=-M7^{2}cos7x-N7^{2}sin7x}$

Plug the derivatives into the equation:

${\displaystyle y_{p}''(x)-3y_{p}'(x)-10y_{p}(x)=3cos7x}$

${\displaystyle (-M7^{2}cos7x-N7^{2}sin7x)-3(-M7sin7x+N7cos7x)-10(Mcos7x+Nsin7x)}$

Separate the sin and cos terms to get 2 equations in order to solve for M and N

${\displaystyle -M7^{2}cos7x-3N7cos7x-10Mcos7x=3cos7x}$

${\displaystyle -N7^{2}sin7x+3M7sin7x-10Nsin7x=0}$

dividing each equation by cos7x and sin7x respectively:

${\displaystyle -49M-21N-10M=3}$

${\displaystyle -49N+21M-10N=0}$

${\displaystyle M=-0.0454}$

${\displaystyle N=-0.0154}$

So the particular solution is:

${\displaystyle y_{p}(x)=-0.0454cos7x-0.0154sin7x}$

Part 3

The overall solution can be found by:

${\displaystyle y(x)=y_{h}(x)+y_{p}(x)}$

The roots given in the problem statement ${\displaystyle \lambda _{1}=-2,\ \lambda _{2}=+5}$

Lead to the homogeneous solution of:

${\displaystyle y_{h}(x)=C_{1}e^{-2x}+C_{2}e^{5x}}$

Combining the homogeneous and particular solution gives us:

${\displaystyle y(x)=C_{1}e^{-2x}+C_{2}e^{5x}-0.0454cos7x-0.0154sin7x}$

Solving for the constants by using the initial conditions ${\displaystyle y(0)=1,y'(0)=0}$

${\displaystyle y(0)=C_{1}e^{0}+C_{2}e^{0}-0.0454cos(0)-0.0154sin(0)=1}$

${\displaystyle y'(0)=-2C_{1}e^{0}+5C_{2}e^{0}+0.3178sin(0)-0.1078cos(0)=0}$

${\displaystyle C_{1}=0.73}$

${\displaystyle C_{2}=0.31}$

The overall solution is:

${\displaystyle y(x)=0.73e^{-2x}+0.31e^{5x}-0.0454cos7x-0.0154sin7x}$

Plot

Plot ${\displaystyle y(x)=0.73e^{-2x}+0.31e^{5x}-0.0454cos7x-0.0154sin7x}$

over 3 periods:

Honor Pledge

On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.

Problem 2

Problem Statement

Complete the solution to problem on p.8-6.
Find the overall solution ${\displaystyle y(x)}$
that corresponds to the initial condition ${\displaystyle y(0)=1,y'(0)=0}$
Plot solution over 3 periods.

Solution

Given:
${\displaystyle y''+4y'+13y=2*e^{-2x}*3cos7x}$
${\displaystyle y_{h}(x)=e^{-2x}*(Acos(3x)+BNsin(3x))}$
${\displaystyle y_{P}(x)=x*e^{-2x}*(Mcos(3x)+Nsin(3x))}$

${\displaystyle y_{P}'(x)=e^{-2x}*cos(3x)(x(-2M+N)+M)+e^{-2x}*sin(3x)(x(-2N-M)+N)}$
${\displaystyle y_{P}''(x)=e^{-2x}(-3sin(3x)(x(-2M+N)+M)}$
${\displaystyle +cos(3x)(-2M+N))-2e^{-2x}cos(3x)(x(-2M+N)+M)+e^{-2x}(3cos(3x)(x(-2N-M)}$
${\displaystyle +N)+sin(3x)(-2N-M))-2e^{-2x}sin(3x)(x(-2N-M)+N)}$

${\displaystyle y_{p}''+4y_{p}'+13y_{p}=2*e^{-2x}*3cos7x}$

Solve for M and N:
${\displaystyle 4N=2,-2M+4N}$
${\displaystyle M=1,N=0.5}$

${\displaystyle y(x)=e^{-2x}*(Acos(3x)+BNsin(3x))+x*e^{-2x}*(cos(3x)+.5*sin(3x))}$
Using initial conditions given find A and B

After applying initial conditions, we get
${\displaystyle A=1,-2A+3B+1=0}$
${\displaystyle A=1,B=1/3}$

${\displaystyle y(x)=e^{-2x}*(cos(3x)+sin(3x)/3)+x*e^{-2x}*(cos(3x)+.5*sin(3x))}$

Honor Pledge

On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.

Problem 3

Problem Statement

Is the given function even or odd or neither even nor odd? Find its Fourier Series.

Solution

${\displaystyle f(x)=x^{2},(-1

${\displaystyle f(-x)=f(x)}$ so ${\displaystyle f(x)=x^{2}}$ is an even function.

The Fourier series is ${\displaystyle f(x)=a_{0}+\sum _{n=1}^{\infty }[a_{n}cos(nwx)+b_{n}sin(nwx)]}$.

${\displaystyle a_{0}={\frac {1}{2L}}\int _{-L}^{L}f(x)dx}$

For ${\displaystyle n=1,2,...}$
${\displaystyle a_{n}={\frac {1}{L}}\int _{-L}^{L}f(x)cos(nwx)dx}$
${\displaystyle b_{n}={\frac {1}{L}}\int _{-L}^{L}f(x)sin(nwx)dx}$

For ${\displaystyle f(x)=x^{2}}$
${\displaystyle a_{0}={\frac {1}{2(1)}}\int _{-1}^{1}x^{2}dx={\frac {1}{3}}}$
${\displaystyle a_{n}={\frac {1}{1}}\int _{-1}^{1}x^{2}cos(n\pi x)dx}$
The above integral requires two iterations of integration by parts. Which gives
${\displaystyle a_{n}={\frac {1}{n\pi }}[sin(n\pi )-sin(-n\pi )]+{\frac {2}{n^{2}\pi ^{2}}}[cos(n\pi )+cos(-n\pi )]-{\frac {2}{n^{3}\pi ^{3}}}[sin(n\pi )-sin(-n\pi )]}$
Similarly, integration by parts needs to be used twice to solve the following integral.
${\displaystyle b_{n}={\frac {1}{1}}\int _{-1}^{1}x^{2}sin(n\pi x)dx}$
${\displaystyle b_{n}={\frac {-1}{n\pi }}[cos(n\pi )-cos(-n\pi )]+{\frac {2}{n^{2}\pi ^{2}}}[sin(n\pi )+sin(-n\pi )]+{\frac {2}{n^{3}\pi ^{3}}}[cos(n\pi )-cos(-n\pi )]}$
So the Fourier series for ${\displaystyle f(x)=x^{2}}$ is
${\displaystyle {\frac {1}{3}}+\sum _{n=1}^{\infty }cos(nwx)[{\frac {1}{n\pi }}[sin(n\pi )-sin(-n\pi )]+{\frac {2}{n^{2}\pi ^{2}}}[cos(n\pi )+cos(-n\pi )]-{\frac {2}{n^{3}\pi ^{3}}}[sin(n\pi )-sin(-n\pi )]]}$
${\displaystyle +sin(nwx)[-{\frac {1}{n\pi }}[cos(n\pi )-cos(-n\pi )]+{\frac {2}{n^{2}\pi ^{2}}}[sin(n\pi )+sin(-n\pi )]+{\frac {2}{n^{3}\pi ^{3}}}[cos(n\pi )-cos(-n\pi )]]}$

Honor Pledge

On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.

Problem 4

Problem Statement

1) Develop the Fourier series of${\displaystyle f({\bar {x}})}$. Plot${\displaystyle f({\bar {x}})}$and develop the truncated Fourier series${\displaystyle f_{n}({\bar {x}})}$.
${\displaystyle f_{n}({\bar {x}}):={\bar {a}}_{0}+\sum _{k=1}^{n}[{\bar {a}}_{k}\cos k\omega {\bar {x}}+{\bar {b}}_{k}\sin k\omega {\bar {x}}]}$
for n = 0,1,2,4,8. Observe the values of at the points of discontinuities, and the Gibbs phenomenon. Transform the variable so to obtain the Fourier series expansion of . Level 1: n=0,1.

2)Do the same as above, but using${\displaystyle f({\tilde {x}})}$to obtain the Fourier series expansion of${\displaystyle f(x)}$; compare to the result obtained above. Level 1: n=0,1.

Solution

Part 1

To begin, the function ${\displaystyle f({\bar {x}})}$ was determined to be even. Even functions reduce to a cosine Fourier series. Because ${\displaystyle f({\bar {x}})}$, has a period of 4, the length is 2.

${\displaystyle a_{0}={\frac {1}{L}}\int _{0}^{2}f({\bar {x}})d{\bar {x}}={\frac {A}{2}}}$

${\displaystyle a_{k}={\frac {2}{L}}\int _{0}^{2}f({\bar {x}})\cos({\frac {k\pi {\bar {x}}}{2}})d{\bar {x}}}$

${\displaystyle a_{k}={\frac {2A}{k\pi }}\sin({\frac {k\pi }{2}})}$

${\displaystyle f_{k}({\bar {x}})=a_{0}+\sum _{k=1}^{n}[a_{n}\cos {\frac {n\pi {\bar {x}}}{2}}]}$

${\displaystyle f_{k}={\frac {A}{2}}+\sum _{k=1}^{n}[{{\frac {2A}{k\pi }}\sin({\frac {k\pi }{2}})}\cos {\frac {k\pi {\bar {x}}}{2}}]}$

For n=0,
${\displaystyle f_{0}({\bar {x}})={\frac {A}{2}}}$

For n=1,
${\displaystyle f_{1}({\bar {x}})={\frac {A}{2}}+{\frac {2A}{\pi }}\cos({\frac {\pi {\bar {x}}}{2}})}$

${\displaystyle {\bar {x}}=x-1.25}$

${\displaystyle f_{k}(x)={\frac {A}{2}}+{\frac {A}{\pi }}\cos({\frac {\pi (x-1.25)}{2}})}$

Plot (A=1)

Part 2

To begin, the function ${\displaystyle f({\bar {x}})}$ was determined to be odd. Even functions reduce to a sine Fourier series. Because ${\displaystyle f({\bar {x}})}$, has a period of 4, the length is 2.

${\displaystyle a_{0}={\frac {1}{L}}\int _{0}^{2}f({\bar {x}})d{\bar {x}}={\frac {A}{2}}}$

${\displaystyle a_{0}={\frac {1}{2L}}\int _{0}^{4}f({\tilde {x}})d{\tilde {x}}={\frac {A}{2}}}$

${\displaystyle a_{n}={\frac {1}{2}}\int _{0}^{4}f{\tilde {x}}\cos({\frac {n\pi {\tilde {x}}}{2}}d{\tilde {x}}}$

${\displaystyle a_{n}={\frac {1}{2}}f({\tilde {x}})\cos({\frac {n\pi {\tilde {x}}}{2}}}$ from 0 to 4

${\displaystyle a_{n}={\frac {A}{n\pi }}\sin(\pi k)}$

${\displaystyle b_{n}={\frac {1}{2}}\int _{0}^{4}f{\tilde {x}}\sin({\frac {n\pi {\tilde {x}}}{2}}d{\tilde {x}}}$

${\displaystyle b_{n}={\frac {1}{2}}f({\tilde {x}})\sin({\frac {n\pi {\tilde {x}}}{2}})}$ from 0 to 4

${\displaystyle b_{n}={\frac {A}{n\pi }}(1-\cos(\pi k))}$

${\displaystyle f_{k}({\tilde {x}})={\frac {A}{2}}+\sum _{k=1}^{n}[{\frac {A}{k\pi }}(1-\cos(\pi k))(\sin({\frac {k\pi {\tilde {x}}}{2}}))]}$

For n=0,
${\displaystyle f_{0}({\tilde {x}})={\frac {A}{2}}}$

For n=1,
${\displaystyle f_{1}({\tilde {x}})={\frac {A}{2}}+{\frac {A}{\pi }}\sin({\frac {\pi {\tilde {x}}}{2}})}$

${\displaystyle {\tilde {x}}=x-.25}$

${\displaystyle f_{1}(x)={\frac {A}{2}}+{\frac {A}{\pi }}\sin({\frac {\pi (x-.25)}{2}})}$
Plot (A=1)

Honor Pledge

On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.

Problem 5

Problem Statement

Find the separated ODE's for the Heat Equation:

${\displaystyle {\frac {\partial ^{2}u}{\partial t^{2}}}=k{\frac {\partial ^{2}u}{\partial x^{2}}}}$ (1)

${\displaystyle k=}$ heat capacity

Solution

Separation of Variables:

Assume: ${\displaystyle u(x,t)=F(x)\cdot G(t)}$

${\displaystyle {\frac {\partial u(x,t)}{\partial x}}=F'(x)\cdot G(t)}$ (2)

${\displaystyle {\frac {\partial ^{2}u(x,t)}{\partial x^{2}}}=F''(x)\cdot G(t)}$ (3)

${\displaystyle {\frac {\partial u(x,t)}{\partial t}}=F(x)\cdot {\dot {G}}(t)}$ (4)

${\displaystyle {\frac {\partial ^{2}u(x,t)}{\partial t^{2}}}=F(x)\cdot {\ddot {G}}(t)}$ (5)

Plug (2) and (3) into Heat Equation (1):

${\displaystyle F(x)\cdot {\dot {G}}(t)=kF''(x)\cdot G(t)}$ (6)

Rearrange (6) to combine like terms:

${\displaystyle {\frac {{\dot {G}}(t)}{kG(t)}}={\frac {F''(x)}{F(x)}}=c{\text{ (constant)}}}$

${\displaystyle {\frac {{\dot {G}}(t)}{kG(t)}}=c}$

${\displaystyle {\dot {G}}(t)=k\,c\,G(t)}$

${\displaystyle {\dot {G}}(t)-k\,c\,G(t)=0}$

${\displaystyle {\frac {F''(x)}{F(x)}}=c}$

${\displaystyle F''(x)=c\,F(x)}$

${\displaystyle F''(x)-c\,F(x)=0}$

Solution:

Separated ODE's for Heat Equation:

${\displaystyle {\dot {G}}(t)-k\,c\,G(t)=0}$

${\displaystyle F''(x)-c\,F(x)=0}$

Honor Pledge

On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.

Problem 6

Problem Statement

Verify (4)-(5) p.19-9
(4)${\displaystyle <\phi _{i},\phi _{j}>=0}$ for ${\displaystyle i\neq j}$
(5)${\displaystyle <\phi _{i},\phi _{j}>=L/2}$ for ${\displaystyle i=j}$

Solution

Verification of (4)

Using the integral scalar product calculation,
${\displaystyle \int _{0}^{L}\phi _{i}(x)\phi _{j}(x)dx}$

Substituting in sin values,
${\displaystyle \int _{0}^{L}sin(\omega _{i}(x))sin(\omega _{j}(x))dx}$

Using ${\displaystyle z={\frac {\pi x}{L}}}$ and ${\displaystyle dz={\frac {\pi }{L}}dx}$

You can substitute z into the integral instead of x.
${\displaystyle \int _{0}^{\pi }sin(iz)sin(jz)dz{\frac {L}{\pi }}}$

Integrating,
${\displaystyle {\frac {1}{2}}[{\frac {sin(i-j)z}{i-j}}-{\frac {sin(i+j)z}{i+j}}]}$ from ${\displaystyle z=0}$ to ${\displaystyle z=\pi }$
Since ${\displaystyle i\neq j}$, the equation with its sin values turns into 0-0=0

Verification of (5)

You can use the same equation from the verification of (4) from this point:
${\displaystyle {\frac {1}{2}}[{\frac {sin(i-j)z}{i-j}}-{\frac {sin(i+j)z}{i+j}}]}$ from ${\displaystyle z=0}$ to ${\displaystyle z=\pi }$
Putting those values in and substituting L back in the equation, it turns into ${\displaystyle {\frac {L}{2}}}$

Honor Pledge

On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.

Problem 7

Problem Statement

${\displaystyle u(x,t)=\sum _{j=1}^{\infty }a_{j}\cos(cw_{j}t)\sin(w_{j}x)}$
Plot the truncated series for n=5. ${\displaystyle t=\alpha p_{1}={\frac {\alpha 2L}{c}}}$

${\displaystyle \alpha =.5,1,1.5,2}$

Solution

${\displaystyle a_{j}={\frac {2[((-1)^{j})-1]}{\pi ^{3}j^{3}}}}$

${\displaystyle w_{j}={\frac {j\pi }{L}}}$

C=3 and L=2
Plot ${\displaystyle u(x,2/3)}$

Plot ${\displaystyle u(x,4/3)}$

Plot ${\displaystyle u(x,2)}$

Plot ${\displaystyle u(x,8/3)}$

Honor Pledge

On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.