Question: How do I solve complx Ivp



 

> 

restart:pt:=1000:Digits:=65:

> 

epsilon:=0:Delta1:=1:Delta2:=5:Delta2:=1:x(0):=0.0:y(0):=0:z(0):=-1:t0:=0:tN:=5: N1:=5000;th:=evalf((tN-t0)/N1):

(1)
> 

 

> 

 

> 

#tit:=sprintf("W=%g,D=%g,f=%g,d=%g,k=%d,N=%g",Omega,Delta,phi,delta,k,N);

> 

sys1:={diff(x(t),t)=I*Delta1*x(t)+y(t)+epsilon,diff(y(t),t)=-I*Delta2*y(t)+x(t)*z(t),diff(z(t),t)=-2*(conjugate(x(t))*y(t)+x(t)*conjugate(y(t)))};

(2)
> 

incs:=xr(0),xI(0),yr(0),yi(0)=0,zr(0)=-1,zi(0)=0:

> 

bigsys := sys1:

> 

functions := indets(bigsys, anyfunc(identical(t))):

> 

redefinitions := map(f -> f = cat(op(0, f), _R)(t) + I*cat(op(0,f), _I)(t), functions):

> 

#newfunctions := indets(redefinitions, anyfunc(identical(t))) minus functions;

> 

bigsys_separated := eval(bigsys, redefinitions):

> 

newsys := map(evalc @ Re, bigsys_separated) union map(evalc @ Im, bigsys_separated):

> 

incs := {x_R(0)=0, x_I(0)=0, y_R(0)=0, y_I(0)=0,z_R(0)=-1, z_I(0)=0,x_R(0)=0, x_I(0)=0, y_R(0)=0, y_I(0)=0, z_R(0)=-1, z_I(0)=0}:

> 

 

(3)
> 

solution := dsolve(newsys union incs, numeric,bigsys);

> 

with(plots):

Error, (in dsolve/numeric/process_input) invalid argument: {diff(x(t), t) = I*x(t)+y(t), diff(y(t), t) = -I*y(t)+x(t)*z(t), diff(z(t), t) = -2*conjugate(x(t))*y(t)-2*x(t)*conjugate(y(t))}

 
> 

 

> 

 

> 

 

> 

 

> 

plots[odeplot](solution, [t, x_R(t)], 0..5,axes=boxed,thickness=2,numpoints=pt,color=black,legend=[z(t)]);

> 

 

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 
> 

 

> 

 

> 

 



Download sys1_union_sys2jc.mw

Please Wait...