Least squares approximation of a function?

In summary, the author is looking for a least squares approximation for cos^3(x) and doesn't know where to start. Looking at a text answer or a website might help.
  • #1
DerpyPenguin
3
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
  • #2
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:
  • #3
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.
 

1. What is the purpose of least squares approximation?

The purpose of least squares approximation is to find the best fit line or curve for a given set of data points. It minimizes the sum of the squared differences between the predicted values and the actual values, making it a useful tool for analyzing data and making predictions.

2. How is least squares approximation different from other regression methods?

Unlike other regression methods, least squares approximation does not require any assumptions about the underlying distribution of the data. It also does not require the independent variables to be linearly related to the dependent variable, making it more flexible for a wider range of data sets.

3. What are the limitations of least squares approximation?

One limitation of least squares approximation is that it can be sensitive to outliers in the data, as it gives more weight to points that are further from the line of best fit. It also assumes that the errors in the data are normally distributed, which may not always be the case.

4. How is the best fit line or curve determined in least squares approximation?

The best fit line or curve is determined by minimizing the sum of the squared differences between the predicted values and the actual values. This is typically done using an algorithm such as the normal equations or gradient descent.

5. What is the relationship between least squares approximation and the method of least squares?

The method of least squares is the mathematical approach used to find the best fit line or curve in least squares approximation. It involves finding the parameters that minimize the sum of the squared errors, which is the basis of least squares approximation.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
368
  • Calculus and Beyond Homework Help
Replies
4
Views
140
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
767
  • Calculus and Beyond Homework Help
Replies
2
Views
875
  • Calculus and Beyond Homework Help
Replies
5
Views
361
  • Calculus and Beyond Homework Help
Replies
2
Views
842
  • Calculus and Beyond Homework Help
Replies
3
Views
833
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
999
Back
Top