It is well known that although the usual harmonic ansatz of geometrical opt
ics fails near a caustic, uniform expansions can be found which remain vali
d in the neighborhood of the caustic, and reduce asymptotically to the usua
l geometric field far enough from it. Such expansions can be constructed by
several methods which make essentially use of the symplectic structure of
the phase space. In this paper we efficiently apply the Kravtsov-Ludwig met
hod of relevant functions, in conjunction with Hamiltonian ray tracing to d
efine the topology of the caustics and compute high-frequency scalar wave f
ields near smooth and cusp caustics. We use an adaptive Runge-Kutta method
to successfully retrieve the complete ray field in the case of piecewise sm
ooth refraction indices. We efficiently match the geometric and modified am
plitudes of the multi-valued field to obtain numerically the correct asympt
otic behavior of the solution. Comparisons of the numerical results with an
alytical calculations in model problems show excellent accuracy in calculat
ing the modified amplitudes using the Kravtsov-Ludwig formulas.