• Support PF! Buy your school textbooks, materials and every day products Here!

Curve fitting and least squares method.

  • Thread starter danbone87
  • Start date
28
0
1. 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?
1. Homework Statement



2. Homework Equations



3. The Attempt at a Solution
 

Answers and Replies

28
0
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...
 
hotvette
Homework Helper
987
3
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:

Related Threads for: Curve fitting and least squares method.

  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
3
Views
849
  • Last Post
Replies
12
Views
2K
  • Last Post
Replies
2
Views
884
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
10
Views
2K
Replies
0
Views
2K
Top