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

Problem Statement
ODE: $$ 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: $$ y(0)= 1, y'(0) = 0 $$

Plot the solution over 3 periods

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

$$ f = cos7x,   f' = -7sin7x$$ $$ g = sin7x,   g' = 7cos7x $$

$$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 $$\Gamma(f,g) \neq 0$$ $$\Gamma(f,g) := \begin{bmatrix}  &  \\  &  \end{bmatrix}$$

$$ f(x) = cos7x, g(x) = sin7x $$ $$ = \int_{-1}^{1}cos7x * cos7x dx = 1.07$$ $$ = \int_{-1}^{1}cos7x * sin7x dx = 0$$ $$ = \int_{-1}^{1}sin7x * cos7x dx = 0$$ $$ = \int_{-1}^{1}sin7x * sin7x dx = 0.93$$

$$\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 $$ r(x) = 3 cos7x $$ will be:

$$ y_p(x) = M cos7x + N sin7x $$

Differentiate to get:

$$ y_p'(x) = - M 7 sin 7 x + N 7 cos 7 x$$

$$ y_p'' (x) = - M 7^2 cos 7 x - N 7^2 sin 7 x $$

Plug the derivatives into the equation:

$$ y_p''(x) - 3y_p'(x) - 10y_p(x) = 3cos7x $$

$$ (- M 7^2 cos 7 x - N 7^2 sin 7 x) - 3 (- M 7 sin 7 x + N 7 cos 7 x) - 10 (M cos7x + N sin7x) $$

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

$$ - M 7^2 cos 7 x - 3 N 7 cos 7 x - 10 M cos7x = 3cos7x $$

$$ - N 7^2 sin 7 x + 3 M 7 sin 7 x - 10 N sin7x = 0 $$

dividing each equation by cos7x and sin7x respectively:

$$ -49M - 21N - 10M = 3 $$

$$ -49N + 21M - 10N = 0 $$

$$ M = -0.0454$$

$$ N = -0.0154$$

So the particular solution is:

$$ y_p(x) = -0.0454 cos7x - 0.0154 sin7x $$

Part 3
The overall solution can be found by: $$ y(x) = y_h(x) + y_p(x) $$

The roots given in the problem statement $$ \lambda_1 = -2, \ \lambda_2 = +5 $$

Lead to the homogeneous solution of:

$$ y_h(x) = C_1 e^{-2x} + C_2 e^{5x} $$

Combining the homogeneous and particular solution gives us:

$$ y(x) = C_1 e^{-2x} + C_2 e^{5x} - 0.0454 cos7x - 0.0154 sin7x $$

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

$$ y(0) = C_1 e^{0} + C_2 e^{0} - 0.0454 cos(0) - 0.0154 sin(0) = 1 $$

$$ y'(0) = -2C_1 e^{0} + 5C_2 e^{0} + 0.3178 sin(0) - 0.1078 cos(0) = 0$$

$$ C_1 = 0.73$$ $$ C_2 = 0.31$$

The overall solution is:

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

Plot
Plot $$ y(x) = 0.73 e^{-2x} + 0.31 e^{5x} - 0.0454 cos7x - 0.0154 sin7x $$ 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 Statement
Complete the solution to problem on p.8-6. Find the overall solution $$ y(x) $$ that corresponds to the initial condition $$ y(0)=1, y'(0)=0 $$ Plot solution over 3 periods.

