Preben Alsholm

13653 Reputation

22 Badges

19 years, 291 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

You could let infinity be 5 (or whatever you like):

f := piecewise(t < 0, 0,t < 1, 1, t < 2, (-2+t)^2, t=4,5,0);
plot(f,t=-10..10,sample=[$-10..10]);
 

Preben Alsholm

You could let infinity be 5 (or whatever you like):

f := piecewise(t < 0, 0,t < 1, 1, t < 2, (-2+t)^2, t=4,5,0);
plot(f,t=-10..10,sample=[$-10..10]);
 

Preben Alsholm

You didn't execute the procedure muller.

In the worksheet mulleralg.mw execute the muller procedure, i.e. put the cursor on it and press Enter.
Then define p by etc. ....

If you executed the muller procedure and then a restart, then the muller procedure is not known to Maple.

Preben Alsholm

You didn't execute the procedure muller.

In the worksheet mulleralg.mw execute the muller procedure, i.e. put the cursor on it and press Enter.
Then define p by etc. ....

If you executed the muller procedure and then a restart, then the muller procedure is not known to Maple.

Preben Alsholm

The following should work, and works for me:

In the worksheet mulleralg.mw execute the muller procedure, i.e. put the cursor on it and press Enter.
Define p by

p:=x^5+11*x^4-21*x^3-10*x^2-21*x-5;
then do

muller(p,-13,-12,-11,.000001,100,r1);

The result is then the output and is printed to the screen as usual. The procedure is made to assign the result to the last argument (r1), which therefore should be a name. It is best to replace r1 by 'r1' as in

muller(p,-13,-12,-11,.000001,100, 'r1');

Preben Alsholm


 

The following should work, and works for me:

In the worksheet mulleralg.mw execute the muller procedure, i.e. put the cursor on it and press Enter.
Define p by

p:=x^5+11*x^4-21*x^3-10*x^2-21*x-5;
then do

muller(p,-13,-12,-11,.000001,100,r1);

The result is then the output and is printed to the screen as usual. The procedure is made to assign the result to the last argument (r1), which therefore should be a name. It is best to replace r1 by 'r1' as in

muller(p,-13,-12,-11,.000001,100, 'r1');

Preben Alsholm


 

If you execute the procedure muller in Walter Schreiner's worksheet mulleralg.mw and in that same worksheet do his examples from his other worksheet  muller.mw then there ought not be any error messages.

You may also just try

muller(x^2-2,1,2,3,1e-7,10,'r');

in the worksheet mulleralg.mw.

Preben Alsholm
 

If you execute the procedure muller in Walter Schreiner's worksheet mulleralg.mw and in that same worksheet do his examples from his other worksheet  muller.mw then there ought not be any error messages.

You may also just try

muller(x^2-2,1,2,3,1e-7,10,'r');

in the worksheet mulleralg.mw.

Preben Alsholm
 

My third point was apparently white, so I couldn't see it.

Then I tried

pointplot3d({[2,3,4],[1,2,3],[4,5,6]},symbol=solidbox,axes=boxed,symbolsize=30,color=black);
 

That helped.  This is in Maple 13.02 (Standard).

Preben Alsholm

Here is an (admittedly, not too exciting) example.

with(plots):
p1:=animate(plot,[sin(a*x),x=0..Pi],a=0..2):
p2:=animate(plot,[cos(a*x),x=0..Pi],a=0..2):
display(Array([p1,p2]));

Or a 'homemade' sequence of plots:
p3:=[seq(plot(arctan(k*x),x=0..Pi),k=0..24)]:
p4:=display(p3,insequence=true):
display(Array([p1,p2,p4]));

Preben Alsholm

Here is an (admittedly, not too exciting) example.

with(plots):
p1:=animate(plot,[sin(a*x),x=0..Pi],a=0..2):
p2:=animate(plot,[cos(a*x),x=0..Pi],a=0..2):
display(Array([p1,p2]));

Or a 'homemade' sequence of plots:
p3:=[seq(plot(arctan(k*x),x=0..Pi),k=0..24)]:
p4:=display(p3,insequence=true):
display(Array([p1,p2,p4]));

Preben Alsholm

Set printlevel to 2.

Try this.

restart;
printlevel;                                
printlevel:=2:
for n from 1 to 5 do
  for m from 1 to 5 do
     m;
  end do;
end do;
 

You could instead include explicit print commands inside the loops as in

restart;
for n from 1 to 5 do
  for m from 1 to 5 do
     print(n,m);
  end do;
end do;
 

Preben Alsholm

I overlooked another problem in my previous comment. The multiplication signs after sqrt should be removed. They are probably due to your pasting from 2D-input. (I never use that).

Since your system is not converted by DEtools/convertsys  you may try doing it yourself.

Something like this,

solproc:=proc(N,t,Y,YP)
YP[2]:=evalf(-(3*Y[3]*Y[2]*(-1/Y[1]^2+(1/3)*(Int(2*Y[1]^2*k^4*(Y[3]*sqrt(Y[1]^2+k^2)+1)*exp(-Y[3]*sqrt(Y[1]^2+k^2))/(Y[1]^2+k^2)^(3/2), k = 0 .. infinity))/Pi^2)/Y[3]));
YP[1]:=Y[2];
YP[3]:=evalf((1/30)*sqrt(900/Y[1]+450*Y[2]*Y[3]^2+900/Y[3]^3+60*Pi^2/Y[3]^4)*Y[3]);
end proc;

L:=dsolve(numeric,procedure=solproc,initial=Array([3,4,2]),start=1000,procvars=[phi(t),D(phi)(t),a(t)]);

#The first one mimics the initial conditions:
 

L(1000);

#The second seems to take forever (I gave up considering the time I had):
L(1001);
#But at least there is no immediate error.

See ?dsolve/numeric/IVP

Preben Alsholm

I overlooked another problem in my previous comment. The multiplication signs after sqrt should be removed. They are probably due to your pasting from 2D-input. (I never use that).

Since your system is not converted by DEtools/convertsys  you may try doing it yourself.

Something like this,

solproc:=proc(N,t,Y,YP)
YP[2]:=evalf(-(3*Y[3]*Y[2]*(-1/Y[1]^2+(1/3)*(Int(2*Y[1]^2*k^4*(Y[3]*sqrt(Y[1]^2+k^2)+1)*exp(-Y[3]*sqrt(Y[1]^2+k^2))/(Y[1]^2+k^2)^(3/2), k = 0 .. infinity))/Pi^2)/Y[3]));
YP[1]:=Y[2];
YP[3]:=evalf((1/30)*sqrt(900/Y[1]+450*Y[2]*Y[3]^2+900/Y[3]^3+60*Pi^2/Y[3]^4)*Y[3]);
end proc;

L:=dsolve(numeric,procedure=solproc,initial=Array([3,4,2]),start=1000,procvars=[phi(t),D(phi)(t),a(t)]);

#The first one mimics the initial conditions:
 

L(1000);

#The second seems to take forever (I gave up considering the time I had):
L(1001);
#But at least there is no immediate error.

See ?dsolve/numeric/IVP

Preben Alsholm

If Digits >=16 then you are asking for more digits than are supplied by using hardware floats, assuming that evalhf(Digits) evaluates to 15.

Thus your procedures using option hfloat can only benefit from that option if Digits <=15.

Incidentally, you called my attention to the existence of the option hfloat. Thank you!

Preben Alsholm

First 224 225 226 227 228 229 Page 226 of 229