## 13593 Reputation

19 years, 177 days

## What is the error message?...

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

## What is the error message?...

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

## color=black helps in Maple 13...

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

## An example of display(Array([]));...

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

## An example of display(Array([]));...

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

## printlevel...

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

## The procedure option may work...

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

## The procedure option may work...

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

## option hfloat...

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

## option hfloat...

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

## {} and [] not allowed as default values?...

The problem seems to be default values {} or [].

Everything else I tried (  e.g. {{}},[[]], {a}, NULL, "" ) works fine.

It is not important that the type declared is 'Vector'.
The problem is exhibited in bare bones below.

restart;
DS:=proc({begynd::Vector:={}})
begynd
end proc:
################################
savelibname:="F:/DMat.mla";
savelib(DS);
restart;
libname:="F:/",libname;
DS();
eval(DS,1):
DS();
DS(begynd= <1,2,3>);

Preben Alsholm

## Changing to .mla doesn't help...

Changing to .mla doesn't help.

I have just submitted a bug report.

Thank you!

Preben Alsholm

## Try it yourself...

If you would like to see that the error message in fact does come up, you can get my package DMat from

http://www2.mat.dtu.dk/people/P.K.Alsholm/Noter/libDMat/

If you put the two files in a folder located at "F:/DMat/libDMat", you will see the problem after ececuting the following lines.

restart;
libname:="F:/DMat/libDMat",libname;
with(DMat):
K:=Matrix([[-.1,.075],[.1,-.2]]);
DSolveSys(K,variabel=x(t));
undebug(DMat:-DSolveSys);
DSolveSys(K,variabel=x(t));

I would be interested in knowing if you don't get the error message.

Preben Alsholm

## This is how it should...

This is how it should behave, yes.
However, it doesn't in my complicated setting.

Notice that my error message says "expects default value for keyword parameter ...".

What puzzles me in that error message is the word 'default', which doesn't appear in your error message.

After defining a matrix K, a vector b, the commands are

DSolveSys(K,b,variabel=<Q1(t),Q2(t)>);
Error, invalid input: DMat:-DSolveSys expects default value for keyword parameter begynd to be of type Vector, but received {}
undebug(DMat:-DSolveSys);
DSolveSys(K,b,variabel=<Q1(t),Q2(t)>);

After executing the undebug command (debug works too) the result from DSolveSys is perfect.

If I replace
begynd::Vector:={}
by
begynd::{Vector,identical({})}:={}

then there is no problem.
But why do I need to?

Why does that error message exist in Maple? There must be a reason?
I'm sorry that I cannot reproduce the error in a simple setting.

Preben Alsholm

## Printing problem...

The reason I raised the question here was that 3 responses in comp.soft-sys.math.maple made me think that the problem was dependent on country specific settings. When I found out that the problem didn't exist in a Unix environment I realized that the 3 people responding might be using Unix. But you are quite right. I shall direct the question directly to Maplesoft.
 First 223 224 225 226 227 Page 225 of 227
﻿