Re: Hypergeometric1F1 polynomial
- To: mathgroup at smc.vnet.net
- Subject: [mg91460] Re: Hypergeometric1F1 polynomial
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Fri, 22 Aug 2008 03:14:04 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <g8je5u$a4n$1@smc.vnet.net>
Alec Mihailovs wrote: > Mathematica gives the wrong answer to the following sum, > > In[1]:= Sum[Binomial[n, k]/Binomial[2 n, k]/k! (2 x)^k, {k, 0, n}] > > Out[1]= 2^(-(1/2) - n) E^x x^(1/2 + n) > BesselI[1/2 (-1 - 2 n), x] Gamma[1/2 - n] > > The correct answer is 1 for n=0 and Hypergeometric1F1[-n, -2 n, 2 x] for > integer n>0, which would be equal to the expression given by Mathematica if > n was not a positive integer. > > Another form of the correct answer is > > (2 x)^(n+1/2) E^x BesselK[n+1/2,x] n!/(2 n)!/Sqrt[Pi] > > Is there a way to apply some assumptions to get the correct answer? Alec, One can pass assumptions thanks to the function *Assuming[]* or the option *Assumptions*, usually in combination with functions such as Simplify or FullSimplify (when special functions are involved). For instance, In[1]:= Assuming[Element[n, Integers] && n > 0, FullSimplify[ Sum[Binomial[n, k]/Binomial[2 n, k]/k! (2 x)^k, {k, 0, n}]]] Out[1]= E^x Hypergeometric0F1[1/2 - n, x^2/4] Note that the original result you got is equivalent for all n, indeed, to the hypergeometric function you claim to be the correct solution. In[2]:= s = Sum[Binomial[n, k]/Binomial[2 n, k]/k! (2 x)^k, {k, 0, n}] Out[2]= 2^(-(1/2) - n) E^x x^(1/2 + n) BesselI[1/2 (-1 - 2 n), x] Gamma[1/2 - n] In[3]:= FullSimplify[s] Out[3]= E^x Hypergeometric0F1[1/2 - n, x^2/4] In[4]:= FullSimplify[s == Hypergeometric1F1[-n, -2 n, 2 x]] Out[4]= True In[5]:= s /. n -> 0 Out[5]= E^x Cosh[x] In[6]:= % // TrigToExp Out[6]= 1/2 + E^(2 x)/2 The above result, however, does not match the following: In[7]:= With[{n = 0}, Sum[Binomial[n, k]/Binomial[2 n, k]/k! (2 x)^k, {k, 0, n}]] Out[7]= 1 (So the sum is now equal to one for n == 0, as you claimed.) The *With[]* construct rewrite the sum as Sum[Binomial[0, k]/Binomial[2 0, k]/k! (2 x)^k, {k, 0, 0}]] *before* evaluating it. Note that Mathematica fails in a weird way ( function == 0 ) checking the equivalence of In[8]:= FullSimplify[(2 x)^(n + 1/2) E^x BesselK[n + 1/2, x] n!/(2 n)!/Sqrt[Pi] == Hypergeometric1F1[-n, -2 n, 2 x]] Out[8]= (2^-n E^x x^(1/2 + n) BesselI[1/2 + n, x] Sec[n \[Pi]])/ Gamma[1/2 + n] == 0 Best regards, -- Jean-Marc