3.9 Functions as vectors

The concept of calculating optimal linear combination of vectors by Eq. (3.12), i.e. by calculating scalar products, is so powerful that we want to generallize it. For fitting general functions we have to replace the discrete set of points \(x_{m,i}\) by a continuous interval \([x_{min},x_{max}]\) and the sum in the scalar product

 \begin{equation*} \left\langle \vec{a} | \vec{b} \right\rangle = \sum_i a_i\; b_i \end{equation*}(3.13)

by an integral

 \begin{equation*} \left\langle \vec{f} | \vec{g} \right\rangle = \int_{x_{min}}^{x_{max}} f(x) g(x) dx \; \label{IntScalarProd}. \end{equation*}(3.14)

To be on the save side we of course would have to check with definition 11 that functions form a group and with definition 14 that Eq. (3.14) really is a scalar product. Since both proves are quite obvious, we will omit it here. For each scalar product (in integral form) a large number of orthonormal function sets \(g_j(x)\) exists which can be looked up in text books. So

 \begin{equation*} \left\langle \vec{g_i} | \vec{g_j} \right\rangle = \int_{x_{min}}^{x_{max}} g_i(x) g_j(x) dx = \delta_{i,j}\;. \end{equation*}(3.15)

For such a set of functions \(g_j(x)\) the best approximation \(f_{opt}(x)\) of an arbitrary function \(f(x)\) according to Eq. (3.12) is

 \begin{equation*} \vec{f}_{opt}(x) = \sum_{j=1}^J \left\langle \vec{g}_j(x)| \vec{f}(x) \right\rangle \vec{g}_j(x) = \sum_{j=1}^J g_j(x) \int_{x_{min}}^{x_{max}} f(x) g_j(x) dx \;. \label{Projection2} \end{equation*}(3.16)

The most prominent sets of orthonormal functions are \(\sin(kx)\), \(\cos(kx)\), and \(\exp(ikx)\). This Fourier series and the corresponding Fourier analysis will be discussed in the next section. In principle the Taylor series of a function \(f\) is the best least square approximation in terms of polynoms of a function \(f\), but polynoms in general do not form an orthonormal set of functions, so Eq. (3.16) can not be applied directly. For a special integral the Legendre polynoms \(P_n(x)\) form (nearly) an orthonormal set of functions

 \begin{equation*} \left\langle \vec{P_n} | \vec{P_m} \right\rangle = \int_{-1}^{+1} P_n(x) P_m(x) dx = \delta_{n,m}\;\frac{2}{2n+1}\;. \end{equation*}(3.17)

This example will be discussed in a homework.


With frame Back Forward as PDF

© J. Carstensen (Math for MS)