Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to computing page for the fourth course APMA0360
Return to Mathematica tutorial for the first course APMA0330
Return to Mathematica tutorial for the second course APMA0340
Return to Mathematica tutorial for the fourth course APMA0360
Return to the main page for the course APMA0330
Return to the main page for the course APMA0340
Return to the main page for the course APMA0360
Introduction to Linear Algebra with Mathematica

Preface


This section is devoted to periodic extensions of functions defined on some finite interval. Since classical Fourier series provide periodic extensions, we need to compare it with corresponding periodic extension of the original function.

Mean Square Error


Let f(x) be an arbitrary square integrable function defined on the interval [𝑎, b], and let {ϕn(x)}n ≥ 0 be a system of orthogonal functions from 𝔏²([𝑎, b]). So
\[ \int_a^b \phi_n (x)^{\ast} \phi_k (x)\,{\text d}x = 0 \qquad\mbox{for}\quad n\ne k , \]
and
\[ \int_a^b \left\vert \phi_n (x) \right\vert^2 {\text d}x = \| \phi_n \|^2 > 0 \qquad\mbox{for}\quad n=0,1,2,\ldots . \]
Let SN(x) be a linear combination of the first N + 1 functions of the given orthogonal system:
\[ S_N (x) = \gamma_0 \hi_0 (x) + \gamma_1 \hi_1 (x) + \gamma_2 \hi_2 (x) + \cdots + \gamma_N \hi_N (x) , \]
where γ0, γ1, γ2, … , γN are constants. Since all members of the orthogonal system are square integrable functions, their linear combination SN(x) is also square integrable. Hence the difference f(x) − SN(x) is also square integrable. Now we consider the quantity
\[ \delta_N = \int_a^b \left\vert f(x) - S_N (x) \right\vert^2 {\text d}x , \]
which we call the mean square error in approximating f(x) by SN(x).

We now pose the problem of choosing the coefficients γ0, γ1, γ2, … , γN (for a given N) in such a way that the deviation δN is a minimum. Expanding the square, we get

\[ \delta_N = \int_a^b \left\vert f(x) \right\vert^2 {\text d}x -2 \int_a^b f(x)^{\ast} \, S_N (x)\, {\text d}x + \int_a^b \left\vert S_N (x) \right\vert^2 {\text d}x \]
The second integral becomes
\[ \int_a^b f(x)^{\ast} \, S_N (x)\, {\text d}x = \sum_{n=0}^N \gamma_n \int_a^b f(x)^{\ast} \, \phi_n (x)\, {\text d}x = \sum_{n=0}^N \gamma_n \left\langle f \,|\, \phi_n \right\rangle . \]
We know that
\[ c_n \| \phi_n \|^2 = \left\langle f \,|\, \phi_n \right\rangle , \qquad n=0,1,2,\ldots , N ; \]
are Fourier coefficients of function f. Moreover, we have

Mean Square Convergence