= Decoupled coefficients of orthogonal polynomial projections
{title2=$c_n=\langle f,p_n\rangle_w/h_n$}
Let $f$ be a real <function> with $\|f\|_w^2=\int_a^b f(x)^2w(x)\,dx<\infty$, and let $V_m$ be the <vector space> of real <polynomials> of degree at most $m$. Its <orthogonal projection> is the <least-squares polynomial in an orthogonal-polynomial basis>
$$
q_m=\sum_{n=0}^m c_np_n,\qquad c_n=\frac{\langle f,p_n\rangle_w}{h_n},\qquad h_n=\langle p_n,p_n\rangle_w.
$$
Each <coefficient> depends on just one <weighted inner product> with $f$ and one squared <norm>. In particular, the <coefficients> $c_0,\ldots,c_m$ stay the same when the allowed <polynomial degree> increases. This statement assumes a fixed weight, interval and normalization of the <orthogonal polynomials>.
To see why the <least-squares normal equations> decouple, first write a trial <polynomial> as $q=\sum_{j=0}^m a_j\phi_j$ in any <basis> of $V_m$. The residual must be <orthogonal> to each permitted direction, giving
$$
\sum_{j=0}^m G_{ij}a_j=b_i,\qquad G_{ij}=\langle\phi_j,\phi_i\rangle_w,\qquad b_i=\langle f,\phi_i\rangle_w.
$$
The <Gram matrix> usually couples the unknown <coefficients>. With $\phi_j=p_j$, it becomes $G_{ij}=h_i\delta_{ij}$, leaving the separate equations $h_i a_i=b_i$. For the <monomial basis> on $[-1,1]$ with $w=1$, by contrast, $G_{ij}$ is zero when $i+j$ is odd and $2/(i+j+1)$ when $i+j$ is even. Distinct even powers, or distinct odd powers, remain coupled.
There is also a proof of the minimum that uses no <differentiation>. The defining <coefficients> give $\langle f-q_m,p_n\rangle_w=0$ for $0\leq n\leq m$. Thus $f-q_m$ is <orthogonal> to all of $V_m$. For every $v\in V_m$, the <Pythagorean theorem in an inner-product space> gives
$$
\|f-v\|_w^2=\|f-q_m\|_w^2+\|q_m-v\|_w^2.
$$
The second term is nonnegative and vanishes exactly when $v=q_m$, proving that the <least-squares solution> is unique. This is an integrated squared-error optimum; it does not assert a smallest error at every point or a smallest <uniform norm>.
For $N>m$, the nested <orthogonal projections> satisfy the exact residual budget
$$
\|f-q_m\|_w^2=\|f-q_N\|_w^2+\sum_{n=m+1}^{N}c_n^2h_n.
$$
Indeed, $q_N-q_m$ is a <linear combination> of mutually <orthogonal polynomials>, and $f-q_N$ is <orthogonal> to it. Every newly retained component removes exactly $c_n^2h_n$ from the squared error. No infinite expansion or completeness assumption is needed for this finite identity. The <Legendre least-squares projections of a cubic> make every term explicit.
Back to article page