I want to elaborate on a statement I read in Acton's "Numerical methods that work", paragraph "Exponential fitting", page 252.
Computationally we are being asked to fit only the parameters $A$ and $B$ in the equation $y = A\exp (-at) + B\exp (-bt)$ when we have observed a sample at several times to produce a set of $(t_i, y_i)$ pairs. It is a simple least-squares fit that generally requires only a desk calculator.
OK I get this part. But then the author goes on :
Unfortunately there is a companion problem that looks only slightly more complicated — until you try it! We again have $(t_i, y_i)$ readings from a radioactive sample, but the decaying materials are not known, hence the decay rates $a$ and $b$ must also be fitted. The answer to this problem lies in the chemical rather than the computer laboratory, and the sooner the hopeful innocent can be sent there and away from the computer room, the better off everyone will be. For it is well known that an exponential equation of this type in which all four parameters are to be fitted is extremely ill conditioned.
(Emphasis is mine.)
I didn't understand this statement, so I started to think how I would have proceed if faced with the same problem. Considering the simplicity of this function
$$ y = A\exp (-at) + B\exp (-bt) $$
seen as a function of $(A,a,B,b)$, I would go straighforward to try some sort of gradient-based method because I can easily compute the partial derivatives.
If I call $E(y)$ my error function, the problem resort to minimizing the quantity
$$ E(y) = \sum_{i=1}^{N} \left( y(t_i) - y_i \right) ^2 $$
Again the partial derivatives with respect to $A$, $a$, $B$ or $b$ are easy to compute, and I don't see the problem coming.
So where is the problem and what is it ?