Help1:=proc(): print(`SSSn(f,x)`):end: #SSSn(f,x): given a function f of x, finds the stable steady states of the discrete 1D dynamical system #x(n+1)=f(x(n)), and their basin of attraction. Try: #SSSn((1+x)/(2+x),x); SSSn:=proc(f,x) local f1,A,a,S: f1:=normal(diff(f,x)): A:=evalf([solve({x=f},{x})]): A:=[seq(subs(A[a],x),a=1..nops(A))]; S:={}: print(`The steady states are`, A): for a from 1 to nops(A) do if abs(subs(x=A[a],f1))<1 then S:=S union {A[a]}: fi: od: S: end: