[Math] How to determine function based on input and output

functionsinterpolation

I'm not very good at mathematics, so please bear with me.

How can you determine / define a function based on sets of values of its input and output parameters.

You have:
$f(x_{1_1}, x_{1_2}, \ldots , x_{1_n}) = y_1$

$f(x_{2_1}, x_{2_2}, \ldots , x_{2_n}) = y_2$

$f(x_{n_1}, x_{n_2}, \ldots , x_{n_n}) = y_n$

You want: $$f(x_1, x_2, \ldots , x_n) = a_1(x_1)^{b_1} + a_2(x_2)^{b_2} + \cdots + a_n(x_n)^{b_n}$$

Let's assume that you have enough (how much is enough?) sets of input and output parameters.

What software could do this and how (excel, mathematica, r, … ?). I'm looking for the simplest solution.

p.s. I need it only to define $f(x_1,x_2)=y$ function, but at the same time I'd like to learn more about all of this. Thank you for your time and answers.

Best Answer

You are solving a set of nonlinear simultaneous equations. As you have $2n$ values to evaluate (all the $a_n$'s and all the $b_n$'s) you need $2n$ pieces of data. In general there will be many solutions because of the $b_n$ exponents-do you really mean that? If all the $b_n$ are $1$ the problem is linear and much easier. For the linear problem the solutions are not hard and Excel's matrix tools will find the solution. For the nonlinear problem you will probably find too much of a mess without using a multidimensional function minimizer, found in many numerical analysis texts (and Excel's Goal Seek) but that gives a numeric answer, not an algebraic one.

Related Question