A cannon ball is fired from a building of height h at the sea shore with a velocity v at an angle of a upwards from the horizontal, targeting a ship at a horizontal distance of S from the shore, as shown in the figure. If 'g' denotes the acceleration due to gravity, tan $\alpha$ governed by the quadratic equation is