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 特殊関数 →

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 poweredAIでLaTeXを書く

最高のAI LaTeXエディタ、Overleaf代替

Octreeは15以上の大学の研究者がAIを使って論文をより速く書くのを支援

  • AIで美しいTikZダイアグラムを生成
  • 画像をアップロードしてシームレスにLaTeXに変換
  • 論文の執筆とフォーマットに即座にサポートを取得