I have a bivariate function $f(a,b)$ that takes 2 positive integers as input and gives another as output. I do not know the "inner-workings" of the function — I can only see the value it returns when I give it any 2 variables. I would like to represent this function with an equation.
My naive attempt at this:
- I call the function repeatedly with a different value for $a$ each time while $b$ is fixed at 1. This gives me a sequence of output integers.
- I ask Wolfram|Alpha to interpolate a function from this sequence and it gives me a univariate polynomial function: $g(a) = \text{some polynomial}$. I seem to always get an exact function that gives the correct output for any value of $a$. This tells me that $f(a,1) = \text{some polynomial}$.
- Next, I repeat steps 1 and 2, incrementing $b$ by 1 each time to get several more such functions: $f(a,2) = \text{polynomial 2}$, $f(a,3) = \text{polynomial 3}$, etc.
This gives me a system of univariate functions which represent the output of my bivariate function for any $a$ and $b$. How can I use these to get a single simplified function for $f(a,b)$?
Example
Let's say I know the following:
- $f(a,1) = 1$
- $f(a,2) = 2a + 1$
- $f(a,3) = 3a^2 + 3a + 1$
- $f(a,4) = 4a^3 + 6a^2 + 4a + 1$
For this simple example, the values of each of these functions shows up as a sequence in the OEIS which helps to discover that $f(a,b) = (a + 1)^b - a^b$.
However, not all sets of functions are this simple where each function is in the OEIS. Is there a standard way to find $f(a,b)$ given $f(a,1)$, $f(a,2)$, etc.?
If we consider the sequence of functions $f_m (a) = f(a,m) \in \Bbb N$ for all $a \in \Bbb N$, $m = 0,1,2,...$, we cannot generally say if this sequence converges to some $f$. It may diverge at some $a$, converge pointwise elsewhere. There's not even a guarantee that for $a_1, a_2 \in \Bbb N$ where the sequence of functions does converge that $\lim_{m \to \infty} f_m (a_1) = \lim_{m \to \infty} f_m (a_2)$. We could have pointwise convergence to different functions.
But your assumption is that such an $f(a,b)$ does exist, always for all $a,b \in \Bbb N$. Even further you are making a much stronger assumption that $f_1(a) = f_2(a) = ... = f(a,b)$ (per your comments about "unpiecewising" the function, finding exactly one such $f$ that holds for all $a,b$). In general as a question about sequences of functions this is not true.