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

From testwiki
Jump to navigation Jump to search

Report 4

Problem 1: Basic Rule to Solve Non-Homogeneous ODE

Problem Statement

Solve the ODE:

y+6y+9y=8x2x7

With the initial conditions:


y(0)=1

y(0)=.5

Plot the homogeneous solution

Plot the particular solution

Plot the overall solution

Solution

Homogeneous solution: yh(x)=C1e3x+C2xe3x

So that yh(x)=3C1e3x+C2e3x3C2xe3x

Solving for the initial conditions:

yh(0)=1=C1+0

yh(0)=.5=3C1+C20

C1=1
C2=3.5

So the homogeneous solution is:

yh(x)=e3x+3.5xe3x

Choose the particular solution to be: yp(x)=Ax7+Bx6+Cx5+Dx4+Ex3+Fx2+Gx+H

So that:

yp(x)=7Ax6+6Bx5+5Cx4+4Dx3+3Ex2+2Fx+G

yp(x)=42Ax5+30Bx4+20Cx3+12Dx2+6Ex+2F

Substitute in the original equation y+6y+9y=8x2x7

(42Ax5+30Bx4+20Cx3+12Dx2+6Ex+2F)+6(7Ax6+6Bx5+5Cx4+4Dx3+3Ex2+2Fx+G)+...
...9(Ax7+Bx6+Cx5+Dx4+Ex3+Fx2+Gx+H)=8x2x7

Sorting by the x term gives:

x7(9A)+x6(42A+9B)+x5(42A+36B+9C)+x4(30B+30C+9D)+...
...x3(20C+24D+9E)+x2(12D+18E+9F)+x(6E+12F+9G)+(2F+6G+9H)=8x2x7

Giving us the system of equations:


9A=2
42A+9B=0
42A+36B+9C=0
30B+30C+9D=0
20C+24D+9E=0
12D+18E+9F=0
6E+12F+9G=8
2F+6G+9H=0

The Matlab code we made to solve this was:

A = -2/9;

B = -(42*A)/9;

C = -(42*A + 36*B)/9;

D = -(30*B + 30*C)/9;

E = -(20*C + 24*D)/9;

F= -(12*D + 18*E)/9;

G = (8-(6*E + 12*F))/9;

H = -(2*F + 6*G)/9;

To get (rounded to the nearest tenth):

A= -0.2

B= 1.0

C= -3.1

D= 6.9

E= -11.5

F= 13.8

G= -9.9

H= 3.5

So now the particular solution is:

yp(x)=0.2x7+1.0x63.1x5+6.9x411.5x3+13.8x29.9x+3.5

The overall solution can be found by:

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

y(x)=C1e3x+C2xe3x0.2x7+1.0x63.1x5+6.9x411.5x3+13.8x29.9x+3.5

To solve for C_1 and C_2 (which are different from the homogeneous solution constants) we find:

y(x)=3C1e3x+C2e3x3C2xe3x1.4x6+6.0x515.5x4+27.6x334.5x2+27.6x9.9

y(0)=1=C1+3.5 y(0)=.5=3C1+C29.9

C1=2.5
C2=2.8

The overall solution is:

y(x)=2.5e3x+2.8xe3x0.2x7+1.0x63.1x5+6.9x411.5x3+13.8x29.9x+3.5

Plot the homogeneous solution:
File:P1H.gif

Plot the particular solution:
File:P1P.gif

Plot the overall solution:
File:P1O.gif

Honor Pledge

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

Problem 2: Sum Rule to Find Particular Solution

Problem Statement

Part 1

Use the Basic Rule 1 and the Sum Rule 3 to show that the appropriate particular solution for:
y+6y+9y=8x2x7
y(0)=1, y(0)=1/2

Part 2

Derive the Basic rule and the Sum rule, instead of just using them, based on the linearity
of the differential operator to obtain the expression (trial solution) for the particular solution yp(x)

Solution

yp(x)=j=0ncjxj

yp(x)=j=1ncjjxj1=j=0n1cj+1(j+1)xj

yp(x)=j=2ncjj(j1)xj2=j=0n2cj+2(j+2)(j+1)xj

With n =7 we get

yp(x)=c0+c1x+c2x2+c3x3+c4x4+c5x5+c6x6+c7x7

yp(x)=c1+2c2x+3c3x2+4c4x3+5c5x4+6c6x5+7c7x6

yp(x)=2c2+6c3x+12c4x2+20c5x3+30c6x4+42c7x5

From report problem 1 it was already found that:

c0=3.5
c1=9.9
c2=13.8
c3=11.5
c4=6.9
c5=3.1
c6=1.0
c7=0.2

yp(x)=0.2x7+1.0x63.1x5+6.9x411.5x3+13.8x29.9x+3.5

Honor Pledge

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

Problem 3: Method of Undetermined Coefficients

Problem Statement

Problem Set 2.7, problem 5

Find a real, general solution. State which rule you are using. Show each step of your work.

y+6y+9y=exsinx
y(0)=1, y(0)=1/2

plot on separate graphs:

