I am reading about Polytropic processes in Thermodynamics where the governing equation is $pV^n =$ constant.
The author of the book wants to derive an expression and describes that he is taking the natural log of both sides and differentiating. He does not say that he is taking the derivative of a function but that he differentiates the equation:
$$\ln p + n \ln V = \text{constant}$$
$$\frac{dp}{p} + \frac{n \, dV}{V} = 0$$
What is going on here? Why is this allowed and how should I reason about this?
I know about taking the derivative of the function $\ln x$ which is $1/x$ but I do not know how to express an equation into differentials.
I can intuitively accept that given an equation, it can be re-casted to infinitesimal increments, and solving it would give that same $f(p,V) =$ constant, correct?
Comment 4/4-2022: Simply because a separable first-order non-linear DE gives the above solution and there is no deep esoteric theory involved?