Second degree recurrence

This script iterates the recurrence relation (x,y) = M×(x,y) + C
It works on lists of initial values and lists of coefficients, the elements being comma separated.
Each element of the list of coefficients is applied upon each element of the initial values lists.
It also gives the equivallent relations in x only and in y only.

x0 = (list)
y0 = (list)

xn+1 = xn + yn + (lists)
yn+1 = xn + yn + (lists)
Iterations number           ≥ 0 values           Merge          

The checkbox "≥0" cancels all <0 results, the checkboxe "Merge" merges all the results into a single list, sorted by absolute values.

Equivallent formulaes

From the relations
xn+1 = P xn + Q yn + K
yn+1 = R xn + S yn + L
A simple calculation gives
xn+2 = (P + S)xn+1 + (QR - PS)xn + QL - KS + K
yn+2 = (P + S)yn+1 + (QR - PS)yn + RK - PL + L

 

 

Home Arithmetic Geometric Misc Topics Scripts Games Exercices Mail Version Française Previous topic Next topic