######################## PROBLÈME 1: ######################### #@# solution récursive u := proc(n) options remember; #@# nécessaire ! 111 - 1130/u(n-1) + 3000/(u(n-2)*u(n-1)); end: u(0) := 11/2: u(1) := 61/11: #@# solution itérative u2 := proc(n) local t, i, n_1, n_2; n_2 := u2(0); n_1 := u2(1); for i from 2 to n do t := 111 - 1130/n_1 + 3000/(n_2*n_1); n_2 := n_1; n_1 := t; od; t; end: u2(0) := 11/2: u2(1) := 61/11: #@# solution approchée (utilise la variable globale d, supposée entière) d := 20: u3 := proc(n) global d; options remember; evalf(111 - 1130/u3(n-1) + 3000/(u3(n-2)*u3(n-1)), d); end: u3(0) := evalf(11/2, d): u3(1) := evalf(61/11, d): #@# solution approchée (propre, évite de modifier/restaurer Digits) ua := proc(n, d) local u; u := proc(n) options remember; evalf(111 - 1130/u(n-2) + 3000/(u(n-2)*u(n-1)), d); end; u(0) := evalf(11/2, d); u(1) := evalf(61/11, d); u(n); end: eq := (111 - 1130/x + 3000/(x*x) = x): solve (eq, x);