adel-00

120 Reputation

9 Badges

11 years, 63 days

MaplePrimes Activity


These are replies submitted by adel-00

@Markiyan Hirnyk @Kitonum

Actually the expression it is not sin(), 

plot3d(Re(f),Delta=-10..10,lambda=0..1, lightmodel=light2,axes=boxed,title=tit,view=0..0.005);

minimize(Re(f), Delta=-10..10, lambda=0..1, location);
Warning, computation interrupted

is there any way to get the minimum value from the plot or any comand can help other than minimze(this took time without any results)

the expression of Re(f) is too lengthy to write it here.

Regards

@Carl Love 

Many many thanks.. 

This is the method of monecalo.. are you familar how to apply it to any function.

Regards

 

Carl Love 9881

please wouldu plz advise me

@gkokovidis 

thanks for ur reply

 

size:=40;
40
limit:=size+1;
Error, attempting to assign to `limit` which is protected
x:=1;
ud:=0;
dd:=0;

 


while(x<(limit))
line([0, size], [x, x]);
x:=x+1;
end;

Is this right?

@gkokovidis 

How can I made the changes of the above code to be aplicable in Maple

@Preben Alsholm 

Yes I just realize it now it is complex

Many thanks

@Preben Alsholm 

Thanks for ur respond.

I think the above lim(sz,t goes to infinity) it isnot accurate in mathematics so I try to do it numericaly as this:

Delta:=5:omega:=10^6:alpha:=M/(2*omega):
N:=1:N1:=1+2*N;M:=sqrt(N*(N+1));

dsys :={diff(x(t),t)=-(N1-I*Delta-2*M*exp(-2*I*omega*t))*x(t), diff(y(t),t)=-(N1+I*Delta-2*M*exp(2*I*omega*t))*y(t), diff(z(t),t)=-(N1+M*cos(2*omega*t))*z(t)-1}:

eqs:=subs(x(t)=x,y(t)=y,z(t)=z,rhs~(dsys))=~0;
res:=solve(eqs,{x,y,z});
eqs2:=subs(x(t)=x1+I*x2,y(t)=y1+I*y2,z(t)=z,rhs~(dsys))=~0;
eqs2R:=(evalc@Re)~(eqs2);
eqs2I:=(evalc@Im)~(eqs2);
solve(eqs2R union eqs2I,{x1,x2,y1,y2,z});
eval(eqs2,%);
simplify(%) assuming real;

subs(RootOf(conjugate(_Z)+_Z)=0+I*x2,res);

Here I got the exact value of z(t).

Now my question is how to use z(t) to calculate: z(t)*w1 and plot it.

where:

I3:=Sum((BesselJ(n,-2*alpha)*(-1)^n+BesselJ(n,-2*I*alpha))*exp(-(N1-I*Delta+2*n*omega)*t),n=-infinity..infinity):
w:=inttrans[laplace](I3,t,s):
w1:=subs(s=I*d,w):

Many Many thanks

@Preben Alsholm 

Many many thanks..

When I run this code only w(t) not oscillatory ... which is not true because of the precence of the terms cos() and sin()

Digits:=15:
x(0):=-1:y(0):=0:z(0):=conjugate(y(0)):N:=1:Delta:=5: N1:=1+2*N:M:=sqrt(N*(N+1)):
ini1:=u(0)=Re(y(0)), v(0)=Im(z(0)),w(0)=x(0);
omega:=10^(6):
dsys1 :=diff(w(t),t)=-(N1+M*cos(2*omega*t))*w(t)-1+2*u(t)*cos(2*omega*t)+2*v(t)*sin(2*omega*t), diff(u(t),t)=-N1*u(t)+Delta*v(t)+(2*M*u(t)-N1-w(t))*cos(2*omega*t)-2*M*v(t)*sin(2*omega*t), diff(v(t),t)=-N1*v(t)-Delta*u(t)+(2*M*u(t)-N1-w(t))*sin(2*omega*t)+2*M*v(t)*cos(2*omega*t);

dsol1 :=dsolve({dsys1,ini1},numeric,abserr=1e-9, relerr=1e-8,maxfun=0);
plots:-odeplot(dsol1,[[t,w(t)]],0.9..1,axes=boxed,tickmarks=[6, 6],axes=boxed,titlefont=[SYMBOL,12]);

If u run the above would be the same??

@vv 

I dont know what is the wrong with this sys.

