This paper presents an approach using the method of separation of variables applied to 2D Helmholtz equations in the Cartesian coordinate. The solution is then computed by a series solutions resulted from solving a sequence of 1D problems, in which the 1D solutions are computed using pollution free difference schemes. Moreover, non-polluted numerical integration formulae are constructed to handle the integration due to the forcing term in the inhomogeneous 1D problems. Consequently, the computed solution does not suffer the pollution effect. Another attractive feature of this approach is that a direct method can be effectively applied to solve the tridiagonal matrix resulted from numerical discretization of the 1D Helmholtz equation. The method has been tested to compute 2D Helmholtz solutions simulating electromagnetic scattering from an open large cavity and rectangular waveguide.