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
-plane for
-1 <=
<= 5, where
, 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); |
| > | IClist := map(x -> [y(0)=1, D(y)(0) = x], ypZROlist); |
| > | ICyvLIST := map(x -> [y(0)=1, v(0) = x], ypZROlist); |
3.3: 23
The five solution curves:
| > | DE23 := (D@@2)(y)(t) + D(y)(t) = 0: |
| > | DE := DE23; |
| > | 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); |
The orbits:
| > | RHS := solve( DE, (D@@2)(y)(t)): |
| > | RHS := subs(D(y)(t) = v(t), RHS): |
| > | DEA := D(y)(t) = v(t); |
| > | DEB := D(v)(t) = RHS; |
| > | SYS := {DEA, DEB}; |
| > | DEplot(SYS, [y(t), v(t)], TRG, ICyvLIST, stepsize=0.05); |
| > |
| > |
3.3: 24
The five solution curves:
| > | DE24 := (D@@2)(y)(t) + 2*D(y)(t) + 65*y(t)= 0: |
| > | DE := DE24; |
| > | 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); |
The orbits:
| > | RHS := solve( DE, (D@@2)(y)(t)): |
| > | RHS := subs(D(y)(t) = v(t), RHS): |
| > | DEA := D(y)(t) = v(t); |
| > | DEB := D(v)(t) = RHS; |
| > | SYS := {DEA, DEB}; |
| > | DEplot(SYS, [y(t), v(t)], TRG, ICyvLIST, stepsize=0.05); |
| > |