(1) the homogeneous solution yh(x),

(2) the particular solution yp(x),

and (3) the overall solution y(x).

Solution

We start by finding the general solution of the homogeneous ODE

y+6y+9y=0

The characteristic equation of the homogeneous ODE is

λ2+6λ+9=0
(λ+3)2=0
λ=3,3

The roots are double real roots.
The general solution of the homogeneous ODE is yh=(c1+xc2)e2x

Now we solve for the particular solution of the nonhomogeneous ODE

y+6y+9y=exsinx

We use the method of Undetermined Coefficients

yp=ex(Kcosx+Msinx)

yp=ex(Kcosx+Msinx)+ex(Ksinx+Mcosx)

yp=ex(Kcosx+Msinx)+ex(Ksinx+Mcosx)+ex(Ksinx+Mcosx)+ex(KcosxMsinx)
yp=ex(Kcosx+Msinx)+2ex(Ksinx+Mcosx)+ex(KcosxMsinx)

We now substitute the values of yp,yp,yp into y+6y+9y=exsinx

ex(Kcosx+Msinx)+2ex(Ksinx+Mcosx)+ex(KcosxMsinx)
+6(ex(Kcosx+Msinx)+ex(Ksinx+Mcosx))
+9(ex(Kcosx+Msinx))=exsinx

