Analytical approximate solutions to oscillation of a current-carrying wire in a magnetic field