%Script file to produce a sequence of pictures illustrating % the pitchfork bifurcation of F(x)=lambda*x - x^3 %First, we illustrate the pitchfork. Solving for % F(x)=x, we got: x( (lambda-1) -x^2 )=0 so that % x=0 or x^2+1=lambda: t=linspace(-2,2,1500); t1=t; figure(1) %Call up figure 1 for plotting subplot(2,2,1) %Creates a 2x2 array of plots in figure 1 t1= -t - t.^3; y = -t1 - t1.^3; plot(t,y,'k-',t,t,'r-.'); axis([-2,2,-2,2]); grid on title('\lambda = -1'); subplot(2,2,2) t1=-t.^3; y= -t1.^3; plot(t,y,'k-',t,t,'r-.'); axis([-2,2,-2,2]); grid on title('\lambda = 0'); subplot(2,2,3) t1= t - t.^3; y= t1 -t1.^3; plot(t,y,'k-',t,t,'r-.'); axis([-2,2,-2,2]); grid on title('\lambda = 1'); subplot(2,2,4) t1=1.5*t-t.^3; y= 1.5*t1 - t1.^3; plot(t,y,'k-',t,t,'r-.'); axis([-2,2,-2,2]); grid on title('\lambda = 3/2');