1

Intuitively, whenever we use the chain rule we're taking the derivative of one function with respect to another. If $f(x)=(h\circ g)(x)$, then we often write $ \frac{\text{d}f}{\text{d}x}=\frac{\text{d}f}{\text{d}g}\frac{\text{d}g}{\text{d}x}$. Formally, $\frac{\text{d}f}{\text{d}g}$ is meaningless, and the chain rule should instead be written $f'(x)=h'(g(x))g'(x)$. In other words, we're using $\frac{\text{d}f}{\text{d}g}$ to mean $h'(g(x))$. Obviously, we could just take this to be the definition of $\frac{\text{d}f}{\text{d}g}$, but this only works when $f$ can be written as a composition of some function with $g$. Is there a way to define this more generally, so that we can take derivatives with respect to arbitrary functions, in the way that we can with integrals (e.g. the Riemann-Stieltjes integral)?

M. Sperling
  • 807
  • 5
  • 11
  • There is a concept of variational derivative, although this doesn't really have much to do with the ordinary chain rule (because in the ordinary chain rule there isn't an actual dependence of a function on a function). – Ian Oct 15 '21 at 04:04
  • Everywhere you have "$\frac{\mathrm{d}f}{\mathrm{d}g}$", you should have "$\frac{\mathrm{d}h}{\mathrm{d}g}$". $$ \frac{\mathrm{d}f}{\mathrm{d}x} = \frac{\mathrm{d}h(g(x))}{\mathrm{d}x} = \frac{\mathrm{d}h}{\mathrm{d}g}\frac{\mathrm{d}g}{\mathrm{d}x} \text{.} $$ – Eric Towers Oct 15 '21 at 04:09
  • The notation used in OP's post is commonly agreed upon, note how the dg's "cancel" and you get $\frac{dh}{dx}$ in your suggestion, but get the correct figure in OP's. –  Oct 15 '21 at 04:23
  • 1
    @TheHype : That is notation I have seen nowhere in several years teaching Calculus from a few different texts. The notation I have seen used is precisely the notation I recite and I would claim is the correct notation because it matches what is done in substitution in integrals. – Eric Towers Oct 15 '21 at 04:28
  • 1
    @TheHype : Additionally, $g(x)$ is not an argument to $f$ it is an argument to $h$, so there is no sensible interpretation to $\mathrm{d}f/\mathrm{d}g$. The outer function is $h$, so $h$ should be the dependent function in the first factor on the right-hand side of the chain rule. – Eric Towers Oct 15 '21 at 04:38
  • To all the people commenting, this isn't a question about whether $\frac{\mathrm{d}f}{\mathrm{d}g}$ makes sense. It's a question about whether there's a sensible inverse procedure to taking an integral with respect to a function, in the Riemann-Stieltjes sense. – 1Rock Oct 15 '21 at 04:52
  • @TheHype : If, on the other hand, we were talking about the composition $f \circ g$, then the left-hand side is wrong and the right-hand side is correct. – Eric Towers Oct 15 '21 at 04:52
  • 1
    @1Rock : The question as written makes unintelligible claims, so is subject to improvement. – Eric Towers Oct 15 '21 at 04:53
  • 4
    Does this answer your question? differentiate with respect to a function See also https://math.stackexchange.com/questions/954073/derivative-of-a-function-with-respect-to-another-function where the unavoidable problem of incompatible domains is raised. – Eric Towers Oct 15 '21 at 05:07
  • It turns out that the correct interpretation of $\frac{df}{dg}$ is $\frac{dh(u)}{du}\mid_{u=g(x)}$ but as a matter of notation you would just write $\frac{df}{dg}$ (the term $h'(g)$ would allow us to see this). see here. This is because we've agreed that $h(u) = f$ then we may make the appropriate substitution. Notice how $h(x)\neq h(g(x))$ in general, and this is where the notation $\frac{dh}{dg}$ fails. The distinction is that you intend to write $\frac{dh}{dg} = \frac{dh}{dx}|_{x=g}$ which is not what $\frac{dh}{dg}$ should "mean". –  Oct 15 '21 at 05:08
  • I will not reply further but suggest you clarify this in your posts for any future readers as this could lead to confusion especially for people just getting introduced to this notation. –  Oct 15 '21 at 05:14
  • @TheHype : $\mathrm{d}f/\mathrm{d}g$ is only sensible if we are studying $f(g(x))$. Otherwise, $g$ is not an argument of $f$. $g$ is an argument to $h$, but $f$, being the composition of both, is blind to this fact. Going back a bit: can you actually cite a usage of this wrong notation in a widely used Calculus text? – Eric Towers Oct 15 '21 at 05:15
  • Sure, scroll down to equation 3.17 in here and in every wikipedia page explaining the chain rule. Again, $df/dg$ means $h'(g(x))$ if $f = h(g(x))$ as a matter of notation, which is linked to the idea of infinitesimals that is commonly used in introductory calculus courses. In fact, you are sure to make the distinction between $\frac{dh}{dg} = \frac{dh(x)}{dg}$ and $dh(g)/dg = df/dg$ in your worked example! –  Oct 15 '21 at 05:28
  • Can you be more explicit about where to find $df/dg$ in equation 3.17 here? I do not see it. – Lee Mosher Oct 15 '21 at 13:58
  • It is the bit where it says if $y = f(u)$ (if $y$ is a function of $u$) and $u = g(x)$ (if $u$ is a function of $x$) then $\frac{dy}{dx} = \frac{dy}{du}\frac{du}{dx}$. You needn't scroll too far, its the small section labeled "The chain rule", the first gray block. @LeeMosher –  Oct 15 '21 at 21:37
  • Okay, but, a dependent variable is not the same thing as the function that defines it. So the point is the $\frac{df}{dg}$ notation that you like is not the same as the more standard notation using only the independent and dependent variables. – Lee Mosher Oct 15 '21 at 21:40

2 Answers2

0

If $M$ is a 1-dimensional manifold, then $T^*M$ is 1-dimensional at any point. Now for any function $f, g\in C^\infty(M)$, $df, dg$ are linearly dependently at all points $x\in M$. In particular, if $dg$ doesn't vanish anywhere, $\frac{df}{dg}$ is a well-defined function on $M$ such that $df = "\frac{df}{dg}" dg$ is an identity on $T^*M$ everywhere. This gives a rigorous meaning to $\frac{df}{dg}$ as long as $g'\not=0$.

We may try to define $\frac{df}{dg}(x_0) = \lim_{x\rightarrow x_0}\frac{f(x)-f(x_0)}{g(x)-g(x_0)}$, and this is the same as $\frac{df}{dg}$ in the above sense by L'Hôpital's rule, as long as $g'(x_0)\not=0$. This defintion generalizes to cases when the order of vanishing of $f$ is not less than the one of $g$ at $x_0$, but still it cannot be definied all the time. It's not unreasonable that integrals can be defined for more general classes of functions than derivatives.

Just a user
  • 22,048
0

There is some ... muddle ... in your notation. As I noted in comments, $$ \frac{\mathrm{d}f}{\mathrm{d}x} = \frac{\mathrm{d}h(g(x))}{\mathrm{d}x} = \frac{\mathrm{d}h}{\mathrm{d}g}\frac{\mathrm{d}g}{\mathrm{d}x} \text{.} $$

In the slightly more detail that I teach it (in preparation for $u$-substitution in integrals a few weeks later), $$ \frac{\mathrm{d}}{\mathrm{d}x} h(g(x)) = \left.\frac{\mathrm{d}h(u)}{\mathrm{d}u}\right|_{u = g(x)}\frac{\mathrm{d}g}{\mathrm{d}x} \text{.} $$ This highlights that we differentiate $h$ with respect to its formal parameter, temporarily ignoring that $g(x)$ is in any way involved. After we complete that differentiation, we specialize the formal parameter to $g(x)$. (This is why "$\frac{\mathrm{d}f}{\mathrm{d}g}$" is wrong: $g(x)$ is not the argument of $f$, it is the argument of $h$.)

After that, the notation suggests a way to get what you are describing, but I predict the result is disappointing. For instance, from $f(x) = \sin^2(x)$, we have $h(u) = u^2$ and $g(x) = \sin(x)$. Then, $$ \frac{\mathrm{d}}{\mathrm{d}x} \sin^2 x = \left.\frac{\mathrm{d}u^2}{\mathrm{d}u}\right|_{u = \sin(x)}\frac{\mathrm{d}\sin x}{\mathrm{d}x} \text{.} $$ Rearranging and specializing $u$ without evaluating the derivative, $$ \frac { \frac{\mathrm{d}}{\mathrm{d}x} \sin^2 x } { \frac{\mathrm{d}\sin x}{\mathrm{d}x} } = \frac{\mathrm{d}\sin^2 x}{\mathrm{d}\sin x} \text{.} $$ Of course the left-hand side is $$ \frac{2 \sin x \cos x}{\cos x} = 2 \sin x \text{,} $$ exactly what we would expect from the right-hand side, treating "$\sin x$" as an independent variable. Notice that this is unavoidable -- the substitution for $u$ on the right-hand side of the elaborated chain rule guarantees that this fairly transparent "result" is all we can hope to obtain by this method.

Eric Towers
  • 70,953