After the time periodicity is removed from the problem, the spatial distribution of internal waves in a stratified fluid is governed by a hyperbolic equation. With boundary conditions specified all along the perimeter of the domain, information is transmitted in both directions (forward and backward) along every characteristic, and, unlike the typical temporal hyperbolic equation, the internal-wave equation is not amenable to a simple forward integration. The problem is tackled here with a finite-difference, relaxation technique by constructing a time-dependent, dissipative problem, the final steady state of which yields the solution of the original problem. Attempts at solving the problem for arbitrary topography then reveal multiple resonances, each resonance being caused by a ray path closing onto itself after multiple reflections. The finite-difference formulation is found to be a convenient vehicle to discuss resonances and to conclude that their existence renders the problem not only singular but also extremely sensitive to the details of the topography. The problem is easily overcome by the introduction of friction. The finite-difference representation of the problem is instrumental in serving as a guide for the investigation of the resonance problem. Indeed, it keeps the essence of the continuous problem and yet simplifies the analysis enormously. Although straightforward, robust and successful at providing a numerical solution to a first few examples, the relaxation component of the integration technique suffers from lack of efficiency. This is due to the particular nature of the hyperbolic problem, but it remains that numerical analysts could improve or replace the present scheme with a faster algorithm.