If I have e.g. a differential equation such as:
$$ \frac{\partial f(t,r,c)}{\partial t} + \frac{\partial f(t,r,c)}{\partial r} + \frac{\partial f(t,r,c)}{\partial c} = 0\,. \tag{1} $$
Now, I would like to change variables, such that $c = h(C,r,t)$ where the $c$ in the original independent variables $(t,r,c)$ will be replaced by $C$ so the new independent variables would be $(t,r,C)$.
If I plug in directly into $f$: $$ f(t,r,c) = f(t,r,h(C,r,t))\,, $$
but since I want to have the equation in the form of $(t,r,C)$, I always get confused with the notation. I would like to know, how to write this formally so that I will not get into the notation mess that follows:
I will denote
$$g(t,r,C)\equiv f(t,r,h(C,r,t))\,,$$
and with this notation the Eq. (1) is (maybe already here my notation is wrong):
$$\frac{\partial g(t,r,C)}{\partial t} + \frac{\partial g(t,r,C)}{\partial r} + \frac{\partial g(t,r,C)}{\partial c} = 0\,.\tag{2}$$
One would now use the chain rule such to get: $$\frac{\partial g(t,r,C)}{\partial t} = \frac{\partial g(t,r,C)}{\partial t} + \frac{\partial g(t,r,C)}{\partial C}\frac{\partial C}{\partial t}\,,...\tag{3}$$
But you can already see the notation nonsense. Formally it looks as if the term on the left hand side cancels out with the first one on the right hand side. And not just that, $C$ is supposed to be independent so partial derivative of $C$ makes no sense. On the other hand I have never seen a PDE being written with $\frac{\mathrm{d}}{\mathrm {t}}$, if just does not feel right (it is partial differential equation after all :-) ).
I think I understand "what is underneath" this ugly notation but I am just curious how a mathematician write it properly so that this mess is avoided. Even some books by mathematicians write "replace $\frac{\partial f}{\partial t}$ by $\frac{\partial f}{\partial t} + \frac{\partial f}{\partial C}\frac{\partial C}{\partial t}$ but even for a simple transformation such as $C = c - c_0(t,r)$ the $f(t,r,c)$ is not the same as $f(t,r,C)$. I understand that this is done to save time but I would really like to see how this should be written properly.
Defining $g$ as you have done is indeed the right thing to do, but for the sake of everyone's sanity, might I suggest that the function $h$ be defined as in the order $h(t,r,C)$ (so compose your $h$ with a permutation $(\alpha,\beta,\gamma)\mapsto(\gamma,\beta,\alpha)$ on its domain). Equation (2) however isn't right. The chain rule for $g$ reads as follows: \begin{align} \frac{\partial g}{\partial t}\bigg|_{(t,r,C)}&=\frac{\partial f}{\partial t}\bigg|_{(t,r,h(t,r,C))}+\frac{\partial f}{\partial c}\bigg|_{(t,r,h(t,r,C))}\cdot\frac{\partial h}{\partial t}\bigg|_{(t,r,C)} \end{align} In even more precise notation, for all $(t,r,C)\in\text{domain}(g)$, \begin{align} (\partial_1g)_{(t,r,C)}&=(\partial_1f)_{(t,r,h(t,r,C))}+(\partial_3f)_{(t,r,h(t,r,C))}\cdot (\partial_1h)_{(t,r,C)}. \end{align} Here, $\partial_i$ denotes the derivative of the function with respect to its $i^{th}$ variable, and the subscript denotes the point of evaluation of these derivatives.
Edit:
As I mentioned above, your equation $(2)$ is wrong. The correct equation is: \begin{align} \frac{\partial g}{\partial t}+\frac{\partial g}{\partial r}+ \frac{\partial g}{\partial C}&= \left(\frac{\partial f}{\partial t}+ \frac{\partial f}{\partial c}\frac{\partial h}{\partial t}\right)+ \left(\frac{\partial f}{\partial r}+ \frac{\partial f}{\partial c}\frac{\partial h}{\partial r}\right)+ \left(\frac{\partial f}{\partial c}\frac{\partial h}{\partial C}\right)\\ &=\frac{\partial f}{\partial c}\left(\frac{\partial h}{\partial t}+ \frac{\partial h}{\partial r}+ \frac{\partial h}{\partial C}\right) + \left(\frac{\partial f}{\partial t} + \frac{\partial f}{\partial r}+ \frac{\partial f}{\partial c}\right)\\ &=\frac{\partial f}{\partial c}\left(\frac{\partial h}{\partial t}+ \frac{\partial h}{\partial r}+ \frac{\partial h}{\partial C}\right) + 0. \end{align} Here, the partials of $g$ and $h$ are evaluated at $(t,r,C)$, while the partials of $f$ are evaluated at $(t,r,h(t,r,C))$; and of course the second bracketed term vanishes by hypothesis (equation $(1)$).
Links
I'm sure I have a whole bunch of other answers along these topics but I'm too lazy to sort through them now.