This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)


gives the Legendre polynomial .
gives the associated Legendre polynomial .
  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • Explicit formulas are given for integers n and m.
  • The Legendre polynomials satisfy the differential equation .
  • The Legendre polynomials are orthogonal with unit weight function.
  • The associated Legendre polynomials are defined by .
  • For arbitrary complex values of n, m, and z, LegendreP and LegendreP give Legendre functions of the first kind.
  • LegendreP gives Legendre functions of type a. The default is type 1.
  • The symbolic form of type 1 involves , of type 2 involves , and of type 3 involves .
  • Type 1 is defined only for within the unit circle in the complex plane. Type 2 represents an analytic continuation of type 1 outside the unit circle.
  • Type 2 functions have branch cuts from to and from to in the complex plane.
  • Type 3 functions have a single branch cut from to .
  • For certain special arguments, LegendreP automatically evaluates to exact values.
  • LegendreP can be evaluated to arbitrary numerical precision.
Compute the 10^(th) Legendre polynomial:
Compute the 10^(th) Legendre polynomial:
Click for copyable input
Click for copyable input
Compute the associated Legendre polynomial :
Compute a half-integer associated Legendre function:
Evaluate for fractional orders:
Evaluate for complex orders and arguments:
Evaluate to high precision:
The precision of the output tracks the precision of the input:
LegendreP threads element-wise over lists:
TraditionalForm formatting:
LegendreP can deal with real-valued intervals:
LegendreP can be applied to a power series:
Different LegendreP types give different symbolic forms:
Types 2 and 3 have different branch cut structures:
Angular momentum eigenfunctions:
Find quantum eigenfunctions for modified Pöschl-Teller potential:
Generalized Fourier transform for functions on interval -1 to 1:
Use FunctionExpand to expand into simpler functions:
Cancellations in the polynomial form may lead to inaccurate numerical results:
Evaluate the function directly:
Visualize distribution of zeros:
Generalized Lissajous figures:
New in 1 | Last modified in 5