Newton's method for root finding
General case for deflection angle calculation