The Flying Mermaid: understanding parametric resonance

Multiple time scales, amplitude equations and a finite-time numerical threshold

Dynamical Systems
Asymptotic Methods
Mathematical Physics
I derived the leading-order resonance boundary for a periodically varying oscillator and compared it with numerical simulations.
Published

April 6, 2025

The problem began with a deliberately playful image: a mermaid pumping a swing until its motion became unstable. The mathematics behind it was a periodically varying oscillator. I wanted to understand how a small periodic modulation could produce a growing response, and how closely a finite simulation would follow the analytical instability threshold.

I used the method of multiple time scales to derive equations for the slowly changing amplitudes. Their behaviour led to the leading-order boundary

\[ \epsilon_c(\nu)=2|\nu-1|. \]

I then compared that boundary with numerical experiments. The simulations used a finite observation interval and an amplitude threshold, so the measured onset did not coincide with the asymptotic boundary. Extending the observation time improved the agreement in the reported experiments.

Original threshold plot with a V-shaped analytical boundary and a higher numerical curve for the 200-time-unit simulation.
Figure 1: Original comparison of the analytical boundary with the numerical threshold measured over an interval of length 200.

The periodically varying oscillator

The nondimensional equation in the report is

\[ \frac{d^2x}{d\tau^2}+\nu x+\epsilon\cos(2\tau)x=0. \tag{1}\]

The periodic term multiplies \(x\): it changes the coefficient of the displacement rather than appearing as a separate additive forcing. The investigation concerns small \(\epsilon\) and \(\nu\) close to \(1\), corresponding to the resonance setting used in the problem.

I introduced the fast and slow variables

\[ \tau_0=\tau,\qquad \tau_1=\epsilon\tau,\qquad \tau_2=\epsilon^2\tau,\quad\ldots \]

and expanded both the parameter and the solution:

\[ \nu=1+\epsilon\nu_1+\epsilon^2\nu_2+\cdots, \]

\[ x=x_0(\tau_0,\tau_1,\ldots) +\epsilon x_1(\tau_0,\tau_1,\ldots) +\epsilon^2x_2(\tau_0,\tau_1,\ldots)+\cdots. \]

The point of separating the time scales is to allow the oscillation at the fast scale to have an amplitude that evolves slowly. A fixed-amplitude leading solution would miss the growth that the calculation is trying to capture.

Expanding the derivatives

The chain rule gives

\[ \frac{d}{d\tau} =\frac{\partial}{\partial\tau_0} +\epsilon\frac{\partial}{\partial\tau_1} +\epsilon^2\frac{\partial}{\partial\tau_2}+\cdots, \]

and consequently

\[ \begin{aligned} \frac{d^2}{d\tau^2} ={}&\frac{\partial^2}{\partial\tau_0^2} +2\epsilon\frac{\partial^2}{\partial\tau_0\partial\tau_1}\\ &+\epsilon^2\left( \frac{\partial^2}{\partial\tau_1^2} +2\frac{\partial^2}{\partial\tau_0\partial\tau_2} \right)+O(\epsilon^3). \end{aligned} \]

Substituting the expansions into Equation 1 and collecting the leading terms yields

\[ \frac{\partial^2x_0}{\partial\tau_0^2}+x_0=0. \]

I wrote its real-valued solution as

\[ x_0=A(\tau_1)\cos\tau_0+B(\tau_1)\sin\tau_0, \tag{2}\]

suppressing the higher slow-time dependence to focus on the first-order calculation.

Removing the resonant terms

At order \(\epsilon\), the equation becomes

\[ \frac{\partial^2x_1}{\partial\tau_0^2}+x_1 =-2\frac{\partial^2x_0}{\partial\tau_0\partial\tau_1} -\nu_1x_0-\cos(2\tau_0)x_0. \]

With primes denoting differentiation with respect to \(\tau_1\), substituting Equation 2 gives

\[ \begin{aligned} \frac{\partial^2x_1}{\partial\tau_0^2}+x_1 ={}&2A'\sin\tau_0-2B'\cos\tau_0 -\nu_1A\cos\tau_0-\nu_1B\sin\tau_0\\ &-A\cos(2\tau_0)\cos\tau_0 -B\cos(2\tau_0)\sin\tau_0. \end{aligned} \]

The product terms contain both resonant and non-resonant frequencies. I used

\[ \cos\tau_0\cos2\tau_0 =\frac12(\cos\tau_0+\cos3\tau_0), \]

\[ \sin\tau_0\cos2\tau_0 =\frac12(\sin3\tau_0-\sin\tau_0). \]

Thus

\[ \begin{aligned} \frac{\partial^2x_1}{\partial\tau_0^2}+x_1 ={}&\left(2A'-\nu_1B+\frac B2\right)\sin\tau_0\\ &+\left(-2B'-\nu_1A-\frac A2\right)\cos\tau_0\\ &-\frac A2\cos3\tau_0-\frac B2\sin3\tau_0. \end{aligned} \]

The terms at frequency \(1\) resonate with the homogeneous solution for \(x_1\). Setting their coefficients to zero removes the secular terms and gives

\[ 2A'-\nu_1B+\frac B2=0, \qquad -2B'-\nu_1A-\frac A2=0. \]

The slow amplitude equations are therefore

\[ \boxed{ A'=\left(\frac{\nu_1}{2}-\frac14\right)B, \qquad B'=-\left(\frac{\nu_1}{2}+\frac14\right)A. } \tag{3}\]

