f (x) = e^(-3 x)

f[x_] = E^(-3 x);
Plot[{f[x], x}, {x, -3, 3}, PlotRange -> {-2, 4}, AspectRatio -> Automatic]

FindRoot[f[x] == x, {x, .5}]

Clear[f,x,i,y,z];
f[x_] = E^(-3 x);
z = .35;
F = 0;
L = 10;
i = 0;
y = N[z];
While[i ≤ L, If[i ≥ F, Print[i, "   ", N[y,8]]];
y = f[y]; i = i+1]

Clear[f,x,y,i];
f[x_] = E^(-3 x);
S = .4;
F = 0;
L = 20;
xmin = 0;
xmax =.7;
ymin = 0;
ymax =.7;
i = 0;
y = N[S];
While[i < F, {y = f[y], i = i+1}];
DataTable = {{y,y},{y, f[y]}};
While[i < L, y = f[y];
AppendTo[DataTable, {y,y}];
AppendTo[DataTable, {y, f[y]}];
i = i+1];
AppendTo[DataTable, {f[y], f[y]}];
Cobweb = ListPlot[DataTable, Joined -> True, PlotRange -> {{xmin, xmax}, {ymin, ymax}}, AspectRatio -> Automatic, PlotStyle -> GrayLevel[.3], DisplayFunction -> Identity];
Graph2 = Plot[{f[x], x}, {x, xmin, xmax}, PlotRange -> {ymin, ymax}, AspectRatio -> Automatic, DisplayFunction -> Identity];
Show[Cobweb, Graph2]

f[x_] = Exp[-3x];
f2[x_] = Exp[-3 * Exp[-3x]];
Plot[{f[x], f2[x], x}, {x,-1,  3}, PlotRange -> {0, 2}, AspectRatio -> Automatic]

f[x_] = Exp[-3x];
f2[x_] = Exp[-3 * Exp[-3x]];
Plot[{f[x], f2[x], x}, {x,0,  1}, PlotRange -> {0, 1}, AspectRatio -> Automatic]

FindRoot[f2[x] == x, {x, .8}]

FindRoot[f2[x] ==x, {x, .2}]

Clear[f,x,i,y,z];
f[x_] = E^(-3 x);
z = .13;
F = 0;
L = 100;
i = 0;
y = N[z];
While[i ≤ L, If[i ≥ F, Print[i, "   ", N[y,8]]];
y = f[f[y]]; i = i+2]

Clear[f,x,y,i];
f[x_] = E^(-3 x);
S = .12;
F = 0;
L = 20;
xmin = 0;
xmax =.3;
ymin = 0;
ymax =.3;
i = 0;
y = N[S];
While[i < F, {y = f[y], i = i+1}];
DataTable = {{y,y},{y, f[y]}};
While[i < L, y = f[y];
AppendTo[DataTable, {y,y}];
AppendTo[DataTable, {y, f[y]}];
i = i+1];
AppendTo[DataTable, {f[y], f[y]}];
Cobweb = ListPlot[DataTable, Joined -> True, PlotRange -> {{xmin, xmax}, {ymin, ymax}}, AspectRatio -> Automatic, PlotStyle -> GrayLevel[.3], DisplayFunction -> Identity];
Graph = Plot[{f[x], x}, {x, xmin, xmax}, PlotRange -> {ymin, ymax}, AspectRatio -> Automatic, DisplayFunction -> Identity];
Show[Cobweb, Graph]

g(x) = cos 2x

g[x_] = Cos[2x];
Plot[{g[x], x}, {x, -3, 3}, PlotRange -> {-2, 2}, AspectRatio -> Automatic]

FindRoot[g[x] == x, {x, .5}]

Clear[g,x,i,y,z];
g[x_] = Cos[2x];
z = .55;
F = 0;
L = 10;
i = 0;
y = N[z];
While[i ≤ L, If[i ≥ F, Print[i, "   ", N[y,8]]];
y = g[y]; i = i+1]

