Series Expansion of Function over Complete Orthonormal Set

Theorem
Let $f \left({x}\right)$ be a real function defined over the interval $\left({a \,.\,.\, b}\right)$.

Let $f \left({x}\right)$ be able to be expressed in terms of a complete orthonormal set of real functions $S := \left \langle {\phi_i \left({x}\right)} \right \rangle_{i \mathop \in I}$ for some indexing set $I$:


 * $f \left({x}\right) = \displaystyle \sum_{i \mathop \in I} a_i \phi_i \left({x}\right)$

Then the coefficients $\left \langle {a_i \left({x}\right)} \right \rangle_{i \mathop \in I}$ can be determined as:
 * $\forall i \in I: a_i = \displaystyle \int_a^b f \left({x}\right) \phi_i \left({x}\right) \, \mathrm d x$