Exercises 3.1.a
Exercises 3.1.a
For:=r-cosh(x)
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.
r
In[]:=
finsol[r_]:=Select[{-ArcCosh[r],ArcCosh[r]},Head[#]Real&];GraphicsGridPartitionShowPlot[#-Cosh[x],{x,-5,6},AxesLabelEvaluate[Style[#,14]&/@{"x",""}],PlotLabel"r = "<>ToString[#]],Iffinsol[#]==={},ListPlot[{{10,10}}],IfMin[finsol[#]]<10,If#1,ShowGraphics[Circle[{0,0},0.2]],GraphicsDisk{0,0},0.2,,,Show[{Graphics[Circle[{finsol[#][[1]],0},0.2]],Graphics[Disk[{finsol[#][[2]],0},0.2]]}],Show[{Graphics[Disk[{finsol[#][[1]],0},0.2]],Graphics[Circle[{finsol[#][[2]],0},0.2]]}],If[finsol[#]==={},Graphics[{Thick,Arrow[{{3,0},{-3,0}}]}],{Graphics[{Thick,Arrow[{{Min[finsol[#]]-0.2,0},{-3,0}}],Arrow[{{Min[finsol[#]]+0.2,0},{Max[finsol[#]]-0.2,0}}],Arrow[{{3,0},{Max[finsol[#]]+0.2,0}}]}]}],PlotRange{{-3,3},{-3,3}},AspectRatio1&/@Range[0.5,3.5,0.5],3,ImageSize1200,Spacings{-10,0},FrameAll
x
π
2
-π
2
Out[]=
Now taking the arrows and fixed points alone and plotting them as a vector field:
In[]:=
rv=Range[0.5,4.5,0.5]vfp=ShowShowIffinsol[#]==={},ListPlot[{{10,10}}],IfMin[finsol[#]]<10,If#1,ShowGraphics[Circle[{0,#},0.2]],GraphicsDisk{0,#},0.2,,,Show[{Graphics[Circle[{finsol[#][[1]],#},0.2]],Graphics[Disk[{finsol[#][[2]],#},0.2]]}],Show[{Graphics[Disk[{finsol[#][[1]],#},0.2]],Graphics[Circle[{finsol[#][[2]],#},0.2]]}],If[finsol[#]==={},Graphics[{Thick,Red,Arrow[{{3,#},{-3,#}}]}],{Graphics[{Thick,Red,Arrow[{{Min[finsol[#]]-0.2,#},{-3,#}}],Arrow[{{Min[finsol[#]]+0.2,#},{Max[finsol[#]]-0.2,#}}],Arrow[{{3,#},{Max[finsol[#]]+0.2,#}}]}]}],AspectRatio1&/@rv,PlotRange{{-3,3},{0,5}},AspectRatio1,AxesLabelEvaluate[Style[#,14]&/@{"x","r"}],AxesTrue
π
2
-π
2
Out[]=
{0.5,1.,1.5,2.,2.5,3.,3.5,4.,4.5}
Out[]=
We get the bifurcation diagram by rotating this whole plot above:
In[]:=
Show[vfp/.Arrow[{{a_,b_},{c_,d_}}]Arrow[{{b,a},{d,c}}]/.Circle[{a_,b_},c_]Circle[{b,a},c]/.Disk[{a_,b_},c__]Disk[{b,a},c],PlotRange{{0,5},{-3,3}}]/.{"x""r","r""x"}
Out[]=
We can actually find these fixed points and thus the bifurcation diagram more simply. We need to solve =r-cosh(x)=0.So the fixed points occur at:
x
In[]:=
{xArcCosh[r],x-ArcCosh[r]}
Out[]=
{xArcCosh[r],x-ArcCosh[r]}
We can plot these fixed points and this gives us
In[]:=
{{xArcCosh[r]},{x-ArcCosh[r]}}Plot[Evaluate[x/.%],{r,-6,6},AxesLabelEvaluate[Style[#,16]&/@{"r","x"}],PlotRange{{-1,5},{-3,3}},AspectRatio1,PlotStyleBlue]
Out[]=
{{xArcCosh[r]},{x-ArcCosh[r]}}
Out[]=
We actually already have whether the fixed points are stable or unstable from the vector field plot above, so let’s put these on:
In[]:=
{{xArcCosh[r]},{x-ArcCosh[r]}}Plot[Evaluate[x/.%],{r,-6,6},AxesLabelEvaluate[Style[#,16]&/@{"r","x"}],PlotRange{{-1,5},{-3,3}},AspectRatio1,PlotStyle{Blue,{Blue,Dashed}}]
The critical point is when the two solutions are the same (when we go from no fixed points, to one, to two):