Digamma in LaTeX (\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.
\documentclass{article}
\begin{document}
Digamma: $\psi(x)$
\[ \psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}, \quad \psi(1) = -\gamma \]
\end{document}Related symbols
- Polygamma
\psi^{(n)}(x) - Hypergeometric
{}_2F_1(a,b;c;z) - Elliptic Integral K
K(k) - Chebyshev U
U_n(x) - Elliptic Integral E
E(k) - Chebyshev T
T_n(x)
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.
최고의 AI LaTeX 편집기, Overleaf 대안
Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움
- AI로 아름다운 TikZ 다이어그램 생성
- 이미지를 업로드하고 LaTeX로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기