# legendre¶

Can calculate the first several Legendre polynomials, along with (some of) their first derivatives.

climlab.utils.legendre.P0(x)[source]
$P_0 (x) = 1$
climlab.utils.legendre.P1(x)[source]
$P_1 (x) = 1$
climlab.utils.legendre.P2(x)[source]

The second Legendre polynomial.

$P_2(x) = \frac{1}{2} (3x^2 - 1)$
climlab.utils.legendre.Pn(x)[source]

Calculate Legendre polyomials P0 to P28 and returns them in a dictionary Pn.

Parameters: x (float) – argument to calculate Legendre polynomials dictionary which contains order of Legendre polynomials (from 0 to 28) as keys and the corresponding evaluation of Legendre polynomials as values. dict
climlab.utils.legendre.Pnprime(x)[source]

Calculates first derivatives of Legendre polynomials and returns them in a dictionary Pnprime.

Parameters: x (float) – argument to calculate first derivate of Legendre polynomials dictionary which contains order of Legendre polynomials (from 0 to 4 and even numbers until 14) as keys and the corresponding evaluation of first derivative of Legendre polynomials as values. dict