Method on @sym: psi (x)
Method on @sym: psi (k, x)

Symbolic polygamma function.

The first polygamma (or “psi”) function is the logarithmic derivative of the gamma function:

syms x
psi(x)
  ⇒ (sym) polygamma(0, x)
diff(log(gamma(x)))
  ⇒ (sym) polygamma(0, x)

More generally, we have the k+1 derivative:

psi(1, x)
  ⇒ (sym) polygamma(1, x)
diff(psi(x))
  ⇒ (sym) polygamma(1, x)
diff(log(gamma(x)), 2)
  ⇒ (sym) polygamma(1, x)

See also: psi, @sym/gamma, @sym/gammainc.

Package: symbolic