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)
=zeros(2,2);A0[1,2]=1 #Define the matrix
A0=zeros(2,2); A1[2,1]=1
A1= Matrix(I, 2, 2) #Initial condition
u
f(u,p,t) = (A0-p(t)*A1)*u # Define the ODE
= ODEProblem(f,u,(0,2*pi),t -> (a-b*cos(t)))
prob
= solve(prob,save_everystep=false) # Value in 2π
sol 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
=0:0.01:10
a=0:0.01:10 # May take a while
bplot(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")
This page was generated using Literate.jl.