Oddball question: say I want to travel from $(a, b)$ where $b > 0$ to $(c, d)$ where $d < 0$ using the shortest path, where I can travel at velocity $v_1$ in the upper half-plane and at velocity $v_2$ in the lower half-plane. (E.g., a light ray would take this path.) Where should I cross the $x$ axis? I want an explicit formula in terms of $a$, $b$, $c$, $d$, $v_1$ and $v_2$.
On the surface this is a "stupid calculus question" (take the derivative and set to zero) but the calculus approach led me to the fourth-degree equation
$$V_1^2((x−c)^2 +d^2)(x−a)^2 =V_2^2((x−a)^2 +b^2)(x−c)^2$$
where $V_1 = 1/v_1$, $V_2 = 1/v_2$. (Seems to be more convenient to work with the inverse velocities, $V_1$ and $V_2$ than with $v_1$ and $v_2$.) A fourth-degree equation can theoretically be solved but I didn't have the heart to do it... I'm hoping that either: (a) someone has already done it; (b) there's a simplification that I'm overlooking; or (c) someone has a computer algebra package that will crunch through it and deliver a nice analytic solution.
PS: I'm aware that the above equation can be used to prove the law of refraction, but that's not what I want; I want to find the actual solution $x$.