LegendreP

LegendreP[n,x]

gives the Legendre polynomial .

LegendreP[n,m,x]

gives the associated Legendre polynomial .

Details

  • 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[n,z] and LegendreP[n,m,z] give Legendre functions of the first kind.
  • LegendreP[n,m,a,z] 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 .
  • LegendreP[n,m,a,z] is defined to be Hypergeometric2F1Regularized[-n,n+1,1-m,(1-z)/2] multiplied by for type 2 and by for type 3.
  • For certain special arguments, LegendreP automatically evaluates to exact values.
  • LegendreP can be evaluated to arbitrary numerical precision.
  • LegendreP automatically threads over lists.

Examples

open allclose all

Basic Examples  (6)

Evaluate numerically:

Compute the 10^(th) Legendre polynomial:

Plot over a subset of the reals:

Plot over a subset of the complexes:

Series expansion at the origin:

Asymptotic expansion at Infinity:

Scope  (42)

Numerical Evaluation  (6)

Evaluate numerically at fixed points:

Evaluate to high precision:

The precision of the output tracks the precision of the input:

Evaluate for complex orders and arguments:

Evaluate LegendreP efficiently at high precision:

LegendreP can deal with real-valued intervals:

LegendreP threads elementwise over lists:

Specific Values  (5)

Legendre polynomial for symbolic :

Find a local maximum as a root of (dTemplateBox[{5, x}, LegendreP])/(dx)=0:

Compute the associated Legendre polynomial :

Compute an associated Legendre polynomial for half-integer and :

Different LegendreP types give different symbolic forms:

Visualization  (3)

Plot the LegendreP function for various orders:

Plot the real part of TemplateBox[{3, {x, +, {ⅈ,  , y}}}, LegendreP]:

Plot the imaginary part of TemplateBox[{3, {x, +, {ⅈ,  , y}}}, LegendreP]:

Type 2 and 3 of Legendre functions have different branch cut structures:

Function Properties  (5)

The domain of Legendre polynomials of integer orders:

The range for Legendre polynomials of integer orders:

The range for complex values is the whole plane:

Legendre polynomial of an odd order is odd:

Legendre polynomial of an even order is even:

LegendreP has the mirror property TemplateBox[{n, TemplateBox[{z}, Conjugate, SyntaxForm -> SuperscriptBox]}, LegendreP]=TemplateBox[{TemplateBox[{n, z}, LegendreP]}, Conjugate]:

Differentiation  (3)

First derivative:

Higher derivatives:

Plot higher derivatives for :

Formula for the ^(th) derivative:

Integration  (3)

Indefinite integral of LegendreP:

Indefinite integral of an algebraic function with TemplateBox[{n, x}, LegendreP]:

Definite integral of TemplateBox[{n, x}, LegendreP]:

Series Expansions  (4)

Taylor expansion for TemplateBox[{n, x}, LegendreP]:

Plot the first three approximations for TemplateBox[{7, x}, LegendreP] at :

General term in the series expansion of TemplateBox[{n, x}, LegendreP]:

Taylor expansion for the associated Legendre polynomial TemplateBox[{n, m, x}, LegendreP3]:

LegendreP can be applied to a power series:

Integral Transforms  (4)

The Fourier transform of a Legendre polynomial with order using FourierTransform:

The Laplace transform of a Legendre polynomial with order using LaplaceTransform:

The Mellin transform of a Legendre polynomial with order using MellinTransform:

The Hankel transform of a Legendre polynomial with order using HankelTransform:

Function Identities and Simplifications  (4)

LegendreP may reduce to simpler functions:

Associated Legendre polynomials in terms of ordinary Legendre polynomials:

Sum of Legendre polynomials:

Recurrence relation:

Function Representations  (5)

Representation in terms of MeijerG:

LegendreP can be expressed as a DifferentialRoot:

SphericalHarmonicY uses associated Legendre function in its definition:

Associated Legendre polynomials in terms of the angular spheroidal function:

TraditionalForm formatting:

Generalizations & Extensions  (3)

LegendreP can deal with real-valued intervals:

Different LegendreP types give different symbolic forms:

Types 2 and 3 have different branch cut structures:

Applications  (3)

Angular momentum eigenfunctions:

Find quantum eigenfunctions for modified PöschlTeller potential:

Generalized Fourier transform for functions on the interval -1 to 1:

Properties & Relations  (4)

Use FunctionExpand to expand into simpler functions:

LegendreP can be expressed as a DifferenceRoot:

The generating function for LegendreP:

The exponential generating function for LegendreP:

Possible Issues  (1)

Cancellations in the polynomial form may lead to inaccurate numerical results:

Evaluate the function directly:

Neat Examples  (2)

Visualize distribution of zeros:

Generalized Lissajous figures:

Introduced in 1988
 (1.0)
 |
Updated in 1996
 (3.0)
2003
 (5.0)