the following gives unfortunately an error in Maple12:
Sum(binomial(n,k)/binomial(2*n,k)/k!*(2*x)^k,k=0..n);
value(%);
simplify(%);
Can somebody shed some light onto what's going wrong there?
Michael
It seems to be a simple error. binomial(2*n,2*n+1) in the denominator of
the value should have been binomial(2*n,2*n-1):
S:=Sum(binomial(n,k)/binomial(2*n,k)/k!*(2*x)^k,k=0..n);
res:=value(S);
eval(res,n=10);
res1:=subs(binomial(2*n,2*n+1)=binomial(2*n,2*n-1),res);
plot(eval(S-res1,n=10),x=0..3);
How it originates, I don't know.
Preben Alsholm
What's wrong, I don't know. If you replace your value by
value(%) assuming n::posint;
we see that even Maple knows there is a problem in that case.
--
G. A. Edgar http://www.math.ohio-state.edu/~edgar/
I'm afraid I was too hasty here. The numerator of the second term in the
result also vanishes. Although my remedy seems to cure the problem it
does so only because anything not vanishing in the denominator is Ok.
Preben Alsholm
> Sum(binomial(n,k)/binomial(2*n,k)/k!*(2*x)^k,k=0..n);
> Can somebody shed some light onto what's going wrong there?
This is 1 for n=0 and hypergeom([-n], [-2*n], 2*x) for integer n>0, which
can be also written as KummerM(-n,-2*n,2*x) and expressed in terms of
.associated Laguerre polynomials.
Maple is erroneously using formula for hypergeom([a],[b],2*x) with a>=0,
b>=0 which is wrong here.
Alec
Thank you very much. In the meantime I found that
T:=(n,x)->(2*x)^(n+1/2)*exp(x)*BesselK(n+1/2,x)*n!/(2*n)!/sqrt(Pi)
does the job for every non-negative integer n.
Is there a way using Maple to show that
T(n,x)-hypergeom([-n], [-2*n], 2*x);
is zero?
simplify(subs(n=n+1,%),symbolic) assuming n::posint;
doesn't work, unfortunately.
Thanks,
Michael
It can be, probably, done, either using recurrence relations, or
differential equations. If you know how to do that by hand, that, probably,
can be reproduced in Maple.
Frankly, I am surprised that somebody is still using Maple. I stopped using
it about 2-3 years ago.
Everybody that I know (I mean mathematicians) is using SAGE.
Alec
> Thank you very much. In the meantime I found that
> T:=(n,x)->(2*x)^(n+1/2)*exp(x)*BesselK(n+1/2,x)*n!/(2*n)!/sqrt(Pi)
> does the job for every non-negative integer n.
>
> Is there a way using Maple to show that
> T(n,x)-hypergeom([-n], [-2*n], 2*x);
One way of doing that is
gfun[holexprtodiffeq]((2*x)^(n+1/2)*exp(x)*BesselK(n+1/2,x)*n!/(2*n)!/sqrt(Pi),y(x));
/ 2 \
/d \ |d |
2 y(x) n + (-2 n - 2 x) |-- y(x)| + |--- y(x)| x
\dx / | 2 |
\dx /
gfun[holexprtodiffeq](hypergeom([-n],[-2*n],2*x),y(x));
/ 2 \
/d \ |d |
{2 y(x) n + (-2 n - 2 x) |-- y(x)| + |--- y(x)| x, y(0) = 1}
\dx / | 2 |
\dx /
The only thing that is left to be checked is that y(0)=1 for the first
expression.
Alec
But why are you still posting in this newsgroup?
> Thank you very much. In the meantime I found that
> T:=(n,x)->(2*x)^(n+1/2)*exp(x)*BesselK(n+1/2,x)*n!/(2*n)!/sqrt(Pi)
> does the job for every non-negative integer n.
>
> Is there a way using Maple to show that
> T(n,x)-hypergeom([-n], [-2*n], 2*x);
> is zero?
The shortest approach is probably:
convert(T(n,x),hypergeom) assuming n::nonnegint;
--
Thomas Richard
Maple Support
Scientific Computers GmbH
http://www.scientific.de
:-)
Just accidentally added it to the list of subscribed newsgroups. I didn't
post here for a long time, and, probably, won't post much again. It was
interesting to see some familiar names though.
Alec
By the way, for n=0 it is a bug. T(0,x) = 1 and hypergeom([0],[0],2*x) =
exp(2*x).
Alec
Actually, the differential equation is of 2nd order, so another thing also
has to be checked for both of them - that the derivative at 0 equals 1.
It is easy to do manually, but Maple has problems with that for the
expression with BesselK, as well as for finding its limit at 0.
Alec
I think that is a limiting problem (using F instead of T as notation):
F(n,x)-hypergeom([-n], [-2*n], 2*x);
subs(n=0,%); subs(x=0, %);
value(%);
gives 0, since the first step gives 1 - exp(2*x)
But for x= 0 the first term F gets troubles
Here is another bug related to that. Let F be the first term in the answer
to the sum problem given by Maple,
F:=(n,x)->BesselI(-n-1/2,x)*GAMMA(-n+1/2)*x^(n+1/2)/2^(n+1/2)*exp(x);
Now, convert it to hypergeom using the same approach,
convert(F(n,x),hypergeom) assuming n::nonnegint;
hypergeom([-n], [-2 n], 2 x)
So what, F equals T?
is(convert(F(n,x)=T(n,x),hypergeom)) assuming n::nonnegint;
true
But it is obviously false. For example,
simplify(T(1,x)=F(1,x));
x + 1 = -(sinh(x) x - cosh(x)) exp(x)
which is clearly wrong.
Alec
convert(F(n,x),BesselK) assuming n::nonnegint;
(n + 1/2)
(2 x) BesselK(n + 1/2, x) exp(x)
-----------------------------------------
1/2
Pi pochhammer(n + 1, n)
convert(%,factorial);
(n + 1/2)
(2 x) exp(x) BesselK(n + 1/2, x) n!
--------------------------------------------
1/2
(2 n)! Pi
T(n,x);
(n + 1/2)
(2 x) exp(x) BesselK(n + 1/2, x) n!
--------------------------------------------
1/2
(2 n)! Pi
The same answers. But we know that F is not equal to T.
Alec
Now, compare this thread with the thread that I started in Mathematica
group,
Look at the Devendra Kapadia (Wolfram Research) response there.
What a difference comparing to Maplesoft (absent) reaction here, or in other
threads in this group or on Mapleprimes!
I got a very nice reply from Wolfram Research, the problem was addressed, a
workaround was suggested, and I wasn't even asked to fill the SCR (software
change request.)
Alec