Block diagonalization of a symmetric 4$\times$4 matrix. I have a symmetric 4$\times$4 matrix, A. I need to find it's eigenvalues. The elements are not purely numerical: some elements are exponential functions and so it's extremely difficult to find the eigenvalues using the typical characteristic equation approach.
(Will Jagy): Here is a 4 by 4 matrix. Edit in the actual entries (Thank you,  Will!)
The 4 by 4 matrix I'm trying to block diagonalise looks like this:
$$
A =
\begin{bmatrix}e^{2x+y} & 1 & 1 & e^{-2x+y} \\
1 & e^{2x-y} & e^{-2x-y} & 1 \\
1 & e^{-2x-y} & e^{2x-y} & 1 \\
e^{-2x+y} & 1 & 1 & e^{2x+y} \\
\end{bmatrix}
$$
It's quite nasty to deal with: directly calculating the eigenvalues through computer algebra software gives a very nasty answer which doesn't lend well to any analytic uses.
I also have a unitary matrix S, which looks like the following:
$$
S =
\begin{bmatrix}0 & 0 & 0 & 1 \\
0 & 0 & 1 & 0 \\
0 & 1 & 0 & 0 \\
1 & 0 & 0 & 0 \\
\end{bmatrix}
$$
Clearly, SA = AS. I know that somehow, I need to block diagonalise A in order to proceed.
How is this kind of block diagonalization typically performed?
Thanks for reading!
Edit: matrices added!
 A: Take $p = e^{2x}$ and $q = e^y.$  Your matrix now has some fractions, so we multiply through by $pq,$ getting
$$
pqA =
\left(
\begin{array}{cccc}
p^2 q^2 & pq & pq & q^2 \\
pq & p^2 & 1 & pq \\
pq & 1 & p^2 & pq \\
q^2 & pq & pq & p^2 q^2 \\
\end{array}
\right)
$$
The characteristic polynomial of this matrix, variable called $t,$ is
$$  \left( t - (p^2 -1) \right)   \left(t - q^2  (p^2 -1)\right)    \left(  t^2 - (p^2 + 1)(q^2 + 1)  t + q^2  (p^2 - 1)^2    \right) $$
We need the quadratic formula to get two of the eigenvalues. 
One quick way is to notice that adding $(1 - p^2)I$ to the matrix makes the two middle rows equal, same as subtracting $(p^2 - 1)I,$ so $p^2 - 1$ is an eigenvalue. Analogous, adding $(q^2 - p^2 q^2)I$ to the matrix makes the first and fourth rows identical, so $p^2 q^2 - q^2= q^2(p^2-1)$ is an eigenvalue.
A: Thanks to my dissertation supervisor's much welcomed advice, I've found a really nice way to calculate the eigenvalues of the matrix. Block diagonalization is the way after all! The technique itself is super cool, so I wanted to share it.
The first step is to calculate the eigenvectors of S and use them to form the following matrix:
$$
\textbf{T} =
\begin{bmatrix}-1 & 0 & 0 & 1 \\
0 & -1 & 1 & 0 \\
0 & 1 & 1 & 0 \\
1 & 0 & 0 & 1 \\
\end{bmatrix}
$$
Calculating the inverse of T provides the following:
$$
\textbf{T}^{-1} =
\begin{bmatrix}-\frac{1}{2} & 0 & 0 & \frac{1}{2} \\
0 & -\frac{1}{2} & \frac{1}{2} & 0 \\
0 & \frac{1}{2} & \frac{1}{2} & 0 \\
\frac{1}{2} & 0 & 0 & \frac{1}{2} \\
\end{bmatrix}
$$
By the properties of matrix similarity, it follows that $\textbf{T}^{-1
}\textbf{A}\textbf{T}$ will have the same eigenvalues as just A. A fantastic coincidence is that the result of $\textbf{T}^{-1
}\textbf{A}\textbf{T}$ is also a $4\times4$ block-diagonalisable matrix, which means that calculating the eigenvalues is as simple as solving the simpler characteristic equations of the $2\times2$ matrices compromising the blocks.
$$
\textbf{T}^{-1
}\textbf{A}\textbf{T} =
\begin{bmatrix}
e^{2x+y} - e^{-2x+y} & 0 & 0 & 0 \\
0 & e^{2x-y} - e^{-2x-y} & 0 & 0 \\
0 & 0 & e^{2x-y} - e^{-2x-y} & 2 \\
0 & 0 & 2 & e^{2x+y} + e^{-2x+y} \\
\end{bmatrix}
$$
The eigenvalues are now a lot easier to calculate.
