adel-00

135 Reputation

9 Badges

14 years, 54 days

MaplePrimes Activity


These are questions asked by adel-00

Solve IVP with complex coef. with compplex varables numerically..

the sys. is x'=-iDelta1x(t)+y(t)+epsilon

y'=-iDelta2y(t)+x(t)z(t)

z'=-2(x*(t)y(t)+x(t)y*(t)), where * means complex conjugate 

I solve it as:

epsilon:=5:Delta1:=4:Delta2:=4:assume(z(t),real):

var:={x_R(t),y_R(t),z_R(t),x_I(t),y_I(t),z_I(t)}:
dsys :={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)+conjugate(y(t))*x(t))}:
functions := indets(dsys, anyfunc(identical(t))):
redefinitions := map(f -> f = cat(op(0, f), _R)(t) + I*cat(op(0,f), _I)(t), functions):
newsys := map(evalc @ Re, redefinitions) union map(evalc @ Im, redefinitions):

incs := {x_R(0)=0, x_I(0)=0, y_R(0)=0, y_I(0)=0,z_R(0)=-1/2, z_I(0)=0}:
dsol1 :=dsolve({newsys,incs},var,numeric, output=listprocedure, abserr=1e-9, relerr=1e-8,range=0..1):

but it seems there is not runing propebly

 

Hello every one,

I had a 3 equations with 3 unknown (X,Y,Z, conjugate(Y),conjugate(Z))

this is the code:

solve( {ao*x + a1*y + conjugate(a1)*conjugate(y)+a2*z+conjugate(a2)*conjugate(z) = 0.5, conjugate(a1)*x + bo*y + conjugate(a2)*conjugate(y)+a1*z = 0, 10*x + 10*y/4 + 10*z = 10}, {x, y, z});

where the coefficients are complex numbers

Is thee any simple way to solve it

thanks

Hello experts..

The following is the IVP:

restart:Digits:=14:t0:=0.0:tN:=5000.0: N1:=5000;th:=evalf((tN-t0)/N1):

dsys1 :=diff(y(t),t)=y(t)*((1-y(t)/3-epsilon)-0.8*y(t)/(y(t)^2+0.5^2));

var:={y(t)}:ini1:=y(0)=0.5:

dsol1 :=dsolve({dsys1,ini1},var,numeric, output=listprocedure, abserr=1e-9, relerr=1e-8,range=0..1);

dsolu:=subs(dsol1,y(t)):

t1:=array(0..N1,[]):u1:=array(0..N1,[]):pt1:=array(0..N1,[]):

for i from 0 to N1 do t1[i]:=evalf(th*i):u1[i]:=evalf(dsolu(t1[i]));pt1[i]:=[t1[i],u1[i]]:

od:

mytab1:=eval([seq(pt1[i],i=0..N1)]):

the above code is to plot y(t) against the time t for fixed epsilon

Now the question is how to plot epsilon against the time???

I do appriciated any comments

 

 

Hi every one,

Q1:

I tried to get the max $ min of a following function:

 

l:=1:alpha:=1:b:=100:k:=20:

eq1 := (alpha+(l+alpha)*u+alpha*k*u^2)*a =
u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2))):

I did this code but it seems it didnt work for this equation

maximize(eq, u=1..12, location);

minimize(eq, u=1..12, location);

Also, I think about solving the cubic i feel i'm so close to the solve but couldn't

factor((rhs-lhs)(eq1));

eq:=collect(%,u);

Q:=(a,u)->eq;sol:=evalf(solve(Q(a,u),u)): S:=array([],1..3): S[1]:=sol[1]:S[2]:=sol[2]:S[3]:=sol[3]:

Q2:

the same thing wanted to get the maximum and the minimum of the function v

here the code

restart;
eq1:=(alpha+(l+alpha)*u+alpha*k*u^2)*a=
u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2)));
eq2:=v=alpha*b*(1+u+k*u^2)/(alpha+(l+alpha)*u+alpha*k*u^2);
factor((rhs-lhs)(eq1));
eq1:=collect(%,u);
params:={l=10,alpha=0.5,b=100,k=20};
U:=[solve(eval(eq1,params),u)]; #3 solutions for u
#plots:-complexplot(U,a=0..20,style=point); #plot in the complex u-plane
vua:=eval(solve(eq2,v),params): #v expressed in terms of u and a
V:=eval~(vua,u=~U): #the 3 solutions for v in terms of a

## PLOT the function V
plot(V,a=0..75,v=0..100,color=black,labels=[a,v],axes=boxed,numpoints=90,linestyle=1,font=[1,1,18],thickness=2,tickmarks=[4,4],view=[0..65,25..100]);

I do appricaited any advises

Hi;

Trying to find the maximum values of the implicit function.. I tree the following commands.

 

l:=1:alpha:=1:b:=100:k:=20:

(alpha+(l+alpha)*u+alpha*k*u^2)*a=u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2)));

with(plots):

implicitplot((alpha+(l+alpha)*u+alpha*k*u^2)*a=u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2))),a=0..100,u=0..20,numpoints=9000000,color=black,axes=boxed,font=[1,1,18],thickness=2,tickmarks=[3,3],view=[0..12,0..12],labels=[a,u]);

maximize((alpha+(l+alpha)*u+alpha*k*u^2)*a=u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2))), N=0.5..1, location);

Any help I'll appriciated 

 

First 8 9 10 11 12 13 Page 10 of 13