I’ve got the following data set:
I’d like to find a least squares fit to this data with an exponential function f(x)=a e^{rx} as shown in the figure below on the left.
Problem 1
Write down the function that I’d need to minimize to accomplish this task.
Problem 2
Since the function above leads to a non-linear system, I apply the logarithm to the y-coordinates to obtain data that should be nearly linear as shown in the figure on the right. I find the function
Write down the exponential function that fits the original data.