Integrating Gamma and Pochhammer functions

Could anybody explain why Mathematica gives different results with:

With[{n = 6, z = 0.34},
{ Integrate[ Log[ Gamma[t + n]/Gamma[t]], t] /. t -> z,
Integrate[ Log[ Pochhammer[t, n]], t] /. t -> z}]
{9.83259, 19.319}

recalling that by definition Gamma[t + n]/Gamma[t] == Pochhammer[t, n]?

The same issue for different values of $$n$$ and $$z$$.

• Hi Nasser! I cleaned up the formatting of your question. Check out mathematica.stackexchange.com/editing-help for more info on formatting. I personally like to put code in a block delimited by . Apr 5 '20 at 2:19
• Added the [scoping] tag, because without With it's evaluating correctly for both expressions. Apr 5 '20 at 2:20
• @m0nhawk, what do you mean by "evaluating correctly for both expressions"?
– Alx
Apr 5 '20 at 2:24
• Indefinite integrals are anti-derivatives, they can differ by an arbitrary constant and still both be valid anti-derivatives. Compare with With[{n = 6, z = 0.3415}, {Integrate[Log[Gamma[t + n]/Gamma[t]], {t, 0, z}], Integrate[Log[Pochhammer[t, n]], {t, 0, z}]}] Apr 5 '20 at 2:37
• @m0nhawk I'm not sure With is to blame, I see the same discrepancy with n = 6; z = 0.34; Integrate[Log[Gamma[t + n]/Gamma[t]], t] /. t -> z Integrate[Log[Pochhammer[t, n]], t] /. t -> z Apr 5 '20 at 2:46

Calculating indefinite integrals we can expect different expressions, at least different by a constant. It is not surprising since the expressions in logarithms migth be negative and so issues with different branches of logarithm would appear. Let's calculate indefinite integrals:

ints = With[{ n = 6}, Assuming[ t > 0,
{ Integrate[ Log[ Gamma[t + n]/Gamma[t]], t],

Integrate[ Log[ Pochhammer[t,n]], t]}]]
{ t Log[Gamma[6 + t]/Gamma[t]] + t LogGamma[t] - t LogGamma[6 + t] - PolyGamma[-2, t]
+ PolyGamma[-2, 6 + t],

-6 t + Log[1 + t] + 2 Log[2 + t] + 3 Log[3 + t] + 4 Log[4 + t] + 5 Log[5 + t]
+ t Log[t (1 + t) (2 + t) (3 + t) (4 + t) (5 + t)]}

We use a rational counterpart of approximate number 0.34 to find the difference in an exact form:

FullSimplify[ ints[] - ints[], t == 17/50]
3 (-5 + Log + Log[Pi])

It appears that the both expressions differ by the above number which equals to

N @ %
-9.48637

as in the question. This difference is the same for every argument as one could expect.

Plot[ ints, {t, 0, 2}, Evaluated -> True, PlotStyle -> Thick, AxesOrigin -> {0, 0}] Of course definite integrals calculated in appropriate ranges don't differ.

ints2 = With[{n = 6, z = 17/50},
{ Integrate[ Log[ Gamma[t + n]/Gamma[t]], {t, 0, z}],
Integrate[ Log[ Pochhammer[t, n]], {t, 0, z}]}];

ints2[] == ints2[]
True

It should be noted that symbolically the both integrals can take different forms, e.g. consider the integrands without logarithms:

With[{ n = 6}, Assuming[ z > 0,{ Integrate[ Gamma[t + n]/Gamma[t], {t,0,z}],
Integrate[ Pochhammer[t,n], {t,0,z}]}]]
{ Integrate[ Gamma[6 + t]/Gamma[t], {t, 0, z}],
60 z^2 + (274 z^3)/3 + (225 z^4)/4 + 17 z^5 + (5 z^6)/2 + z^7/7}

although the system knows that the integrands are equal:

FullSimplify[ Gamma[t + n]/Gamma[t] == Pochhammer[t, n]]