I\'m looking for a non-linear curve fitting routine (probably most likely to be found in R or Python, but I\'m open to other languages) which would take x,y data and fit a c
Your first model is actually linear in the three parameters and can be fit in R using
fit <- lm(y ~ x + I(x^2), data=X)
which will get you your three parameters.
The second model can also be fit using nls()
in R with the usual caveats of having to provide starting values etc. The statistical issues in optimization are not necessarily the same as the numerical issues -- you cannot just optimize any functional form no matter which language you choose.