Question: how to solve differential equations with variables interdependent

 

i am using maple to solve a system of ordinary differential equations , 3 unknows (x,y, x ), and 3 equations (dx/dt,dy/dt,dz/dt)

there is one known variable denpendent on x and z

# code begins here

if x(t) <= z(t) then Q(t) := 8 end if;

if x(t) > z(t) then Q(t) := 10 end if;

 

eq1 := diff(x(t), t) = 3*x(t)-1;

eq2 := diff(y(t), t) = y(t)+Q(t);

eq3 := diff(z(t), t) = z(t);

eqs := {eq1, eq2, eq3};

 

# code ends here

 

above i put the system of ODEs, the code maybe illegal in maple, but i wrote in this way to make it clear.

Q is dependent on x and z.

 

in the past, when i was trying to solve ODEs, normally, eqs contains with only x,y,z as unknowns. but in this eqs, clearly, Q is included as an unknown. 

 

i've tried to use piecewise function to express Q(t), but failed.

 

how could i solve a system like this? thanks 

 

 

Please Wait...