Solve the Schrödinger equation with periodic potential:
By the Bloch theorem, solutions are bounded provided is within an energy band. The energy gap corresponds to a range of where MathieuCharacteristicExponent has a non-vanishing imaginary part:
This shows the stability diagram for the Mathieu equation: