Least squares approximation of a function?

DerpyPenguin
Messages
3
Reaction score
0

Homework Statement


Find the least squares approximation of cos^3(x) by a combination of sin(x) and cos(x) over the interval (0, 2pi)

Homework Equations

The Attempt at a Solution


I know how to find a least squares approximation with vectors, but I don't even know how to start with a function? The normal equation wouldn't work here because there are no vectors correct? The answer in the back of the book gives sin (x)+(3/4)cos(x), but I don't even know what that answer means. Please help.
 
Physics news on Phys.org
You won't be able to do it by folowing a formula... you need to understand what least squares regression is and apply the principle. The formula for vectors should have been derived for you. Note: cos and sin are vectors.

So if you had an arbitrary vector, ##\vec a## and you needed it in terms of two other vectors ##\vec u## and ##\vec v##... how would you go about it?
 
Last edited:
DerpyPenguin said:

Homework Statement


Find the least squares approximation of cos^3(x) by a combination of sin(x) and cos(x) over the interval (0, 2pi)

Homework Equations

The Attempt at a Solution


I know how to find a least squares approximation with vectors, but I don't even know how to start with a function? The normal equation wouldn't work here because there are no vectors correct? The answer in the back of the book gives sin (x)+(3/4)cos(x), but I don't even know what that answer means. Please help.

Perhaps you don't know what the answer means because you don't know the definition of least squares approximations for functions. Surely it is in your text. Or looking here:

http://homepage.math.uiowa.edu/~atkinson/ftp/ENA_Materials/Overheads/sec_4-7.pdf

might help you get started. Also, I think your text answer isn't correct.
 
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top