Exercises 3.1.d
Exercises 3.1.d
For:=r+-
x
x
2
x
1+x
i) Sketch the different vector field types that appear when you vary . We’re actually going to do this first the hard way, then the easier way.
r
Looking at the phase portrait for different values of we get the following. The red dashed line corresponds to the discontinuity at Red points are fixed points. Arrows indicate flows on the line.
r
x=-1.
In[]:=
finsol[r_]:=x/.NSolver+-0,x;GraphicsGridPartitionShowPlot#+-,{x,-5,6},AxesLabelEvaluate[Style[#,14]&/@{"x",""}],PlotLabel"r = "<>ToString[#],Graphics[{Dashed,Red,Thick,Line[{{-1,-12},{-1,7}}]}],If[Mean[Abs[Im[finsol[#]]]]>0,ListPlot[{{10,10}}],If[Min[finsol[#]]>-1,Show[{Graphics[Circle[{finsol[#][[1]],0},0.2]],Graphics[Disk[{finsol[#][[2]],0},0.2]]}],Show[{Graphics[Circle[{finsol[#][[1]],0},0.2]],Graphics[Disk[{finsol[#][[2]],0},0.2]]}]]],Graphics[{Thick,Arrow[#]}&/@If[Mean[Abs[Im[finsol[#]]]]>0,{{{-1,0},{-4,0}},{{-1,0},{4,0}}},If[Min[finsol[#]]>-1,{{{-1,0},{-4,0}},{{-1,0},{Min[finsol[#]],0}},{{Max[finsol[#]],0},{Min[finsol[#]],0}},{{Max[finsol[#]],0},{6,0}}},{{{-1,0},{6,0}},{{-1,0},{Max[finsol[#]],0}},{{Min[finsol[#]],0},{Max[finsol[#]],0}},{{Min[finsol[#]],0},{-5,0}}}]]],PlotRange{{-5,6},{-7,5}},AspectRatio1&/@{-1,-0.5,0,0.5,1,1.5,2.5,3,3.5},3,ImageSize1200,Spacings{-40,0},FrameAll
x
2
x
1+x
x
2
x
1+x
x
Out[]=
Note that there is a discontinuity at so there are arrows facing in opposite directions without having a fixed point in between.
x=-1,
Now taking the arrows and fixed points alone and plotting them as a vector field:
In[]:=
rv=Range[-1,3.5,0.4]Show[Table[Show[Graphics[{Dashed,Red,Thick,Line[{{-1,-12},{-1,7}}]}],If[Mean[Abs[Im[finsol[rv[[i]]]]]]>0,ListPlot[{{10,10}}],If[Min[finsol[rv[[i]]]]>-1,Show[{Graphics[Circle[{finsol[rv[[i]]][[1]],rv[[i]]},0.2]],Graphics[Disk[{finsol[rv[[i]]][[2]],rv[[i]]},0.2]]}],Show[{Graphics[Circle[{finsol[rv[[i]]][[1]],rv[[i]]},0.2]],Graphics[Disk[{finsol[rv[[i]]][[2]],rv[[i]]},0.2]]}]]],Graphics[{Thick,Arrow[#]}&/@If[Mean[Abs[Im[finsol[rv[[i]]]]]]>0,{{{-1,rv[[i]]},{-6,rv[[i]]}},{{-1,rv[[i]]},{6,rv[[i]]}}},If[Min[finsol[rv[[i]]]]>-1,{{{-1,rv[[i]]},{-6,rv[[i]]}},{{-1,rv[[i]]},{Min[finsol[rv[[i]]]],rv[[i]]}},{{Max[finsol[rv[[i]]]],rv[[i]]},{Min[finsol[rv[[i]]]],rv[[i]]}},{{Max[finsol[rv[[i]]]],rv[[i]]},{6,rv[[i]]}}},{{{-1,rv[[i]]},{6,rv[[i]]}},{{-1,rv[[i]]},{Max[finsol[rv[[i]]]],rv[[i]]}},{{Min[finsol[rv[[i]]]],rv[[i]]},{Max[finsol[rv[[i]]]],rv[[i]]}},{{Min[finsol[rv[[i]]]],rv[[i]]},{-6,rv[[i]]}}}]]],PlotRange{{-7.5,6},{-2.5,5}}],{i,Length[rv]}],AxesLabelEvaluate[Style[#,14]&/@{"x","r"}],AxesTrue,AxesOrigin{-7,-2}]
Out[]=
{-1.,-0.6,-0.2,0.2,0.6,1.,1.4,1.8,2.2,2.6,3.,3.4}
Out[]=
x
x
2
x
1+x
Thereisactuallyamucheasierwaytothinkaboutplottingthebifurcationdiagramthanthisthough.Remembertheequationis:
x
x
2
x
1+x
The fixed points are found by solving for =0. There are two solutions as it results in a quadratic equation.
x
In[]:=
x#&/@x/.Solver+-0,x
x
2
x
x+1
Out[]=
x1-2r-1-2r+
1
2
1-12r+4
,x2
r
1
2
1-12r+4
2
r
The critical values occur when we have only one solution and not two, which will happen when the term inside the square root is zero:
In[]:=
r#&/@(r/.Solve[1-12r+40,r]//Simplify)
2
r
Which happens when the x-values are:
In[]:=
xSimplify(1-2r)/.r->-(1-2r)/.r->+
1
2
3
2
2
,xSimplify1
2
3
2
2
Out[]=
x-1+
2
,x-1-2
So the (r,x) coordinates of the critical points are:
In[]:=
critpoints=-+
3
2
2
,-1+2
,3
2
2
,-1-2
;ListPlot[critpoints,PlotRange{{-2,4},{-6,6}},PlotStyle{Blue,PointSize[0.02]},AxesLabelEvaluate[Style[#,18]&/@{"r","x"}]]Out[]=
Now let's look at where the fixed points go to when r∞?
So this fixed point x -1 as r∞.
So this fixed point x 2-2r as r∞.
Try and do the same thing for r-∞. You should find exactly the same answers but reversed (ie. the first one will be the 2-2r and the second one will be the -1.)
Now put in the critical points, and the asymptotic behaviours of the fixed points as red lines for r±∞.
And now put it all together:
We still don’t know which ones of the lines are stable and which are unstable. Let’s take a particular value of r. Let’s take r=-1 and ask, for the two values of x, which one is stable and which is unstable. The two values of x are:
Plotting these on the bifurcation diagram, we are looking at:
We see that the gradient is negative just above the fixed point. Repeating just below, you will see that it’s positive. This tells us that this fixed point is stable. You can do the same thing for the other branches, and you will get:
Which is the normal form for a saddle node bifurcation. You can do the same thing for the other critical point and you will find the same thing.