(*Created by Rafael Luís: rafaelluis@netmadeira.com
 2016-09-11: adapted for Mathematica v.10 by Ross Moore *)

(* Times series for quadratic Map *)
Clear[h,x];
f[x_,h_]=x+0.7h((x^2)+1);
(*recursive definition of the funtion*)
f[x_,h_,0]:=x;
f[x_,h_,n_]:=f[f[x,h,n-1],h]

f[x,1,2]

aa={};
x0=1 ; (*initial Value*)
h=0.1;    (*Parameter*)
iterates=12;
Do[AppendTo[aa,f[x0,h,j]],{j,1,iterates}];
imagem11=ListPlot[aa,Joined->False,AxesLabel->{"n","(Subscript[x, n])"},PlotLabel->StyleForm["Diagram (n,x(n) for h=0.1)"], AxesOrigin->{0,0},PlotStyle->{RGBColor[1,0,0]}]

Clear[aa]

aaa={};
x0=1 ; (*initial Value*)
h=0.2;    (*Parameter*)
iterates=8;
Do[AppendTo[aaa,f[x0,h,j]],{j,1,iterates}];
imagem11=ListPlot[aaa,Joined->False,AxesLabel->{"t","(Subscript[x, t])"},PlotLabel->StyleForm["Diagram (n,x(n) for h=0.2)"],
AxesOrigin->{0,0},PlotStyle->{RGBColor[1,0,0]},
PlotRange->{0,20}]