2) Difference equations of the form xn+1=ƒ(xn) are a somewhat old-fashioned approach. A more modern approach is to use difference equations of the form Δx=ƒ(xn) where Δx = xn+1- xn.
Explore the difference equation Δx=ƒ=r xn (1-xn).
a) Algebraically determine the equilibrium and its stability as functions of r.
b) Construct a simple bifurcation by hand by graphing the equilibria as a function of r. Represent a stable equilibrium with a solid graph and an unstable equilibrium with a dashed or dotted graph.
c) construct a bifurcation diagram showing stable cycles, using Sage (or Matlab, SciLab, Mathematica, Maple, etc). Comment your program, and make it easy to modify the function, initial value, parameter range, and number of iterations.
clc%clears screen
clear all%clears history
close all%closes all files
format long
f=@(x) x-sin(x);
x0=1;
N=10;
for i=1:N
x1=x0-f(x0);
x0=x1;
end
disp('Final is');
disp(x1);
2) Difference equations of the form xn+1=ƒ(xn) are a somewhat old-fashioned approach. A more modern approach...