leaderey wrote:
Hi Jacquelin
Thanks for your reply!!
I have matlab but am not conversant with programming in it. I was going through some possible solutions and I found one where the author says that I can use nonlinear curve fit routine and call the ordinary differential equation solver (runge-kutta) from within it. But as I said I'm new to matlab and programming am trying to find a way to write this program.
k, n and m are positive real numbers. n and m can have values ranging from "0 - 4". "k" can have any positive value (its usually in the range of 10^5 to 10^7).
a = 406
b = 289
Hi !
There is probably a mistake in your wording : a confusion between the coefficient k and 1/k.
For example, in the case x=50
dx/dt = k*[(a-2x)^n]*[(b-2x)^m] The smallest value of dx/dt is = k ( because for any n>0 and m >0 then (406-2*50)^n is >1 and (289-2*50)^m is >1. So, dx/dt > k )
If we consider your given range of 10^5 < k < 10^7 , then dx/dt > 10^5
On the other hand, the order of magnitude of dx/dt is :
(60-40) / (t(60)-t(40)) = (50-40) / (43-26) = 1.18 which is inconsistent with dx/dt > 10^5
So, I suppose that the equation is dx/dt =(1/K) *[(a-2x)^n]*[(b-2x)^m] with k=1/K
The result of the least square fitting depends on what we are looking for. Since the relationship is far to be linear, the optimum values of K, n and m are very different if we intend to obtain the smallest mean relative deviation or the smallest mean absolute deviation.
My results are shown below :
SEARCH FOR THE SMALLEST MEAN ABSOLUTE DEVIATION :
K = 47430
n = 0.505
m = 1.538
Mean absolute deviation = 5.98
Mean relative deviation = 15.4%
Experimental values : (xe, te) . Computed values : tc
xe ; te ; tc
10 ; 8 ; 4.017
20 ; 13 ; 8.642
30 ; 19 ; 14.023
40 ; 26 ; 20.363
50 ; 33 ; 27.944
60 ; 43 ; 37.171
70 ; 54 ; 48.65
80 ; 69 ; 63.328
90 ; 87 ; 82.78
100 ; 110 ; 109.847
110 ; 140 ; 150.256
120 ; 204 ; 217.749
127 ; 310 ; 301.543
SEARCH FOR HE SMALLEST MEAN RELATIVE DEVIATION :
K = 48400
n = 1.157
m = 0.797
Mean absolute deviation = 8.7
Mean relative deviation = 9.8%
xe ; te ; tc
10 ; 8 ; 5.393
20 ; 13 ; 11.47
30 ; 19 ; 18.374
40 ; 26 ; 26.292
50 ; 33 ; 35.471
60 ; 43 ; 46.248
70 ; 54 ; 59.1
80 ; 69 ; 74.721
90 ; 87 ; 94.168
100 ; 110 ; 119.158
110 ; 140 ; 152.723
120 ; 204 ; 200.939
127 ; 310 ; 250.671