For the following equation, I have been able to solve for $A$ and $B$ using non-linear least squares (implemented by SciPy's curve_fit function. It's easy because $y$ has been isolated. I just give the function a few known $(x_k,y_k)$ pairs and the algorithm can then solve for $A$ and $B$ iteratively. $C_0$ is a known constant.
$$ y = Axe^{\frac{xB}{C_0}} $$
But what happens when $y$ is inside the argument to $e$? How do you go about solving this equation?
$$ y = Axe^{(x-y)\frac{B}{C_0}} $$
A pointer to some numerical technique would be nice. I am particularly looking for examples using SciPy solvers.
Let u = x-y. Then the equation becomes $x-u = A*x*e^{u*B/C_0}$, thus $u = x-A*x*e^{u*B/C_0}$, $u = x*(1-A*e^{u*B/C_0})$, and then $x = {u \over {1-A*e^{u*B/C_0}}}$ Use this equation as a replacement and it should work