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

From testwiki
Revision as of 16:16, 25 February 2018 by imported>MaintenanceBot (HTML5 cleanup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Report 6

Problem 1

Problem Statement

ODE: y3y10y=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

Solution

Part 1

Wronskian: Function is linearly independent if W(f,g)0
W(f,g):=[fgfg]=fggf

f=cos7x,f=7sin7x

g=sin7x,g=7cos7x

W(cos7x,sin7x):=[cos7xsin7x7sin7x7cos7x]=7cos27x+7sin27x=1


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

Gramian: Function is linearly independent if Γ(f,g)0
Γ(f,g):=[<f,f><f,g><g,f><g,g>]

f(x)=cos7x,g(x)=sin7x
<f,f>=11cos7x*cos7xdx=1.07
<f,g>=11cos7x*sin7xdx=0
<g,f>=11sin7x*cos7xdx=0
<g,g>=11sin7x*sin7xdx=0.93

Γ(f,g):=[1.07000.93]=0.9951


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

Part 2

The particular solution for a r(x)=3cos7x will be:

yp(x)=Mcos7x+Nsin7x

Differentiate to get:

yp(x)=M7sin7x+N7cos7x

yp(x)=M72cos7xN72sin7x

Plug the derivatives into the equation:

yp(x)3yp(x)10yp(x)=3cos7x

(M72cos7xN72sin7x)3(M7sin7x+N7cos7x)10(Mcos7x+Nsin7x)

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

M72cos7x3N7cos7x10Mcos7x=3cos7x

N72sin7x+3M7sin7x10Nsin7x=0

dividing each equation by cos7x and sin7x respectively:

49M21N10M=3

49N+21M10N=0

M=0.0454

N=0.0154

So the particular solution is:

yp(x)=0.0454cos7x0.0154sin7x

Part 3

The overall solution can be found by:

y(x)=yh(x)+yp(x)

The roots given in the problem statement λ1=2, λ2=+5

Lead to the homogeneous solution of:

yh(x)=C1e2x+C2e5x

Combining the homogeneous and particular solution gives us:

y(x)=C1e2x+C2e5x0.0454cos7x0.0154sin7x

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

y(0)=C1e0+C2e00.0454cos(0)0.0154sin(0)=1

y(0)=2C1e0+5C2e0+0.3178sin(0)0.1078cos(0)=0

C1=0.73

C2=0.31

The overall solution is:

y(x)=0.73e2x+0.31e5x0.0454cos7x0.0154sin7x

Plot

Plot y(x)=0.73e2x+0.31e5x0.0454cos7x0.0154sin7x

over 3 periods:

File:R6.1.PNG

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 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*e2x*3cos7x
yh(x)=e2x*(Acos(3x)+BNsin(3x))
yP(x)=x*e2x*(Mcos(3x)+Nsin(3x))


yP(x)=e2x*cos(3x)(x(2M+N)+M)+e2x*sin(3x)(x(2NM)+N)
yP(x)=e2x(3sin(3x)(x(2M+N)+M)
+cos(3x)(2M+N))2e2xcos(3x)(x(2M+N)+M)+e2x(3cos(3x)(x(2NM)
+N)+sin(3x)(2NM))2e2xsin(3x)(x(2NM)+N)

yp+4yp+13yp=2*e2x*3cos7x


Solve for M and N:
4N=2,2M+4N
M=1,N=0.5

y(x)=e2x*(Acos(3x)+BNsin(3x))+x*e2x*(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)=e2x*(cos(3x)+sin(3x)/3)+x*e2x*(cos(3x)+.5*sin(3x))

File:Plot 1.PNG
File:Plot 2.PNG

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

f(x)=x2,(1<x<1),p=2

f(x)=f(x) so f(x)=x2 is an even function.

The Fourier series is f(x)=a0+n=1[ancos(nwx)+bnsin(nwx)].

a0=12LLLf(x)dx

For n=1,2,...
an=1LLLf(x)cos(nwx)dx
bn=1LLLf(x)sin(nwx)dx

For f(x)=x2
a0=12(1)11x2dx=13
an=1111x2cos(nπx)dx
The above integral requires two iterations of integration by parts. Which gives
an=1nπ[sin(nπ)sin(nπ)]+2n2π2[cos(nπ)+cos(nπ)]2n3π3[sin(nπ)sin(nπ)]
Similarly, integration by parts needs to be used twice to solve the following integral.
bn=1111x2sin(nπx)dx
bn=1nπ[cos(nπ)cos(nπ)]+2n2π2[sin(nπ)+sin(nπ)]+2n3π3[cos(nπ)cos(nπ)]
So the Fourier series for f(x)=x2 is
13+n=1cos(nwx)[1nπ[sin(nπ)sin(nπ)]+2n2π2[cos(nπ)+cos(nπ)]2n3π3[sin(nπ)sin(nπ)]]
+sin(nwx)[1nπ[cos(nπ)cos(nπ)]+2n2π2[sin(nπ)+sin(nπ)]+2n3π3[cos(nπ)cos(nπ)]]

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 off(x¯). Plotf(x¯)and develop the truncated Fourier seriesfn(x¯).
fn(x¯):=a¯0+k=1n[a¯kcoskωx¯+b¯ksinkω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 usingf(x~)to obtain the Fourier series expansion off(x); compare to the result obtained above. Level 1: n=0,1.

Solution

Part 1

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

a0=1L02f(x¯)dx¯=A2

ak=2L02f(x¯)cos(kπx¯2)dx¯

ak=2Akπsin(kπ2)

fk(x¯)=a0+k=1n[ancosnπx¯2]

fk=A2+k=1n[2Akπsin(kπ2)coskπx¯2]

For n=0,
f0(x¯)=A2

For n=1,
f1(x¯)=A2+2Aπcos(πx¯2)

x¯=x1.25

fk(x)=A2+Aπcos(π(x1.25)2)

Plot (A=1)

File:R6 p4(1).JPG

Part 2

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

a0=1L02f(x¯)dx¯=A2

a0=12L04f(x~)dx~=A2

an=1204fx~cos(nπx~2dx~

an=12f(x~)cos(nπx~2 from 0 to 4

an=Anπsin(πk)

bn=1204fx~sin(nπx~2dx~

bn=12f(x~)sin(nπx~2) from 0 to 4

bn=Anπ(1cos(πk))

fk(x~)=A2+k=1n[Akπ(1cos(πk))(sin(kπx~2))]

For n=0,
f0(x~)=A2

For n=1,
f1(x~)=A2+Aπsin(πx~2)

x~=x.25

f1(x)=A2+Aπsin(π(x.25)2)
Plot (A=1)

File:R6 p4(2).JPG

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:

2ut2=k2ux2 (1)

k= heat capacity

Solution

Separation of Variables:

Assume: u(x,t)=F(x)G(t)

u(x,t)x=F(x)G(t) (2)

2u(x,t)x2=F(x)G(t) (3)

u(x,t)t=F(x)G˙(t) (4)

2u(x,t)t2=F(x)G¨(t) (5)

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

F(x)G˙(t)=kF(x)G(t) (6)

Rearrange (6) to combine like terms:

G˙(t)kG(t)=F(x)F(x)=c (constant)

G˙(t)kG(t)=c

G˙(t)=kcG(t)

G˙(t)kcG(t)=0

F(x)F(x)=c

F(x)=cF(x)

F(x)cF(x)=0

Solution:

Separated ODE's for Heat Equation:

G˙(t)kcG(t)=0

F(x)cF(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)<ϕi,ϕj>=0 for ij
(5)<ϕi,ϕj>=L/2 for i=j

Solution

Verification of (4)

Using the integral scalar product calculation,
0Lϕi(x)ϕj(x)dx

Substituting in sin values,
0Lsin(ωi(x))sin(ωj(x))dx

Using z=πxL and dz=πLdx

You can substitute z into the integral instead of x.
0πsin(iz)sin(jz)dzLπ

Integrating,
12[sin(ij)zijsin(i+j)zi+j] from z=0 to z=π
Since ij, 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:
12[sin(ij)zijsin(i+j)zi+j] from z=0 to z=π
Putting those values in and substituting L back in the equation, it turns into L2

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

u(x,t)=j=1ajcos(cwjt)sin(wjx)
Plot the truncated series for n=5. t=αp1=α2Lc

α=.5,1,1.5,2

Solution

aj=2[((1)j)1]π3j3

wj=jπL

C=3 and L=2
Plot u(x,2/3)

File:P7.1.JPG

Plot u(x,4/3)

File:P7.2.JPG

Plot u(x,2)

File:P7.3.JPG

Plot u(x,8/3)

File:P7.4.JPG

Honor Pledge

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

Template:CourseCat