Anyway, taking a derivative with respect to a product, or any expression, is perhaps best thought of as making a new variable to represent the expression, doing the substitution, taking the derivative with respect to the substituted variable, and then substituting back