The derivative of a tensor-valued function of a tensor