Preben Alsholm

13728 Reputation

22 Badges

20 years, 246 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

I noticed that when I copied your code s0 was set at 100000 which doesn't agree very well with the data.
I notice now that s0 is set at 10000, which is fine. I suppose you edited that in the meantime?
I shall edit my answer below to that effect.

In Maple 2016 the error message for your example (with D[1] as you have it) is more informative:

Error, (in PDEtools:-Solve) unable to handle functions of not names as in the case of the system passed, containing [_F2(-x)]

To see why there is talk about _F2(-x) try

pdsolve(PDE);
eval(%,t=0);

In Maple 12 (I don't have 13) the error message is

Error, (in pdsolve/sys) unable to handle PDE problem subject to boundary conditions {u(x, 0) = cos((1/2)*x), (D[1](u))(x, 0) = 0}

You don't need the package PDEtools, but if you do, the syntax is
with( PDEtools );

 

@Thomas Dean Yes, if D[2] is meant (i.e. the first derivative with respect to the second variable), then there is no problem:

pdsolve({PDE, u(x, 0) = cos((1/2)*x), D[2](u)(x, 0) = 0});

          

The warning just means that solve cannot find any (or all) solutions, but on the other hand cannot claim that there aren't any either.

If you want somebody to try your code, you need to upload a worksheet.

Your "code" doesn't tell us what npar, de, nde, Ctrl (and more?) are, so please upload a worksheet or, alternatively, give us the full code as text.

@Axel Vogt As for your new polynomial isn't Digits=15 way too low?
This works perfectly:
 

restart;
N:=40:
Digits:=100:
F:=expand(mul(I*x-k,k=1..N)):
f:=evalf(F):
S:=[fsolve(f,complex)];

 

The bug doesn't appear in Maple 8, but does come up in Maple 12, 15, 16, 17, 18, and 2015 besides Maple 2016.
All these (including Maple 8) use NAG hw_c02agc it appears by setting infolevel[fsolve]:=3.

@Christopher2222 I just tried right clicking on the output of

1000*evalf(Pi);

in Maple 12 and got

The use of comma is likely because my computer is speaking Danish.
I got the same using Maple 2016.
Using identify(%);  immediately after produced 1000*Pi in both versions.

@acer I think I checked all links labelled A.
Except for
http://www.mapleprimes.com/questions/201351-There-Were-Problems-During-The-Loading
which has English and what appears to me to be Chinese (in the beginning), I can confirm that the worksheets are in Danish (at least in parts).
"hj\303\246lp"  probably was "hjælp" .
"sammenh\303\246ngen"  undoubtably was "sammenhængen" .

@andreasamdisen The first worksheet shows up empty in Maple 2016 (but is not), the second has the collapsed section F1 Introduktion og føringsveje 30/1, which expands nicely to reveal subsections etc.
Maple complained about incompleteness for both worksheets though.
I have remarked on previous occasions that this unfortunate phenomenon seems to happen more often for Danes (as in this case). I have no explanation for that.

There are some people (not me) on this forum who can help you. Your worksheet may or may not be recoverable.
So upload the worksheet and hope for the best.

@maxwell You will probably find a numerical solution easier to find, but of course that means that all parameters must be concrete and that you won't have a formula.
Starting where I left off above i.e. with constants defined (and with sol3A found for comparison only) try this:

res3:=dsolve({deq3, v3(0) = v__0}, numeric);
plots:-odeplot(res3,[t,v3(t)],0..10);
plots:-odeplot(res3,[t,v3(t)-sol3A],0..10);

Here is the last plot. It represents the difference between the exact solution (sol3A) and the numerical solution:

You can make that error smaller if desired by decreasing the default values of abserr and relerr, which for method=rkf45 are abserr=1e-7 and relerr=1e-6. (See the help page ?dsolve/numeric/rkf45)

Digits:=15:
res3a:=dsolve({deq3, v3(0) = v__0}, numeric,abserr=1e-12,relerr=1e-12);
plots:-odeplot(res3a,[t,v3(t)-sol3A],0..10);

@nm You could try the functions initially known to Maple.
Examples: Replace foo by sin, exp, LambertW, or whatever you can come up with in
showstat(`evalf/foo`);

You can define your own procedure `evalf/myfunc` for your function myfunc.
See ?evalf  (details)

@ I added a second numerical version to my answer (at the bottom). It defines peano as before (adding option remember though). Then it defines two very simple procedures, which just call peano. peano1(...)  returns peano(...)[1] and peano2(...)  returns peano(...)[2].
Notice that if the second argument (depth, here 5) is fixed then peano(t,depth) is only a function of one variable, but peano returns two results. Thus the need for peano1 and peano2. But you cannot expect those two to have common zeros.

Here is a little history:
The bug doesn't appear in Maple 8 nor in Maple 12. (The representations of the solution are different in the two, but they are equivalent).
The bug appears in Maple 15, 16, 17, 18.
The bug doesn't appear in Maple 2015.2 nor in Maple 2016.2. (sin and cos are used for the imaginary roots as they also are in Maple 12).
Whether it is present in Maple 13 or 14 I don't know.
### The following does work in Maple 18 (with a,b,c unassigned):

ode2:=a*diff(y(x), x$4)+b*diff(y(x),x$2)+c*y(x) = 0;
sol2:=dsolve(ode2);
eval(sol2,{a=26,b=-50,c=-2});
simplify(%);

 

 

First 66 67 68 69 70 71 72 Last Page 68 of 230