Dkunb

65 Reputation

3 Badges

2 years, 195 days

MaplePrimes Activity


These are replies submitted by Dkunb

@acer Thank you so much!!

@acer How to convert it to a larger with great structure insight and symmetry??  I was thinking about the  converting sin to exp to see structure with Maple. I had a hard time to make it with Maple. Could you give me advice on this??

Why does subs command not work inside  proj_wigner?
 

restart;

with(LinearAlgebra):with(ArrayTools):

 

 

#Oscillator eigenfunction n stasrts 0
psi := (m1,n,x)->2^(-n/2)*(m1)^(1/4)*HermiteH(n,sqrt(m1)*x)*exp(-m1*x^2/2)/(Pi)^(1/4)/sqrt(n!);

#Free particle eigenfunction n stasrts 1
phi:= (L,n,x)->sqrt(2/L)*sin(n*Pi*x/L+n*Pi/2);  

#KroneckerDelta
delta := (m,n)->piecewise(m=n,1,m<>n,0);

TripleProduct := proc(A,B,C) local M:
  M := MatrixMatrixMultiply(B,C):
  MatrixMatrixMultiply(A,M):
end proc:

psi := proc (m1, n, x) options operator, arrow; 2^(-(1/2)*n)*m1^(1/4)*HermiteH(n, sqrt(m1)*x)*exp(-(1/2)*m1*x^2)/(Pi^(1/4)*sqrt(factorial(n))) end proc

 

phi := proc (L, n, x) options operator, arrow; sqrt(2/L)*sin(n*Pi*x/L+(1/2)*n*Pi) end proc

 

proc (m, n) options operator, arrow; piecewise(m = n, 1, m <> n, 0) end proc

(1)

 

 

#Wignerfucntion integral
eq1 := W[m,n](q,p) = simplify(1/Pi*Int(phi(L,m,q+y)*exp(-2*I*p*y)*phi(L,n,q-y),y=-L/2+abs(q)..L/2-abs(q)));
eq2 := simplify(convert(eq1,int)) assuming(n,integer,m,integer):
wp := simplify(eq2) assuming(q>0);
wn := simplify(eq2) assuming(q<0);

W[m, n](q, p) = 2*(Int(sin((1/2)*m*Pi*(2*q+2*y+L)/L)*exp(-(2*I)*p*y)*sin((1/2)*n*Pi*(2*q-2*y+L)/L), y = -(1/2)*L+abs(q) .. (1/2)*L-abs(q)))/(L*Pi)

 

W[m, n](q, p) = (-16*exp(I*p*(L-2*q))*(I*L*p*((-(1/4)*m^2-(1/4)*n^2)*Pi^2+p^2*L^2)*sin(n*Pi)-(1/2)*n*cos(n*Pi)*Pi*(((1/4)*m^2-(1/4)*n^2)*Pi^2+p^2*L^2))*sin(2*m*Pi*q/L)+16*exp(-I*p*(L-2*q))*(I*L*p*((-(1/4)*m^2-(1/4)*n^2)*Pi^2+p^2*L^2)*sin(m*Pi)+(1/2)*cos(m*Pi)*m*Pi*((-(1/4)*m^2+(1/4)*n^2)*Pi^2+p^2*L^2))*sin(2*n*Pi*q/L)-8*Pi*(exp(I*p*(L-2*q))*m*(((-(1/4)*m^2+(1/4)*n^2)*Pi^2+p^2*L^2)*sin(n*Pi)+I*L*n*p*Pi*cos(n*Pi))*cos(2*m*Pi*q/L)-n*(((-(1/4)*m^2+(1/4)*n^2)*Pi^2-p^2*L^2)*sin(m*Pi)+I*L*m*p*Pi*cos(m*Pi))*exp(-I*p*(L-2*q))*cos(2*n*Pi*q/L)))/((m-n)^2*(m+n)^2*Pi^5-8*L^2*p^2*(m^2+n^2)*Pi^3+16*L^4*p^4*Pi)

 

