Given a function $f \colon (x,y,t)\mapsto f(x,y,t)$, suppose I obtain the relation
$$\frac{d f}{d t}= a \frac{dx}{dt} + b \frac{dy}{dt}$$
where $a\colon (x,t)\mapsto a(x,t)$ and $b\colon (y,t)\mapsto b(y,t)$ are functions of $x$ and $y$.
Since $f$'s total derivative is
$$\frac{df}{dt} = \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt}$$
I can subtract them
$$\left(a-\frac{\partial f}{\partial x}\right)\frac{dx}{dt} + \left(b-\frac{\partial f}{\partial y}\right)\frac{dy}{dt}=0$$
and deduce that
$$ a = \frac{\partial f}{\partial x} \quad \text{and}\quad b=\frac{\partial f}{\partial y}$$
have to hold for arbitrary $dx/dt$ and $dy/dt$. Is there a name for such a formulation, and/or general principles used here? For me, this popped up in thermodynamics.