acer

32358 Reputation

29 Badges

19 years, 331 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Mac Dude I will submit an SCR (Software Change Request, ie. bug report).

Simpler example:

restart:

evalf(LambertW(3));

                                  1.049908895

restart:           

UseHardwareFloats:=true:                

evalf(LambertW(3));     
Error, invalid input: evalf/LambertW uses a 2nd argument, zz, which is missing

In addition to Thomas's suggestion, you could upload a worksheet in which the error occurs. Something else seems to have come before the problematic execution, since the floats are printed with more than default digits.

 

@Bendesarts I hope this is clear. When you reopen this sheet you should be able to immediately execute the last line, to show that P is the Matrix of data, without re-executing any of the earlier lines.

DT3.mw

@sarra How about...


restart;

with(MultiSeries, asympt):

assume(0<x):

assume(0<v):

ee := argument(HankelH1(v, x)):

H := convert(asympt(convert(ee,arctan),x,6),polynom):

#simplify(simplify(combine(H)),size);

HH:=simplify(simplify(combine(convert(H,exp))),size);

(1/15360)*(-(15360*I)*ln(exp(-((1/4)*I)*(2*Pi*v+Pi-4*x)))*x^5+192*(40*x^4+((10/3)*v^2-125/6)*x^2+v^4-(57/2)*v^2+1073/16)*(v-1/2)*(v+1/2))/x^5

plot3d([ HH, argument(HankelH1(v, x)) ],

       x=5000..5010, v=-1..1, style=[point, surface],color=[red,blue]);

 


Download aHH.mw

I am not seeing that error, if I paste or type it in as 1D or 2D input in a Worksheet using Maple 2015.0 on Windows 7, with the restart in either a separate or the same execution group or document block.

Could you please upload a Worksheet or Document that demonstrates it?

acer

@sarra 


restart:

with(MultiSeries, asympt):

assume(0<x):

assume(0<v):

H:=convert(asympt(abs(HankelH1(v, x)),x,8),polynom):

H:=simplify(combine(H));

(1/8192)*2^(1/2)*(960*v^6+1280*v^4*x^2+2048*v^2*x^4+8192*x^6-10192*v^4-3712*v^2*x^2-512*x^4+20276*v^2+848*x^2-4447)/(Pi^(1/2)*x^(13/2))

HD:=convert(asympt(abs(diff(HankelH1(v,x),x)),x,8),polynom):

HD:=simplify(combine(HD));

-(1/8192)*2^(1/2)*(448*v^6+768*v^4*x^2+2048*v^2*x^4-8192*x^6-13552*v^4-6272*v^2*x^2-1536*x^4+29716*v^2+1584*x^2-6597)/(Pi^(1/2)*x^(13/2))

#plot3d([ ln(H), ln(abs(HankelH1(v,x))) ],
#       x=2e5..2e6, v=-20..20, style=[point, surface], color=[red,blue]);
plot3d([ H, abs(HankelH1(v,x)) ],
       x=2e5..2e6, v=-20..20, style=[point, surface], color=[red,blue]);

#plot3d([ ln(HD), ln(abs(diff(HankelH1(v,x),x))) ],
#       x=2e5..2e6, v=-20..20, style=[point, surface],color=[red,blue]);
plot3d([ HD, abs(diff(HankelH1(v,x),x)) ],
       x=2e5..2e6, v=-20..20, style=[point, surface],color=[red,blue]);

evalf[1000]( eval( abs(diff(HankelH1(v,x),x)), [v=2.7, x=1e6] ) ): evalf[10](%);
evalf[1000]( eval( HD, [v=2.7, x=1e6] ) ): evalf[10](%);

0.7978845608e-3

0.7978845608e-3

 


Download H1.mw

@vv The conversion to exp broke for this in Maple 10.03.

restart;

kernelopts(version);

             Maple 10.02, X86 64 LINUX, Nov 8 2005 Build ID 208934

ee := 3^(-(1/2)*n)*2^((1/6)*n)-2^((2/3)*n)*6^(-(1/2)*n):

convert(ee,exp);

    exp(-1/2 ln(3) n) exp(1/6 ln(2) n) - exp(2/3 ln(2) n) exp(-1/2 ln(6) n)

simplify(combine(%));

                                       0

And,

restart;

kernelopts(version);

            Maple 10.03, X86 64 LINUX, Mar 24 2006 Build ID 222373

ee := 3^(-(1/2)*n)*2^((1/6)*n)-2^((2/3)*n)*6^(-(1/2)*n):

convert(ee,exp);

                        (n/6)  (n/2)     (n/3) 2  (n/2)
                       2      6      - (2     )  3
                       --------------------------------
                                 (n/2)  (n/2)
