I have a question concerning the construction of kernels wit orthogonal polynomials. The instructor defined the orthogonal polynomials as
$$P_0(x)=\frac{1}{\sqrt{2}}, P_m(x)=\sqrt{\frac{2 m+1}{2}} \frac{1}{2^m m !} \frac{d^m}{d x^m}\left[\left(x^2-1\right)^m\right]$$
I want to show that $K(u)=\sum_{k=0}^r P_k(0) P_k(u) \mathbf{1}_{\{|u| \leq 1\}}$ is a kernel of order $r$, ie that $$\forall j=1, \ldots, r, \quad \int u^j K(u) d u=0 \quad \text{and} \quad \int u^{r+1} K(u) d u \neq 0 \quad ( r \geq 1)$$
I know that the family $(P_0, P_1 , \dots)$ forms a basis of $\mathbb{L}^2([-1,1])$.
Thus we can write $u^j = \sum_{l=0}^j b_{jl} P_l(u)$. Thus \begin{align} \int u^j K(u) d u &= \int_{-1}^1 \sum_{l=0}^j b_{jl} P_l(u)\sum_{k=0}^r P_k(0) P_k(u) \,du\\ &= \sum_{l=0}^j\sum_{k=0}^r b_{jl} P_k(0) \int_{-1}^1 P_l(u)P_k(u) \,du \\ &= \sum_{l=0}^j\sum_{k=0}^r b_{jl} P_k(0)\int_{-1}^1 \left( P_k(u) \right)^2 \,du \\ &= \sum_{l=0}^j\sum_{k=0}^r b_{jl} P_k(0) \end{align} where we have used that the polynomials are orthogonal, but I don't know how to conclude.
Consider any system of orthonormal polynomials $p_k$ with respect to a probability measure $\mu$ with infinite support so that $\int x^{2k}\,d\mu(x)<\infty $ for any $k\ge 0.$ The last condition is redundant if $\mu$ has bounded support. By construction $p_k\perp x^j$ for $j<k.$ The polynomials satisfy the recurrence relation of the form $$xp_k(x)=\lambda_kp_{k+1}(x)+\beta_kp_k(x)+\lambda_{k-1}p_{k-1}(x),\quad k\ge 0$$ where $\lambda_{-1}=0,$ $\lambda_k>0$ for $k\ge 0,$ $\beta_k\in\mathbb{R}$ and $p_0\equiv 1.$ In the OP case $d\mu(x)={1\over 2}dx$ for $|x|\le 1.$ Since the measure is symmetric with respect to $0,$ we get $\beta_k\equiv 0.$ Hence the recurrence relation takes the form $$xp_k(x)=\lambda_kp_{k+1}(x)+\lambda_{k-1}p_{k-1}(x),\quad k\ge 0\quad (*)$$ Substituting $x=0$ gives $$\lambda_kp_{k+1}(0)=-\lambda_{k-1}p_{k-1}(0)\quad (**)$$ Since $p_0(0)=1\neq 0$ we get $p_{2k}(0)\neq 0.$ On the other hand $p_1(x)=\lambda_1^{-1}x,$ thus $p_1(0)=0.$ Therefore $(**)$ implies $p_{2k-1}(0)=0$ for $k\ge 1.$
By the Christoffel-Darboux formula we get $$ \lambda_n{p_n(0)p_{n+1}(x)-p_{n+1}(0)p_n(x)\over x}=\sum_{k=0}^np_k(0)p_k(x)=:K_n(x)$$ Therefore for $1\le j\le n$ we get $$\int x^jK_n(x)\,d\mu(x)=\lambda_n\left [p_n(0)\int x^{j-1}p_{n+1}(x)\,d\mu(x)-p_{n+1}(0)\int x^{j-1}p_{n}(x)\,d\mu(x)\right ]=0$$ as $x^{j-1}\perp p_n, \,p_{n+1}$ with respect to the inner product $\langle f,g\rangle =\int f(x)\overline{g(x)}\,d\mu(x).$ On the other hand for $j=n+1$ we get $$\int x^{n+1}K_n(x)\,d\mu(x)=\lambda_n\left [p_n(0)\int x^{n}p_{n+1}(x)\,d\mu(x)-p_{n+1}(0)\int x^{n}p_{n}(x)\,d\mu(x)\right ]\\ = -\lambda_np_{n+1}(0)\int x^{n}p_{n}(x)\,d\mu(x)$$ By $(*)$ the leading coefficient of $p_n$ is equal $\lambda_0^{-1}\ldots \lambda_{n-1}^{-1}>0.$ Therefore $p_n(x)=\lambda^{-1}_0\ldots\lambda^{-1}_{n-1}[x^n+r_n(x)],$ where $\deg r_n\le n-1.$ Hence $x^n=\lambda_0\ldots\lambda_{n-1}[p_n(x)-r_n(x)].$ Thus by orthonormality we get $$\int x^{n+1}K_n(x)\,d\mu(x)=-\lambda_0\ldots \lambda_np_{n+1}(0)$$ The last quantity does not vanish if and only if $n$ is odd.