Originally Posted by

**h2osprey** An inner product <f,g> is defined as the integral from -1 to 1 of f(x)g(x).

Given an orthonormal basis for the set of polynomials of degree less than or equal to 2, i.e.,

w1 = (rt 2)/2,

w2 = (rt 6)/2,

w3 = [(x^2 - 1/3) 3(rt10)] / 4,

Find the polynomial of degree at most two which is closest to sin (pi x).

I tried to minimize the norm of v - a linear combination of w1, w2 and w2, and I arrived at the answer 3/pi, which seems wrong. I checked my answer using an approximation through taylor series and as expected I obtained pi.

I can't figure out where I went wrong - all the integration seems to be correct; any help would be much appreciated. Thanks!