To recap, the result returned by FunctionExpand[Hypergeometric1F1[1/2 - n/2, -(1/2) - n/2, -a^2]]
is a generic solution, which is intended to be correct in most cases. Unfortunately, the case of odd n
is not part of those cases:
Table[Hypergeometric1F1[1/2 - n/2, -(1/2) - n/2, -a^2] ==
Exp[-a^2] (1 + 2 a^2 + n)/(1 + n) // FullSimplify // TrueQ, {n, 10}]
{False, True, False, True, False, True, False, True, False, True}
To handle the odd n
case, we first do a preliminary transformation:
Hypergeometric1F1[1/2 - n/2, -(1/2) - n/2, -a^2] /. n -> 2 k + 1 // Simplify
Hypergeometric1F1[-k, -1 - k, -a^2]
which shows the source of the failure: the case of odd n
results in a Kummer function with a nonpositive numerator parameter, which is precisely the degenerate polynomial case. To explicitly deal with this, we go back to the defining series for ${}_1 F_1$:
$${}_1 F_1\left({{a}\atop{b}}\mid z\right)=\sum_{j=0}^\infty \frac{(a)_j}{(b)_j}\frac{z^j}{j!}$$
For the special case under consideration, we have
$${}_1 F_1\left({{-k}\atop{-1-k}}\mid -a^2\right)=\sum_{j=0}^\infty \frac{(-k)_j}{(-1-k)_j}\frac{\left(-a^2\right)^j}{j!}$$
Since $(-k)_j=0$ if $j>k$, the series terminates:
$${}_1 F_1\left({{-k}\atop{-1-k}}\mid -a^2\right)=\sum_{j=0}^k \frac{(-k)_j}{(-1-k)_j}\frac{\left(-a^2\right)^j}{j!}$$
Using
FullSimplify[Pochhammer[-k, j]/Pochhammer[-1 - k, j]]
1 - j/(1 + k)
we thus have
Sum[(1 - j/(1 + k)) (-a^2)^j/j!, {j, 0, k}] // FullSimplify
((-a)^k a^(4 + k) E^a^2 + (1 + a^2 + k) Gamma[2 + k, -a^2])/
(E^a^2 (1 + k)*Gamma[2 + k])
We can now undo the earlier substitution:
s[n_] = % /. k -> (n - 1)/2 // FullSimplify
(2 ((-a)^((-1 + n)/2) a^((7 + n)/2) E^a^2 + ((1 + 2 a^2 + n)
Gamma[(3 + n)/2, -a^2])/2))/(E^a^2 (1 + n) Gamma[(3 + n)/2])
The rather complicated closed form gives no indication that it is in fact a polynomial. Nevertheless,
Table[Hypergeometric1F1[1/2 - n/2, -(1/2) - n/2, -a^2] == s[n] //
FullSimplify, {n, 1, 11, 2}]
{True, True, True, True, True, True}
s[7] // FullSimplify
(24 - 18*a^2 + 6*a^4 - a^6)/24
Hypergeometric1F1[]
degenerates to a polynomial if its upper parameter is a nonpositive integer. Unfortunately, the generic solution returned byFunctionExpand[]
/FullSimplify[]
does not take this into account. $\endgroup$FunctionExpand[]
is false when the upper parameter is a nonpositive integer? $\endgroup$