My notes state the following:
The coefficients $c_k$ in the generalised Fourier series
$$f(x) = \sum\limits_{k = 1}^\infty c_k \phi_k(x)$$
, with respect to the orthonormal set, $\{ \psi_k\}$,
$$f(x) = \sum\limits_{k = 0}^\infty c_k \psi_k(x)$$
, are given by $c_k = \langle f, \psi_k \rangle$.
Note: We have implicitly assumed that it is possible to choose the coefficients $c_k$ so that the sum
$$\sum\limits_{k = 0}^N c_k \psi_k(x)$$
converges to $f(x)$ as $N \to \infty$.
I have two questions about this:
Why are the coefficients $c_k$ in the generalised Fourier series, with respect to the orthonormal set, given by $c_k = \langle f, \psi_k \rangle$? Can someone please demonstrate this?
How is it that we have implicitly assumed that it is possible to choose the coefficient $c_k$ so that the sum converges to $f(x)$ as $N \to \infty$? I don't see why this is the case.
I would greatly appreciate it if people could please take the time to clarify this.
The statement about convergence is vague. But here is the basic idea: Suppose $\{\psi_k\}$ is orthonormal on $[a,b],$ and there are constants $c_k$ such that
$$f(x) =\sum_{k=1}^{\infty}c_k\psi_k(x),\,\,x\in [a,b].$$
Then the $c_k$ are given by the formula
$$c_k = \int_a^b f(x)\psi_k(x)\,dx, \,\,k=1,2,\dots.$$
Proof: Fix $k=k_0.$ Then
$$\int_a^b f(x)\psi_{k_0}(x)\,dx = \int_a^b \left (\sum_{k=1}^{\infty}c_k\psi_k(x)\right )\psi_{k_0}(x)\,dx$$ $$ =\int_a^b \left (\sum_{k=1}^{\infty}c_k\psi_k(x)\psi_{k_0}(x)\right)\,dx = \sum_{k=1}^{\infty}c_k\int_a^b \psi_k(x)\psi_{k_0}(x)\,dx$$ $$ = c_{k_0}\int_a^b \psi_{k_0}(x)\psi_{k_0}(x)\,dx = c_{k_0}\cdot 1 = c_{k_0}.$$
If you've never seen this kind of argument before, the first expression may look like it's pulled out of a hat. But it's the thing that works. We get to the second expression by simple substitution for $f.$ The third expression should explain itself. In the fourth expression we have switched summation and integration. This needs justification, but with your permission we just sail on through. The rest of the expressions come about by orthonormality: Those integrals equal $0$ except when $k=k_0,$ where it equals $1.$
I'm hoping this answers question 1. For question 2. the answer is simple: If we don't have coefficients $c_k$ such that $\sum c_k\psi_k =f$ in some manner, then how could we substitute $\sum c_k\psi_k$ in for $f$ in the second integral?