Determine the polynomial of the second degree that approximates by the method of least squares in the following function, at the interval [0,5, 1,5].
$f(x)=\frac{3}{\sqrt{x}}$
I´ve done least squares before using the point table, but now all i have is a function! How can i solve this?
Assume your polynomial to be $$P(x) = ax^2 + bx + c$$
Now, the error in approximation is defined as
$$E(P, f) = \left(\frac{1}{b-a}\int_a^b(P - f)^2dx\right)^\frac{1}{2}$$
Hence, your task is to find $a,b,c$ to minimise
$$I = \int_{0.5}^{1.5}\left(ax^2+bx+c-\frac{3}{\sqrt{x}}\right)^2dx$$
Now, to solve for $a,b,c$, you will need to solve the system
$$\frac{\partial I}{\partial a} = \frac{\partial I}{\partial b} = \frac{\partial I}{\partial c} = 0$$