Skip to main content

legendre

Overloads

NameDescription
legendre(integer n, bool x) -> realEvaluates the Legendre polynomial of degree n at the given position. The Legendre polynomials are defined as:...
legendre(integer n, real x) -> realEvaluates the Legendre polynomial of degree n at the given position. The Legendre polynomials are defined as:...
legendre(integer n, integer x) -> realEvaluates the Legendre polynomial of degree n at the given position. The Legendre polynomials are defined as:...

legendre(integer n, bool x) -> real

Evaluates the Legendre polynomial of degree n at the given position. The Legendre polynomials are defined as:

Pn(x)=12nn!dndxn(x21)nP_n(x) = \frac{1}{2^n n!} \frac{d^n}{dx^n} (x^2 - 1)^n

Parameters

  • n: The degree of the polynomial.
  • x: The value at which the function is evaluated.

legendre(integer n, real x) -> real

Evaluates the Legendre polynomial of degree n at the given position. The Legendre polynomials are defined as:

Pn(x)=12nn!dndxn(x21)nP_n(x) = \frac{1}{2^n n!} \frac{d^n}{dx^n} (x^2 - 1)^n

Parameters

  • n: The degree of the polynomial.
  • x: The value at which the function is evaluated.

legendre(integer n, integer x) -> real

Evaluates the Legendre polynomial of degree n at the given position. The Legendre polynomials are defined as:

Pn(x)=12nn!dndxn(x21)nP_n(x) = \frac{1}{2^n n!} \frac{d^n}{dx^n} (x^2 - 1)^n

Parameters

  • n: The degree of the polynomial.
  • x: The value at which the function is evaluated.