Legendre Polynomial Pₙ(x) Calculator
Enter a degree n and x to evaluate the Legendre polynomial Pₙ(x) via recurrence. Shows neighboring degrees, the derivative, the coefficient list, and a graph.
Input
Enter a degree n (a non-negative integer) and x to evaluate the Legendre polynomial Pₙ(x) via the recurrence relation.
A non-negative integer (up to 200)
Any real number; graphed over −1 to 1
Result
Value of P5(x)
0.08984375
at x = 0.5
Degree n
5
P5₋₁(x)
-0.2890625
P5₊₁(x)
0.32324219
P5′(x) derivative
-2.2265625
Graph of P5(x) over −1 to 1
The blue curve is P{n}(x); the orange dot marks your input x.
Coefficients of P5(x)
Coefficients for each power of x. Zero coefficients are omitted.
| Power of x | Coefficient |
|---|---|
| 5 | 7.875 |
| 3 | -8.75 |
| 1 | 1.875 |
How it works
- Starting from P0(x)=1 and P1(x)=x, the recurrence (n+1)P(n+1)(x)=(2n+1)x Pn(x) − n P(n-1)(x) is applied in order to obtain Pn(x).
- On the interval −1 to 1 the value of Pn(x) always lies between −1 and 1 and has n zeros. The graph is drawn over this interval.
- The derivative is computed from (x^2−1)Pn'(x)=n(x Pn(x) − P(n-1)(x)), with the formula Pn'(1)=n(n+1)/2 used at x=±1.
- The coefficient list shows the coefficient of each power of x in the expansion of Pn(x), built from integer binomial coefficients. A closed form is combined with the recurrence to limit rounding error.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Legendre Polynomial Pₙ(x) Calculator