11assgnA09.mws

11assgnA09.mws

For MATH 333 Assignment #11 3.3: 23, 24 -- 11assgnA09.mws

"Find the general real-valued solution of each ODE.  Plot solution curves in the ty -plane for

-1 <= t  <= 5, where y(0) = 1 , y'(0) = -6, -3,  0, 3, 6.   Plot the corresponding orbits in a rectangle that shows their main features."

>    restart;

>    with(DEtools, DEplot):

Common Initial-Value Stuff

>    TRG := t=-1..5:

>    yZRO := 1:  ypZROlist := [-6, -3,  0, 3, 6]:

>    PTS := map( x -> [1,x], ypZROlist);

PTS := [[1, -6], [1, -3], [1, 0], [1, 3], [1, 6]]

>    IClist := map(x -> [y(0)=1, D(y)(0) = x], ypZROlist);

IClist := [[y(0) = 1, D(y)(0) = -6], [y(0) = 1, D(y)(0) = -3], [y(0) = 1, D(y)(0) = 0], [y(0) = 1, D(y)(0) = 3], [y(0) = 1, D(y)(0) = 6]]
IClist := [[y(0) = 1, D(y)(0) = -6], [y(0) = 1, D(y)(0) = -3], [y(0) = 1, D(y)(0) = 0], [y(0) = 1, D(y)(0) = 3], [y(0) = 1, D(y)(0) = 6]]

>    ICyvLIST := map(x -> [y(0)=1, v(0) = x], ypZROlist);

ICyvLIST := [[y(0) = 1, v(0) = -6], [y(0) = 1, v(0) = -3], [y(0) = 1, v(0) = 0], [y(0) = 1, v(0) = 3], [y(0) = 1, v(0) = 6]]
ICyvLIST := [[y(0) = 1, v(0) = -6], [y(0) = 1, v(0) = -3], [y(0) = 1, v(0) = 0], [y(0) = 1, v(0) = 3], [y(0) = 1, v(0) = 6]]

3.3: 23

The five solution curves:

>    DE23 := (D@@2)(y)(t) + D(y)(t) = 0:

>    DE := DE23;

DE := `@@`(D,2)(y)(t)+D(y)(t) = 0

>    IVPlist := map(q -> {DE,op(q)}, IClist):

>    solnLIST := map( u -> dsolve(u, y(t)), IVPlist ):

>    plotLIST := map(z -> plot(rhs(z), TRG) ,solnLIST):   

>    plots[display](plotLIST);

[Maple Plot]

The orbits:

>    RHS := solve( DE, (D@@2)(y)(t)):

>    RHS := subs(D(y)(t) = v(t), RHS):

>    DEA := D(y)(t) = v(t);

DEA := D(y)(t) = v(t)

>    DEB := D(v)(t) = RHS;

DEB := D(v)(t) = -v(t)

>    SYS := {DEA, DEB};

SYS := {D(y)(t) = v(t), D(v)(t) = -v(t)}

>    DEplot(SYS, [y(t), v(t)], TRG, ICyvLIST, stepsize=0.05);

[Maple Plot]

>   

>   

3.3: 24

The five solution curves:

>    DE24 := (D@@2)(y)(t) + 2*D(y)(t) + 65*y(t)= 0:

>    DE := DE24;

DE := `@@`(D,2)(y)(t)+2*D(y)(t)+65*y(t) = 0

>    IVPlist := map(q -> {DE,op(q)}, IClist):

>    solnLIST := map( u -> dsolve(u, y(t)), IVPlist ):

>    plotLIST := map(z -> plot(rhs(z), TRG) ,solnLIST):   

>    plots[display](plotLIST);

[Maple Plot]

The orbits:

>    RHS := solve( DE, (D@@2)(y)(t)):

>    RHS := subs(D(y)(t) = v(t), RHS):

>    DEA := D(y)(t) = v(t);

DEA := D(y)(t) = v(t)

>    DEB := D(v)(t) = RHS;

DEB := D(v)(t) = -2*v(t)-65*y(t)

>    SYS := {DEA, DEB};

SYS := {D(y)(t) = v(t), D(v)(t) = -2*v(t)-65*y(t)}

>    DEplot(SYS, [y(t), v(t)], TRG, ICyvLIST, stepsize=0.05);

[Maple Plot]

>