BifurcationPlots`

Installation Instructions:

To install the package,  select File ▶ Install.... Set the Type of Item to Install to Package.  From the Source drop down, select File; the file chooser will open.  Navigate to the to the Bifurcations.m file and double-click on it.  The file chooser will now close.  Click on OK button to install.  The pacakge can now be loaded at any time by execuating

<<BifurcationPlots`

Basic Usage

Solve[c+(1-y) y==0,y]

Solve[c+(1-y) y==0,c]

Create the plot for the equation y'==c+(1-y) y:

BifurcationPlot3D[y (1 - y) + c, {c, -1, 1}, {y, -0.5, 1.5}]

Create the plot for the equation z'==c z+(z^2):

BifurcationPlot3D[c z +  (z^2), {c, -1,1}, {z, -1,1}]

Managing Equilibrium Curves

Automatic Methods

The default method uses Solve to automatically solve for the curves (manually added here for emphasis)

BifurcationPlot3D[d Cos[π z]- d^2 Sin[π z],{d,-1,1},{z,-2,2},EquilibriumCurves->Automatic]

Simply disable the drawing of the curves (the equilibrium plane is still drawn):

BifurcationPlot3D[d Cos[π z]- d^2 Sin[π z],{d,-1,1},{z,-2,2},EquilibriumCurves->None]

Using the fast numeric approximation:

BifurcationPlot3D[d Cos[π z]- d^2 Sin[π z],{d,-1,1},{z,-2,2},EquilibriumCurves ->"FastNumeric"]

Using the accurate numeric approximation:

BifurcationPlot3D[d Cos[π z]- d^2 Sin[π z],{d,-1,1},{z,-2,2}, EquilibriumCurves ->"AccurateNumeric"]

Manual Method

You can manually specify the curves.  In this case the value of EquilibriumCurves should be an ordered pair or a list of order pairs of the form {c, g[c]} or {h[z],z}, each giving a curve as graph in the in f==0 plane.  In this case:

BifurcationPlot3D[d Cos[π z]- d^2 Sin[π z],{d,-1,1},{z,-2,2}, 
EquilibriumCurves -> {{0,z},{d,-2+((ArcCot[d])/π)},{d,-1+((ArcCot[d])/π)},{d,((ArcCot[d])/π)},{d,1+((ArcCot[d])/π)},{d,2+((ArcCot[d])/π)}} 
]

A simpler example (compare with the first basic example):

BifurcationPlot3D[y (1 - y) + c, {c, -1, 1}, {y, -0.5, 1.5},EquilibriumCurves->{-y+y^2,y}]

Setting Styles

Change the style of the equilibirum curve:

BifurcationPlot3D[y + c CubeRoot[y],{c,-2,2},{y,-2,2},EquilibriumCurves->{{-CubeRoot[y]^2,y},{c,0}}, EquilibriumCurveStyle->Directive[Thick,Dashed,Cyan]]

Set the style of the f==0 plane:

BifurcationPlot3D[y + c CubeRoot[y],{c,-2,2},{y,-2,2},EquilibriumCurves->{{-CubeRoot[y]^2,y},{c,0}}, EquilibriumPlaneStyle->Directive[Opacity[.75],Cyan]]

Set the style of the curve giving the rate function at a given value of the parameter:

BifurcationPlot3D[y + c CubeRoot[y],{c,-2,2},{y,-2,2},EquilibriumCurves->{{-CubeRoot[y]^2,y},{c,0}}, RateFunctionCurveStyle->Directive[Dotted,RGBColor[0.57,0.95,0.75`],Thickness[0.05]]]

Set the style of the vertical plane:

BifurcationPlot3D[y + c CubeRoot[y],{c,-2,2},{y,-2,2},EquilibriumCurves->{{-CubeRoot[y]^2,y},{c,0}}, RateFunctionPlaneStyle->Purple]

The style of the rate function is controlled by the normal PlotStyle option:

BifurcationPlot3D[y + c CubeRoot[y],{c,-2,2},{y,-2,2},EquilibriumCurves->{{-CubeRoot[y]^2,y},{c,0}}, PlotStyle->Blue]

Other Options

All options to Plot3D are understood and used.

Change the plot range and box ratios:

BifurcationPlot3D[y(c-y^2),{c,-1,1},{y,-1,1}, PlotRange->All,BoxRatios->{1, 1, 1}]

Change the plot them and add custom labels:

BifurcationPlot3D[y(c-y^2),{c,-1,1},{y,-1,1}, PlotTheme->"Detailed",AxesLabel->{"Dependent variable", "Parameter", None}]