I'm looking for a function $f(x, r)$ that bifurcates to give $n$ number of solutions suddenly at $r > 0$, and $0$ solutions if $n$ is even or $1$ solution if $n$ is odd for $r < 0$. For example:
- 2 branches(saddle node): $f(x, r) = r - x^2$
- 3 branches(pitchfork): $f(x, r) = rx - x^3$
- 4 branches: $f(x, r) = -1 + (r+2)x^2 - x^4$
- 5 branches: $f(x, r) = -x + (r+2)x^3 - x^5$
The last two I found mainly by trial and error.
Any help would be greatly appreciated, and thank you in advance!