restart;#part1
omega:=10^6:Delta:=0:N:=1:N1:=1+2*N;M:=sqrt(N*(N+1)):
dsys :={diff(z(t),t)=-(N1+M*cos(2*omega*t))*z(t)-1+(u(t)*exp(-2*I*omega*t)+v(t)*exp(2*I*omega*t)), diff(u(t),t)=-(N1+I*Delta-2*M*exp(2*I*omega*t))*u(t)-(N1+z(t))*exp(2*I*omega*t)-2*M, diff(v(t),t)=conjugate(u(t))}:

res:=dsolve(dsys union {z(0)=-1,u(0)=0,v(0)=0},numeric,output=listprocedure,maxfun=500000):

3
tit:=sprintf("D=%g,N=%g",Delta,N):
plots[odeplot](res,[[t,Re(z(t))]],0..1,axes=boxed,titlefont=[SYMBOL,14],font=[1,1,18],color=black,linestyle=1,tickmarks=[3, 4],font=[1,1,14],thickness=2,titlefont=[SYMBOL,12]);


Warning, cannot evaluate the solution further right of .11330776, maxfun limit exceeded (see ?dsolve,maxfun for details)

This is the full sys. I tried to split it with REal and Im. still no result

@Preben Alsholm 

I'm extreamly greatfull for your fast reply. I have quastions if you dont mind.

1) size=[1800,default]);(why this option isn't work in Maple15)

2) If I set omega:=10^6: at the top what is the wrong with that?

3) it takes 20 min to get the plots . Is that normal??

Many thanks.

@Kitonum @vv 615

Hi,

I split the sysytem above (the real and the imiginary parts) and the system now are three DEs without complex coefficients as:

 

restart:
Dijits:=20:
------------------------- Defining the nature of the variables used ----------------------
assume(t,real):

x(0):=-1:y(0):=1:z(0):=conjugate(y(0)):N:=10:Delta:=5:omega:=10^(6):N1:=1+2*N:M:=sqrt(N*(N+1)):
t0:=0.0:tN:=30.0: M1:=5000;:th:=evalf((tN-t0)/M1):
5000
ini1:=u(0)=Re(y(0)), v(0)=Im(z(0)),w(0)=x(0);
u(0) = 1, v(0) = 0, w(0) = -1
var:={u(t),v(t),w(t)}: 
dsys1 :=diff(w(t),t)=-(N1+M*cos(2*omega*t))*w(t)-1+2*u(t)*cos(2*omega*t)+2*v(t)*sin(2*omega*t), diff(u(t),t)=-N1*u(t)+Delta*v(t)-2*M+(2*M*u(t)-N1-w(t))*cos(2*omega*t)-2*M*v(t)*sin(2*omega*t), diff(v(t),t)=-N1*v(t)-Delta*u(t)+(2*M*u(t)-N1-w(t))*sin(2*omega*t)+2*M*v(t)*cos(2*omega*t):


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


Warning, cannot evaluate the solution further right of .46544244e-3, maxfun limit exceeded (see ?dsolve,maxfun for details)


dsolu:=subs(dsol1,u(t)):dsolv:=subs(dsol1,v(t)):dsolw:=subs(dsol1,w(t)):
t1:=array(0..M1,[]): u1:=array(0..M1,[]): v1:=array(0..M1,[]): w1:=array(0..M1,[]): pt1:=array(0..M1,[]):pt2:=array(0..M1,[]):pt3:=array(0..M1,[]): 
for i from 0 to M1 do t1[i]:=evalf(th*i):u1[i]:=evalf(dsolu(t1[i]));v1[i]:=evalf(dsolv(t1[i])):w1[i]:=evalf(dsolw(t1[i])):pt1[i]:=[t1[i],u1[i]]:pt2[i]:=[t1[i],v1[i]]:pt3[i]:=[t1[i],w1[i]]:od:


Error, (in dsolu) cannot evaluate the solution further right of 0.46544244e-3, maxfun limit exceeded (see ?dsolve,maxfun for details)


with(plots):
unassign('i'):mytab1:=[seq(pt1[i],i=0..M1)]:mytab2:=[seq(pt2[i],i=0..M1)]:mytab3:=[seq(pt3[i],i=0..M1)]:
plot(mytab3,t=0..5,tickmarks=[6, 6],axes=boxed);

I got the underlines error. PLZ Mr. Kitonum and W 615 looking forward for your advise. Many thanks.

when I set the maxfun=10^9

the message apeares:

Warning, extending a solution obtained using the range argument with 'maxfun' large or disabled is highly inefficient, and may consume a great deal of memory. If this functionality is desired, it is suggested to call dsolve without the range argument
Warning, computation interrupted

Please and comments or addvise will be helpful

Warning, cannot evaluate the solution further right of .31089494e-2, maxfun limit exceeded (see ?dsolve,maxfun for details)

This is the message!

5 6 7 8 9 10 11 Page 7 of 11