Prevailing-frequency approximation of the coupling ray theory for electromagnetic waves or elastic S waves