Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

As always you are so much more likely to get a useful response if you provide details, in this case the equations as text or as an uploaded worksheet.

Obviously you didn't get plotting Sin[x*Pi]*Exp[A*x] to work for any value of A if you used that syntax.
So which command did you actually ask Maple to execute?

@arunousephthoma My concern was whether you have the correct branches of the different square roots. So the basic question is: How did you end up with square roots? The original problem most likely didn't contain any?

And by the way, you may try

plots:-complexplot3d(m*10^(-24),x =1*10^5+1*10^4*I..1*10^7+1*10^7*I);

What is the original problem? Obviously this didn't come out of the blue.
Which symbolic transformations took place before you ended up with this?
The appearance of square roots of complex numbers suggests the question: Are you sure to have the right branch of the square root?
The square root in Maple is the principal one.

@navid Are there any particular values for the parameters for which this happens? Could you give an example.

Like e.g.

param:={n=50,lambda=.1,p=1/3};

for which I got 50 roots.

@trottaleonardo OK, so you tried a different approach. But your code makes a 1 x nops(Z) matrix.
Revise it to (assuming w is the same as your Z):

convert(w,list);
`[]`~(%); #To turn the list into a listlist
convert(%,Matrix);

In the example you gave w was a sum of terms (type `+`). I'm assuming this is also the case with Z. If nops(Z) = 2 and Z is of type `+` then there are only 2 terms. So you get only two lines.

By the way, did you actually try my first code on your own example?

@trottaleonardo OK, so you tried a different approach. But your code makes a 1 x nops(Z) matrix.
Revise it to (assuming w is the same as your Z):

convert(w,list);
`[]`~(%); #To turn the list into a listlist
convert(%,Matrix);

In the example you gave w was a sum of terms (type `+`). I'm assuming this is also the case with Z. If nops(Z) = 2 and Z is of type `+` then there are only 2 terms. So you get only two lines.

By the way, did you actually try my first code on your own example?

Your code exactly as written (except for supplying a missing semicolon at the end) worked for me.  I'm using ghostscript and ghostview for viewing. 

Try

Digits:=25;

and a much smaller range (0..0.0001).

Added later:

In order to see that X is not constant (although it appears to be at first sight) you can plot like this:

rg:=0..0.0001;
X0:=10^20:
init:=R(0)=0,X(0)=X0:
res:=dsolve({sys,init},[X(x),R(x)],numeric,range=rg);
plots:-odeplot(res,[x,R(x)],rg);
plots:-odeplot(res,[x,ln(X(x)/X0)],rg,thickness=4,view=-1.5e-17..0);

#Alternatively, make a simple change of variableX(x) = X0 + xi(x):

X0:='X0':
sys2:=PDEtools:-dchange({X(x)=X0+xi(x)},{sys},[xi]);
Digits:=25:
X0:=10^20:
init2:=xi(0)=0,R(0)=0:
rg:=0..0.0001;
res:=dsolve(sys2 union {init2},[xi(x),R(x)],numeric,range=rg);
plots:-odeplot(res,[x,R(x)],rg);
plots:-odeplot(res,[x,xi(x)],rg,thickness=4);



Try

Digits:=25;

and a much smaller range (0..0.0001).

Added later:

In order to see that X is not constant (although it appears to be at first sight) you can plot like this:

rg:=0..0.0001;
X0:=10^20:
init:=R(0)=0,X(0)=X0:
res:=dsolve({sys,init},[X(x),R(x)],numeric,range=rg);
plots:-odeplot(res,[x,R(x)],rg);
plots:-odeplot(res,[x,ln(X(x)/X0)],rg,thickness=4,view=-1.5e-17..0);

#Alternatively, make a simple change of variableX(x) = X0 + xi(x):

X0:='X0':
sys2:=PDEtools:-dchange({X(x)=X0+xi(x)},{sys},[xi]);
Digits:=25:
X0:=10^20:
init2:=xi(0)=0,R(0)=0:
rg:=0..0.0001;
res:=dsolve(sys2 union {init2},[xi(x),R(x)],numeric,range=rg);
plots:-odeplot(res,[x,R(x)],rg);
plots:-odeplot(res,[x,xi(x)],rg,thickness=4);



@Markiyan Hirnyk Certainly bug fixing should be done by employees of Maple. But while we are waiting for Maple 16.03 we will have to live with what we got.
I'm afraid that it is unlikely that any update will appear before Maple 17 is released (and probably not after either).
If that is so, people who don't buy Maple 17 will have to live with that bug forever.

Maybe you should have waited till you could upload the mw-file.

In one of the links given by acer:

http://www.mapleprimes.com/questions/142322-Why-Has-The-Plot-Command-Deteriorated#comment142326

I suggest a more general workaround:

R:=proc(p) local f;
   f:=proc(curve)
      evalindets(curve,Or(listlist,Matrix),m->ListTools:-Split(hastype,convert(m,listlist),undefined))
   end proc;
   evalindets(p,specfunc(anything,CURVES),f);
end proc;

R(A); #A being the plot

Did you try copy and paste of the lines I wrote? Why does the error message mention an F? The unknown function has the name X.

Did you try copy and paste of the lines I wrote? Why does the error message mention an F? The unknown function has the name X.

First 182 183 184 185 186 187 188 Last Page 184 of 231