Imagine that we have a value $s_i = f(s_{i-1}, x_{i-1})$, reccurent formula $s_i$ with parameter $x_i$. $x_i$ values depends on $x_0$ and each $x_i$ is calculated in a diffenrent way. I guess it is legitimate to say that $x_i$ is descrete value defined by $x_0$. We know that $s_0 = a$ and $s_n = b$. How to pick $x_0$ so that we get required $s_0$ and $s_n$?
For example: we are invested \$100 to something and want it to be \$1000 in 12 month ($s_0 = 100, s_{11} = 1000$). And we could pick some initial parameter $x_0$ that will define our monthly revenue. And from $x_0$ we could calculate $x_i, i\in{0, ..., 11}$.
I guess it could be from decision theory. Is there any methods that can solve a task of this type?