# CAOP

## Graphical Representation of Legendre Polynomials

### Definition

The Legendre polynomials are defined as

\begin{align} P_n(x) &= \frac{1}{2^n}\,\sum_{k=0}^{[n/2]} (-1)^k\,{n\choose k}\,{2n-2k\choose n}\,x^{n-2k}\\ &= {2n \choose n} \left(\frac{x}{2}\right)^n {}_2F_1 \left(\left. {-n/2+\frac{1}{2}, -n/2 \atop -n+\frac{1}{2}} \; \right| \frac{1}{x^2} \right) \end{align}

### Plot

Note: You can choose a selection on the small graph in order to zoom. Mark the check boxes on the left side for which n you want to plot the graph.

### Parameters

factor (use Maple-style input)