TITLE: How much can one say about this differential equation?
QUESTION [11 upvotes]: Consider the ODE $y^{\prime \prime}(x) = \cos(x) y(x)$ with boundary value conditions $y(0)=1$, $y(1)=2$. Solving it results in a linear combination of Mathieu functions, but what I find more interesting is its graph. So, the questions are:

Is there really a phase transition around 300?
What is the envelope of the graph? That is, are the maxima/minima growing exponentially, or does something else occur?
Is the oscillating part actually periodic (which one would guess from the cos term)?

In general, what qualitative methods are there for answering these questions? I am sure the actual Mathieu function has been studied extensively, but just using its specific properties seems too "rigid".

REPLY [16 votes]: I would guess that you are just seeing the effects of a dynamical system with a hyperbolic fixed point.  Consider the matrix equation
$$
A'(x) = \begin{pmatrix} 0 & 1\\ \cos(x) & 0\end{pmatrix} A(x)
$$
with initial condition $A(0) = I_2$.  Because of the $2\pi$-periodicity of $\cos(x)$, this fundamental solution clearly satisfies
$$
A(x+2\pi) = A(x)A(2\pi)
$$
where 
$$
A(2\pi)\approx \begin{pmatrix} -8.065 & -8.273\\   -7.742 & -8.065\end{pmatrix},
$$
a matrix that has eigenvalues $\lambda\approx -16.068$ and $1/\lambda\approx -0.062$.  (Note that the ratio of the eigenvalues is about $\lambda^2 \approx 258$.)  The action of $A(2\pi)$ on $\mathbb{R}^2$ is hyperbolic, contracting along the $1/\lambda$-eigenspace
and expanding along the $\lambda$-eigenspace.
Now, the general solution of your equation satisfies
$$
\begin{pmatrix}y(x)\\y'(x)\end{pmatrix}
= A(x)\begin{pmatrix}y(0)\\y'(0)\end{pmatrix},
$$
so 
$$
\begin{pmatrix}y(x+2k\pi)\\y'(x+2k\pi)\end{pmatrix}
= A(x)A(2\pi)^k\begin{pmatrix}y(0)\\y'(0)\end{pmatrix},
$$
and if the initial condition is very near (but does not lie in) the $1/\lambda$-eigenspace of $A(2\pi)$, it will take a few cycles of $2\pi$ for the very small $\lambda$-eigenvector component to grow, but once it does, it will become exponentially dominant. I'm guessing that your boundary values just happen to have hit on such an initial condition.

REPLY [11 votes]: All these questions are basically answered by Floquet theory. The envelope is an exponential, and there is nothing special going on at 300, what you are seeing is just
exponential growth, and on the scale on which you are plotting everything less that $10^{49}$ just looks like zero.