Dear Maplers,
when trying to get a usable plot of
absint := unapply(abs(int(sqrt(sin(c*x)), x = 0 .. 2*Pi)), c);
I got convinced there's a bug in Maple. I'm using
> interface(version);
`Standard Worksheet Interface, Maple 15.01, Windows 7, June 2 2011 Build
ID 636299`
First, it is clear that for nonnegative integer parameters c the value
of the integral should be the same because absint(c) is or should be the
same as abs(Int(sqrt(sin(x))/c, x=0..2*Pi*c));
Numerical verification:
fai := c -> abs(int(sqrt(sin(c*x)), x = 0 .. 2*Pi, numeric = true));
`$`(fai(i), i = 1 .. 3)
gives three times the value evalf(4*GAMMA(3/4)^2/sqrt(Pi)) (modulo
floating point noise)
3.388852339, 3.388852339, 3.388852339
OK
But I am interested how the plot of absint looks like for real values of c.
If I try a plot of the function absint in the range c=1..2, I get a
weird result (
http://dl.dropbox.com/u/3030567/Maple/absint12.png );
increasing Digits to e.g. 30 does not help.
Using Mathematica, I got a result which looks promising to me (
http://dl.dropbox.com/u/3030567/Maple/mmaplot.png ). It has got values
around 3.88 at c=1,2 and is smooth in between.
Converting the Mathematica expression to Maple led to a surprise:
mmaint := convert("Abs[(-2*EllipticE[(Pi - 4*c*Pi)/4, 2] +
Sqrt[2/Pi]*Gamma[3/4]^2)/c]", FromMma);
(converted to mmaint := abs((-2*EllipticE(sin((1/4)*Pi-c*Pi),
sqrt(2))+sqrt(2/Pi)*GAMMA(3/4)^2)/c), because the parameters of the
elliptic functions are handled differently)
The values at integer parameters are:
evalf(`$`(mmaint, c = 1 .. 3));
2.396280469, 0.4e-9, .7987601563
not a too obvious relation to the correct values above :-(
and the plot does not show values near (or almost near) 3.8 for c=1 or
c=2 (
http://dl.dropbox.com/u/3030567/Maple/mmaint12.png )
Using limit on absint gives a useless result:
limit(absint(i), i = 1);
limit(2^(1/2)*abs((-GAMMA(3/4)^2-I*GAMMA(3/4)^2+(2*I)*Pi^(1/2)*hypergeom([-1/4,
1/2], [3/4], -(1/4)/(cos(Pi*i)^2*(-1+cos(Pi*i)^2)
I lost patience after a few minutes while trying to do the same plot for
the function "fai" above. But the attempt to evaluate it for c=17 led to:
foo := CodeTools:-Usage(fai(17), output = all);
Error, (in property/LinearProp/+) too many levels of recursion
and the value at c=1.7
bar := CodeTools:-Usage(fai(1.7), output = all);
bar := Record(realtime = 9.300, cputime = 9.267, bytesused = 534493216,
bytesalloc = 0, output = 3.417123397)
has nothing to do with
evalf(eval(mmaint, c = 17/10));
.
5215125561
but is the same as calculated by Mathematica (here "maint" is the
Mma-expression converted above):
In[10]:= mmaint/.c->1.7
Out[10]= 3.41712
Do I have to reinstall Maple or is this 'normal' behaviour?
Thanks,
Peter
b.t.w.: Maxima 5.26 fails to get a numeric or symbolic result for
quad_qags(sqrt(sin(x)), x, 0, 2*%pi);
and
integrate(sqrt(sin(x)), x, 0, 2*%pi);
respectively