I am given a function $g(t) = a + b \cdot \exp(-c \cdot t)$ and a set of $(t_i, g(t_i))$ pairs (temperature measurements), and the task is to find values of parameters $a,b,c$ s.t. they fit given data. The task is to do this numerically, and in particular using BFGS method, which is a gradient descent method that uses Rank-2-update to choose descent direction and Wolfe conditions to choose step length. I implemented the algorithm but got stuck in theory.
My approach would be to minimize the sum of the squares of the residuals, like:
$$f(a,b,c) = \sum_i [g(t_i) - (a + b \cdot \exp(-c \cdot t_i))] ^2\rightarrow \min$$
But if we take a look at a gradient we see that:
$$\begin{array}{rcl}\frac{\partial f}{\partial a}(a,b,c) &=& -2\sum_i[g(t_i) - (a + b \cdot \exp(-c \cdot t_i))]\\ \frac{\partial f}{\partial b}(a,b,c) &=& -2\sum_i[g(t_i) - (a + b \cdot \exp(-c \cdot t_i))]\cdot\exp(-c\cdot t_i)\\ \frac{\partial f}{\partial c}(a,b,c) &=& -2\sum_i[g(t_i) - (a + b \cdot \exp(-c \cdot t_i))]\cdot(-bc)\cdot\exp(-c\cdot t_i)\end{array}$$
So we get $\nabla f(a,b,c) = 0$ for all $c=0$ and $a + b = \mu$ – mean value of all $g(t_i)$'s. So this approach doesn't seem to make much sense, since the algorithm guarantees only convergence to stationary points $(\nabla f(x) = 0)$, but then the solution is ambigious and far from optimal.
So my question would be, what function should I minimize to solve the problem?
Note: there were some similar questions to this problem (like this, for instance), but neither of them solved this particular problem, so I hope this question is unique.
Thanks in advance!