Find the least squares approximation g(x) = a0 + a1x of the function f(x) = sqrt(x), 1 <= x <= 4.

1.6k Views Asked by At

HELP!! I'm floundering here.... Find the least squares approximation $g(x) = a_0 + a_1x $of the function $f(x) = \sqrt(x),$ from $1 \le x \le 4$. I'm not sure how to set up this problem. The problem does not define the inner product. So I assumed standard basis ${1,x}$ and $< f , g > = \int(f*g)$ from $1$ to $4$.

Orthogonal basis $-> {1, x - 5/2}$

Orthonormal basis$ -> {1, 2x/3 - 5/3}$

Then by Least Squares approximation theorem $g = < f , w_1 >*w_1 + < f , w_2 >*w_2 + ... + < f , w_n >*w_n$

$g(x) = 44x/135 + 520/135$ which is nowhere near $\sqrt{x}$.

2

There are 2 best solutions below

1
On BEST ANSWER

The normalized constant function is $1/\sqrt{3}$ because, when you integrate its square from 1 to 4 you get 1.

1
On

Hint

I suppose that there is an error in the calculation of $a_0$. $a_1$ is exact. Try to find the error. By the way, $520/135$ is $104/27$ .... and the denominator is good !

By the way, the curves are very close if you shift the straight line down to where it has to be.

I am sure that you can take from here.