Formula
The exponential equation is `y=ab^x`
taking natural logarithm on both sides, we get
`ln(y)=ln(ab^x)`
`ln(y)=ln(a)+ln(b^x)`
`ln(y)=ln(a)+x ln(b)`
`Y=A+Bx` where `Y=ln(y), A=ln(a), B=ln(b)`
which linear in Y,x
So the corresponding normal equations are
`sum Y = nA + B sum x`
`sum xY = A sum x + B sum x^2`
|
Examples
1. Calculate Fitting exponential equation `(y=ab^x)` - Curve fitting using Least square method
X | Y |
0 | 10 |
1 | 21 |
2 | 35 |
3 | 59 |
4 | 92 |
5 | 200 |
6 | 400 |
7 | 610 |
Solution:
The curve to be fitted is `y=ab^x`
taking logarithm on both sides, we get
`ln(y)=ln(a)+x ln(b)`
`Y=A+Bx` where `Y=ln(y), A=ln(a), B=ln(b)`
which linear in Y,x
So the corresponding normal equations are
`sum Y = nA + B sum x`
`sum xY = A sum x + B sum x^2`
The values are calculated using the following table
`x` | `y` | `Y=ln(y)` | `x^2` | `x*Y` |
0 | 10 | 2.3026 | 0 | 0 |
1 | 21 | 3.0445 | 1 | 3.0445 |
2 | 35 | 3.5553 | 4 | 7.1107 |
3 | 59 | 4.0775 | 9 | 12.2326 |
4 | 92 | 4.5218 | 16 | 18.0872 |
5 | 200 | 5.2983 | 25 | 26.4916 |
6 | 400 | 5.9915 | 36 | 35.9488 |
7 | 610 | 6.4135 | 49 | 44.8942 |
--- | --- | --- | --- | --- |
`sum x=28` | `sum y=1427` | `sum Y=35.205` | `sum x^2=140` | `sum x*Y=147.8096` |
Substituting these values in the normal equations
`8A+28B=35.205`
`28A+140B=147.8096`
Solving these two equations using Elimination method,
`8a+28b=35.205`
and `28a+140b=147.8096`
`:.28a+140b=147.81`
`8a+28b=35.205 ->(1)`
`28a+140b=147.8096 ->(2)`
equation`(1) xx 7 =>56a+196b=246.435`
equation`(2) xx 2 =>56a+280b=295.6192`
Substracting `=>-84b=-49.1842`
`=>84b=49.1842`
`=>b=49.1842/84`
`=>b=0.585526`
Putting `b=0.585526` in equation `(1)`, we have
`8a+28(0.585526)=35.205`
`=>8a=35.205-16.394733`
`=>8a=18.810267`
`=>a=18.810267/8`
`=>a=2.351283`
`:.a=2.351283" and "b=0.585526`
we obtain `A=2.3513,B=0.5855`
`:. a=antiln(A)=antiln(2.3513)=10.499`
and `b=antiln(B)=antiln(0.5855)=1.7959`
Now substituting this values in the equation is `y = a b^x`, we get
`y=10.499*(1.7959)^x`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then