Legendre's Equation Explained with Worked Examples

Legendre's equation has polynomial solutions when is a non-negative integer: , , , .

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Legendre's equation means

Check : , ; the left side is for , . Values: , , and always . They are found by a power series (the power series solution) that terminates for integer .

On they are orthogonal: , with norm , so (orthogonality of Legendre polynomials, the recurrence). This is a Sturm–Liouville problem (Sturm–Liouville problem) with weight 1.

The equation arises from separating Laplace's equation in spherical coordinates (spherical coordinates, Laplace's equation), so describe the angular dependence of gravitational and electric potentials. They are also the basis of Gauss–Legendre quadrature (Gaussian quadrature).

What is it used for?

Legendre polynomials are the polynomial solutions of Legendre's equation and describe angular dependence on a sphere.

How to use legendre's equation

  1. Insert and compute , .
  2. Check that the left side vanishes for .
  3. Evaluate at the given .
  4. Use orthogonality to project functions onto .

Graph

Legendre polynomials P1, P2 and P3 on [−1, 1]P2(0.5) = −0.125P3(0.5) = −0.4375-1-0.8-0.6-0.4-0.200.20.40.60.81-1-0.500.51Legendre polynomials P1, P2 and P3 on [−1, 1]xPP1P2P3Graph with x from -1 to 1 and y from -1 to 1.1. Shows the curve P1; the curve P2; the curve P3; point P2(0.5) = −0.125 at (0.5, -0.125); point P3(0.5) = −0.4375 at (0.5, -0.4375).

Every Legendre polynomial equals 1 at x = 1.

Worked examples

These examples are worked by hand, step by step, so you can compare your own working.

Example 1: P₂(0.5)

Find .

Worked example
Answer
−0.125-0.125
  1. Formula

Example 2: P₃(0.5)

Find .

Worked example
Answer
−0.4375-0.4375
  1. Formula

Example 3: a norm

Find .

Worked example
Answer
0.40.4
  1. Formula

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

P₂(0.5)

(3 × 0.25 − 1)/2

−0.125.

P₃(0.5)

(5 × 0.125 − 1.5)/2

−0.4375.

P₂(2)

(12 − 1)/2

5.5.

P_n(1)

1

For every n.

Word problems

Legendre’s equation (1 − x²)y″ − 2xy′ + n(n + 1)y = 0 has polynomial solutions Pₙ(x): P₀ = 1, P₁ = x, P₂ = (3x² − 1)/2, P₃ = (5x³ − 3x)/2, orthogonal on [−1, 1].

P₂

Evaluate P₂(0.5).

  1. (0.75 − 1)/2
  2. Check: ✓-0.125

P₃

Evaluate P₃(0.5).

  1. (0.625 − 1.5)/2
  2. Check: ✓-0.4375

Outside [−1, 1] Higher

Evaluate P₂(2).

  1. (12 − 1)/2
  2. Check: ✓5.5

At the end Higher

Evaluate P₂(1).

  1. (3 − 1)/2
  2. Check: ✓1

Common mistakes

Wrong coefficient

P₂ = (3x² + 1)/2 ✗

P₂ = (3x² − 1)/2 ✓

Minus one.

n(n + 1)

n² ✗

n(n + 1) ✓

Eigenvalue.

Orthogonal on [0, 1]

wrong interval ✗

[−1, 1] ✓

Weight 1.

P_n(−1)

always 1 ✗

(−1)ⁿ ✓

Parity.

Exam tips

  1. P_n(1) = 1.
  2. P_n(−x) = (−1)ⁿP_n(x).
  3. Orthogonal on [−1, 1].
  4. Recurrence builds them.
  5. |P_n| ≤ 1 on [−1, 1].

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. P₂(0) Foundation

-0.5

2. P₂(0.8) to 3 d.p. Foundation

0.46

3. P₃(1) Foundation

1

4. P₃(0.2) to 4 d.p. Higher

-0.28

5. P₂(−0.5) to 3 d.p. Higher

-0.125

6. P₁(0.7) Higher

0.7

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Legendre polynomial
Pₙ(x).
Legendre’s equation
(1 − x²)y″ − 2xy′ + n(n + 1)y = 0.
Orthogonality
∫PₘPₙ = 0.
Parity
Symmetry in x.
Rodrigues’ formula
Derivative form.
Eigenvalue
n(n + 1).

Frequently asked questions

What is Legendre’s equation?

(1 − x²)y″ − 2xy′ + n(n + 1)y = 0.

What are P₂ and P₃?

(3x² − 1)/2 and (5x³ − 3x)/2.

What is Pₙ(1)?

1.

Where are they orthogonal?

On [−1, 1].

Which page covers Bessel’s equation?

Bessel’s equation.

Which page covers Sturm–Liouville problems?

Sturm–Liouville problems.

More in Analysis, algebra and topology and the formula sheets.