format long; function x = Updatex(r, x) x = r.*x.*(1-x); end function x = TrajLogEq(n, r, x, fig, s=0) x = [x, zeros(1, n-1)]; for i = 2:n x(i) = Updatex(r, x(i-1)); end if fig == 1 plot(1:n , x + s) xlabel('Iteration n') ylabel('Population x') end end function BFDLogEq(r, x) hold on; x = 0*r + x; for n = 2:1000 x = Updatex(r,x); if n >= 990 scatter(r, x, 1, "k") end end title('Finite iteration BFD') xlabel('BFP r') ylabel('Fixed point x*') end
n = 50; r = 2.75; hold on; TrajLogEq(n, r, 0.1, 1); TrajLogEq(n, r, 0.2, 1);
Lets look at the phase diagram of the system in the limit where xn+1=xn=x
xn+1=rxx(1−xn)
x=rx(1−x)
Which has root solutions of the form
x=0, x=1−r1
We can plot the fixed points (in the limit) as a function of r and check for when r = 2.75.
fixedpoint = 1-(1/2.75) r = 0.1:0.1:4; hold on; plot(r, 1-1./r); plot(r, 0*r) xlabel('r') ylabel('x*')
From the BFD and trajectories below we can approximate the behaviour over our BF parameter.
n = 60; for r = [2.5, 3.0, 3.2, 3.5]; figure hold on; TrajLogEq(n, r, 0.1, 1); TrajLogEq(n, r, 0.2, 1,1); end
r = 3.0, t approx 3 iterations
r = 3.2, t approx 5 iterations
r = 3.5, t approx 5 iterations
We want to model the fixed point as a function of the BFP. In order to capture cycles, we need to scatter a few iterations after the system has tended to the fixed point. See function above.
BFD
figure 1 r = 1.8:1e-4:4; x = 0.6; BFDLogEq(r, x) figure 2 r = 3.45:1e-4:3.8; x = 0.6; BFDLogEq(r, x) figure 3 r = 3.56:1e-4:4; x = 0.6; BFDLogEq(r, x)
The pitchfork BF are a good example of self sym. These occur at the cycle doubling BFPs listed above.
We see that the two trajectories are symmetric for the first few iterations before diverging. This indicated sensitivity to initial conditions.
r = 3.67; n = 50; figure hold on; TrajLogEq(n, r, 0.1, 1); TrajLogEq(n, r, 0.1001, 1, 1); n = 20; figure hold on; TrajLogEq(n, r, 0.1, 1); TrajLogEq(n, r, 0.1001, 1); figure r = 3.56:1e-4:4; x = 0.1; BFDLogEq(r, x) figure r = 3.56:1e-4:4; x = 0.1001; BFDLogEq(r, x)
function x = UpdatexTwo(r, x) x = x.*exp(r.*(1-x)); end function x = TrajLogEqTwo(n, r, x, fig, s=0) x = [x, zeros(1, n-1)]; for i = 2:n x(i) = UpdatexTwo(r, x(i-1)); end if fig == 1 plot(1:n , x + s) xlabel('Iteration n') ylabel('Population x') end end function BFDLogEqTwo(r, x) hold on; x = 0*r + x; for n = 2:1000 x = UpdatexTwo(r,x); if n >= 990 scatter(r, x, 1, "k") end end title('Finite iteration BFD') xlabel('BFP r') ylabel('Fixed point x*') end
r = 0:5e-3:4; x = 0.5; BFDLogEqTwo(r,x)
From the BFD and trajectories below we can approximate the behaviour over our BF parameter.
x = 0.5; figure 1 r = 1.9:5e-4:2.55; BFDLogEqTwo(r,x) figure 2 r = 2.5:5e-4:2.7; BFDLogEqTwo(r,x) figure 3 r = 2.65:5e-4:3; BFDLogEqTwo(r,x) figure 4 r = 2.7:5e-4:2.8; BFDLogEqTwo(r,x)
x = 0.5; n = 50; for r = [1, 2.5, 2.6, 2.7] ; figure TrajLogEqTwo(n, r, x, 1); end