Solution
Given: $$ y'' + 4y' + 13y = 2*e^{-2x}*3cos7x $$ $$ y_h(x)= e^{-2x}*(Acos(3x) + BNsin(3x)) $$ $$ y_P(x)= x*e^{-2x}*(Mcos(3x) + Nsin(3x)) $$ $$ y_P'(x)= e^{-2x}*cos(3x)(x(-2M+N)+M) + e^{-2x}*sin(3x)(x(-2N-M)+N) $$ $$ y_P''(x)= e^{-2x}(-3sin(3x)(x(-2M+N)+M)$$ $$+cos(3x)(-2M+N))-2e^{-2x}cos(3x)(x(-2M+N)+M) + e^{-2x}(3cos(3x)(x(-2N-M)$$ $$+N) + sin(3x)(-2N-M)) - 2e^{-2x}sin(3x)(x(-2N-M)+N) $$ $$ y_p'' + 4y_p' + 13y_p = 2*e^{-2x}*3cos7x $$ Solve for M and N: $$ 4N=2, -2M+4N $$ $$ M=1, N=0.5 $$ $$ 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 $$ A=1, -2A+3B+1=0 $$ $$ A=1, B=1/3 $$ $$ 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 Statement
Is the given function even or odd or neither even nor odd? Find its Fourier Series.

Solution
$$ f(x) = x^2, (-1<x<1), p=2 $$ $$ f(-x) = f(x) $$ so $$ f(x) = x^2 $$ is an even function. The Fourier series is $$ f(x)=a_0+\sum_{n=1}^{\infty}[a_ncos(nwx)+b_nsin(nwx)] $$. $$ a_0=\frac{1}{2L}\int_{-L}^{L}f(x) dx $$ For $$ n=1,2,... $$ $$ a_n=\frac{1}{L}\int_{-L}^{L}f(x)cos(nwx)dx$$ $$ b_n=\frac{1}{L}\int_{-L}^{L}f(x)sin(nwx)dx$$ For $$ f(x)=x^2 $$ $$ a_0=\frac{1}{2(1)}\int_{-1}^{1}x^2dx=\frac{1}{3} $$ $$ a_n=\frac{1}{1}\int_{-1}^{1}x^2cos(n\pi x)dx $$ The above integral requires two iterations of integration by parts. Which gives $$ 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. $$ b_n=\frac{1}{1}\int_{-1}^{1}x^2sin(n\pi x)dx $$ $$ 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 $$ f(x)=x^2 $$ is $$ \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)]]$$ $$+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 Statement
1) Develop the Fourier series of$$f (\bar x)$$. Plot$$f (\bar x)$$and develop the truncated Fourier series$$ f_n(\bar x)$$. $$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$$f (\tilde x)$$to obtain the Fourier series expansion of$$f (x)$$; compare to the result obtained above. Level 1: n=0,1.

Part 1
To begin, the function $$f (\bar x)$$ was determined to be even. Even functions reduce to a cosine Fourier series. Because $$f (\bar x)$$, has a period of 4, the length is 2. $$a_0=\frac{1}{L}\int_{0}^{2}f(\bar x)d\bar x=\frac{A}{2}$$ $$a_k=\frac{2}{L}\int_{0}^{2}f(\bar x)\cos (\frac{k\pi \bar x}{2})d\bar x$$ $$a_k=\frac{2A}{k\pi }\sin (\frac{k\pi }{2})$$ $$f_k(\bar x)=a_0+\sum_{k=1}^{n}[a_n\cos \frac{n\pi\bar x }{2}]$$ $$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, $$f_0(\bar x)=\frac{A}{2}$$ For n=1, $$f_1(\bar x)=\frac{A}{2}+\frac{2A}{\pi }\cos (\frac{\pi\bar x}{2})$$ $$ \bar x= x - 1.25$$ $$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 $$f (\bar x)$$ was determined to be odd. Even functions reduce to a sine Fourier series. Because $$f (\bar x)$$, has a period of 4, the length is 2. $$a_0=\frac{1}{L}\int_{0}^{2}f(\bar x)d\bar x=\frac{A}{2}$$

