Legendre polynomials form a sequence of orthogonal polynomials on the interval . They arise naturally in solving Laplace's equation in spherical coordinates and play a central role in physics and engineering. Their orthogonality property means the integral is zero whenever and are different. This property makes them ideal as basis functions in spectral methods and other numerical schemes.
The polynomials satisfy the Legendre differential equation . Solutions that remain finite on are precisely the Legendre polynomials. The lowest-order cases are , , and . Higher degrees follow a recurrence relation.
The standard recurrence relation is
This formula enables efficient computation by building polynomials of higher degree from two previous ones. Because the coefficients remain rational, the polynomials feature integer powers of with rational multipliers, making them straightforward to evaluate.
Legendre polynomials appear across theoretical and applied mathematics. In potential theory and electrostatics, they emerge when separating variables in Laplace's equation with spherical symmetry. They also provide a basis for representing functions on the sphere in spherical harmonics. In numerical analysis, expansions in Legendre polynomials offer spectral accuracy, enabling highly precise approximations with relatively few terms.
The calculator on this page allows you to choose a non-negative integer degree and a real value . It then computes using the recurrence relation. The algorithm starts with and , repeatedly applying the formula until it reaches the requested degree. The result is displayed with four decimal places, offering quick feedback for classroom exercises or self‑study.
Legendre polynomials also satisfy orthogonality: . This property means any reasonable function defined on can be approximated as a sum of Legendre polynomials. The coefficients in such an expansion derive from inner products with .
Orthogonal polynomials like Legendre's minimize approximation error in the least-squares sense. When projecting a function onto the space spanned by the first few polynomials, the coefficients produce the best L2 approximation. This concept underlies spectral methods, where high-order polynomials model physical phenomena such as fluid flow or electromagnetic fields with exceptional accuracy.
Historically, Adrien-Marie Legendre introduced these polynomials while studying gravitational potentials. They soon found applications in celestial mechanics, where expansions in Legendre polynomials help compute planetary motions. Today, they remain fundamental in numerical integration techniques like Gauss–Legendre quadrature, which achieves exactness for polynomials up to degree using only sample points.
By experimenting with this calculator, you gain practical experience with special functions that influence many branches of mathematics. Observing how behaves for various degrees builds intuition for the oscillatory nature of higher-order polynomials. Because the polynomials are normalized, their magnitude remains bounded on , illustrating how orthogonality controls growth even as the degree increases. This interplay between algebraic structure and analytic behavior continues to captivate mathematicians and scientists alike.
Once you become comfortable computing individual polynomials, you can explore their connections to other families like Chebyshev and Hermite polynomials. These families satisfy similar recurrence relations and differential equations, revealing deep links between seemingly distinct areas of mathematics. Many algorithms in approximation theory and numerical computation rely on understanding such relationships. Ultimately, Legendre polynomials exemplify how simple recursions lead to rich mathematical structures with far-reaching implications.
Generate an interpolation polynomial using Newton's divided differences.
Approximate the value of a double integral over a rectangular region.
Compute the Hessian matrix of a function of two variables at a specific point using symbolic differentiation.