# Simplifying sums and showing equality - limitations?

Is it possible to verify the following lhs,rhs involving the sums are equal, with Mathematica?

I can verify it for individual values of $$d$$ variable:

ClearAll[d, q, h, eq1, eq2, x, lhs, rhs];
eq1[d_: d, q_: q, h_: h] := Sum[
((-1)^(d + 1 - k))*(1/((d + 1) Factorial[(k - 1)] Factorial[(d + 1 - k)]))*
Product[(q/h + (k - i)), {i, 1, d + 1}] *
Product[(1 - j h), {j, k, d}] *
Product[(1 + l h), {l, d - k + 2, d}]
, {k, 1, d + 1}]
eq2[d_: d, q_: q, h_: h] := Sum[
((-1)^(d - k))*(1/((d) Factorial[(k - 1)] Factorial[(d - k)]))*
Product[(q/h + (k - i)), {i, 1, d}] *
Product[(1 + (k - j) h), {j, 1, d}]
, {k, 1, d}]
lhs[d_: d, x_: x, h_: h] := (x - 1)^d  eq1[d, 1/(x - 1), h]
rhs[d_: d, x_: x, h_: h] :=  (x)^d eq2[d, 1/x, (((x - 1) h)/x)]

t = 0;
Do[r = PossibleZeroQ[lhs[d] - rhs[d]]; Print[d, " ", r], {d, 1, 100}];


And it is true for first $$100$$ values of $$d$$, for example.

But PossibleZeroQ[lhs[d] - rhs[d]] returns false for general $$d$$.

I've tried simplifying and expanding, with no success.

I've added method Method -> "ParallelBestQuality" to both sums to obtain expressions in terms of Gamma and HypergeometricPFQRegularized, as following:

lhs:

((-1)^d (-h)^d (-1 + x)^d Gamma[1 + d - 1/h] Gamma[1 + 1/(h (-1 + x))] HypergeometricPFQRegularized[{-d, -((1 + d h)/ h), 1 + 1/(h (-1 + x))},{(-1 + h)/h, -d + 1/(h (-1 + x))}, 1])/Gamma[2 + d]


rhs:

((-1)^(1 + d) (h (-1 + 1/x))^d x^d Gamma[1 + 1/(h (-1 + x))] Gamma[(x + h (-1 + d + x - d x))/(h (-1 + x))] Gamma[d + x/(h - h x)] HypergeometricPFQRegularized[{1 - d, 1 + 1/(h (-1 + x)), 1 + x/(h (-1 + x))}, {1 - d + 1/(h (-1 + x)), (x + h (-1 + d + x - d x))/(h (-1 + x))},1])/(Gamma[1 + d] Gamma[x/(h - h x)])


Is it possible for Mathematica to simplify one of these two into the other? (Show difference is $$0$$?)

Solving this will also answer the following question from MSE: Equality like Pascal triangle.

(The source of sums)

Setting the first statement equal to lhs and the second to rhs, we can ask for:

FindInstance[lhs =!= rhs, {d, x, h}]
{{d -> -(12/5) - I/2, x -> -(9/5) + (3 I)/5, h -> -(24/5) - (21 I)/5}}


So they are not equal.

• The $d$ should be a positive integer as it is the sum limit. Perhaps this was the problem, $d$ being treated like a complex variable. – Vepir Sep 1 '19 at 6:44
• Also, FindInstance dose not appear to be working on the closed forms produced by the sum. FindInstance[lhs =!= rhs && d>0, {d, x, h}, Integers] finds a counterexample, but it is actually not a counter example when substituted into the expressions lhs, rhs we were testing, and applying FullSimplify to them gives the equal numerical (fraction) value. I think the problem might be in =!= used in the FindInstance giving false-counter-example. – Vepir Sep 1 '19 at 7:23

Version 8.0 has no problem, showing lhs-rhs=0,

eq1[d, q, h]

(*   -((-1)^(2 d) (-h)^
d Gamma[(-1 + h + d h)/h] Gamma[(h + d h - q)/
h] HypergeometricPFQ[{-d, -d - 1/h,
1 + q/h}, {1 - 1/h, -d + q/h}, 1])/(Gamma[2 + d] Gamma[(-1 + h)/
h] Gamma[-(q/h)])   *)

eq2[d, q, h]

(*   -((-1)^(2 d) (-h)^
d Gamma[(-1 + d h)/h] Gamma[(d h - q)/
h] HypergeometricPFQ[{1 - d, 1 + 1/h, 1 + q/h}, {1 - d + 1/h,
1 - d + q/h}, 1])/(Gamma[1 + d] Gamma[-(1/h)] Gamma[-(q/h)])   *)

diff = lhs[d] - lhs[d]

(*   0   *)