1

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.

atapaka
  • 507

2 Answers2

2

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

  • Partial Derivatives of Functions of Functions. Here OP is confused about notation with partial derivatives, and it seems like you could benefit from reading it (an several of the other related questions on the side links, many of which I've answered as well).
  • Intuitive Proof of the Multivariable Chain Rule. Here OP asks about an intuitive proof of the chain rule. I know you didn't ask for a proof, but I think you could benefit from seeing the abstract chain rule, and observing how the various special cases are derived from it, so that it becomes clear what the functions are, where things are being evaluated etc.

I'm sure I have a whole bunch of other answers along these topics but I'm too lazy to sort through them now.

peek-a-boo
  • 55,725
  • 2
  • 45
  • 89
  • Oh, sorry. It didn’t display on my screen. Apologies. – Ted Shifrin Jun 25 '22 at 04:15
  • @TedShifrin had me panicking for a sec there – peek-a-boo Jun 25 '22 at 04:16
  • 1
    Panic is sometimes good :) – Ted Shifrin Jun 25 '22 at 04:17
  • @peek-a-boo After reading,I thought that understand it but when trying to write it all down, i get using the first notation: $\frac{\partial g}{\partial c}\large|{(t,r,C)} = \frac{\partial f}{\partial c}\large{(t,r,h(t,r,C))}\frac{\partial h}{\partial c}\large_{(t,r,C)}$ but since $h(t,r,C)$ then $\partial_c h(t,r,C)=0$... Or maybe it is just $\frac{\partial f}{\partial c}\large_{(t,r,h(t,r,C))}$ but then you have both $c$ and $C$ and I am confusing myself more and more now. Also your derivatives of $f$ contain $c$ but the goal is to recast the Eq. (1) so that all $c$ is replaced by $C$. – atapaka Jun 25 '22 at 21:10
  • As a note: this is just me trying to see a change in variables in Boltzmann equation and avoid statements such as "we replace $\partial_t f$ in Boltazmann eq. by $\partial_\vec{C}f\cdot\partial_t\vec{c_0}$ because I think the $f(c)$ is not the same as $f(C)$. (Also please ignore mixing now in vectors, this is just an example of a book statement that is relevant). – atapaka Jun 25 '22 at 21:15
  • @leosenko you need to review precisely what the chain rule says, and what the notation means, and read it from a proper math text; e.g Spivak's Calculus on Manifolds or Loomis and Sternberg's Advanced Calculus. I've also written a whole bunch of answers related to this, so you might want to read through those as well (I'll try to find links to related answers I've written in the past and edit soon). – peek-a-boo Jun 25 '22 at 21:24
  • anyway, it should be $\frac{\partial g}{\partial C}\bigg|{(t,r,C)}=\frac{\partial f}{\partial c}\bigg|{(t,r,h(t,r,C))}\cdot \frac{\partial h}{\partial C}\bigg|{(t,r,C)}$, or more precisely $(\partial_3g){(t,r,C)}=(\partial_3f){(t,r,h(t,r,C))}\cdot (\partial_3h){(t,r,C)}$. – peek-a-boo Jun 25 '22 at 21:26
  • @peek-a-boo I know that for multivariable function the chain rule: $\frac{\partial f\circ \vec{H}}{\partial x_i} (a) = \frac{\partial f}{\partial y_j}(\vec{H(a)}) \frac{\partial h_j}{\partial x_i}(a)$ now in my case the $\vec{H} = (t,r,h(t,r,C)$, $a=(t,r,C)$, now i believe I denote $g\equiv f\circ\vec{H}$, now, if I put $g$ straight into eq (1), I would get $\frac{\partial g}{\partial c}$ and not $\frac{\partial g}{\partial C}$ which is just that because $C$ is independent variable for $g$ (no chain rule). – atapaka Jun 25 '22 at 21:49
  • @leosenko I've just put in a few links which you might find helpful, so I suggest looking over them. First of all, a logical and obligatory remark is that math absolutely does not care about the letters you decide to use. Anyway in this case, being less formal, I'm not sure why you're confused. You have the maps $(t,r,c)\mapsto f(t,r,c)$, and $(t,r,C)\mapsto H(t,r,C)=(t,r,h(t,r,C))$, and you're composing them $g:=f\circ H$, $g(t,r,C)=f(H(t,r,C))=f(t,r,h(t,r,C))$. So, with this notation we 100% expect to use $\frac{\partial g}{\partial C}$. – peek-a-boo Jun 25 '22 at 21:53
  • also, I don't see how you can plug in $g$ straight into equation (1). $g$ is not $f$, you can't plug it in. – peek-a-boo Jun 25 '22 at 21:55
  • @peek-a-boo I will read through the material, but to me it seems that one should start form eq. (1) with $f(t,r,c)$ and "work" one's way through to get an equation that contains only variables $(t,r,C)$, however, you seem to do it the opposite way (i have seen it several times done like this) and for me it is difficult to comprehend because it seems you are starting from what you want not what you have. – atapaka Jun 25 '22 at 21:55
0

You want to transform coordinates from $(t, r, c)$ to $(t, r, C)$. You want to write $\frac{\partial f}{\partial t}$, $\frac{\partial f}{\partial r}$, $\frac{\partial f}{\partial c}$ in terms of partial derivatives $\frac{\partial f}{\partial t}$, $\frac{\partial f}{\partial r}$, $\frac{\partial f}{\partial C}$ in your new coordinates $(t, r, C)$. This will allow you to transform your differential equation to new coordinates immediately. We are given that the inverse of the coordinate transition map is $$(t, r, c) = (t, r, h(t, r, C)).$$ In our new $(t, r, C)$ coordinates (meaning that we write $f = f(t, r, C)$), we have by the chain rule that $$\frac{\partial f}{\partial t} = \frac{\partial f}{\partial t}\frac{\partial t}{\partial t} + \frac{\partial f}{\partial r}\frac{\partial r}{\partial t} + \frac{\partial f}{\partial C}\frac{\partial C}{\partial t}.$$ In order to compute this, we need the Jacobian $\frac{\partial(t, r, C)}{\partial(t, r, c)}$. From the inverse of the coordinate map, we can compute the inverse of the Jacobian: $$\frac{\partial(t, r, c)}{\partial(t, r, C)} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ \frac{\partial h}{\partial t} & \frac{\partial h}{\partial r} & \frac{\partial h}{\partial C} \\ \end{pmatrix}. $$ Using row operations, this matrix is easily inverted to yield the Jacobian: $$\frac{\partial(t, r, C)}{\partial(t, r, c)} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ -\frac{\partial h / \partial t}{\partial h / \partial C} & -\frac{\partial h / \partial r}{\partial h / \partial C} & \frac{1}{\partial h / \partial C} \\ \end{pmatrix}. $$ Plugging this into $\frac{\partial f}{\partial t} = \frac{\partial f}{\partial t}\frac{\partial t}{\partial t} + \frac{\partial f}{\partial r}\frac{\partial r}{\partial t} + \frac{\partial f}{\partial C}\frac{\partial C}{\partial t}$ yields $$\frac{\partial f}{\partial t} = \frac{\partial f}{\partial t} - \frac{\partial f}{\partial C}\frac{\partial h / \partial t}{\partial h / \partial C}.$$ (It may seem weird that $\frac{\partial f}{\partial t}$ appears on both sides, but they mean different things on both sides since $f$ means different things on both sides. On the left hand side, $f$ means $f(t, r, c)$, while on the right hand side, $f$ means $f(t, r, C)$.) Similarly, $$\frac{\partial f}{\partial r} = \frac{\partial f}{\partial t}\frac{\partial t}{\partial r} + \frac{\partial f}{\partial r}\frac{\partial r}{\partial r} + \frac{\partial f}{\partial C}\frac{\partial C}{\partial r} = \frac{\partial f}{\partial r} - \frac{\partial f}{\partial C}\frac{\partial h / \partial r}{\partial h / \partial C}$$ and $$\frac{\partial f}{\partial c} = \frac{\partial f}{\partial t}\frac{\partial t}{\partial c} + \frac{\partial f}{\partial r}\frac{\partial r}{\partial c} + \frac{\partial f}{\partial C}\frac{\partial C}{\partial c} = \frac{\partial f}{\partial C}\frac{1}{\partial h / \partial C}.$$ So in the $(t, r, C)$ coordinates, the differential equation is $$\frac{\partial f}{\partial t} - \frac{\partial f}{\partial C}\frac{\partial h / \partial t}{\partial h / \partial C} + \frac{\partial f}{\partial r} - \frac{\partial f}{\partial C}\frac{\partial h / \partial r}{\partial h / \partial C} + \frac{\partial f}{\partial C}\frac{1}{\partial h / \partial C} = 0.$$

Mason
  • 10,415