Computation of Resonance Tongues of Mathieu Equation

Mathieu equation is a classical example of a linear periodic second order ODE where the periodic forcing induces the (hyperbolic) instability of a previously (elliptically) stable fixed point through the phenomenon of parametric resonance.

There are several formulations of the equation. A possible choice is

\[ x'' + (a-b \cos(t))x=0 \]

where \(a,b\) are real parameters: \(a\) may be called the energy (by analogy with Schrödinger operators) and \(b\) the coupling constant. Mathieu equation is part of a more general family of equations called Hill’s equations, see the book by Magnus and Winkler.

A common diagram when studying these equations is the plot of resonance tongues (see Broer and Levi for historical references on these diagrams. This represents closure of the set of values of \((a,b)\) in the parameter space where the Mathieu equation does not have any bounded solution apart from the trivial one.

Thanks to Floquet theory for linear periodic ODEs and the conservative character of the equation, this is equivalent to the condition \(|\text{trace}(X(2\pi,a,b))|>2\), where \(X\) is the fundamental solution of the ODE problem

\[ X' \begin{pmatrix} 0 & 1 \\ -a+b\cos{t} & 0 \end{pmatrix} X, \quad X(0)=Id. \]

The most straightforward way to plot this parametric plot is to create a function which computes the trace function for a given pair \((a,b)\) (using the standard algorithms implmented in SciML/DifferentialEquations) and return it

using DifferentialEquations, LinearAlgebra

function mathieu_trace(a,b)

    A0=zeros(2,2);A0[1,2]=1     #Define the matrix
    A1=zeros(2,2); A1[2,1]=1
    u = Matrix(I, 2, 2)         #Initial condition

    f(u,p,t) = (A0-p(t)*A1)*u   # Define the ODE
    prob = ODEProblem(f,u,(0,2*pi),t -> (a-b*cos(t)))

    sol = solve(prob,save_everystep=false) # Value in 2π
    tr(sol.u[2])                #u[2] is X(2π)
end

In the code above, f is a function which takes p, a function, as an argument and in the next line we pass it as an anonymous function.

We will now simply plot the tongues for a range of values. Increasing the number of points in each axis the set of tongues looks more neat.

using Plots
a=0:0.01:10
b=0:0.01:10        # May take a while
plot(a,b,(x,y)->abs(mathieu_trace(x,y))>2,st=:contour,fill = true,colorbar_entry=false,c=cgrad([:white, :black]))
savefig("resonance-tongues.svg")

Resonance tongues for Mathieu Equation

This page was generated using Literate.jl.