Finding the minimum approximation with orthonormal basis of a given integral

44 Views Asked by At

With two continuous functions, the inner product is defined:

$$ \langle{f,g}\rangle = \int_0^1f(x)g(x)dx $$

Here, I would like to find $h(x)$ such that the following integral can be approximately minimized with a given basis $v = \{1, x, x^2\}$

$$ \int_0^1(e^x-h(x))^2dx $$

Currently, I have tried to find its orthonormal basis as following

$$ \begin{align*} & e_1 = \dfrac{v_1}{\sqrt{\langle{v_1,v_1}\rangle}} = \dfrac{1}{\sqrt{\int_0^1 1 \cdot 1dx}} = 1 \\\ & e_2' = v_2 - \langle{v_1,v_2}\rangle e_1 = x - \int_0^1xdx = x - \dfrac{1}{2} \\\ & e_2 = \dfrac{e_2'}{\sqrt{\langle{e_2',e_2'}\rangle}} = \dfrac{x-\dfrac{1}{2}}{\int_0^1 (x-\dfrac{1}{2})^2dx} = 2\sqrt{3}(x-\dfrac{1}{2}) \\\ e_3' & = v_3 - \langle{v_3,e_1}\rangle e_1 - \langle{v_3, e_2}\rangle e_2 \\\ & = x^2 - \int_0^1x^2dx - 12(x-\dfrac{1}{2})\int_0^1x^2(x-\dfrac{1}{2})dx \\\ & = x^2 - \dfrac{1}{3} - 12(x-\dfrac{1}{2})\dfrac{1}{12} = x^2 - x + \dfrac{1}{6} \\\ e_3 & = \dfrac{e_3'}{\sqrt{\langle{e_3', e_3'}\rangle}} = \dfrac{x^2-x+\dfrac{1}{6}}{\sqrt{\dfrac{1}{180}}} \\\ & = 6\sqrt{5}(x^2 - x + \dfrac{1}{6}) \end{align*} $$

$$ \begin{align*} V_n = \{1, 2\sqrt{3}(x - \dfrac{1}{2}), 6\sqrt{5}(x^2 - x + \dfrac{1}{6}\} \end{align*} $$

However, I have no idea about how to find the $h(x)$ such that the integral can be minimized. Suppose $f(x) = a_1e_1 + a_2e_2 + a_3e_3$, $g(x) = b_1e_1 + b_2e_2 + b_3e_3$, their dot product will be $f \cdot g = a_1b_1 + a_2b_2 + a_3b_3$, but this seems not providing any related information to me.

1

There are 1 best solutions below

3
On BEST ANSWER

You are almost done! The function that you are after is\begin{multline}\langle\exp,e_1\rangle e_1+\langle\exp,e_2\rangle e_2+\langle\exp,e_3\rangle e_3=\\=3 \left(-190x^2+196x-35+e\left(70x^2-72x+13\right)\right).\end{multline}You can see below the graph of the exponential function (in blue) together with the graph of this approximation (in orange).

enter image description here