What I need to solve is a problem in the form "Find the least-squares approximation of f(x) by a polynomial of degree n", or in other words the answer must be a0+a1*x+...+an*x^n. It's easy enough to solve this with mma commands but I need to know the procedure.
The class notes say that you find each coefficient a sub k of the polynomial approximation by taking the inner product of x^k and the function to be fit and dividing it by the inner product of x^k by x^k: a sub k = <x^k,f(x)>/<x^k,x^k>, but the coefficients I get aren't correct. What step am I missing?
Thanks!
The class notes say that you find each coefficient a sub k of the polynomial approximation by taking the inner product of x^k and the function to be fit and dividing it by the inner product of x^k by x^k: a sub k = <x^k,f(x)>/<x^k,x^k>, but the coefficients I get aren't correct. What step am I missing?
Thanks!