...with the ensuing difficulties we see in this thread.

@vv If n=s+t*I then with arbitrary real s and t we get coverage of arbitrary complex n which was the question at hand.

I doubt anyone's suggesting that Maple ought not be able to get all this easily -- I'm not.

@faisal You can send me a contact (via email) using the "Contact" button here. After I reply to that by email you can send me a longer message with an attachment, say.

@faisal If you are using Maple 2015 then it may be that you did not intend the extra (errant) space between brackets in D(F) (etainf) and that the GUI automatocally inserted it.

If you are using Maple 2015 then you could disable so-called Smart operators by unchecking the box in the preferences dialogues. See the main menubar and Tools->Options->Interface->"Smart operators". It is a bug in the Smart operator facility that it inserts an extra space between round brackets in so common a situation as the initial conditions on derivatives as expected by the dsolve command! You can disable this feature and save that preference globally, so as to cover future Maple sessions.

See also here and here.

@markweitzman That undefined result is coming out of the FTOC (Fundamental Theorm Of Calculus) method=ftoc that is one of the approaches int can take for definite integration.

By forcing the ftocms method the desired result can also attain. The difference in the methods consists (mostly) of whether the :-series and :-limit or the MultiaSeries:-series and MultiSeries:-limit commands are used.

Sorry, I do not have the time to dig down into the integration engine, to debug and figure out where it goes wrong with method=ftoc. It may be some kind of hint, that it works if the abs is turned into Heaviside up front. (It could also be related to the limits where tp=t but that is pure conjecture.)


restart;

assume(T>0);
assume(t>0);
additionally(T>t);
assume(n::integer, n>0);

G := x -> (1/2)*omega0^2*T^2*((1/6)*Pi^2-(1/2)*Pi*abs(2*Pi*x/T)+Pi^2*x^2/T^2)/Pi^2:

igbit := exp(2*Pi*I*n*tp/T);

exp((2*I)*Pi*n*tp/T)

evalc(igbit);

cos(2*Pi*n*tp/T)+I*sin(2*Pi*n*tp/T)

int( G(t-tp)*evalc(igbit), tp = 0 .. T, method=ftocms );

(1/4)*T^3*omega0^2*(I*sin(2*t*Pi*n/T)+cos(2*t*Pi*n/T))/(Pi^2*n^2)

U := Int( G(t-tp)*igbit, tp = 0 .. T, method=ftocms ):
value(U);

(1/4)*exp((2*I)*t*Pi*n/T)*T^3*omega0^2/(Pi^2*n^2)

int( G(t-tp)*evalc(igbit), tp = 0 .. T, method=ftoc );

undefined

U := Int( G(t-tp)*igbit, tp = 0 .. T, method=ftoc ):
value(U);

undefined

 


Download MWP44_edited2.mw

@Markiyan Hirnyk  How is the answer given for that so-called precedent relevant here?

@Tzrpla 

p1:=plot(sin, -Pi..Pi,-1..1):
t1:=plots:-textplot([Pi/2,0.8,typeset("(",x[0],",",y[0],")")]):
t2:=plots:-textplot([-Pi/2,-0.8,typeset("(",x__0,",",y__0,")")]): # italic zero
plots:-display(p1,t1,t2);

@Christian Wolinski The penny finally drops for me. And now the functional programming fist is recognizable.

Welcome to the forum.

@Christian Wolinski I see distinct remember tables in my 64bit Maple 2015.2 and on my 64bit Linux machine in all versions back to and including Maple 11.02.

I see a shared (and thus clobbered) remember table between proc f and copied proc p in Maple 9.5 though.

What OS and Maple version are you using?

restart;
interface(prettyprint=1);
                                      1

p:=proc(x) option remember; x^2; end:
p(3.4);
                                    11.56

op(4,eval(p));
                            TABLE([3.4 = 11.56])

f:=copy(eval(p)):
op(4,eval(f));
                            TABLE([3.4 = 11.56])

[addressof(eval(p)), addressof(eval(f))];
                [18446884509604021454, 18446884509604021718]

[addressof(eval(op(4,eval(p)))), addressof(eval(op(4,eval(f))))];

                [18446884509603813726, 18446884509603814302]

p(5.7): # add a new entry to p's remember table
op(4,eval(p)); # changed as I'd expect
                      TABLE([5.7 = 32.49, 3.4 = 11.56])

op(4,eval(f)); # unchanged as I'd hope
                            TABLE([3.4 = 11.56])

interface(version);
  Standard Worksheet Interface, Maple 2015.2, Linux, November 13 2015 Build ID 1087698
First 311 312 313 314 315 316 317 Last Page 313 of 592