The third-harmonic terms remain non-resonant at this order. The important result is that the slowly varying amplitudes are coupled even though the leading fast motion is sinusoidal.

Solving the amplitude system

Following the notation of the report, let

\[ \alpha=\frac{\nu_1}{2}-\frac14, \qquad \beta=\frac{\nu_1}{2}+\frac14. \]

Then

\[ A'=\alpha B,\qquad B'=-\beta A, \]

and differentiating the first equation gives

\[ A''+\alpha\beta A=0. \]

Oscillatory amplitudes

For \(\alpha\beta>0\), the report obtains

\[ A=C_1\cos(\sqrt{\alpha\beta}\,\tau_1) +D_1\sin(\sqrt{\alpha\beta}\,\tau_1), \]

and

\[ B=\frac1\alpha\left[ -\sqrt{\alpha\beta}\,C_1\sin(\sqrt{\alpha\beta}\,\tau_1) +\sqrt{\alpha\beta}\,D_1\cos(\sqrt{\alpha\beta}\,\tau_1) \right]. \]

Substituting these into \(x_0=A\cos\tau_0+B\sin\tau_0\) gives an oscillatory leading-order response. In this case, the slow amplitudes do not contain exponentially growing factors.

Exponential instability

For \(\alpha\beta<0\),

\[ A=C_2e^{\sqrt{-\alpha\beta}\,\tau_1} +D_2e^{-\sqrt{-\alpha\beta}\,\tau_1}, \]

and

\[ B=\frac{\sqrt{-\alpha\beta}}{\alpha} \left[ C_2e^{\sqrt{-\alpha\beta}\,\tau_1} -D_2e^{-\sqrt{-\alpha\beta}\,\tau_1} \right]. \]

The leading response now admits a growing exponential component. This is the mechanism described as the mermaid’s “flight” in the original problem: a small periodic change in the oscillator’s coefficient can lead to a large response over a sufficiently long interval.

Deriving the threshold

The sign change occurs when

\[ \alpha\beta =\left(\frac{\nu_1}{2}-\frac14\right) \left(\frac{\nu_1}{2}+\frac14\right) =\frac{\nu_1^2}{4}-\frac1{16}=0. \]

Hence

\[ |\nu_1|=\frac12. \]

The report separates the two regimes as

\[ |\nu_1|>\frac12\quad\Longrightarrow\quad\alpha\beta>0, \]

\[ |\nu_1|<\frac12\quad\Longrightarrow\quad\alpha\beta<0. \]

Using the first-order relation

\[ \nu\approx1+\epsilon\nu_1 \quad\Longrightarrow\quad \nu_1\approx\frac{\nu-1}{\epsilon}, \]

and setting \(\nu_1^2=1/4\) gives

\[ \epsilon_c(\nu)=2|\nu-1|. \tag{4}\]

This is the leading-order threshold derived near \(\nu=1\). The strict interior condition above describes the exponentially unstable amplitude regime; the equality identifies its boundary in this first-order calculation.

The physical interpretation in the report is that pumping near twice the natural frequency places the system near \(\nu=1\). There, the calculated threshold is small, so even a small modulation can produce growth in the idealised model. The fictional swing makes the mechanism memorable, but the mathematical result is the amplitude-system instability and its parameter dependence.

Comparing the analysis with numerical experiments

For the numerical part, I rewrote the second-order equation as two first-order equations and used Python’s solve_ivp. The report gives the following experimental procedure:

  1. Choose values of \(\nu\) near resonance, within \([0.95,1.05]\).
  2. Vary \(\epsilon\) within the reported interval \((0.01,0.3)\).
  3. Integrate over \(\tau\in[0,100]\).
  4. Check whether \(|x(\tau)|\) exceeds \(10^2\) during that interval.
  5. Record the corresponding forcing amplitude as the numerical threshold and compare it with Equation 4.
Oscillating displacement with increasing amplitude reaching the horizontal threshold of 100 near the end of the displayed simulation.
Figure 2: Original amplitude trace showing growth and the threshold of 100 used in the experiment.
A numerical critical-forcing curve above the V-shaped analytical curve for simulations of length 100.
Figure 3: Original analytical versus numerical threshold comparison for the interval from 0 to 100.

The numerical threshold in Figure 3 lies above the analytical line. The report attributes part of that discrepancy to finite observation time: a response may be growing without reaching the chosen amplitude threshold before the simulation ends.

I repeated the experiment over \(\tau\in[0,200]\). The numerical curve moved closer to the analytical boundary, as shown in Figure 1. It still did not coincide with it. The change is useful because it makes the distinction between an asymptotic growth condition and a finite-time detection criterion visible in the results.

Interpretation and limits

The investigation connects three levels of description. The original oscillator contains the periodic coefficient. The multiple-scales calculation reduces its near-resonant behaviour to the coupled amplitudes \(A\) and \(B\). The numerical experiments test when the growing motion becomes large enough to cross a chosen threshold.

The report concludes that the mermaid’s near-resonant pumping makes instability difficult to avoid in this idealised setting, with small forcing potentially delaying rather than eliminating visible growth. The threshold is a leading-order local result, and the numerical comparison depends on the finite simulation window and the amplitude criterion.

The most instructive part for me was the discrepancy between the two threshold curves. It forced me to ask what the numerical experiment was actually measuring. A calculation of the onset of instability and a simulation that waits for an amplitude of 100 are closely related, but they answer different questions.

Originally completed as part of MAM2040F · Ordinary Differential Equations, University of Cape Town, 2025.