Legendre P in LaTeX (P_n(x))

Pn(x)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.

∫−11Pm(x)Pn(x) dx=22n+1δmn\int_{-1}^{1} P_m(x) P_n(x)\, dx = \frac{2}{2n+1} \delta_{mn}
\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

All Speciale Functies →

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.
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