$$a_0=\frac{1}{2L}\int_{0}^{4}f(\tilde x)d\tilde x=\frac{A}{2}$$ $$a_n=\frac{1}{2}\int_{0}^{4}f{\tilde x}\cos(\frac{n\pi\tilde x}{2}d\tilde x$$ $$a_n=\frac{1}{2}f(\tilde x)\cos(\frac{n\pi\tilde x}{2}$$ from 0 to 4 $$a_n=\frac{A}{n\pi}\sin(\pi k)$$ $$b_n=\frac{1}{2}\int_{0}^{4}f{\tilde x}\sin(\frac{n\pi\tilde x}{2}d\tilde x$$ $$b_n=\frac{1}{2}f(\tilde x)\sin(\frac{n\pi\tilde x}{2})$$ from 0 to 4  $$b_n=\frac{A}{n\pi}(1-\cos(\pi k))$$  $$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, $$f_0(\tilde x)=\frac{A}{2}$$  For n=1, $$f_1(\tilde x)=\frac{A}{2}+\frac{A}{\pi}\sin(\frac{\pi\tilde x}{2})$$  $$\tilde x=x-.25$$  $$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 Statement
Find the separated ODE's for the Heat Equation: $$\frac{\partial^2 u}{\partial t^2} = k \frac{\partial^2 u}{\partial x^2}$$  (1) $$k =$$ heat capacity

Solution
Separation of Variables: Assume: $$u(x,t) = F(x) \cdot G(t)$$ $$\frac{\partial u(x,t)}{\partial x} = F'(x) \cdot G(t)$$  (2) $$\frac{\partial^2 u(x,t)}{\partial x^2} = F''(x) \cdot G(t)$$  (3) $$\frac{\partial u(x,t)}{\partial t} = F(x) \cdot \dot{G}(t)$$  (4) $$\frac{\partial^2 u(x,t)}{\partial t^2} = F(x) \cdot \ddot G(t)$$  (5) Plug (2) and (3) into Heat Equation (1): $$F(x) \cdot \dot G(t) = k F''(x) \cdot G(t)$$  (6) Rearrange (6) to combine like terms: $$\frac{\dot G(t)}{k G(t)} = \frac{F''(x)}{F(x)}= c \text{ (constant)}$$ $$\frac{\dot G(t)}{k G(t)} = c$$ $$\dot G(t) = k \, c \, G(t)$$ $$\dot G(t) - k \, c \, G(t) = 0$$ $$\frac{F''(x)}{F(x)}= c$$ $$F''(x) = c \, F(x)$$ $$F''(x) - c \, F(x) = 0$$ Solution: Separated ODE's for Heat Equation: $$\dot G(t) - k \, c \, G(t) = 0$$ $$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 Statement
Verify (4)-(5) p.19-9 (4)$$<\phi_i, \phi_j> = 0$$ for $$i \neq j$$ (5)$$<\phi_i, \phi_j> = L/2$$ for $$i=j$$

Verification of (4)
Using the integral scalar product calculation, $$\int_{0}^{L} \phi_i(x)\phi_j(x)dx$$ Substituting in sin values, $$\int_{0}^{L}sin(\omega_i(x))sin(\omega_j(x))dx$$ Using $$z=\frac{\pi x}{L}$$ and $$dz=\frac{\pi}{L}dx$$ You can substitute z into the integral instead of x. $$\int_{0}^{\pi}sin(iz)sin(jz)dz \frac{L}{\pi}$$ Integrating, $$ \frac{1}{2} [\frac{sin(i-j)z}{i-j}-\frac{sin(i+j)z}{i+j}] $$ from $$z=0$$ to $$z=\pi$$ Since $$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: $$ \frac{1}{2} [\frac{sin(i-j)z}{i-j}-\frac{sin(i+j)z}{i+j}] $$ from $$z=0$$ to $$z=\pi$$ Putting those values in and substituting L back in the equation, it turns into $$\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 Statement
$$ u(x,t)=\sum_{j=1}^{\infty}a_j\cos(cw_jt)\sin(w_jx)$$ Plot the truncated series for n=5. $$t=\alpha p_1=\frac{\alpha 2L}{c}$$ $$\alpha=.5,1,1.5,2$$

Solution
$$a_j=\frac{2[((-1)^j)- 1]}{\pi ^3 j^3}$$ $$w_j=\frac{j\pi}{L}$$ C=3 and L=2 Plot $$u(x,2/3)$$ Plot $$u(x,4/3)$$ Plot $$u(x,2)$$ Plot $$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.