# Christoffel–Darboux formula

In mathematics, the Christoffel–Darboux formula or Christoffel–Darboux theorem is an identity for a sequence of orthogonal polynomials, introduced by Elwin Bruno Christoffel (1858) and Jean Gaston Darboux (1878).
Christoffel–Darboux formula — if a sequence of polynomials $f_{0},f_{1},\dots$ are of degrees $0,1,\dots$, and orthogonal with respect to a probability measure $\mu$, then
    $\sum _{j=0}^{n}{\frac {f_{j}(x)f_{j}(y)}{h_{j}}}={\frac {k_{n}}{h_{n}k_{n+1}}}{\frac {f_{n}(y)f_{n+1}(x)-f_{n+1}(y)f_{n}(x)}{x-y}}$
where $h_{j}=\|f_{j}\|_{\mu }^{2}$ are the squared norms, and $k_{j}$ are the leading coefficients.
There is also a "confluent form" of this identity by taking $y\to x$ limit:
Christoffel–Darboux formula, confluent form — $\sum _{j=0}^{n}{\frac {f_{j}^{2}(x)}{h_{j}}}={\frac {k_{n}}{h_{n}k_{n+1}}}\left[f_{n+1}'(x)f_{n}(x)-f_{n}'(x)f_{n+1}(x)\right].$

## Proof

Lemma — Let $p_{n}$ be a sequence of polynomials orthonormal with respect to a probability measure $\mu$, such that $p_{n}$ has degree $n$, and define$a_{n}=\langle xp_{n},p_{n+1}\rangle ,\qquad b_{n}=\langle xp_{n},p_{n}\rangle ,\qquad n\geq 0$(they are called the "Jacobi parameters"), then we have the three-term recurrence${\begin{array}{l l}{p_{0}(x)=1,\qquad p_{1}(x)={\frac {x-b_{0}}{a_{0}}},}\\{xp_{n}(x)=a_{n}p_{n+1}(x)+b_{n}p_{n}(x)+a_{n-1}p_{n-1}(x),\qquad n\geq 1}\end{array}}$
By definition, $\langle xp_{n},p_{k}\rangle =\langle p_{n},xp_{k}\rangle$, so if $k\leq n-2$, then $xp_{k}$ is a linear combination of $p_{0},...,p_{n-1}$, and thus $\langle xp_{n},p_{k}\rangle =0$. So, to construct $p_{n+1}$, it suffices to perform Gram-Schmidt process on $xp_{n}$ using $p_{n+1},p_{n},p_{n-1}$, which yields the desired recurrence.
For any sequence of nonzero constants $c_{0},c_{1},\dots$, we can change each $f_{k}$ to $c_{k}f_{k}$, and both sides of the equation would remain unchanged. Thus WLOG, scale each $f_{n}$ to $p_{n}$.
Since ${\frac {k_{n+1}}{k_{n}}}xp_{n}-p_{n+1}$ is a degree $n$ polynomial, it is perpendicular to $p_{n+1}$, and so $\langle {\frac {k_{n+1}}{k_{n}}}xp_{n},p_{n+1}\rangle =\langle p_{n+1},p_{n+1}\rangle =1$. Thus, a$_n$=k$_n$/(k$_{n+1}$) {\textstyle a_{n}={\frac {k_{n}}{k_{n+1}}}}.
Base case:
${\frac {k_{0}}{k_{1}}}{\frac {p_{0}(y)p_{1}(x)-p_{1}(y)p_{0}(x)}{x-y}}={\frac {k_{0}}{k_{1}}}{\frac {p_{0}(y){\frac {x-b_{0}}{a_{0}}}-p_{0}(x){\frac {y-b_{0}}{a_{0}}}}{x-y}}=1$
Induction:
${\begin{aligned}&(x-y)\sum _{j=0}^{n}p_{j}(x)p_{j}(y)=(x-y)\sum _{j=0}^{n-1}p_{j}(x)p_{j}(y)+p_{n}(x)p_{n}(y)(x-y)\\&{\stackrel {\text{ (IH) }}{=}}{\frac {k_{n-1}}{k_{n}}}\left[p_{n}(x)p_{n-1}(y)-p_{n}(y)p_{n-1}(x)\right]+(x-y)p_{n}(x)p_{n}(y)\end{aligned}}$
By the three-term recurrence,
${\begin{aligned}&xp_{n}(x)=a_{n}p_{n+1}(x)+b_{n}p_{n}(x)+a_{n-1}p_{n-1}(x)\\&yp_{n}(y)=a_{n}p_{n+1}(y)+b_{n}p_{n}(y)+a_{n-1}p_{n-1}(y)\end{aligned}}$
Multiply the first by p$_n$(y){\textstyle p_{n}(y)} and the second by p$_n$(x){\textstyle p_{n}(x)} and subtract:
$(x-y)p_{n}(x)p_{n}(y)=a_{n}\left[p_{n}(y)p_{n+1}(x)-p_{n}(x)p_{n+1}(y)\right]+a_{n-1}\left[p_{n}(y)p_{n-1}(x)-p_{n}(x)p_{n-1}(y)\right]$
Now substitute in a$_n$=k$_n$/(k$_{n+1}$), a$_{n−1}$=k$_{n−1}$/k$_n$ {\textstyle a_{n}={\frac {k_{n}}{k_{n+1}}}, \quad a_{n-1}={\frac {k_{n-1}}{k_{n}}}} and simplify.

