Ok, so I'm dealing with a recursive function (you can see it here on MathExchange as I have problems also on the analytic resolution) that I'm trying to solve numerically. The relation is
\begin{equation} \begin{cases} x_{n+1} = e^{-x^2_{n}}\\ x_0 = a\in\mathbb{R} \end{cases} \end{equation}
So I have $a$ that could be any real. Since I would like to visualise how the function goes I made this code:
a = 1;
G[0] = a;
G[y_] := Exp[-G[y - 1]^2]
DiscretePlot[G[y], {y, 0, 30}, PlotRange -> {0.2, 1}]
with the test value $a = 1$, which produce this output:
Now, since $a$ is not 1 in general, I would like to make $a$ become a variable parameter to change and make something like Manipulate[]
in order to see graphically how the relation changes by changing $a$.
I tried
G[0] = a;
G[y_] := Exp[-G[y - 1]^2]
Manipulate[DiscretePlot[G[y], {y, 0, 30}, PlotRange -> {0, 1}], {a, 0, 10}]
Obviously it didn't work at all. Any advice?