Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

P21(x) at x = 0
-0
101 rows generated
x P21(x)
-1 0
-0.98 0.585053
-0.96 0.8064
-0.94 0.962112
-0.92 1.081695
-0.9 1.176903
-0.88 1.253931
-0.86 1.316559
-0.84 1.367318
-0.82 1.408014
-0.8 1.44
-0.78 1.464324
-0.76 1.481825
-0.74 1.493187
-0.72 1.498984
-0.7 1.4997
-0.68 1.495753
-0.66 1.487506
-0.64 1.47528
-0.62 1.459359
-0.6 1.44
-0.58 1.417433
-0.56 1.391868
-0.54 1.363497
-0.52 1.332499
-0.5 1.299038
-0.48 1.263267
-0.46 1.225328
-0.44 1.185357
-0.42 1.14348
-0.4 1.099818
-0.38 1.054485
-0.36 1.007588
-0.34 0.959234
-0.32 0.909521
-0.3 0.858545
-0.28 0.8064
-0.26 0.753175
-0.24 0.698956
-0.22 0.64383
-0.2 0.587878
-0.18 0.53118
-0.16 0.473816
-0.14 0.415864
-0.12 0.357399
-0.1 0.298496
-0.08 0.239231
-0.06 0.179676
-0.04 0.119904
-0.02 0.059988
0 -0
0.02 -0.059988
0.04 -0.119904
0.06 -0.179676
0.08 -0.239231
0.1 -0.298496
0.12 -0.357399
0.14 -0.415864
0.16 -0.473816
0.18 -0.53118
0.2 -0.587878
0.22 -0.64383
0.24 -0.698956
0.26 -0.753175
0.28 -0.8064
0.3 -0.858545
0.32 -0.909521
0.34 -0.959234
0.36 -1.007588
0.38 -1.054485
0.4 -1.099818
0.42 -1.14348
0.44 -1.185357
0.46 -1.225328
0.48 -1.263267
0.5 -1.299038
0.52 -1.332499
0.54 -1.363497
0.56 -1.391868
0.58 -1.417433
0.6 -1.44
0.62 -1.459359
0.64 -1.47528
0.66 -1.487506
0.68 -1.495753
0.7 -1.4997
0.72 -1.498984
0.74 -1.493187
0.76 -1.481825
0.78 -1.464324
0.8 -1.44
0.82 -1.408014
0.84 -1.367318
0.86 -1.316559
0.88 -1.253931
0.9 -1.176903
0.92 -1.081695
0.94 -0.962112
0.96 -0.8064
0.98 -0.585053
1 -0

What is the Associated Legendre Polynomial Table Calculator?

This tool computes a table of values of the associated Legendre function \(P_n^m(x)\) (degree \(n\), order \(m\)) over a chosen range of \(x\) and draws the corresponding curve. It is pure mathematics and applies identically everywhere, with no units or country-specific assumptions. The associated Legendre polynomials appear throughout physics and applied mathematics: in spherical harmonics, the solution of Laplace's equation in spherical coordinates, multipole expansions, and quantum mechanics of angular momentum.

How to use it

Enter the integer degree \(n\) (0, 1, 2, ...) and the integer order \(m\) with \(-n \le m \le n\). Choose the start value of \(x\) (between -1 and 1), the step increment, and the number of rows. The defaults \(n = 2\), \(m = 1\), start = -1, step = 0.02, 101 rows sweep \(x\) from -1 to +1 inclusive. Select Type A (Wolfram convention) or Type B (Maple convention); for real \(x\) in \((-1, 1)\) they agree in magnitude and differ only by a sign/phase of the prefactor.

The formula explained

For integer \(n\) and \(0 \le m \le n\) we use $$P_n^m(x) = (-1)^m(1-x^2)^{m/2}\,\frac{d^m}{dx^m}P_n(x),$$ evaluated with the numerically stable recurrence $$P_m^m = (-1)^m(2m-1)!!(1-x^2)^{m/2},$$ $$P_{m+1}^m = x(2m+1)P_m^m,$$ then $$(l-m)P_l^m = (2l-1)x\,P_{l-1}^m - (l+m-1)P_{l-2}^m.$$ For negative \(m\), $$P_n^{-m} = (-1)^m\frac{(n-m)!}{(n+m)!}P_n^m.$$ This closed recurrence avoids the Gamma-function blow-up of the literal \({}_2F_1\) form for positive integer \(m\).

Curves of several associated Legendre functions plotted over the interval from minus one to one
Graphs of the first few associated Legendre functions \(P_n^m(x)\) on the interval \([-1, 1]\).

Worked example

With \(n = 2\), \(m = 1\) the function is $$P_2^1(x) = -3x\sqrt{1-x^2}.$$ At \(x = 0\) the value is 0; at \(x = 0.5\) it is $$-3(0.5)(0.866025) = -1.299038;$$ at \(x = -0.5\) it is \(+1.299038\). The curve starts at 0 (\(x = -1\)), rises to about \(+1.1547\) near \(x = -0.577\), crosses zero at \(x = 0\), dips to about \(-1.1547\) near \(x = +0.577\), and returns to 0 at \(x = +1\).

Triangular arrangement of polynomial entries indexed by degree n down rows and order m across columns
Table layout: rows by degree \(n\), columns by order \(m\), each cell holding \(P_n^m(x)\).

