Legendre P in LaTeX (P_n(x))
- LaTeX command
P_n(x)- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Legendre polynomial of degree n, orthogonal on [-1, 1] with weight 1.
Legendre polynomials start P_0 = 1, P_1 = x, P_2 = \frac{1}{2}(3x^2 - 1) and follow Rodrigues' formula P_n(x) = \frac{1}{2^n n!} \frac{d^n}{dx^n}(x^2 - 1)^n. Orthogonality reads \int_{-1}^1 P_m P_n\,dx = \frac{2}{2n+1}\delta_{mn}. They appear in multipole expansions, spherical harmonics, and Gauss-Legendre quadrature nodes. Associated Legendre functions are written P_n^m(x) or P_\ell^m(\cos\theta). Physicists often use \ell for degree. Do not confuse with the path graph P_n or the probability P; the argument x usually signals the polynomial.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Legendre P: $P_n(x)$
\[ \int_{-1}^{1} P_m(x) P_n(x)\, dx = \frac{2}{2n+1} \delta_{mn} \]
\end{document}Related symbols
- Legendre Q
Q_n(x) - Modified Bessel K
K_n(x) - Hermite Polynomial
H_n(x) - Modified Bessel I
I_n(x) - Laguerre Polynomial
L_n(x) - Bessel Y
Y_n(x)
Frequently asked questions
- How do I write Legendre P in LaTeX?
- Type P_n(x) in math mode, for example $\int_{-1}^{1} P_m(x) P_n(x)\, dx = \frac{2}{2n+1} \delta_{mn}$. It works in plain LaTeX without loading any package.
- Which package do I need for P_n(x)?
- None. P_n(x) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use P_n(x) in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $P_n(x)$ in running text.
Editor LaTeX AI Terbaik, Alternatif Overleaf
Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI
- Jana diagram TikZ yang cantik menggunakan AI
- Muat naik imej dan tukar ke LaTeX dengan lancar
- Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan