I have this set of data


and I need it fitted into a function of the form


where $R$ is the gas constant $R=8.31\dots$ and $t=0.002$. This is a decay and the function in the exponent is the Arrhenius factor.

I checked the help for the fitting tools, but what I found was either in one variable, or in more variables, but for a higher dimensional plot. I also have variable bounds which I need to implement. I have this simple curve with parameters

A, n, Ea

$A$ is bounded by $10^{12}$ and $10^{14}$, $Ea$ lies between $270000$ and $320000$, $n$ close to zero (single digit). The plot of the function should be with respect to temperature $TT$ is the varying variable on the x-axis.

  • $\begingroup$ You need NonlinearModelFit. Do not use capital letters as variables names. There are couple of built it. N C I $\endgroup$
    – Kuba
    Commented Aug 9, 2013 at 8:05
  • $\begingroup$ It might be more convenient to work with the Log of your data. $\endgroup$ Commented Aug 9, 2013 at 8:15
  • $\begingroup$ @Kuba: Thanks for the hint. I tried the NonlinearModelFit and it worked but the values I get are far off. How can I implement the boundaries? $\endgroup$
    – Alchymist
    Commented Aug 9, 2013 at 8:34
  • 1
    $\begingroup$ You can implement boundaries with {Exp[-(a*tt^n*Exp[-ea/(r*tt)])*t], 10^12 <= a <= 10^14, 0.5 < n < 10, 270000 <= ea <= 320000} (or similar with the log version) within NonlinearModelFit. $\endgroup$ Commented Aug 9, 2013 at 10:38
  • 1
    $\begingroup$ Are you trying to use the Arrhenius equation with a temperature-dependent pre-exponential factor? If so then you need to look at your exponential: R is in $J\ mol^{-1}\ K^{-1}$, TT is unitless so your activation energy, Ea is in the same units as the gas law constant. $\endgroup$ Commented Aug 10, 2013 at 12:47

2 Answers 2


Only NMinimize method can be used for constrained problems.



(*Constrained parameters*)
(*Starting values for constrained parameters*)



$e^{-1.37091\times 10^{10} e^{-33078.6/\text{tt}} \text{tt}^{0.0317634}}$

enter image description here


I have no time now to do the right job with Log Log data so let me only show straightforward approach.

I don't know how to put constraints on parameters but you can always give starting value.

sol = With[{r = 8.31, t = 0.002},
                             {{a, 10^13}, {ea, 295000}, {n, 1}},
NonlinearModelFit::cvmit: Failed to converge to the requested accuracy or 
precision within 100 iterations

The warning is because it is always hard to fit parameters which differ with order of magnitute so much. But let's see the results:

Plot[Normal@sol, {tt, 1200, 1700}, Epilog -> Point@mydata, 
     Axes -> False, Frame -> True, BaseStyle -> AbsolutePointSize@7]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.