$$Z_{n+1}=\frac{\alpha Z_n}{1+Z_{n-1}}$$ How to write the above expression in Mathematica? I want to get say Z_100, Z_10 by that scheme. Can I call say $Z_{10}$ if $Z_{n+1}$ is given?
1 Answer
$\begingroup$
$\endgroup$
3
You must initialize values of z
for the function to be evaluated. Moreover, never use upper-case letters as variables as they are likely to conflict with internal variables and functions.
\[Alpha] = 3;
z[0] = 0;
z[1] = 1;
z[n_] := \[Alpha] z[n - 1]/(1 + z[n - 2]);
ListPlot[Table[{i, z[i]}, {i, 1, 30}], Joined -> True, PlotRange -> All]
-
$\begingroup$ How to get the plot? What is this plot? Is it plot of z[0], z[1], ...z[30]? $\endgroup$ Commented May 11, 2015 at 16:48
-
$\begingroup$ @SkSarifHassan I added the instructions for making a plot. $\endgroup$ Commented May 11, 2015 at 16:54
-
$\begingroup$ Additional questions: for which values of Alpha is the solution finite? Which is the asymtotic value, which the frequency? (These questions assume linearisation of the equation). $\endgroup$ Commented May 11, 2015 at 20:55