3
$\begingroup$

I was doing the following sum: $$\sum_{i=2}^k \frac{(-1)^i}{i-1} \binom{2k-i-1}{k-1}x^i$$

First, Mathematica simplifies it to some DifferenceRoot function:

Sum[(-1)^i/(i - 1) Binomial[2 k - i - 1, k - 1] x^i, {i, 2, k}]
(* DifferenceRoot[
  Function[{\[FormalY], \[FormalN]}, {(-1 + \[FormalN]) (-\[FormalN] +
      k) x \[FormalY][\[FormalN]] + (-\[FormalN] - \[FormalN]^2 + 
     2 \[FormalN] k - \[FormalN] x + \[FormalN]^2 x + 
     k x - \[FormalN] k x) \[FormalY][
    1 + \[FormalN]] + \[FormalN] (1 + \[FormalN] - 
     2 k) \[FormalY][2 + \[FormalN]] == 0, \[FormalY][2] == 
 0, \[FormalY][3] == x^2 Binomial[-3 + 2 k, -1 + k]}]][1 + k] *)

Then I tried to simplify it:

FullSimplify[%, k ∈ Integers && k >= 10]

And Mathematica throws a ComplexInfinity error:

FullSimplify::infd: Expression DifferenceRoot[Function[{\[FormalY],\[FormalN]},{(-1+\[FormalN]) (Times[<<2>>]+k) x \[FormalY][\[FormalN]]+(Times[<<2>>]+Times[<<2>>]+Times[<<3>>]+Times[<<3>>]+Times[<<2>>]+Times[<<2>>]+Times[<<4>>]) \[FormalY][Plus[<<2>>]]+\[FormalN] (1+\[FormalN]+Times[<<2>>]) \[FormalY][Plus[<<2>>]]==0,\[FormalY][2]==0,\[FormalY][3]==x^2 Binomial[-3+Times[<<2>>],-1+k]}]][1+k] simplified to ComplexInfinity. >>

Just would like to understand what is going on here, what does Mathematica try to do? Perhaps it meets something like $\Gamma(z)$ for negative integer $z$?

$\endgroup$
5
$\begingroup$

(This is more of an extended comment than an answer.)

Consider the following result:

And @@ Table[x^2 Binomial[2 k - 3, k - 1]
             HypergeometricPFQ[{1, 1, 2 - k}, {2, 3 - 2 k}, -x] == 
             Sum[(-x)^i/(i - 1) Binomial[2 k - i - 1, k - 1], {i, 2, k}] // Expand,
             {k, 2, 30}]
   True

and compare the hypergeometric expression in the snippet above with the result of FunctionExpand[Sum[(-1)^i/(i - 1) Binomial[2 k - i - 1, k - 1] x^i, {i, 2, k}], k ∈ Integers && k > 0]. After a few manipulations, you'll notice that the first term of that result is the same as that used in the first snippet. All the singularity trouble encountered by the OP and bbgodfrey seem to stem from the needless second term, which has the troublesome factor HypergeometricPFQ[{1, 1, k}, {2 - k, 1 + k}, -x] which blows up for $k\in\mathbb Z \text{ and } k>2$. Even if this second term is simplified in terms of the now finite HypergeometricPFQRegularized[{1, 1, k}, {2 - k, 1 + k}, -x], this second term now contributes a logarithmic term, which is absurd since the original sum considered is a polynomial.

This tells me that something peculiar must be going on during the processing of the DifferenceRoot[] by either FullSimplify[] or FunctionExpand[]. As we have no access to the internals, we can only take a stab in the dark as to what's happening. Oh well.


Okay, a final confession. Here is how I actually obtained the correct expression:

Sum[(-x)^i/(i - 1) Binomial[2 k - i - 1, k - 1], {i, 2, k}, 
    Method -> "HypergeometricTermFinite"]

where I used the specialized setting for finite hypergeometric series. Why does Automatic not do this? Again, we don't know.

$\endgroup$
3
$\begingroup$

I do not view the following as a real answer, but it may provide some insight. If we designate the Sum as s,

s = Sum[(-1)^i/(i - 1) Binomial[2 k - i - 1, k - 1] x^i, {i, 2, k}]

then the simplification

FullSimplify[s, k ∈ Integers && k > 0]

yields an expression in terms of hypergeometric functions.

(* x ((x HypergeometricPFQ[{1, 1, 2 - k}, {2, 3 - 2 k}, -x])/Gamma[k] + 
   ((-x)^k Gamma[3 - 2 k] HypergeometricPFQ[{1, 1, k}, {2 - k, 1 + k}, -x])/
   (k! Gamma[2 - k]^2) *)

Setting k equal to a positive integer in this expression evaluates to an indeterminate or infinite result. So, it is reasonable to surmise that an intermediate step in FullSimplify is to produce an expression in terms of hypergeometric functions, after which further attempts to simplify s by setting k to 10 or greater produces the error message.

Incidentally,

FunctionExpand[s]

also yields an expression in terms of hypergeometric functions.

(* -((2^(-3 + 2 k) x^2 Gamma[1 - k] HypergeometricPFQ[{1, 1, 2 - k}, {2, 3 - 2 k}, -x] 
   Tan[k π])/(Sqrt[π] Gamma[3/2 - k])) + ((-x)^k x 
   HypergeometricPFQ[{1, 1, k}, {2 - k, 1 + k}, -x] Tan[k π])/(2 (-1 + k) k π) *)

Here, too, seeking further simplification by specifying k to an integer greater than some positive value yields an indeterminate or infinite result.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.