# Finding parameters numerically

I suspect that a function $f(x,y)$ is of the form $f(x,y)=a(bx+c)^{dy+e}$. I have access to several values of $f(x,y)$. How do I proceed numerically to find the parameters $\{a,b,c,d,e\}$?

By plotting $\log f$ versus $\log y$ for a fixed $x$, I would get a linear curve and this would give me hope to find $\{d,e\}$. But getting $\{b,c\}$ is beyond me right now.

If it is it OK to recommend a solution that uses Python and SciPy, you can use the curve-fit function from scipy to do the job.

import scipy.optimize as op
import numpy as np

def func(xydata,a,b,c,d,e):
x = xydata[:,0]
y = xydata[:,1]
return a*(b*x + c)**(d*y + e)

# Assuming you have your f(x,y) data in a file with
# three columns separated by comma e.g. x1,y1,f1
In general, you can formulate this as a nonlinear least squares problem. If your values are known at points $(x_{i},y_{i})$, and the known values are $f_{i}$, then you can minimize
$\min_{a,b,c,d,e} \sum_{i=1}^{n} \left( f_{i} - a(bx_{i}+c)^{dy_{i}+e} \right)^{2}$