Bifurcation Diagram Generator
Bifurcation Diagram Generator generates a bifurcation diagram for a differential equation \\( x’ = f(x, r) \\) by plotting stable states versus parameter \\( r \\), using RK4 for numerical integration, MathJax for steps, and p5.js for visualization.
Bifurcation Diagram Generator
Bifurcation Diagram Generator creates a bifurcation diagram for a differential equation \\( x’ = f(x, r) \\) by plotting stable states against the parameter \\( r \\). Input the ODE, parameter range, initial condition, time span, and number of points to see the diagram with MathJax-rendered steps and p5.js visualization. Results are copyable, with sharing and embedding options for dynamical systems students.
Example 1: Pitchfork Bifurcation
ODE: \\( x’ = r x – x^3 \\), Parameter Range: \\([-2, 2]\\), Initial: \\( x(0) = 0.1 \\), Time Span: 10.
Step 1: Define the system.
\\( x’ = r x – x^3 \\), \\( r \in [-2, 2] \\), \\( x(0) = 0.1 \\), iterate for \\( t = 10 \\).
Step 2: Numerical integration.
For each \\( r \\), solve using RK4 to find stable states after transient behavior.
Step 3: Identify stable points.
For \\( r < 0 \\), one stable fixed point at \\( x = 0 \\).
For \\( r > 0 \\), two stable fixed points at \\( x = \pm \sqrt{r} \\), one unstable at \\( x = 0 \\).
Step 4: Plot bifurcation diagram.
Plot stable \\( x \\) versus \\( r \\). (See graph.)
Step 5: Conclusion.
The diagram shows a pitchfork bifurcation at \\( r = 0 \\).
Example 2: Logistic Growth
ODE: \\( x’ = r x (1 – x) \\), Parameter Range: \\([0, 4]\\), Initial: \\( x(0) = 0.1 \\), Time Span: 10.
Step 1: Define the system.
\\( x’ = r x (1 – x) \\), \\( r \in [0, 4] \\), \\( x(0) = 0.1 \\), iterate for \\( t = 10 \\).
Step 2: Numerical integration.
For each \\( r \\), solve using RK4 to find stable states.
Step 3: Identify stable points.
For \\( 0 < r < 1 \\), stable fixed point at \\( x = 0 \\).
For \\( 1 < r < 3 \\), stable fixed point at \\( x = 1 - \frac{1}{r} \\).
For \\( r > 3 \\), periodic or chaotic behavior may emerge.
Step 4: Plot bifurcation diagram.
Plot stable \\( x \\) versus \\( r \\). (See graph.)
Step 5: Conclusion.
The diagram shows bifurcations at \\( r = 1 \\) and period-doubling at \\( r \approx 3 \\).