If I have a system of difference equations
$$ \begin{cases} x(n + 1) = x(n) + x(n) y(n) + y(n)^2 \\ y(n + 1) = y(n) - x(n)^2 + y(n)^2 \end{cases}, \text{ with } \begin{cases} x(0) = 1\\ y(0) = 2 \end{cases}. $$
How can I solve it by Mathematica?
I tried this but I do not know if it is correct
RSolve[{x[n + 1] == x(n) + x(n) y(n) + y(n)^2,
y[n + 1] == y(n) - x(n)^2 + y(n)^2},
{x[n], y[n]}, n
]
Thank you for help!
[]
and not()
. But when I tried it, it could not solve it.eq1 = x[n + 1] == x[n] + x[n]*y[n] + y[n]^2; eq2 = y[n + 1] == y[n] - x[n]^2 + y[n]^2; ic = {x[0] == 1, y[0] == 2}; RSolve[{eq1, eq2, ic}, {x[n], y[n]}, n]
because it is non-linear, it returned unevaluated. $\endgroup$