Question: How to find the solutions matrix(array) of ode

How to find Z(t) matrix(array) =[ [z[1,0](t),z[1,1](t)],[z[2,0](t),z[2,1](t)]]

restart;

with(IntegrationTools):with(Physics):

 

 

 

h1 := (m,n)->(n+1/2)*KroneckerDelta[n,m];

proc (m, n) options operator, arrow; Physics:-`*`(n+Physics:-`*`(1, Physics:-`^`(2, -1)), Physics:-KroneckerDelta[n, m]) end proc

(1)

h2 := (mu,nu,m2,l)->-(nu*Pi/l)^2/(2*m2)*KroneckerDelta[mu,nu];

proc (mu, nu, m2, l) options operator, arrow; Physics:-`*`(-1, Physics:-`*`(Physics:-`^`(Physics:-`*`(nu, Pi, Physics:-`^`(l, -1)), 2), Physics:-`^`(Physics:-`*`(2, m2), -1), Physics:-KroneckerDelta[mu, nu])) end proc

(2)

v1 := (m,n,m1)->sqrt(min(n,m)!/max(n,m)!)*(2*m1)^(-abs(n-m)/2)*exp(-1/(4*m1))*LaguerreL(min(n,m),abs(n-m),-1/(2*m1));

proc (m, n, m1) options operator, arrow; Physics:-`*`(sqrt(Physics:-`*`(factorial(min(n, m)), Physics:-`^`(factorial(max(n, m)), -1))), Physics:-`^`(Physics:-`*`(2, m1), Physics:-`*`(-1, Physics:-`*`(abs(n-m), Physics:-`^`(2, -1)))), exp(Physics:-`*`(-1, Physics:-`*`(1, Physics:-`^`(Physics:-`*`(4, m1), -1)))), LaguerreL(min(n, m), abs(n-m), Physics:-`*`(-1, Physics:-`*`(1, Physics:-`^`(Physics:-`*`(2, m1), -1))))) end proc

(3)

v2 := (mu,nu,l)->4*Pi^2*l*mu*nu*(exp(l/2)-(-1)^(mu+nu)*exp(-l/2))/((Pi*(mu+nu))^2+l^2)/((Pi*(mu-nu))^2+l^2);

proc (mu, nu, l) options operator, arrow; Physics:-`*`(4, Physics:-`^`(Pi, 2), l, mu, nu, exp(Physics:-`*`(l, Physics:-`^`(2, -1)))-Physics:-`*`(Physics:-`^`(-1, mu+nu), exp(Physics:-`*`(-1, Physics:-`*`(l, Physics:-`^`(2, -1))))), Physics:-`^`(Physics:-`^`(Physics:-`*`(Pi, mu+nu), 2)+Physics:-`^`(l, 2), -1), Physics:-`^`(Physics:-`^`(Physics:-`*`(Pi, mu-nu), 2)+Physics:-`^`(l, 2), -1)) end proc

(4)

h:=(m,n,mu,nu,m1,m2,l)->evalf(h1(m,n)+h2(mu,nu,m2,l)+v1(m,n,m1)+v2(mu,nu,l));

proc (m, n, mu, nu, m1, m2, l) options operator, arrow; evalf(h1(m, n)+h2(mu, nu, m2, l)+v1(m, n, m1)+v2(mu, nu, l)) end proc

(5)

m1:=1:m2:=1:l:=1:

H:= (m,n,mu,nu)->h(m,n,mu,nu,m1,m2,l);

proc (m, n, mu, nu) options operator, arrow; h(m, n, mu, nu, m1, m2, l) end proc

(6)

H(1,1,0,0);

2.668201175

(7)

eq1:= diff(z(m,nu,t),t)=-I*Sum(Sum(H(m,n,mu,nu)*z(n,mu,t),n=1..N),mu=0..M);

diff(z(m, nu, t), t) = -I*(Sum(Sum(((n+.5000000000)*Physics:-KroneckerDelta[m, n]-4.934802202*nu^2*Physics:-KroneckerDelta[mu, nu]+.7788007831*(factorial(min(m, n))/factorial(max(m, n)))^(1/2)*2.^(-.5000000000*abs(-1.*n+m))*LaguerreL(min(m, n), abs(-1.*n+m), -.5000000000)+39.47841762*mu*nu*(1.648721271-.6065306597*(-1.)^(mu+nu))/((9.869604404*(mu+nu)^2+1.)*(9.869604404*(mu-1.*nu)^2+1.)))*z(n, mu, t), n = 1 .. N), mu = 0 .. M))

(8)

 

zint := Array([[1,0],[0,1]]);

Matrix(2, 2, {(1, 1) = 1, (1, 2) = 0, (2, 1) = 0, (2, 2) = 1})

(9)

Z:= Array(1..2,1..2);
 for i from 1to 2 do
    for j from 1 to 2 do
        Z[i,j]:= dsolve({eq1,zint[i,j]},numeric,output=listprocedure);
    end do;
end do;

 

Matrix(2, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 0, (2, 2) = 0})

 

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

 

 

Download test3.mw

Please Wait...