I'm going through some old engineering lecture notes. I've already spotted some errors in the notes. In an important part of a derivation, the lecturer did the following:
$Tds = du + pd(1/\rho)$
can be rewritten as
$T\nabla s = \nabla u + p\nabla(1/\rho)$
The equation is the second law of thermodynamics where s, u, p, and $\rho$ are the entropy, internal energy, pressure, and density: all scalars, and all state variables (that do not depend on the path taken to get from point a to point b).
I've seen similar transformations done for the material derivative:
$TDs/Dt = Du/Dt + pD(1/\rho)/Dt$
where
$Dg/Dt = \partial g/\partial t + \vec{u}\bullet\nabla g$
My question is:
When are these forms of taking a derivative interchangeable or not (for a scalar in 3D Cartesian space)? Or do you know of a handy online reference that explains it?
Take a more general case (still scalar variables):
If I can write,
$dg = (\partial g/\partial a)da + (\partial g/\partial b)db$
I get the sense that I can't just swap "d" for $\nabla$... about notation: let's stick with x,y,z as spatial coordinates, t is time, everything else is an arbitrary scalar, and $\vec u$ is a vector.