16ex(Kcosx+Msinx)+8ex(Ksinx+Mcosx)+ex(KcosxMsinx)=exsinx
ex(15(Kcosx+Msinx)+8(Ksinx+Mcosx)=exsinx
ex((15Kcosx+8Mcosx)+(15Msinx8Ksinx))=exsinx

Now we equate the coefficients of like terms on both sides
15K+8M=0
15M8K=1

Now we solve these equations for the coefficients
K=8/15M
15M+64/15M=1
M=0.05190

15K+8(15/289)=0
K=0.02768

These values are substituted into yp=ex(Kcosx+Msinx) to get the particular solution of the ODE
yp=ex(0.02768cosx+0.05190sinx)

The general solution of the ODE is
y=yh+yp
y=(c1+xc2)e2x+ex(0.02768cosx+0.05190sinx)

In order to determine the values of c1,c2 we use the initial conditions y(0)=1, y(0)=1/2
y(0)=c1+0.02768=1
c1=0.97232

y=2e2x(c1+xc2)+e2x(c2)+ex(0.02768cosx+0.05190sinx)+ex(0.02768sinx+0.05190cosx)
y=2e2x(c1+xc2)+e2x(c2)+ex(0.07958cosx+0.02422sinx)
y(0)=2(c1)+c2+0.07958=1/2
y(0)=1.94464+c2+0.07958=1/2
c2=2.36506

The general solution of the ODE is
y=e2x(0.97232+2.36506x)+ex(0.02768cosx+0.05190sinx)

Plot the homogeneous solution:
File:Problem4-1.jpg
Plot the particular solution:
File:Problem4-2.jpg
Plot the overall solution:
File:Problem4-3.jpg

Honor Pledge

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

Problem 4: Method of Undetermined Coefficients

Problem Statement

Problem Set 2.7, problem 5

Find a real, general solution. State which rule you are using. Show each step of your work.

y+6y+9y=e2xsinhx
y(0)=1, y(0)=1/2

plot on separate graphs:

(1) the homogeneous solution yh(x),

(2) the particular solution yp(x),

and (3) the overall solution y(x).

Solution

We start by finding the general solution of the homogeneous ODE

y+6y+9y=0

The characteristic equation of the homogeneous ODE is

λ2+6λ+9=0
(λ+3)2=0
λ=3,3

The roots are double real roots.
The general solution of the homogeneous ODE is yh=e2x(c1+xc2)

Now we solve for the particular solution of the non-homogeneous ODE

y+6y+9y=e2xsinhx

By using the definition of hyperbolic trigonometric functions we can convert sinhx=1/2(exex).
Our non-homogeneous ODE can now be written as:

y+6y+9y=e2x(1/2(exex)

y+6y+9y=1/2(exe3x)

Since the replacement of sinhx is the sum of two functions we can use the sum rule for the method of undetermined coefficients.

yp=yp1+yp2=JexKe3x

yp=JexKe3x

y'p=Jex+3Ke3x

y'p=Jex9Ke3x

We now substitute the values of yp,yp,yp into y+6y+9y=1/2(exe3x)

Jex9Ke3x
+6(Jex+3Ke3x)
+9(JexKe3x)=1/2(exe3x)

Jex9Ke3x6Jex+18Ke3x+9Jex9Ke3x=1/2(exe3x)

4Jex=1/2(exe3x)

Now we equate the coefficients of like terms on both sides and solve for the coefficients
4J=1/2
J=1/8
K=0

These values are substituted into yp=JexKe3x to get the particular solution of the ODE

yp=1/8ex

The general solution of the ODE is:

y=yh+yp
y=e2x(c1+xc2)+1/8ex

In order to determine the values of c1,c2 we use the initial conditions y(0)=1, y(0)=1/2
y(0)=c1+1/8=1
c1=7/8

y=2e2x(c1+xc2)+e2xc2
y=2e2x(7/8+xc2)+e2xc2
y(0)=14/8+c2=1/2
c2=9/4

The general solution of the ODE is
y=e2x(7/8+9/4x)+1/8ex

Plot the homogeneous solution:
File:Problem5-1.jpg
Plot the particular solution:
File:Problem5-2.jpg
Plot the general solution:
File:Problem5-3.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: Display of Equality by Series Expansion

Problem Statement

Expand the series on both sides of (1)-(2) p.7-12b to verify these equalities
(1)

j=25cj*j*(j1)*xj2=j=03cj+2*(j+2)*(j+1)*xj

(2)

j=15cj*j*xj1=j=04cj+1*(j+1)*xj

Solution

Evaluating the right-hand side of (1):

c22(21)x22+c33(31)x32+c44(41)x42+c55(51)x52

=2c2+6c3x+12c4x2+20c5x3

Now evaluating the left-hand side of (1):

c0+2(0+2)(0+1)x0+c1+2(1+2)(1+1)x1+c2+2(2+2)(2+1)x2+c3+2(3+2)(3+1)x3

=2c2+6c3x+12c4x2+20c5x3

So both sides are equal.

Now evaluating the right-hand side of (2):

c1(1)x11+c2(2)x21+c3(3)x31+c4(4)x41+c5(5)x51

=c1+2c2x+3c3x2+4c4x3+5c5x4

The left-hand side of (2) expands into the following:

c0+1(0+1)x0+c1+1(1+1)x1+c1+1(1+1)x1+c2+1(2+1)x2+c3+1(3+1)x3+c4+1(4+1)x4

=c1+2c2x+3c3x2+4c4x3+5c5x4

So both sides are equal.

Honor Pledge

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

Problem 6: Taylor Series to Solve ODE

Problem Statement

y+6y+9y=cos(2x)
y(0)=1 and y(0)=1/2

Solution

The taylor series for the excitation is (4)n*x2n(2n)! from n=0 to infinity
For n=3, this equals 12x2+2x4/34x6/45
For n=5, this equals 12x2+2x4/34x6/45+2x8/3154x10/14175
For n=9, this equals 12x2+2x4/34x6/45+2x8/3154x10/14175+4x12/4677758x14/42567525+2x16/6385128754x18/97692469875


For n=3,
yp=Ax6+Bx5+Cx4+Dx3+Ex2+Fx+G
y'p=6Ax5+5Bx4+4Cx3+3Dx2+2Ex+F
y'p=30Ax4+20Bx3+12Cx2+6Dx+2E


Plugging these into the original equation using the taylor series approximation as the excitation,
(Ax6+Bx5+Cx4+Dx3+Ex2+Fx+G)+6(6Ax5+5Bx4+4Cx3+3Dx2+2Ex+F)+9(30Ax4+20Bx3+12Cx2+6Dx+2E)
=12x2+2x4/34x6/45
Rearranging the coefficients,
Ax6+(B+36A)x5+(C+30B+270A)x4+(D+24C+180B)x3+(E+18D+108C)x2+(F+12E+54D)x+(G+6F+18E)
=1+0x2x2+0x3+2x4/3+0x54x6/45


Equating x^6 coefficients, A=-45/4
Equating x^5 coefficients, B=405
Equating x^4 coefficients, C=-118461.833
Equating x^3 coefficients, D=2770183.992
Equating x^2 coefficients, E=-37069430.492
Equating x^1 coefficients, F=-594423101.472
Equating x^0 coefficients, G=4233788358.69
yp=45/4x6+405x5+118461.833x4+2770183.992x337069430.492x2594423101x+4233788358.69

The graph shown is the taylor series for cos(2x) for the 0th through 3rd order.

File:Cos(2x) graph.png


Honor Pledge

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

Problem 7: Taylor Series Expansion of the log Function

Problem Statement

y+6y+9y=log(3+4x)
y(0)=1,y(0)=.5
Use the point
x^=1/2
logx=logex=lnx

Solution

The taylor series expansion for log(3+4x) around x^=1/2 up to 16 terms is
4(x+.5)8(x+.5)2+643(x+.5)364(x+.5)4+10245(x+.5)520483(x+.5)6+163847(x+.5)78192(x+.5)8
+2621449(x+.5)95242885(x+.5)10+419430411(x+.5)1141943043(x+.5)12+6710886413(x+.5)13
1342177287(x+.5)14+107374182415(x+.5)152684354563(x+.5)16
Plots of taylor series expansion: Up to order 4
File:Taylor1.JPG

Up to order 7
File:Taylor2.JPG

Up to order 11
File:Taylor3.JPG

Up to order 16
File:Taylor4.JPG

The visually estimated domain of convergence is from .8 to .2.
Now use the transformation of variable
xt  such that  3+4x=1+t
x=t24

If log(1+t) has a domain of convergence from [1,+1] then log(3+4x) converges from [34,14]

Honor Pledge

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

Template:CourseCat