For negative
integer and negative
noninteger Mathematica uses formula:
$$\psi ^{(n)}(x)=\frac{\int_0^x (x-t)^{-n-2} \text{log$\Gamma $}(t) \, dt}{(-n-2)!}$$
PolyGammaMathematica[n_, x_] := 1/(-n - 2)!*NIntegrate[(x - t)^(-n - 2)*LogGamma[t], {t, 0, x}]
PolyGammaMaple1[n_, x_] :=(HurwitzZeta[1 + n, x]*(EulerGamma + PolyGamma[0, -n]) + Derivative[1, 0][HurwitzZeta][1 + n, x])/Gamma[-n] // N
PolyGammaMaple2[n_, x_] := -NIntegrate[(Exp[-x t]*t^n)/(1 - Exp[-t])*(Cos[Pi n] + EulerGamma/Pi*Sin[Pi n] + Sin[Pi n]/Pi*Log[t]), {t, 0, Infinity}](*For Re[x]>0,Re[n]>0*)
Table[{PolyGammaMathematica[n, 1], PolyGamma[n, 1],
PolyGammaMaple1[n, 1]}, {n, -4, -1, 1/2}] // N // Chop // MatrixForm (*For negative integer and negative noninteger*)
Table[{PolyGamma[n, 1], PolyGammaMaple2[n, 1]}, {n, 1, 4, 1/2}] // N //
Chop // MatrixForm (*For positive integer and positive noninteger*)
EDIT 25.12.2023
Looks like unfortunately, multiple extensions of the polygamma function exist, that way Mathematica and Maple uses a different choice.
Formula for complexes fractional order:
$$\psi ^{(n)}(x)=x^{-n} \left(\frac{\gamma -\log (x)+\psi (-n)}{x \Gamma (-n)}-\frac{\gamma }{\Gamma (1-n)}\right)+x^{1-n} \sum _{k=1}^{\infty } \frac{\,
_2\tilde{F}_1\left(1,2;2-n;-\frac{x}{k}\right)}{k^2}$$
PolyGammaMathematica2[n_,x_] := x^-n*((EulerGamma - Log[x] +
PolyGamma[-n])/(x Gamma[-n]) - EulerGamma/Gamma[1 - n]) +
x^(1 - n)*NSum[1/k^2*Hypergeometric2F1Regularized[1, 2, 2 - n, -
x/k], {k, 1, Infinity}](*For integer n gives "Indeterminate expression"*)
Table[{PolyGammaMathematica2[n, 1], PolyGamma[n, 1]}, {n, -3, 5,
1/3}] // N // Chop // MatrixForm // Quiet
Table[{PolyGammaMathematica2[n, 1], PolyGamma[n, 1]}, {n, 1/2 + I,
5 + I, 1/2}] // N // Chop // MatrixForm // Quiet
For more info See here
maple link
you provided all examples (1)-(11) agree with thePolyGamma
in Mathematica. In light of this, can you, please, make an effort to explain yourself better? What exactly is your issue? $\endgroup$