restart: interface(version); Digits:=14:
Classic Worksheet Interface, Maple 11.02, Windows, Nov 10 2007 Build ID 330022
Ei(1,1/2*Pi*(1+2*k)):
%=convert(%,Sum);
subs(k=0,%);
evalf(%);
Pi (1 + 2 k)
Ei(1, ------------) = GAMMA(Pi k + 1/2 Pi)
2
Pi Pi
Ei(1, ----) = GAMMA(----)
2 2
0.090082461803865 = 0.89056089038154
and that mess not only for k=0 ...
Comments
or simply
Ei(1,x): %=convert(%,Sum); Ei(1, x) = GAMMA(x)Strange bug
Interesting...
convert(Ei(1,x), GAMMA);
(which is correct).
convert(Ei(1,x), FormalPowerSeries, x);
(also correct, I think).
Why is the <maple> tag not working for me?
Concerning the maple tag
It does not work for me either, and it has not worked since the mapleprimes "update" which, it seems, was more concerned with cosmestics than usability. See for instance The pre, code, and maple tags and Maple tag, still ....
perhaps ...
The problem routine
The core routine that does this transformation is
> showstat(`convert/GAMMA/IC/from`[Ei]); `convert/GAMMA/IC/from`[Ei] := proc(f) local a, z, G; 1 if nargs = 0 then 2 return 1, (a, z) -> if nargs = 2 then [[z <> 0]] end if end if; 3 if nops(f) = 2 then 4 a, z := op(f); 5 if `tools/type`(z <> 0) then 6 if `tools/type`(a,'integer') then 7 G := ('GAMMA')(1-a,z) else 8 G := GAMMA(1-a,z) end if; 9 return z^(a-1)*G end if end if; 10 f end procwhich gives
GAMMA(0,z)when givenEi(1,z)as input. What should it be instead?Gamma( z ) vs Gamma( 0 , z )
converting Ei( 1 , z ) to Sum returns GAMMA( z ), not GAMMA( 0 , z )
BTW: strange that Maple knows about the (modified) exponential integral Ei( z ), but I can
not find it through the help (it should stand for the formal series in Robert's reply)
Edited for the "BTW": ok, should have looked closer at the help pages ... there it is, sorry
Why GAMMA?
What I wonder is why
does not convert to a formal power series, as stated in ?convert,sum and something like this form is needed to get it:
convert(Ei(1,z), Sum, include = powers,dummy=n); /infinity \ | ----- n (n + 1) | | \ (-1) z | -gamma - ln(z) + | ) ----------------| | / (n + 1)! (n + 1)| | ----- | \ n = 0 /convert(Ei(1,z),Sum) OK in Maple10
What I get
in Maple 10.06 is different:
Gamma(z) vs Gamma(0,z)
Internally, it first returns Gamma(0,z), which some other routines then ``simplify'' to Gamma(z). Perhaps that is the actual bug?
Gamma(z) vs Gamma(0,z)