Differentiation of the auxiliary function