Obtaining differential equation from recursive function I have a function $f(x)$ for $x = \{0, 1, \ldots, m\}$ which is defined as
$$
f(x) = \begin{cases}0 & \mbox{if }x = 0 \\ f(x-1)(1- \dfrac{x}{m}) + \dfrac{x}{m} & \mbox{if } x \ge 1   \end{cases}
$$
Now it would like to obtain a continuously differentiable function $g(y)$ for $y \in [0,m]$ such that $g(x) = f(x)$ for $x = \{0, 1, \ldots, m\}$.
One obvious option would be fitting a $(m-1)$-th degree polynomial through $f$. I think that there should also be a possibility to transform the problem into a differential equation, but can't see how exactly I would do that. Any suggestions?
 A: There are infinite functions that interpolate $f$. If you only need the values at integer $x$, any one will do. If you are interested in intermediate values, a polynomial could be a terrible idea (it can very well oscillate wildly between the integer points, even if they do grow tamely).
What values of $m$ are of interest?
Write the recurrence so there is no subtraction in $x$:
$\begin{align*}
   m f(x + 1)
     &= f(x) (m - 1 - x) + x + 1 \\ 
\end{align*}$
This is a linear recurrence of the first order. Divide by the summing factor
$\begin{align*}
   \prod_{0 \le r < x} \frac{m - 1 - x}{m}
      &= \frac{(m - 1)^{\underline{x}}}{m^x}
\end{align*}$
and get, after changing variable to $r$:
$\begin{align*}
   \frac{m^{r + 1} f(r + 1)}
        {(m - 1)^{\underline{r}}}
    - \frac{m^r f(r)}
           {(m - 1)^{\underline{r - 1}}}
    &= \frac{r m^r}
            {(m - 1)^{\underline{r}}}
\end{align*}$
Summing over $0 \le r < x$ has the left hand side telescope nicely:
$\begin{align*}
  \frac{m^{x - 1} f(x)}{(m - 1)^{\underline{x - 1}}}
    - \frac{m^0 f(0)}{(m - 1)^\underline{0}}
    &= \sum_{0 \le r < x} \frac{r m^r}{(m - 1)^{\underline{r}}}
\end{align*}$
Sadly, the last sum seems to have no simple form. If it had, you could tahe it as your natutal interpolant.