W[m, n](q, p) = (-8*n*exp(-I*p*(L+2*q))*(((1/4)*m^2-(1/4)*n^2)*Pi^2+p^2*L^2)*sin(m*Pi*(L+2*q)/L)-8*m*(exp(I*p*(L+2*q))*((-(1/4)*m^2+(1/4)*n^2)*Pi^2+p^2*L^2)*sin(n*Pi*(L+2*q)/L)+I*n*(cos(n*Pi*(L+2*q)/L)*exp(I*p*(L+2*q))-exp(-I*p*(L+2*q))*cos(m*Pi*(L+2*q)/L))*Pi*L*p))/((m-n)^2*(m+n)^2*Pi^4-8*L^2*p^2*(m^2+n^2)*Pi^2+16*L^4*p^4)

(2)

# Wigner Matrix for Projectile
proj_wigner := proc(d2,L,z_sol) local w:
  st[0] := time[real]():
  [seq([seq(subs(m=i,n=j,wp),j=1..d2)],i=1..d2)];
 
  (*f1:= (m,n,L)->wp:
  w1:= (m,n)->evalc(f1(m,n,L)):
  M1:= map(x->unapply(x,p,q),Matrix(d2,w1));
  f2:= (m,n,L)->wn:
  w2:= (m,n)->evalc(f2(m,n,L)):
  M2:= map(x->unapply(x,p,q),Matrix(d2,w2));
  Times := time[real]()-st[0]:
  lprint(cat("Calculated Wigner matrix1: ",timeparse(Times)));
  st[1] := time[real]():
  z_sol_dag := map(HermitianTranspose,z_sol):
  z_sol_tranp := map(Transpose,z_sol):
  z_sol_conj := map(Transpose,z_sol_dag):
  WP := zip((x,y)->Trace(TripleProduct(x,y,M1)),z_sol_tranp,z_sol_conj):
  WN := zip((x,y)->Trace(TripleProduct(x,y,M2)),z_sol_tranp,z_sol_conj):*)
  Times := time[real]()-st[1]:
  lprint(cat("Calculated Wigner matrix2: ",timeparse(Times)));
  WP,WN:
end proc:

Warning, (in proj_wigner) `st` is implicitly declared local

 

Warning, (in proj_wigner) `i` is implicitly declared local

 

Warning, (in proj_wigner) `j` is implicitly declared local

 

Warning, (in proj_wigner) `Times` is implicitly declared local

 

M := convert(RandomArray(5,distribution=normal),Matrix):

proj_wigner(2,1,M): A:= [seq([seq(subs(m=i,n=j,wp),j=1..2)],i=1..2)]:

("Calculated Wigner matrix2: ") || (timeparse(3235.776-st[1]))

 

 

 


 

Download test6.mw

@acer 

@acer Actually I want the simplest form of the eq12 and eq13 or at least I want for them to look similar. W_n,m is my matrix component which would be multiplied by another matrix. W_n,m is also function of p  and q. Because of the long expression, I can not see output of the result of W matrix. My goal is to make two equations as simple as possible.

Thank you for your help!

I posted the stupid question and code. Is there any way to delete this question and code?

@acer How can I use if-statement inside elif? I want to use elif rather than if.

@acer 
 My original integration was as like as the below code: Because the calculation took a bit longer time, I tried to calculate intermediate steps of the integration which are repeated in real part and imaginary part using changing variables. Thanks for your help in advance.

 

restart;
with(IntegrationTools);

[Change, CollapseNested, Combine, Expand, ExpandMultiple, Flip, GetIntegrand, GetOptions, GetParts, GetRange, GetVariable, Parts, Split, StripOptions, Utils]

(1)

# too slow L:=1,sigma:=0.01,x0:=0.2,k0:=-100},

