Newton method, Derivation