Issue with Bifurcation Plot for Driven Pendulum I'm trying to create a bifurcation plot for a driven damped pendulum. In particular, I'm trying to recreate the plot found in Taylor's 'Classical Mechanics' (page 484) for a driving strength $\gamma$ in the range $1.060 \leq \gamma \leq 1.087$: 

I believe I have the code down and I can reproduce the main properties of the plot, however for $\gamma \geq 1.081$ the points shift down a couple of units which causes a large discontinuity. I'd appreciate any help on the matter. I've attached an image of my result below.

 A: Without more details it's hard to answer precisely, but two possibilities are:


*

*As the maximum amplitude increases, some numerical angle normalization makes a jump with no meaning (e.g., from $2\pi$ to $4\pi$) - that might very well be the case here, if "End Position" in your plot is normalized by $2\pi$.

*This system exhibits multistability (i.e., it can have more than one stable final state, for a given set of parameter values) and which state is reached depends on which basin of attraction the initial condition belongs to. As $\gamma$ is varied, the boundary between different basins moves in phase space, and the fixed initial condition being used to construct the bifurcation diagram might suddenly find itself on a different basin at a certain $\gamma^*$: in this way, the diagram shows the bifurcations of attractor $A$ for $\gamma<\gamma^*$, and of attractor $B$ afterwards.


Perhaps supporting this second possibility are the following diagrams found in the web:


*

*Kinchin & Mullens' Damped Driven Pendulum Project:





*

*Gasenzer's The chaotic physical pendulum:


*LeBailly's Master thesis:



*

*Rinberg's Chaos Pendulum Lab report:



A: I was also having a problem generating a bifurcation diagram for this system, with small pieces and even an entire branch missing. Mysteriously, my Poincare sections were just not catching everything. While it looks like you were having a mod pi issue, it turns out there are also 3 distinct attractors, so 3 different basins of attraction: stafusa was correct on both counts, this system exhibits multi-stability. In fact, the basins of attraction turn out to have the Wada property: https://www.nature.com/articles/s41598-018-28119-0
After testing out enough initial conditions, I managed to generate a fairly complete diagram. (I think the basins are changing shape, though, so it's still missing a few tiny bits.) Gasenzer's plot appears to be the most accurate. Here's a larger version of Gasenzer's, as well as the plot of theta v.s. A:


If you are or anyone else is interested in the Matlab code, feel free to contact me. It also works for things like Duffing, Rossler, etc.