g[x_] = Cos[2x];
Plot[{g[x], g[g[x]], x}, {x, -3, 3}, PlotRange -> {-2, 2}, AspectRatio -> Automatic]

FindRoot[g[g[x]] == x, {x, 1}]

FindRoot[g[g[x]] == x, {x, -.5}]

Clear[f,x,i,y,z];
f[x_] = Cos[2x];
z = .9;
F = 0;
L = 100;
i = 0;
y = N[z];
While[i ≤ L, If[i ≥ F, Print[i, "   ", N[y,8]]];
y = f[f[y]]; i = i+2]

h(x) = -x^3 - x

h[x_] =-x^3 - x;
Plot[{h[x], x}, {x, -3, 3}, PlotRange -> {-2, 2}, AspectRatio -> Automatic]

Clear[h,x,i,y,z];
h[x_] = -x^3-x;
z = .05;
F = 0;
L = 30;
i = 0;
y = N[z];
While[i ≤ L, If[i ≥ F, Print[i, "   ", N[y,8]]];
y = h[y]; i = i+1]

Plot[{x, h[x], h[h[x]]}, {x, -3, 3}, PlotRange -> {-3, 3}, AspectRatio -> Automatic]

T(x) = x^2 + c

Solve[x^2 + c == x, x]

Clear[f,x,y,i, c];
c = -.5; 
xmin = -1;
xmax = 0;
ymin = -1;
ymax =0;
f[x_] = x^2 + c;
S = -.4;
F = 0;
L = 20;
i = 0;
y = N[S];
While[i < F, {y = f[y], i = i+1}];
DataTable = {{y,y},{y, f[y]}};
While[i < L, y = f[y];
AppendTo[DataTable, {y,y}];
AppendTo[DataTable, {y, f[y]}];
i = i+1];
AppendTo[DataTable, {f[y], f[y]}];
Cobweb = ListPlot[DataTable, Joined -> True, PlotRange -> {{xmin, xmax}, {ymin, ymax}}, AspectRatio -> Automatic, PlotStyle -> GrayLevel[.3], DisplayFunction -> Identity, AxesLabel -> {"= c "c}];
Graph = Plot[{f[x], x}, {x, xmin, xmax}, PlotRange -> {ymin, ymax}, AspectRatio -> Automatic, DisplayFunction -> Identity];
Show[Cobweb, Graph]

Clear[f,x,y,i, c];
c = -.6; 
xmin = -1;
xmax = 0;
ymin = -1;
ymax =0;
f[x_] = x^2 + c;
S = -.35;
F = 0;
L = 20;
i = 0;
y = N[S];
While[i < F, {y = f[y], i = i+1}];
DataTable = {{y,y},{y, f[y]}};
While[i < L, y = f[y];
AppendTo[DataTable, {y,y}];
AppendTo[DataTable, {y, f[y]}];
i = i+1];
AppendTo[DataTable, {f[y], f[y]}];
Cobweb = ListPlot[DataTable, Joined -> True, PlotRange -> {{xmin, xmax}, {ymin, ymax}}, AspectRatio -> Automatic, PlotStyle -> GrayLevel[.3], DisplayFunction -> Identity, AxesLabel -> {"= c "c}];
Graph = Plot[{f[x], x}, {x, xmin, xmax}, PlotRange -> {ymin, ymax}, AspectRatio -> Automatic, DisplayFunction -> Identity];
Show[Cobweb, Graph]

