  A convergence theory for the $hp$-FEM applied to a variety of
constant-coefficient Helmholtz problems was pioneered in the papers
[Melenk-Sauter, 2010], [Melenk-Sauter, 2011], [Esterhazy-Melenk, 2012],
[Melenk-Parsania-Sauter, 2013]. This theory shows that, if the solution
operator is bounded polynomially in the wavenumber $k$, then the Galerkin
method is quasioptimal provided that $hk/p \leq C_1$ and $p\geq C_2 \log k$,
where $C_1$ is sufficiently small, $C_2$ is sufficiently large, and both are
independent of $k,h,$ and $p$. The significance of this result is that if
$hk/p= C_1$ and $p=C_2\log k$, then quasioptimality is achieved with the total
number of degrees of freedom proportional to $k^d$; i.e., the $hp$-FEM does not
suffer from the pollution effect. This paper proves the analogous
quasioptimality result for the heterogeneous (i.e. variable-coefficient)
Helmholtz equation, posed in $\mathbb{R}^d$, $d=2,3$, with the Sommerfeld
radiation condition at infinity, and $C^\infty$ coefficients. We also prove a
bound on the relative error of the Galerkin solution in the particular case of
the plane-wave scattering problem. These are the first ever results on the
wavenumber-explicit convergence of the $hp$-FEM for the Helmholtz equation with
variable coefficients.
