Question: A problem which is more difficult to solve

I've followed all the recommendations, but I can't see the mistake yet...:

z := proc(n::integer)

local A,E,S,k,s1,s2;

if n = 0 then

matrix(2,1,[0,0]);

else if n = 1 then

matrix(2,1,[-2,epsilon^()+sqrt(epsilon^(2)+4)]);

else

A(n) := matrix([[1+epsilon^(2)-lambda^(n),epsilon^()],[epsilon^(), 1-lambda^(n)]]);

E := matrix(2,1,[epsilon^(2),epsilon^()]);

S := 0;

for k  from 1 by 1 to n-1 do

s1 := thisproc(n-k);

s1 := s1[1];

s2 := thisproc(k);

s2 := s2[1];

S := S+s1*s2;

end do;

A(n)^(-1)*E*S ;

end if;

end proc

 

I need this to do a Dynamical systems problem called Hénon map, which has by function formula:

f(x,y) = (x+epsilon*(y+epsilon*x*(1-x)), y+epsilon*x*(1-x))

so the problem consists in finding the expression of function P such that f(P(t)) = P(lambda*t), where lambda = 1+(epsilon/2)*(epsilon-sqrt(epsilon^2+4)) is one of the eigenvalues of the differential matrix of f valued on (0,0). In Maple, I've put z = (x,y) to let the problem be a vector problem. And as I made the calculations with the help of a LaTex-presentation PDF, I took the formula A(n)*z(n) = (epsilon^2;epsilon)*S, where s is the following recursive sum in the code. If I don't get the result, I won't be able to explain why Matlab plotting goes too far, even when n = 2!!! Bref, trying to put things much easier in a difficult problem, but Maple returns me the error like I did some mistake, and I tried to debug these code lines!!! Along the code, please note that lambda and epsilon are mere parametres, not local variables. If the error comes from there, please put epsilon = 0.2 and lambda as the formula just below the code.

Please Wait...