ICs_cal := proc(n_max)
odd_eigen := cos(Pi*n*x/L);
even_eigen := sin(Pi*n*x/L);
g := exp(-(x-x0)^2/2/sigma^2);
q[1] := even_eigen*g*cos(k0*x); #even_ICs_real
q[2] := even_eigen*g*sin(k0*x): #even_ICs_imag
q[3] := odd_eigen*g*cos(k0*x): #odd_ICs_real
q[4] := odd_eigen*g*sin(k0*x): #odd_ICs_imag
q1 := convert(q,list):
q2 := map(f->unapply(f,x),q1);
q3 := map(f->Int(f(x),x=-L/2..L/2),q2):
q4 := map(f->Change(f,x=sqrt(2)*sigma*z+x0),q3):
q5 := map(f->Expand(f),q4):
Indets :=  convert(map(f->op(select(has,indets(f,function),Int)),q5),set);
q6 := convert(Indets,list);
q7 := map(f->unapply(f,n),q6);

(*for j from 1 to n_max do
 if(is(j,even)) then q8 := map(f->evalf[8](f(j)),q7);  
                     q9 := seq(q6[i]=q8[i],i=1..4);
                     v[j] := evalf[8](unapply(subs(q9,q5[1]),n)(j))+I*evalf[8](unapply(subs(q9,q5[2]),n)(j));      
  else q8 := map(f->evalf[8](f(j)),q7);  
       q9 := seq(q6[i]=q8[i],i=1..4);
       v[j] := evalf[8](unapply(subs(q9,q5[3]),n)(j))+I*evalf[8](unapply(subs(q9,q5[4]),n)(j));     
 end if;
 convert(convert(v,list),Vector);
end do;*)

end proc:

Warning, (in ICs_cal) `odd_eigen` is implicitly declared local

 

Warning, (in ICs_cal) `even_eigen` is implicitly declared local

 

Warning, (in ICs_cal) `g` is implicitly declared local

 

Warning, (in ICs_cal) `q` is implicitly declared local

 

Warning, (in ICs_cal) `q1` is implicitly declared local

 

Warning, (in ICs_cal) `q2` is implicitly declared local

 

ICs_cal(20);

[proc (x) options operator, arrow; sin(Pi*n*x/L)*exp(-(1/2)*(x-x0)^2/sigma^2)*cos(k0*x) end proc, proc (x) options operator, arrow; sin(Pi*n*x/L)*exp(-(1/2)*(x-x0)^2/sigma^2)*sin(k0*x) end proc, proc (x) options operator, arrow; cos(Pi*n*x/L)*exp(-(1/2)*(x-x0)^2/sigma^2)*cos(k0*x) end proc, proc (x) options operator, arrow; cos(Pi*n*x/L)*exp(-(1/2)*(x-x0)^2/sigma^2)*sin(k0*x) end proc]

(2)

 


 

Download SolnforProjectile_v3.mw

@Mariusz Iwaniuk 

Thank you!

However, I would prefer to obtain the result through Maple.

@Rouben Rostamian  Thank you so much for your detailed and kind explanation in spite of my poor description on the problem due to my poor English. The next step I want to do is to find the density matrices if ths solution Z(t) is obtained.

Any further advice would be very appreciated . Thank you very much again!

@Rouben Rostamian   Could  you help me one more time?

 

restart;

with(IntegrationTools):with(Physics):

 

 

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

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)->-(nu*Pi/l)^2/(2*m2)*KroneckerDelta[mu,nu];

proc (mu, nu) 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)->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) 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)->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) 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)->h1(m,n)+h2(mu,nu)+v1(m,n)+v2(mu,nu);

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

(5)

N:=2:M:=2:

Z:= Array(0..N-1,1..M, (i,j)->z[i,j](t));

`Array(0..1, 1..2, {(0, 2) = z[0, 1](t), (1, 1) = z[0, 1](t), (1, 2) = z[1, 1](t)})`

(6)

add(add(evalf(h(m,n,mu,nu))*z[n,mu](t),n=0..N-1), mu=1..M):
mnu_entry := unapply(%,m,nu):

