A reliable algorithm for solving frequency equations involving transcendental functions