Clear[f,x,y,i, c];
c = -.7; 
xmin = -1;
xmax = 0;
ymin = -1;
ymax =0;
f[x_] = x^2 + c;
S = -.35;
F = 0;
L = 50;
i = 0;
y = N[S];
While[i < F, {y = f[y], i = i+1}];
DataTable = {{y,y},{y, f[y]}};
While[i < L, y = f[y];
AppendTo[DataTable, {y,y}];
AppendTo[DataTable, {y, f[y]}];
i = i+1];
AppendTo[DataTable, {f[y], f[y]}];
Cobweb = ListPlot[DataTable, Joined -> True, PlotRange -> {{xmin, xmax}, {ymin, ymax}}, AspectRatio -> Automatic, PlotStyle -> GrayLevel[.3], DisplayFunction -> Identity, AxesLabel -> {"= c "c}];
Graph = Plot[{f[x], x}, {x, xmin, xmax}, PlotRange -> {ymin, ymax}, AspectRatio -> Automatic, DisplayFunction -> Identity];
Show[Cobweb, Graph]

Clear[f,x,y,i, c];
c = -.725; 
xmin = -1;
xmax = 0;
ymin = -1;
ymax =0;
f[x_] = x^2 + c;
S = -.35;
F = 0;
L = 50;
i = 0;
y = N[S];
While[i < F, {y = f[y], i = i+1}];
DataTable = {{y,y},{y, f[y]}};
While[i < L, y = f[y];
AppendTo[DataTable, {y,y}];
AppendTo[DataTable, {y, f[y]}];
i = i+1];
AppendTo[DataTable, {f[y], f[y]}];
Cobweb = ListPlot[DataTable, Joined -> True, PlotRange -> {{xmin, xmax}, {ymin, ymax}}, AspectRatio -> Automatic, PlotStyle -> GrayLevel[.3], DisplayFunction -> Identity, AxesLabel -> {"= c "c}];
Graph = Plot[{f[x], x}, {x, xmin, xmax}, PlotRange -> {ymin, ymax}, AspectRatio -> Automatic, DisplayFunction -> Identity];
Show[Cobweb, Graph]

Clear[f,x,y,i, c];
c = -.745; 
xmin = -1;
xmax = 0;
ymin = -1;
ymax =0;
f[x_] = x^2 + c;
S = -.3;
F = 0;
L = 2000;
i = 0;
y = N[S];
While[i < F, {y = f[y], i = i+1}];
DataTable = {{y,y},{y, f[y]}};
While[i < L, y = f[y];
AppendTo[DataTable, {y,y}];
AppendTo[DataTable, {y, f[y]}];
i = i+1];
AppendTo[DataTable, {f[y], f[y]}];
Cobweb = ListPlot[DataTable, Joined -> True, PlotRange -> {{xmin, xmax}, {ymin, ymax}}, AspectRatio -> Automatic, PlotStyle -> GrayLevel[.3], DisplayFunction -> Identity, AxesLabel -> {"= c "c}];
Graph = Plot[{f[x], x}, {x, xmin, xmax}, PlotRange -> {ymin, ymax}, AspectRatio -> Automatic, DisplayFunction -> Identity];
Show[Cobweb, Graph]

Clear[f,x,y,i, c];
c = -.755; 
xmin = -.6;
xmax = -.4;
ymin = -.6;
ymax =-.4;
f[x_] = x^2 + c;
S = -.45;
F = 0;
L = 100;
i = 0;
y = N[S];
While[i < F, {y = f[y], i = i+1}];
DataTable = {{y,y},{y, f[y]}};
While[i < L, y = f[y];
AppendTo[DataTable, {y,y}];
AppendTo[DataTable, {y, f[y]}];
i = i+1];
AppendTo[DataTable, {f[y], f[y]}];
Cobweb = ListPlot[DataTable, Joined -> True, PlotRange -> {{xmin, xmax}, {ymin, ymax}}, AspectRatio -> Automatic, PlotStyle -> GrayLevel[.3], DisplayFunction -> Identity, AxesLabel -> {"= c "c}];
Graph = Plot[{f[x], x}, {x, xmin, xmax}, PlotRange -> {ymin, ymax}, AspectRatio -> Automatic, DisplayFunction -> Identity];
Show[Cobweb, Graph]

