constrained derivative method