Digamma in LaTeX (\psi(x))

ψ(x)\psi(x)
LaTeX command
\psi(x)
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Digamma function, the logarithmic derivative of the gamma function: Gamma'(x)/Gamma(x).

\psi(x) = \frac{d}{dx}\ln\Gamma(x) satisfies \psi(x+1) = \psi(x) + 1/x, so \psi(n+1) = H_n - \gamma with H_n the harmonic number and \gamma the Euler-Mascheroni constant, and \psi(1) = -\gamma. It appears in variational Bayes for Dirichlet distributions, where \mathbb{E}[\ln \theta_k] = \psi(\alpha_k) - \psi(\sum_j \alpha_j). The Greek \psi is standard; some texts write F(x). Do not use \digamma, which prints the archaic Greek letter digamma rather than the function. In quantum mechanics \psi is the wavefunction, so define it.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

ψ(x)=Γ′(x)Γ(x),ψ(1)=−γ\psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}, \quad \psi(1) = -\gamma
\documentclass{article}
\begin{document}
Digamma: $\psi(x)$

\[ \psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}, \quad \psi(1) = -\gamma \]
\end{document}

Related symbols

All Speciale Functies →

Frequently asked questions

How do I write Digamma in LaTeX?
Type \psi(x) in math mode, for example $\psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}, \quad \psi(1) = -\gamma$. It works in plain LaTeX without loading any package.
Which package do I need for \psi(x)?
None. \psi(x) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \psi(x) in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\psi(x)$ in running text.
Math poweredSchrijf LaTeX met AI

Beste AI LaTeX Editor, Overleaf Alternatief

Octree helpt onderzoekers van 15+ universiteiten sneller onderzoeksartikelen schrijven met AI

  • Genereer mooie TikZ-diagrammen met AI
  • Upload afbeelding en converteer naadloos naar LaTeX
  • Krijg directe hulp bij het schrijven en opmaken van onderzoeksartikelen