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 الدوال الخاصة →

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 poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث