using differentiation including higher order derivatives