Update differentiation and add root finder