0
$\begingroup$

$$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?

$\endgroup$

1 Answer 1

3
$\begingroup$

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]

enter image description here

$\endgroup$
3
  • $\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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.