the_rhs := Array(0..N-1,1..M,mnu_entry):

DE := I*diff(Z,t)= the_rhs;

`Array(0..1, 1..2, {(0, 2) = \`*\`(I, \`*\`(diff(z[0, 1](t), t))), (1, 1) = \`*\`(I, \`*\`(diff(z[0, 1](t), t))), (1, 2) = \`*\`(I, \`*\`(diff(z[1, 1](t), t)))})` = `Array(0..1, 1..2, {(0, 2) = \`+\`(\`-\`(\`*\`(2.639557630, \`*\`(z[0, 1](t)))), \`-\`(\`*\`(3.367663098, \`*\`(z[1, 1](t)))), \`*\`(1.461176441, \`*\`(z[0, 2](t))), \`*\`(.7330709726, \`*\`(z[1, 2](t)))), (1, 1) = \`+\`(\`-\`(\`*\`(2.639557630, \`*\`(z[0, 1](t)))), \`-\`(\`*\`(3.367663098, \`*\`(z[1, 1](t)))), \`*\`(1.461176441, \`*\`(z[0, 2](t))), \`*\`(.7330709726, \`*\`(z[1, 2](t)))), (1, 2) = \`+\`(\`-\`(\`*\`(3.367663098, \`*\`(z[0, 1](t)))), \`-\`(\`*\`(1.250157238, \`*\`(z[1, 1](t)))), \`*\`(.7330709726, \`*\`(z[0, 2](t))), \`*\`(2.850576833, \`*\`(z[1, 2](t))))})`

(7)

IC := eval(Z,t=0) = Array(0..N-1,1..M, (i,j)->`if`(i=j-1,1,0));

`Array(0..1, 1..2, {(0, 2) = z[0, 1](0), (1, 1) = z[0, 1](0), (1, 2) = z[1, 1](0)})` = `Array(0..1, 1..2, {(0, 2) = 1, (1, 1) = 1, (1, 2) = 0})`

(8)

dsol := dsolve({DE,IC});

`[Length of output exceeds limit of 1000000]`

(9)

Download collision_zmatrix_v3.mw

@Rouben Rostamian  Thank you a lot!! 

@Rouben Rostamian  

dz:= diff(Z(t),t)= -I* (Multiply(hm1,Z(t))+Multiply(Z(t),hm2)+Multiply(Multiply(vm1,Z(t)),Transpose(vm2))); 

restart;

with(IntegrationTools):with(Physics):with(LinearAlgebra):

 

 

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

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)->-(nu*Pi/l)^2/(2*m2)*KroneckerDelta[mu,nu];

proc (mu, nu) 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)->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) 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)->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) 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));

 

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

#H(1,1,0,0);

#N:=5:M:=5:

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

hm1:= Matrix(5,h1);

Matrix(5, 5, {(1, 1) = 3/2, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 5/2, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 7/2, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 9/2, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 11/2})

(5)

hm2:=evalf(Matrix(5,h2));

