Least Squares Fit for h(x)=ae^x+be^(-x) Homework

In summary, the problem asks for the least squares fit of the given form for the data points x=1,2,3,4,6 and y=14,10,8,6,5. The given function is h(x)=ae^x+be^(-x) and the attempt at a solution involved trying to linearize the equation by taking the natural log of both sides. However, this approach is incorrect and there is no need to linearize the equation. The correct method involves finding the sum of errors squared and using it to find the values of a and b that minimize the error.
  • #1
rey242
41
0

Homework Statement


For the following data, find the least squares fit of the given form
x=1,2,3,4,6
y=14,10,8,6,5
h(x)=ae^x+be^(-x)

Homework Equations





The Attempt at a Solution


So I tried to linearize the equation by taking the natural log of everything
ln(h)=ln(ae^-x)+ln(be^ex)
ln(h)=ln(a)+ln(b)+x-x

that when I run into a problem, I eliminate the x's.
My question is, is there another way to linearize the equation or should I continue though?
 
Physics news on Phys.org
  • #2
That's not right. In particular,
[tex] \ln (ae^{-x} + be^x) \neq \ln (ae^{-x}) + \ln (be^x) [/tex]
 
  • #3
There is no reason to linearize anything. Nor are you trying to fit the curve to those points- just the "least squares" fit.

If [itex]h(x)= ae^{x}+ be^{-x}[/itex] then [itex]h(1)= ae+ be^{-1}[/itex]. Since you are told that y= 14 when x= 1, the "error" is [itex]ae+ be^{-1}- 14[/itex] and the "error squared" is [itex](ae+ be^{-1})^2[/itex]. Similarly, for x= 2, y= 10, the "error squared" is [itex](ae^2+ be^{-2}- 10)^2[/itex].

For all 5 x,y pairs, the sum of errors squared is [itex](ae+ be^{-1}- 14)^2[/itex][itex]+ (ae^2+ be^{-2}- 10)^2[/itex][itex]+ (ae^3+ be^{-3}- 8)^2[/itex][itex]+ (ae^4+ be^{-4}- 6)^2+ (ae^6+ be^{-6}-5)^2[/itex]. Find a and b to minimize that.
 
  • #4
What procedure would I use to find a and b? I know about the error...would I convert the sum of the errors squared into normal equations?
 

1. How do I find the values for a and b in the equation h(x)=ae^x+be^(-x)?

The values for a and b can be found by using the least squares method, which involves finding the line of best fit that minimizes the sum of the squared differences between the actual data points and the predicted values. This can be done using a calculator or by hand using a system of equations.

2. What assumptions are made when using the least squares method for h(x)=ae^x+be^(-x) homework?

The main assumption is that the data follows a linear relationship, meaning that the data points can be closely approximated by a straight line. Additionally, it is assumed that the errors or residuals are normally distributed and have a mean of 0.

3. How can I determine if the least squares fit is a good fit for my data?

One way to determine if the least squares fit is a good fit for the data is by looking at the coefficient of determination, also known as R-squared. This value ranges from 0 to 1, with higher values indicating a better fit. Another method is to plot the data and the predicted values on a graph to visually assess the fit.

4. Can I use the least squares method for non-linear data?

No, the least squares method is only applicable for linear data. If the data does not follow a linear relationship, other methods such as polynomial regression or exponential regression should be used.

5. Are there any limitations to using the least squares method for h(x)=ae^x+be^(-x) homework?

One limitation is that the method assumes that the errors or residuals are normally distributed, which may not be the case for all data sets. Additionally, the method may not be accurate if there are outliers or influential data points in the data set. It is important to carefully analyze the data and consider these factors when using the least squares method.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
638
  • Calculus and Beyond Homework Help
Replies
12
Views
3K
  • Calculus and Beyond Homework Help
Replies
3
Views
825
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
933
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
453
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
Back
Top