# Least squares and integration problem

1. Nov 26, 2005

### Ghost of Progress

Question states
Consider the vector space C[-1,1] with an inner product defined by
<f,g> = the integral from 1 to -1 of f(x)g(x) dx
a)
Show that
u1(x)= 1/(2^.5) u2(x)= ((6^.5)/2)x
form an orthonormal set of vectors
b)
Use the result from a) to find the best least squates approximation to
h(x)= x^(1/3) + x^(2/3)
by a linear function.
For part a) I have shown that u1 and u2 each have an inner product of zero and a length of one.
I've been trying to find a solution to b) in the form
p(x) = (c1)(u1(x)) + (c2)(u2(x))
where ci = the integral from -1 to 1 of (ui(x))h(x)
evaluating this integral for c1 produces
(1/(2^.5))[(3/4)x^(4/3) + (3/5)x^(5/3)] evaluated from -1 to 1
Now I've finally got to the problem
Putting -1 in would produce complex numbers and I don't know how to proceed.
I'm not sure weather the problem here is that I'm not aproaching the least squares problem correctly or weather I'm not approaching the integral correctly. Any help would be appreciated, thanks.

2. Nov 26, 2005

### HallsofIvy

Staff Emeritus
Putting -1 in for x? That doesn't produce complex numbers. The cube root of -1 is -1. Its value at x= 1 is $\frac{1}{\sqrt{2}}\left(\frac{3}{4}+\frac{3}{5}\right)$ and its value at x= -1 is $\frac{1}{\sqrt{2}}\left(\frac{3}{4}-\frac{3}{5}\right)$ Subtracting gives just $\frac{1}{\sqrt{2}}\frac{6}{5}$.