  We consider quantum Hamiltonians of the form $H = H_0 - U \sum_j \cos(C_j)$
where $H_0$ is a quadratic function of position and momentum variables $\{x_1,
p_1, x_2, p_2,...\}$ and the $C_j$'s are linear in these variables. We allow
$H_0$ and $C_j$ to be completely general with only two restrictions: we require
that (1) the $C_j$'s are linearly independent and (2) $[C_j, C_k]$ is an
integer multiple of $2\pi i$ for all $j,k$ so that the different cosine terms
commute with one another. Our main result is a recipe for solving these
Hamiltonians and obtaining their exact low energy spectrum in the limit $U
\rightarrow \infty$. This recipe involves constructing creation and
annihilation operators and is similar in spirit to the procedure for
diagonalizing quadratic Hamiltonians. In addition to our exact solution in the
infinite $U$ limit, we also discuss how to analyze these systems when $U$ is
large but finite. Our results are relevant to a number of different physical
systems, but one of the most natural applications is to understanding the
effects of electron scattering on quantum Hall edge modes. To demonstrate this
application, we use our formalism to solve a toy model for a fractional quantum
spin Hall edge with different types of impurities.