Matrix(5, 5, {(1, 1) = -4.934802202, (1, 2) = 0., (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (2, 1) = 0., (2, 2) = -19.73920881, (2, 3) = 0., (2, 4) = 0., (2, 5) = 0., (3, 1) = 0., (3, 2) = 0., (3, 3) = -44.41321982, (3, 4) = 0., (3, 5) = 0., (4, 1) = 0., (4, 2) = 0., (4, 3) = 0., (4, 4) = -78.95683523, (4, 5) = 0., (5, 1) = 0., (5, 2) = 0., (5, 3) = 0., (5, 4) = 0., (5, 5) = -123.3700550})

(6)

vm1:=evalf(Matrix(5,v1));

Matrix(5, 5, {(1, 1) = 1.168201175, (1, 2) = .9735009790, (1, 3) = .5564021546, (1, 4) = .2529229733, (1, 5) = 0.9775488176e-1, (2, 1) = .9735009790, (2, 2) = 1.654951664, (2, 3) = 1.470491409, (2, 4) = .9133329600, (2, 5) = .4487837751, (3, 1) = .5564021546, (3, 2) = 1.470491409, (3, 3) = 2.255277267, (3, 4) = 2.070843841, (3, 5) = 1.362322990, (4, 1) = .2529229733, (4, 2) = .9133329600, (4, 3) = 2.070843841, (4, 4) = 2.987431129, (4, 5) = 2.796927709, (5, 1) = 0.9775488176e-1, (5, 2) = .4487837751, (5, 3) = 1.362322990, (5, 4) = 2.796927709, (5, 5) = 3.871897331})

(7)

vm2:=evalf(Matrix(5,v2));

Matrix(5, 5, {(1, 1) = 1.016443788, (1, 2) = .1823756578, (1, 3) = 0.1918860319e-1, (1, 4) = 0.1600347438e-1, (1, 5) = 0.3633229210e-2, (2, 1) = .1823756578, (2, 2) = 1.035632392, (2, 3) = .1983791322, (2, 4) = 0.2282183242e-1, (2, 5) = 0.2045303165e-1, (3, 1) = 0.1918860319e-1, (3, 2) = .1983791322, (3, 3) = 1.039265621, (3, 4) = .2028286895, (3, 5) = 0.2409949261e-1, (4, 1) = 0.1600347438e-1, (4, 2) = 0.2282183242e-1, (4, 3) = .2028286895, (4, 4) = 1.040543281, (4, 5) = .2046649072, (5, 1) = 0.3633229210e-2, (5, 2) = 0.2045303165e-1, (5, 3) = 0.2409949261e-1, (5, 4) = .2046649072, (5, 5) = 1.041135720})

(8)

 

dz:= diff(Z(t),t)=Multiply(hm1,Z(t))+Multiply(Z(t),hm2)+Multiply(Multiply(vm1,Z(t)),Transpose(vm2));

diff(Z(t), t) = (Matrix(5, 5, {(1, 1) = -2.054769102*Z(t), (1, 2) = 1.339390731*Z(t), (1, 3) = .8474439372*Z(t), (1, 4) = .4369509680*Z(t), (1, 5) = .1911049546*Z(t), (2, 1) = 1.335795632*Z(t), (2, 2) = -15.02600665*Z(t), (2, 3) = 2.071284755*Z(t), (2, 4) = 1.393819037*Z(t), (2, 5) = .7269958521*Z(t), (3, 1) = .9150993004*Z(t), (3, 2) = 2.146886777*Z(t), (3, 3) = -37.81413847*Z(t), (3, 4) = 2.933520963*Z(t), (3, 5) = 1.928640771*Z(t), (4, 1) = .5213594422*Z(t), (4, 2) = 1.528200699*Z(t), (4, 3) = 3.011537528*Z(t), (4, 4) = -70.33093277*Z(t), (4, 5) = 3.592909300*Z(t), (5, 1) = .2661787052*Z(t), (5, 2) = .8958826320*Z(t), (5, 3) = 2.167328507*Z(t), (5, 4) = 3.990890516*Z(t), (5, 5) = -113.2240860*Z(t)}))

(9)

zint:= (m,n)->KroneckerDelta[m,n];

proc (m, n) options operator, arrow; Physics:-KroneckerDelta[m, n] end proc

(10)

Z0:=Matrix(5,zint);

Matrix(5, 5, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 1, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 1})

(11)

sol:=dsolve({dz,Z(0)=Z0},Z(t));

Error, (in dsolve) invalid input: solve expects its 1st argument, eqs, to be of type {`and`, `not`, `or`, algebraic, relation(algebraic), ({list, set})({`and`, `not`, `or`, algebraic, relation(algebraic)})}, but received {Z(0) = (Matrix(5, 5, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 1, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 1}))}

 

 

Download test4.mw

@Rouben Rostamian  Thank you so much!

@C_R Thank you!

1 2 3 4 Page 1 of 4