Function Projection: Orthogonal Polynomials I am currently reading a paper called "Numerical Quadrature" by Timothy J. Giese (2008) which describes the numerical quadrature technique in detail. At one point (just before equation 19) it states that:
$"\dots$, we begin by projecting $f(x)$ into a set of orthogonal polynomials $[p_0(x),\dots,p_n(x)]$
$$f(x) = w(x)\sum_j p_j(x) \int f(x') p_j(x') dx'",$$
where  $w(x)$ is the weighting function.
My question is, what is the intuition behind the truth of this equality?
 A: After looking at the paper, I think that the author is simply abusing notation here. Simply by virtue of words "by projecting...", the author means that $f(x)$ is to be approximated by the expression on the right-hand-side. The point is that $f(x)$ can be some arbitrary smooth function, and we have a quadrature that works on polynomials with weight $w(x)$, so we wish to express $f(x)$ approximately in terms of a polynomial multiplied by $w(x)$.
In particular, suppose $p_0, \ldots, p_n$ are orthonormal polynomials with respect to the weight $w(x)$; that is, we have inner product $\langle f,g \rangle = \int f(x) g(x) w(x) \, dx$. Then the orthogonal projection of $f(x)/w(x)$ onto that polynomial space is given by
\begin{align}
\mathrm{Proj} (f(x)/w(x)) & = \sum_{j=0}^n \langle f/w, p_j \rangle p_j(x) \\
& = \sum_j p_j(x) \int [f(x')/w(x')] p_j(x') w(x') \, dx' \\
& = \sum_j p_j(x) \int f(x') p_j(x') \, dx'
\end{align}
Now, by virtue of being an orthogonal projection, this means that so long as $f(x)$ and its higher derivatives are well-behaved, $f(x)/w(x)$ is "close" to the above expression (in an appropriate norm). Therefore, we have, informally,
$$f(x)/w(x) \approx  \sum_j p_j(x) \int f(x') p_j(x') \, dx' $$
Multiplying by $w(x)$ on both sides yields the "equality" (which is really an approximation) that the author derived.
