LegendrePolynomial
The Legendre polynomial , orthogonal on with unit weight and normalised by . Provided by @enumeratio/analytic.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wikipedia
Legendre polynomialsMathWorldLegendrePolynomialDLMF18.3.T1.t1.r10FungrimLegendrePolynomial✓Fungrim entryWolfram LanguageLegendreP✓LegendrePolynomial(n, x)the degree- Legendre polynomial at , for an integer .SageMath
legendre_P(n, x)SymPylegendre(n, x)mpmathlegendre(n, x)Juliaenumeratio_ball((n, x) -> hypergeometric_2f1(-n, n + 1, CC(1), (1 - x) / 2), n, x)Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer, number) -> number | analytic | always |
Details
- , , and Bonnet's recurrence . The coefficients are rationals whose denominators are powers of 2.
- .
- and . Parity follows the degree: .
- A negative order folds as Wolfram does: .
- At an integer and a symbolic or exact the result is the expanded polynomial. At a floating-point or complex the recurrence runs directly on the number.
- The name is Fungrim's. Wolfram calls it
LegendreP, which also takes a non-integer degree and, with three arguments, the associated functions; only the integer-degree polynomial is implemented here.
Plot
Examples
7 more kept as data, checked against the oraclesScope #
Properties #
About
| Examples | 19 |
|---|---|
| Checked against | Wolfram Language 19 agreeSageMath 19 agreeSymPy 19 agreempmath 14 agreeJulia 14 agree |
| Crosswalk | WikipediaMathWorldDLMFFungrimFungrim entry ×23Wolfram LanguageSageMathSymPympmathJulia |
Implementation
primitive · kernela kernel — an algorithm over mutable state that would not be readable as a tree
nativeengine
typescriptpackages/symbols/analysis/analytic/src/legendre.tsmappedexternal
wolfram / mpmath / sympypackages/oracle/src/mappings.tsLegendreP[n, x]; mpmath.legendre(n, x); sympy.legendre(n, x).
mapped
sympypackages/oracle/src/mappings.tsmapped
mpmathpackages/oracle/src/mappings.tsmapped
sagepackages/oracle/src/mappings.tsmapped
juliapackages/oracle/src/mappings.ts See also: ChebyshevT, ChebyshevU