Find function for given values

36 Views Asked by At

I have some trouble solving the following (scalar valued) problem. What I know: Scalar values of $f(a,b)$, $a$ and $b$ are given. Now I am searching for a scalar function $g()$, so that it holds

$f(a,b) = a \cdot g(a) + b \cdot g(b)$.

How should I approach this?

EDIT:

After thinking a while, here is a simpler version of my problem. Suppose I know every discrete value $f_i$ of function $f()$ for the parameter $a_i$ and $b_i$. How should I find a solution for $G()$ (or every $G_i$), if it should hold

$f_i = G_i(a_i) + G_i(b_i)$.

Also, there exists a formula for $a_i$ and $b_i$. So they are dependend,

$a_i = x_i - b_i$ with $x_i$ is also known.

I am writing this in "discrete" form since the values for $f()$ and $a$ and $b$ are also caluculated numerically.