Let $\phi_0(x),\phi_1(x),\phi_2(x),...$ be a sequence of orthogonal polynomials on an interval $[a,b]$ w.r.t a positive weight function $w(x)$. Let $x_1,....,x_n$ be the n zeros of $\phi_n(x)$' it is known that these roots are real and $a<x_1<...<x_n<b$
Show that the Lagrange polynomials of degree n-1 based on these points are orthogonal to each other, so we can write $$\int_a^b w(x) L_j(x)L_k(x)dx=0; \hspace{5mm} j \neq k,$$ where $$L_j(x) = \prod_{k=1,k \neq j}^n \frac{x-x_k}{x_j-x_k}, \hspace{5mm} 1\leq j \leq n$$
My attempt:
Denote $x= x_i$. Therefore we have $L_j(x_i)$ and $L_k(x_i)$. Since $j \neq k$, we see that when $i = j$ by defn $L_j(x_j) = 1$ and $L_k(x_j) = 0$, likewise when $i=k$, by defn, $L_j(x_k) = 0$ and $L_k(x_k) = 1$. When $i \neq k$ and $i \neq j$, it follows that $L_j(x_i) = L_k(x_i) = 0$
Thus it follows that $L_j(x)L_k(x) = 0 \rightarrow \int_a^b w(x) L_j(x)L_k(x)dx=0 $ $\forall j,k$ Therefore the Lagrange polynomials are orthogonal to each other.
I was talking to my classmates, and they said this proof was not correct since I did not take into account continuity. I am not sure what they mean by this. What am I missing here?