Closed-Form Associated Legendre Functions P_n^m(x)

The associated Legendre functions \(P_n^m(x)\) for integer degree \(n\) and order \(0\le m\le n\) follow from \(P_n^m(x)=(-1)^m(1-x^2)^{m/2}\dfrac{d^m}{dx^m}P_n(x)\). The factor \((-1)^m\) is the Condon–Shortley phase included in the Type A convention (matching Wolfram); the Type B convention (Maple) omits it, so its odd-\(m\) entries differ only in sign. The table below lists the explicit forms under Type A.

\(n\) \(m\) \(P_n^m(x)\) (Type A, with sign)
0 0 \(1\)
1 0 \(x\)
1 1 \(-\sqrt{1-x^2}\)
2 0 \(\tfrac{1}{2}(3x^2-1)\)
2 1 \(-3x\sqrt{1-x^2}\)
2 2 \(3(1-x^2)\)
3 0 \(\tfrac{1}{2}(5x^3-3x)\)
3 1 \(-\tfrac{3}{2}(5x^2-1)\sqrt{1-x^2}\)
3 2 \(15x(1-x^2)\)
3 3 \(-15(1-x^2)^{3/2}\)

As a worked check, at \(x=0.5\) the entry \(P_2^1\) gives \(-3(0.5)\sqrt{1-0.25}=-1.5\sqrt{0.75}=\) -1.299038. The \(m=0\) column reproduces the ordinary Legendre polynomials \(P_n(x)\), e.g. \(P_3^0(x)=\tfrac12(5x^3-3x)\), which can be tabulated with the Legendre polynomial table calculator.

Key Terms and Variables

Degree \(n\)
A non-negative integer (degreeN) setting the order of the underlying Legendre polynomial \(P_n(x)\), which is a polynomial of degree \(n\).
Order \(m\)
An integer (orderM) controlling how many derivatives are taken. For real-valued results on \((-1,1)\) one normally uses \(0\le m\le n\); when \(m>n\) the function is identically zero because the \(m\)-th derivative of a degree-\(n\) polynomial vanishes.
Argument \(x\)
The evaluation point (initialX plus \(i\cdot\)stepX). The functions are real for \(-1\le x\le 1\); in physics \(x=\cos\theta\).
Type A (Wolfram / Condon–Shortley)
Includes the phase factor \((-1)^m\). This is the convention used by Wolfram's LegendreP and standard quantum-mechanics texts.
Type B (Maple)
Omits the \((-1)^m\) phase, so \(P_n^m\) (Type B) \(=(-1)^m\,P_n^m\) (Type A). Magnitudes are identical; only the sign of odd-\(m\) entries differs.
Double factorial \((2m-1)!!\)
The product of odd integers \((2m-1)(2m-3)\cdots 3\cdot 1\), with \((-1)!!=1\). It appears in the leading coefficient \(P_m^m(x)=(-1)^m(2m-1)!!\,(1-x^2)^{m/2}\); e.g. \(P_3^3\) uses \(5!!=15\). See the double-factorial calculator for these values.
Negative-order relation
For \(m>0\), \(P_n^{-m}(x)=(-1)^m\dfrac{(n-m)!}{(n+m)!}\,P_n^{m}(x)\), connecting positive and negative orders through factorials.

Interpreting the Table and Graph

Several structural properties let you sanity-check the tabulated values and the plotted curve:

  • Parity. \(P_n^m(-x)=(-1)^{n+m}P_n^m(x)\). When \(n+m\) is even the graph is symmetric about \(x=0\); when \(n+m\) is odd it is antisymmetric (and therefore passes through the origin).
  • Zeros in the interior. On the open interval \((-1,1)\), \(P_n^m(x)\) has exactly \(n-m\) simple zeros. For example \(P_3^1\) has two interior zeros, while \(P_n^n\) has none.
  • Endpoint behavior. Because of the factor \((1-x^2)^{m/2}\), every function with \(m>0\) vanishes at \(x=\pm 1\). For \(m=0\) the values are \(P_n(1)=1\) and \(P_n(-1)=(-1)^n\).
  • Magnitude near the edges. For higher \(m\) the \((1-x^2)^{m/2}\) factor suppresses the curve sharply as \(x\to\pm1\), so the largest excursions occur toward the middle of the range.

These functions are the \(\theta\)-dependent part of the spherical harmonics \(Y_n^m(\theta,\phi)\): writing \(x=\cos\theta\), one has \(Y_n^m\propto P_n^m(\cos\theta)\,e^{im\phi}\). The interior zeros become the nodal circles of latitude, and the \(m>0\) endpoint vanishing corresponds to the harmonics tending to zero at the poles. The same \(P_n^m\) values therefore feed directly into a spherical-harmonics evaluation at a chosen \(\theta\) and \(\phi\).

FAQ

Why must \(n\) and \(m\) be integers? The terminating polynomial form requires a non-negative integer \(n\); the recurrence and the \((n\pm m)!\) factors require integer \(m\) with \(-n \le m \le n\).

What is the sample value shown? The hero box reports \(x\) and \(P_n^m(x)\) at the middle row of the table (the median index), a quick spot-check of the curve.

What does \(m = 0\) give? \(P_n^0(x)\) is the ordinary Legendre polynomial \(P_n(x)\).

Last updated: