Finite elements for short wave scattering problems have recently been developed by various authors. These have almost exclusively dealt with the Helmholtz equation. The elements have been very successful, in terms of drastic reductions of the number of degrees of freedom in the numerical model. However, most of them are not directly applicable to problems in which the wave speed is not constant, but varies with position. Many important wave problems fall into this latter category. This is because short waves are often present in materials whose properties vary in space. The present paper demonstrates how the method may be extended so as to deal with problems in which the wave speed is piecewise constant, in various regions of the problem domain. Lagrange multipliers are used to enforce the necessary conditions of compatibility between the different regions. The paper gives numerical results, for problems for which the analytical solution is known. This shows how these methods may be extended, in a relatively simple fashion, to solve a much larger class of wave problems, of great practical interest.