Question: System of Nonlinear ODE's Issue in Matrix Formulation

Hello Everyone;Hope you are fine. I am trying to convert the nonlinear system of ODE's into matric form using the following comand but not working it.

 

Kindly help me to do this. The cose is pasted and also attached. I am waiting for your kind response.

Thanks.

Question1_NEW.mw


 

restart; with(PDEtools, Solve); with(LinearAlgebra); with(plots); with(plottools); printlevel := 2

NULL

ZETA[0] := proc (t) options operator, arrow; 0 end proc:

sys222 := [(3/16)*Pi*C[2, 1](t)+(3/4)*Pi*C[1, 1](t)+diff(C[1, 1](t), t) = 0, 5*Pi*C[2, 2](t)+20*Pi*C[1, 2](t)+diff(C[1, 2](t), t) = 0, 800*ZETA[0](t)*C[1, 1](t)*Pi+(3/4)*Pi*C[2, 1](t)+(3/4)*Pi*C[1, 1](t)+diff(C[2, 1](t), t) = 0, 4320*ZETA[1](t)*C[1, 1](t)*Pi+4320*ZETA[0](t)*C[1, 2](t)*Pi+20*Pi*C[2, 2](t)+20*Pi*C[1, 2](t)+diff(C[2, 2](t), t) = 0, diff(ZETA[1](t), t)+(1/3)*C[2, 1](t) = 0, diff(ZETA[2](t), t)+(1/3)*C[2, 2](t) = 0]

[(3/16)*Pi*C[2, 1](t)+(3/4)*Pi*C[1, 1](t)+diff(C[1, 1](t), t) = 0, 5*Pi*C[2, 2](t)+20*Pi*C[1, 2](t)+diff(C[1, 2](t), t) = 0, (3/4)*Pi*C[2, 1](t)+(3/4)*Pi*C[1, 1](t)+diff(C[2, 1](t), t) = 0, 4320*ZETA[1](t)*C[1, 1](t)*Pi+20*Pi*C[2, 2](t)+20*Pi*C[1, 2](t)+diff(C[2, 2](t), t) = 0, diff(ZETA[1](t), t)+(1/3)*C[2, 1](t) = 0, diff(ZETA[2](t), t)+(1/3)*C[2, 2](t) = 0]

(1)

var1 := {C[1, 1](t), C[1, 2](t), C[2, 1](t), C[2, 2](t), ZETA[1](t), ZETA[2](t)};

{C[1, 1](t), C[1, 2](t), C[2, 1](t), C[2, 2](t), ZETA[1](t), ZETA[2](t)}

(2)

f, diffs := eval(GenerateMatrix(`~`[`-`](`~`[rhs](sys222), `~`[lhs](sys222)), var1))

f, diffs := Matrix(6, 6, {(1, 1) = -(3/4)*Pi, (1, 2) = 0, (1, 3) = -(3/16)*Pi, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (2, 1) = 0, (2, 2) = -20*Pi, (2, 3) = 0, (2, 4) = -5*Pi, (2, 5) = 0, (2, 6) = 0, (3, 1) = -(3/4)*Pi, (3, 2) = 0, (3, 3) = -(3/4)*Pi, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (4, 1) = 0, (4, 2) = -20*Pi, (4, 3) = 0, (4, 4) = -20*Pi, (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = -1/3, (5, 4) = 0, (5, 5) = 0, (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = -1/3, (6, 5) = 0, (6, 6) = 0}), Vector(6, {(1) = diff(C[1, 1](t), t), (2) = diff(C[1, 2](t), t), (3) = diff(C[2, 1](t), t), (4) = 4320*ZETA[1](t)*C[1, 1](t)*Pi+diff(C[2, 2](t), t), (5) = diff(ZETA[1](t), t), (6) = diff(ZETA[2](t), t)})

(3)

NULL


 

Download Question1_NEW.mw

Please Wait...