## Specific cases
### Hermite

The Hermite polynomials are orthogonal with respect to the gaussian distribution.
The $H$ polynomials are orthogonal with respect to ${\frac {1}{\sqrt {\pi }}}e^{-x^{2}}$, and with $k_{n}=2^{n}$.$\sum _{k=0}^{n}{\frac {H_{k}(x)H_{k}(y)}{k!2^{k}}}={\frac {1}{n!2^{n+1}}}\,{\frac {H_{n}(y)H_{n+1}(x)-H_{n}(x)H_{n+1}(y)}{x-y}}.$The $He$ polynomials are orthogonal with respect to ${\frac {1}{\sqrt {2\pi }}}e^{-{\frac {1}{2}}x^{2}}$, and with $k_{n}=1$.$\sum _{k=0}^{n}{\frac {He_{k}(x)He_{k}(y)}{k!}}={\frac {1}{n!}}\,{\frac {He_{n}(y)He_{n+1}(x)-He_{n}(x)He_{n+1}(y)}{x-y}}.$

### Laguerre

The Laguerre polynomials $L_{n}$ are orthonormal with respect to the exponential distribution $e^{-x},\quad x\in (0,\infty )$, with $k_{n}=(-1)^{n}/n!$, so$\sum _{k=0}^{n}L_{k}(x)L_{k}(y)={\frac {n+1}{x-y}}\left[L_{n}(x)L_{n+1}(y)-L_{n}(y)L_{n+1}(x)\right]$

### Legendre

Associated Legendre polynomials:
    ${\begin{aligned}(\mu -\mu ')\sum _{l=m}^{L}\,(2l+1){\frac {(l-m)!}{(l+m)!}}\,P_{lm}(\mu )P_{lm}(\mu ')=\qquad \qquad \qquad \qquad \qquad \\{\frac {(L-m+1)!}{(L+m)!}}{\bigP_{L+1\,m}(\mu )P_{Lm}(\mu ')-P_{Lm}(\mu )P_{L+1\,m}(\mu '){\big ]}.\end{aligned}}$

## Christoffel–Darboux kernel

The summation involved in the Christoffel–Darboux formula is invariant by scaling the polynomials with nonzero constants. Thus, each probability distribution $\mu$ defines a series of functions$K_{n}(x,y):=\sum _{j=0}^{n}f_{j}(x)f_{j}(y)/h_{j},\quad n=0,1,\dots$which are called the Christoffel–Darboux kernels. By the orthogonality, the kernel satisfies $\int f(y)K_{n}(x,y)\mathrm {d} \mu (y)={\begin{cases}f(x),&f\in \operatorname {Span} \left(p_{0},p_{1},\ldots ,p_{n}\right)\\0,&\int _{a}^{b}f(x)p_{\ell }(x)\mathrm {d} \mu (x)=0(\ell =0,1,\ldots ,n)\end{cases}}$In other words, the kernel is an integral operator that orthogonally projects each polynomial to the space of polynomials of degree up to $n$.