%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); figure(1) %Call up figure 1 for plotting subplot(2,2,1) %Creates a 2x2 array of plots in figure 1 y= -t - t.^3; plot(t,y,'k-',t,t,'r-.'); axis([-2,2,-2,2]); grid on title('\lambda = -1'); subplot(2,2,2) y= -t.^3; plot(t,y,'k-',t,t,'r-.'); axis([-2,2,-2,2]); grid on title('\lambda = 0'); subplot(2,2,3) y= t -t.^3; plot(t,y,'k-',t,t,'r-.'); axis([-2,2,-2,2]); grid on title('\lambda = 1'); subplot(2,2,4) y= 1.5*t - t.^3; plot(t,y,'k-',t,t,'r-.'); axis([-2,2,-2,2]); grid on title('\lambda = 3/2');