Question: system ode plot not working

 

"restart: with(plots):with(DEtools):with(Student[ODEs]):infolevel[Student]:=3 ;"NULL

"maple.ini in users"

 

3

(1)

NULL#  plot  solutions to a system  of DEs

NULL

sys := {diff(x(t), t) = y(t), diff(y(t), t) = -x(t) - 1/2*y(t)}

{diff(x(t), t) = y(t), diff(y(t), t) = -x(t)-(1/2)*y(t)}

(2)

DEplot(sys, [x(t), y(t)], t = 0 .. 15, [[x(0) = 1, y(0) = 0]])

 

;

This is not working, seems to be simple ...
Have made an attempt to create a procedure from these two commands, but no success
Apparently, I need to learn to use a debugger to determine what is wrong, then?

dv_systeemplot:= proc ( DV1,DV2 ,RV1,RV2 )
                 local t, sys,systeemplot;  
                 sys := {DV1 , DV2 }:
                 systeemplot:= DEplot(sys, [x(t), y(t)], t = 0 .. 15, [[RV1 , RV2]]);
                 return systeemplot;
end proc;

proc (DV1, DV2, RV1, RV2) local t, sys, systeemplot; sys := {DV1, DV2}; systeemplot := DEplot(sys, [x(t), y(t)], t = 0 .. 15, [[RV1, RV2]]); return systeemplot end proc

(3)

NULL

DV1 := diff(x(t), t) = y(t)

diff(x(t), t) = y(t)

(4)

DV2 := diff(y(t), t) = -x(t)-(1/2)*y(t)

diff(y(t), t) = -x(t)-(1/2)*y(t)

(5)

RV1 := x(0) = 1

x(0) = 1

(6)

RV2 := y(0) = 0

y(0) = 0

(7)

dv_systeemplot( DV1,DV2 ,RV1,RV2 );

 

Error, (in DEtools/DEplot/CheckDE) inputs must be ODEs

 

NULL

Ask AI to get some code: never i got the right Maple code ! :)

 

"restart: with(plots):with(DEtools):with(Student[ODEs]):infolevel[Student]:=3 ;"``
 

"maple.ini in users"

 

3

(8)

restart;

systeem := proc(eq1, eq2, beginwaarden)
  local x, y, oplossing;
  x := unapply(rhs(dsolve({eq1, eq2, beginwaarden}, {x(t), y(t)})), t);
  y := unapply(rhs(dsolve({eq1, eq2, beginwaarden}, {x(t), y(t)})), t);
  oplossing := DEplot([x(t), y(t)], t = 0 .. 10, beginwaarden);
  oplossing;
end proc;

# Definieer de differentiaalvergelijkingen
eq1 := diff(x(t), t) = y(t);
eq2 := diff(y(t), t) = -x(t);

# Geef de beginwaarden op
beginwaarden := [x(0) = 1, y(0) = 0];

# Roep de procedure aan met de differentiaalvergelijkingen en beginwaarden
systeem(eq1, eq2, beginwaarden);

"maple.ini in users"

 

proc (eq1, eq2, beginwaarden) local x, y, oplossing; x := unapply(rhs(dsolve({eq1, eq2, beginwaarden}, {x(t), y(t)})), t); y := unapply(rhs(dsolve({eq1, eq2, beginwaarden}, {x(t), y(t)})), t); oplossing := DEplot([x(t), y(t)], t = 0 .. 10, beginwaarden); oplossing end proc

 

diff(x(t), t) = y(t)

 

diff(y(t), t) = -x(t)

 

[x(0) = 1, y(0) = 0]

 

Error, (in dsolve) invalid input: PDEtools/sdsolve expects its 1st argument, SYS, to be of type Or(set({`<>`, `=`, algebraic}),list({`<>`, `=`, algebraic}),`casesplit/ans`(list,list)), but received {diff(x(t),t) = y(t), diff(y(t),t) = -x(t), [x(0) = 1, y(0) = 0]}

 

Probably i do need to work with a debugger here?


Download dv_systeem_via_mapleprimes_.mw

Please Wait...