Periodic solutions of $x'' = Ax$, with matrix $A$. $x'' = Ax$. Let $A = \begin{pmatrix}
1 & 1\\
0 & \epsilon
\end{pmatrix}$.
Find $\epsilon$ such that it has periodic solution. I don't know what are the conditions that the matrix has to meet?
 A: for periodic solution of $x$ and $y$ we need to have $\epsilon =-a^2$, where $a$ is real.
The two equations are $\frac{d^2x}{dt^2}-x=y, \frac{d^2y}{dt^2}=-a^2y$.
The second Eq. has the well known periodic solution as $y=A \sin at+ B\cos at$
Inserting it in the first one we get
$\frac{d^2x}{dt^2}-x=A \sin at +B \cos at$.
$\implies (D^2-1)x=A \sin at + B\cos at.$
$\implies x=\frac{A \sin at+ B \cos at}{-a^2-1},$
the periodic solution.
A: Here is a neat approach from a linear algebra perspective.
If $\epsilon\neq 1$ your matrix $A$ has a well$-$defined square root, namely $\sqrt{A}=P\begin{pmatrix}1&0\\ \:0&\sqrt{\epsilon }\end{pmatrix}P^{-1}$ with $P$ being the $2\times 2$ matrix $P=\begin{pmatrix}1&1\\ \:0&\epsilon-1\end{pmatrix}$.
So for $\epsilon\neq 1$ the general solution to $x''=Ax$ is $$x(t)=e^{t\sqrt{A}}\vec{c}_1+e^{-t\sqrt{A}}\vec{c}_2$$ where $\vec{c}_1,\vec{c}_2\in \mathbb{R}^2$ are your "arbitrary constants."
If we prescribe $x(0)=c\begin{pmatrix}1\\ \epsilon-1\end{pmatrix}\in \text{span} \begin{pmatrix}1\\ \epsilon-1\end{pmatrix}$ and $x'(0)=\vec{0}$ for some $c\neq 0$ fixed, its not hard to show that $$x(t)=c\left(\frac{e^{t\sqrt{\epsilon}}+e^{-t\sqrt{\epsilon}}}{2}\right)\begin{pmatrix}1\\ \epsilon-1\end{pmatrix}$$ If $\epsilon<0$ the above reduces to $$x(t)=c \cos\left(t\sqrt{-\epsilon}\right)\begin{pmatrix}1\\ \epsilon-1\end{pmatrix}$$ which is periodic.
A: A linear ordinary differential equation $z'=Fz$ has a periodic solution if the eigenvalues of $F$ lie on the imaginary axis (with multiplicity 1).
Now, let us consider the following state-space variables for your question:
$z_1=x, \qquad z_2=x'$
Then, we have:
$z^\prime_1 = z_2 \\ z^\prime_2=Az_1$
Re-write in compact form:
$z^\prime = \underbrace{\left[ \begin{matrix} 0 & I \\ A & 0 \end{matrix} \right]}_{\triangleq F} z$
So, a periodic solution exists if all the eigenvalues of $F$ lie on the imaginary axis. However, if the matrix $A$ is in the form you provided, then there are always two eigenvalues located at $\lambda_1=-1$ and $\lambda_2=1$ whatever the value of $\epsilon$ is. Yet, the other two eigenvalues become complex conjugate with zero real part if $\epsilon<0$. So, you may have a periodic solution if the initial condition lies on the eigenvector corresponding to complex conjugate eigenvalues.
