Preben Alsholm

13593 Reputation

22 Badges

19 years, 177 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

The tilde is superfluous as it is designed for elementwise operations on containers, i.e. sets, lists Vectors, Matrices, Arrays, and tables, and has no effect on other types, in this case `+`.

Preben Alsholm

 

The tilde is superfluous as it is designed for elementwise operations on containers, i.e. sets, lists Vectors, Matrices, Arrays, and tables, and has no effect on other types, in this case `+`.

Preben Alsholm

 

Well, it seems to be correct in Maple 13.02.

Preben Alsholm

Since you don't have a more recent version of Maple (I guessed you use Maple 5.1 from your worksheet), allow me to reproduce from the help pages in Maple 13:

'range'= numeric...numeric
Values that specify the range of the independent variable over which solution values are desired.
For IVPs and DAEs this option is used only by the non-stiff and stiff default methods (rkf45, rosenbrock, rkf45_dae, rosenbrock_dae) and the taylorseries method. It has two purposes for procedure-type output. If 'range' is used, then the call to dsolve computes the solution over the desired range before returning, storing that solution for later calls to the returned procedure, which then compute the return values through interpolation.
 

and about maxfun (cut short)

The option maxfun=n in the call to dsolve,numeric gives an upper limit on the total number of function evaluations.
For the rkf45 and rosenbrock methods, the default setting is maxfun=30000, while for the classical methods, the default setting is maxfun=50000.
A setting of maxfun=0 disables the option.

Preben Alsholm

Since you don't have a more recent version of Maple (I guessed you use Maple 5.1 from your worksheet), allow me to reproduce from the help pages in Maple 13:

'range'= numeric...numeric
Values that specify the range of the independent variable over which solution values are desired.
For IVPs and DAEs this option is used only by the non-stiff and stiff default methods (rkf45, rosenbrock, rkf45_dae, rosenbrock_dae) and the taylorseries method. It has two purposes for procedure-type output. If 'range' is used, then the call to dsolve computes the solution over the desired range before returning, storing that solution for later calls to the returned procedure, which then compute the return values through interpolation.
 

and about maxfun (cut short)

The option maxfun=n in the call to dsolve,numeric gives an upper limit on the total number of function evaluations.
For the rkf45 and rosenbrock methods, the default setting is maxfun=30000, while for the classical methods, the default setting is maxfun=50000.
A setting of maxfun=0 disables the option.

Preben Alsholm

After receiving your answer I thought that a fairly big customer like my university would receive Maple 14 more or less right away.

Instead the response from your UK representative (Adeptscience) was that if she could find time maybe we would get Maple 14 in 1 or 2 weeks.

However, we still have not received anything, and I'm not talking about tangibles like DVDs or manuals.

Preben Alsholm

Since plot and plot3d are not disturbed by undefined results there is no need for defining k for all values in the square [-1,1]x[-1,1].

With a definition of zero for points below the x-axis the plot is different and maybe not as intended.

Another minor comment. The two if- statements can be made into one by the use of 'elif' :

k := proc (x, y) if -1 <= x and x <= 0 and -1 <= y and y <= 0 then x^2+y^2 elif 0 <= x and x <= 1 and 0 <= y and y <= 1 then 3*x*y  end if end proc;
plot3d(k,  -1 .. 1,  -1 .. 1,axes=boxed);

And finally the answer to the original question: What is wrong with plot3d( k, x= -1..1,y=-1..1) is the same that is wrong with plot(sin, x = 0..2*Pi);

k and sin are procedures. So you have the choice between the variable free version plot(sin, 0..2*Pi) and the version plot(sin(x),x=0..2*Pi)

In your case you need unevaluation quotes around k(x,y), since your procedure doesn't handle symbolic input:

plot3d('k(x,y)', x= -1 .. 1, y= -1 .. 1,axes=boxed);
 

Preben Alsholm

Since plot and plot3d are not disturbed by undefined results there is no need for defining k for all values in the square [-1,1]x[-1,1].

With a definition of zero for points below the x-axis the plot is different and maybe not as intended.

Another minor comment. The two if- statements can be made into one by the use of 'elif' :

k := proc (x, y) if -1 <= x and x <= 0 and -1 <= y and y <= 0 then x^2+y^2 elif 0 <= x and x <= 1 and 0 <= y and y <= 1 then 3*x*y  end if end proc;
plot3d(k,  -1 .. 1,  -1 .. 1,axes=boxed);

And finally the answer to the original question: What is wrong with plot3d( k, x= -1..1,y=-1..1) is the same that is wrong with plot(sin, x = 0..2*Pi);

k and sin are procedures. So you have the choice between the variable free version plot(sin, 0..2*Pi) and the version plot(sin(x),x=0..2*Pi)

In your case you need unevaluation quotes around k(x,y), since your procedure doesn't handle symbolic input:

plot3d('k(x,y)', x= -1 .. 1, y= -1 .. 1,axes=boxed);
 

Preben Alsholm

There is nothing wrong with using (e.g.) s[1] and t together. The problem is with t[1] and t, i.e. the same letter 't' used in both names.

If you like the indexed name to resemble 't', you could use T[1] or tt[1], or whatever you like, just not t[1].

Preben Alsholm

There is nothing wrong with using (e.g.) s[1] and t together. The problem is with t[1] and t, i.e. the same letter 't' used in both names.

If you like the indexed name to resemble 't', you could use T[1] or tt[1], or whatever you like, just not t[1].

Preben Alsholm

In Maple 13.02:

F:= c -> evalf(Int(3*c*x^2 + c^2*x, x = 0 .. 1)):
  Optimization:-NLPSolve(F);

Error, (in Optimization:-NLPSolve) complex value encountered
 

Preben Alsholm

In Maple 13.02:

F:= c -> evalf(Int(3*c*x^2 + c^2*x, x = 0 .. 1)):
  Optimization:-NLPSolve(F);

Error, (in Optimization:-NLPSolve) complex value encountered
 

Preben Alsholm

Yes, the straightforward solve gave the warning (Maple 13.02).

Preben Alsholm

 

 

Yes, the straightforward solve gave the warning (Maple 13.02).

Preben Alsholm

 

 

Is "Extended Maintenance Program" equivalent in this regard to  "Elite Maintenance Plan"?

My university has received the following message from 
Adeptscience in the UK:
"We are working with MapleSoft to make sure that Elite Maintenance Plan customers, like yourselves are sent the new version by the end of May. This will be provided as a download link with new purchase codes unless you have a Site licence, in which case you will also receive physical product. This will take longer to arrive."       Preben Alsholm 

 

First 220 221 222 223 224 225 226 Page 222 of 227