# Hopf bifurcations

from Red Blob Games
28 Sep 2020

I’m watching Prof Ghrist’s lectures to learn about Hopf bifurcation.

I put it into Andrei Kashcha’s vector field visualization tool: Hopf with subcritical and Hopf with supercritical.

```// p.x and p.y are current coordinates
// v.x and v.y is a velocity at point p
vec2 get_velocity(vec2 p) {
// hopf bifurcation
float m = 1.0;
float w = 1.0;
float c = -1.0;
float r2 = dot(p, p);
return vec2(
m * p.x - w * p.y + c * p.x * r2,
w * p.y + m * p.x + c * p.y * r2
);
}
```

I posted the video to Twitter.

My notes from the videos:

## 1  10.1: A New Bifurcation#

Video

The Hopf Bifurcation is an example of a bifurcation that does not behave separately on the two dimensions, but both dimensions work together in an inseparable way.

Equations:

• dx/dt = μx - ωy + cx(x² + y²)
• dy/dt = ωx + μx + cy(x² + y²)

where c, ω are constants and μ is a parameter. {This seems a little weird to me because μ and ω look like they’re doing the same types of things, so why aren’t both of them parameters?}

He then analyzes the pair of equations by writing it in matrix form and finding the eigenvalues.

• if μ < 0: spiral sink
• if μ > 0: spiral source
• at μ = 0: bifurcation

### 1.1 10.2 Birth of a Limit Cycle

Video

In matrix form you can see that there’s a rotation, so convert the equation into polar coordinates. After following some algebra, it simplifes a lot!

• dr/dt = μr + cr³
• dθ/dt = ω

This is nice because now these two parameters are independent of each other.

• θ: it’s spinning at a constant rate
• r: solve for equilibria: dr/dt = 0 → r = 0 OR r = √(-μ/c)

When c = -1: unstable equilibrium at r = 0, stable equilibrium at r = √(-μ/c). This an attracting periodic orbit.

When c = +1:

### 1.2 10.3 Supercritical vs Subcritical Hopf

Video

Relates this to the pitchfork bifurcation. {I haven’t watched that chapter yet.}

• supercritical: when c < 0, stable periodic orbit, safe in that if you go from stable to orbit and then reduce parameter μ you get back to a stable position
• subcritical: when c > 0, unstable periodic orbit, unsafe in that if you go from stable to orbit and then reduce parameter μ you may never get back to stability

Really beautiful graphics in this video.

### 1.3 10.4 Example of a Hopf

Video

Example chemistry model

• dx/dy = 1 - (b+1)x + ax²y
• dy/dt = bx - ax²y

Calculates the equilibrium to be at x = 1, y = b/a.

Then he calculates the partial derivative matrix and its determinant and trace, and shows that there’s a Hopf bifurcation in there. {I don’t understand this because I haven’t yet watched the earlier videos.}

He says there are lots of examples of Hopf bifurcations in nature! But it’s hard to figure out whether they’re supercritical or subcritical.

### 1.4 10.5 A Super/Sub Criterion for Hopfs

Video

Do you care whether a Hopf bifurcation is supercritical or subcritical? Yes! Here’s how to figure it out:

1. Translate the system to put the origin at the bifurcation point.
2. Rewrite the system into a particular form, separating the linear from higher order portions.
3. Evaluate partial derivatives at the origin. Long ugly formula.
4. If you get a negative number, it’s supercritical; if you get a positive number, subcritical.

### 1.5 Thoughts

I understood parts of this but I think I need to go back through previous chapters to really understand the analysis.

But I don’t need the analysis to be able to play with the visualization!

Email me , or tweet @redblobgames, or comment: