Curve fitting and least squares method.

Click For Summary
SUMMARY

The discussion focuses on applying the least squares method to derive an equation for maximum time (tmax) based on the function C(t) = Css + a(e^.5t) + b(e^.9t). The user seeks clarification on the distinction between finding tmax and performing least squares fitting, as well as guidance on selecting an appropriate polynomial degree for the fitting process. The least squares method aims to minimize the sum of the squares of the vertical distances between data points and the fitting function, leading to a set of simultaneous linear equations for the coefficients a and b.

PREREQUISITES
  • Understanding of least squares method for curve fitting
  • Familiarity with derivatives and their application in finding maxima
  • Knowledge of exponential functions and their properties
  • Ability to solve simultaneous linear equations
NEXT STEPS
  • Study the derivation of the least squares method in detail
  • Learn about polynomial regression and its application in fitting data
  • Explore the use of numerical methods for solving nonlinear equations
  • Investigate the properties of exponential functions in modeling real-world data
USEFUL FOR

Students and researchers in mathematics, physics, or engineering who are involved in data analysis and curve fitting using the least squares method.

danbone87
Messages
28
Reaction score
0

Homework Statement



I have an equation as a function of time. (eq1) C(t) = Css + a(e^.5t) + b(e^.9t) t>0

Where, Css is a constant. then I have 6 data points of time and C (Concentration of a liquid)

1. I have to find an equation to find the maximum time and contains a, b and Css.
2. I have to show the complete least squares derivation based on equation 1 as the approximating function.

First of all, I'm wondering what the difference between 1 and 2 are... both are ways to find tmax. Also, when doing a least squares method, I don't know exactly how to decide what to type of equation to choose to find my a, b and Css. Will a polynomial work since this function involves exponentials... and how would i decide what degree polynomial to use? Since I should have 3 systems of equations should I go up to a third degree polynomial?
 
Physics news on Phys.org
Hi, I have an update!

For part 1. I realized from long ago that the max and mins of a function occur when y'=0

So I took the derivative of the function which gave me

C(t) = Css + a(e^.5t) + b(e^.9t) t>0

c'(t)= .5a(e^.5t)*(e^.5t) + .9b(e^.9t)*(e^.9t) = 0

i took the ln of the whole thing

and that gave me

[ln(.5a)*.5t + .5t] + [ln(.9b)*.9t + .9t] = 0

my question now is can use the property that ln(xy) = ln(x)+ln(y) to combine the two ln's and thereby combining the coeffiecients of t such that it is .5t+.9t = .14t

and the whole thing would be .14t*ln(.45ab)= -.14t

... that seems to be wrong considering that the t's cancel out but I can't think of much else...
 
If you are still looking for help, you need to look at the purpose of least squares, which is to minimize the sum of the squares of the vertical distance between the data points and the fitting function:

[tex]min \ g= \sum_{i=1}^n[f(a,b,t_i) - y_i]^2[/tex]

Where a and b are the unknown coefficients of the fitting function. To minimize, take the partial derivative of g with respect to each unknown. When terms are collected, the result is a set of simultaneous linear equations that can be solved for a and b.
 
Last edited:

Similar threads

Replies
6
Views
1K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
7
Views
2K