Clear[f,x,y,i, c];
c = -.775; 
xmin = -1;
xmax = 0;
ymin = -1;
ymax =0;
f[x_] = x^2 + c;
S = -.45;
F = 0;
L = 2000;
i = 0;
y = N[S];
While[i < F, {y = f[y], i = i+1}];
DataTable = {{y,y},{y, f[y]}};
While[i < L, y = f[y];
AppendTo[DataTable, {y,y}];
AppendTo[DataTable, {y, f[y]}];
i = i+1];
AppendTo[DataTable, {f[y], f[y]}];
Cobweb = ListPlot[DataTable, Joined -> True, PlotRange -> {{xmin, xmax}, {ymin, ymax}}, AspectRatio -> Automatic, PlotStyle -> GrayLevel[.3], DisplayFunction -> Identity, AxesLabel -> {"= c "c}];
Graph = Plot[{f[x], x}, {x, xmin, xmax}, PlotRange -> {ymin, ymax}, AspectRatio -> Automatic, DisplayFunction -> Identity];
Show[Cobweb, Graph]

Clear[f,x,y,i, c];
c = -.8; 
xmin = -1;
xmax = 0;
ymin = -1;
ymax =0;
 Label["top"];
f[x_] = x^2 + c;
S = -.45;
F = 0;
L = 2000;
i = 0;
y = N[S];
While[i < F, {y = f[y], i = i+1}];
DataTable = {{y,y},{y, f[y]}};
While[i < L, y = f[y];
AppendTo[DataTable, {y,y}];
AppendTo[DataTable, {y, f[y]}];
i = i+1];
AppendTo[DataTable, {f[y], f[y]}];
Cobweb = ListPlot[DataTable, Joined -> True, PlotRange -> {{xmin, xmax}, {ymin, ymax}}, AspectRatio -> Automatic, PlotStyle -> GrayLevel[.3], DisplayFunction -> Identity, AxesLabel -> {"= c "c}];
Graph = Plot[{f[x], x}, {x, xmin, xmax}, PlotRange -> {ymin, ymax}, AspectRatio -> Automatic, DisplayFunction -> Identity];
Show[Cobweb, Graph]

Clear[g,x,i,y,z];
g[x_] = x^2-.8;
z = .55;
F = 80;
L = 100;
i = 0;
y = N[z];
While[i ≤ L, If[i ≥ F, Print[i, "   ", N[y,8]]];
y = g[y]; i = i+1]

T[x_] = x^2 - .8;
Solve[T[x] == x, x]
Solve[T[T[x]] == x, x]

Clear[g,x,i,y,z];
g[x_] = x^2-.8;
z = .55;
F = 80;
L = 120;
i = 0;
y = N[z];
While[i ≤ L, If[i ≥ F, Print[i, "   ", N[y,20]]];
y = g[g[y]]; i = i+2]

Manipulate[Plot[{x^2 + c, x}, {x, -1, 0}, PlotRange -> {-1, 0}, AspectRatio -> Automatic], {c, -2,0}]

Manipulate[{ Plot[{x^2 + c, (1-(Sqrt[1-4 c]))(x - (1/2) (1-(Sqrt[1-4 c]))) + ((1/2) (1-(Sqrt[1-4 c])))^2   + c, x}, {x, -1, 0}, PlotRange -> {-1, 0}, AspectRatio -> Automatic], (1-(Sqrt[1-4 c]))}, {c, -2,0}]

Manipulate[Plot[{x^2 + c,((x^2 + c)^2 + c)^2 + c, x}, {x, -2, 2}, PlotRange -> {-2, 2}, AspectRatio -> Automatic], {c, -2,0}]

T[x_] = x^2 - 2;
NSolve[T[T[T[x]]] == x, x]

T[-1.87939]
T[1.53209]
T[.347296]

T[x_] = x^2 -1.7;
NSolve[T[T[T[x]]] == x, x]

Manipulate[Plot[{x^2 + c,((x^2 + c)^2 + c)^2 + c, x}, {x, -1.9, -1.6}, PlotRange -> {-1.9, -1.6}, AspectRatio -> Automatic], {c, -2,0}]