# Validity of this particular "Chain Rule"

For two multivariable function $$y(m,n)$$ and $$x(m,n)$$ does it make sense/is it mathematically correct to talk of the following chain rules -

$$\frac{dy}{dx}=\frac{\partial y}{\partial m}\frac{dm}{dx}+\frac{\partial y}{\partial n}\frac{dn}{dx}\tag{1}$$ and $$\frac{dx}{dy}=\frac{\partial x}{\partial m}\frac{dm}{dy}+\frac{\partial x}{\partial n}\frac{dn}{dy}\tag{2}$$

simultaneously, where m, n can be rewritten as $$m=m(x,y),\,n=n(x,y)$$ and $$d/dx,\,d/dy$$ of m, n exists.

The context is this PhysicsSE question - if that is relevant.

How correct/wrong is this "Chain rule"?

Any intuitive/geometric argument together with a mathematical proof, if possible, is highly appreciated.

• It is not exactly the chain rule but the very definition of partial derivatives in differential calculus (more particular in differential geometry): if $(m,n)$ is a coordinates system and $y$ is a function of these coordinates, then $\mathrm{d}y = \partial_my\, \mathrm{d}m + \partial_ny\, \mathrm{d}n$ Commented Mar 11, 2021 at 9:38
• I agree... related to a question that I posted in PhysicsSE (link in the OP if you are interested), people seems to suggest that both equations (1) and (2) do not exist simultaneously. Although I don't see a reason for that, I wanted to know whether that is the case, if so then how to mathematically see that. Commented Mar 11, 2021 at 9:45

The expression $$\frac{dy}{dx}$$ suggests that we have a rule which associates a value of $$x$$ to a single, well-defined value of $$y$$ - let's say $$y=g(x)$$ - and that we are differentiating it, so $$\frac{dy}{dx} = g'(x)$$. In your example, you have one function of two variables $$f:\mathbb R^2 \rightarrow \mathbb R$$ and two functions of one variable $$m,n : \mathbb R \rightarrow \mathbb R$$; $$g$$ is then given by their composition, $$y = g(x) = f\bigg(m(x),n(x)\bigg)$$ $$\implies \frac{dy}{dx}= g'(x) = (\partial_1f)\big(m(x),n(x)\big)\cdot m'(x) + (\partial_2f)\big(m(x),n(x)\big) \cdot n'(x)$$ where $$\partial_i f$$ is the partial derivative of $$f$$ with respect to its $$i^{th}$$ entry. Standard convention is to suppress the arguments and associate each entry with the function we plug into it, which leads to the prettier expression $$\frac{dy}{dx} = g'(x) = \frac{\partial f}{\partial m} \frac{dm}{dx} + \frac{\partial f}{\partial n} \frac{dn}{dx}$$

It is entirely possible that $$g$$ can be inverted, at least locally. This would imply the existence of a function $$\tilde g$$ such that $$\tilde g(g(x)) = g(\tilde g(x)) = x$$, which means that we can write $$x = \tilde g(y)$$. It's not hard to show that $$\tilde g'(y) = \frac{1}{g'\big(\tilde g(y)\big)}$$ as long as $$g'\big(\tilde g(y)\big)\neq 0$$; in such cases, we would have that $$\frac{dx}{dy} = \tilde g'(y) = \frac{1}{g'\big(\tilde g(y)\big)} = \left(\left.\frac{dy}{dx}\right|_{x=\tilde g(y)}\right)^{-1}$$

However, this $$\tilde g$$ will generally not be able to expressed in terms of the functions $$f$$, $$m$$, and $$n$$ in any meaningful way. Take for example $$f(m,n)=m^2n$$, $$m(x)=x$$, $$n(x)=x^4$$. Then $$y=g(x) = f\big(m(x),n(x)\big) = x^6$$, and $$\frac{dy}{dx} = 6x^5$$.

Inverting this, $$x = \tilde g(y) = y^{1/6}$$, so $$\frac{dx}{dy} = \frac{1}{6 y^{5/6}} = \left(6 x^5\right)^{-1}$$, and all is well.

Your expression (2) implies that $$\tilde g(y)$$ can be expressed as $$F\big(m(y),n(y)\big)$$ for yet another function $$F:\mathbb R^2\rightarrow \mathbb R$$. In such a case, we would indeed have (skipping right to the pretty notation), $$\frac{dx}{dy} = \tilde g'(y) = \frac{\partial F}{\partial m}\frac{dm}{dy} + \frac{\partial F}{\partial n}\frac{dn}{dy}$$

In my simple example above, note that $$\tilde g(y) = y^{1/6}$$, so we could let $$F(m,n) = m^{1/6}$$. Of course, this $$F$$ is not unique; $$F(m,n)=n^{1/12}$$ and $$F(m,n) = m^{1/12} n^{1/24}$$ would also work, and would also give us the result we're looking for.

More generally, if $$m$$ is invertible with inverse $$\tilde m$$, we could let $$F(m,n) = \tilde g\big(\tilde m (m)\big)$$, which would yield the result we're looking for.

Of course, the above is what I would consider idle mathematical curiosity. Given a relationship $$y = g(x) = f\big(m(x),n(x)\big)$$, it is broadly possible to find a function $$F$$ such that $$x = \tilde g(y) = F\big(m(y),n(y)\big)$$. This $$F$$ is highly non-unique in general, and I can think of no particularly good reason to do this, but you can bend over backward to do so if you really want to. However, $$F$$ could not be determined from $$f$$ alone; it would inevitably involve the inverse function of $$m$$, $$n$$, or both.

• Thank you for your time! Commented Mar 11, 2021 at 19:25