suppose y, y1, y2, y3,... are the last n values the function takes on over a certain N x values separated by a delta value.
A first derivative can be approximated like:
So just picking a random relationship in x and y versus t might be:
Plugging in the approximations from above gives:
Let's suppose the function started x1 = .5, x2 = .4, y1 = .75, y2 = 1
x = 0.5721630376
y = .7621630376
Then make these two values our x1 and y1, make the old x1 and y1: x2 and y2, and iterate. A plot of this looks like: