# What does mean $df/dg$ (derivative of a function with relation to another)?

I have on a textbook a system of two ODEs as follow

$$\dfrac{df}{dx}=af(x)g(x)\\ \dfrac{dg}{dx}=-bg(x)$$

So, the author studies $$df/dg$$ writing $$\dfrac{df}{dg}=-\dfrac{a}{b}f(x)$$.

I understand the arithmetic, but I am not sure of mathemathical/geometric meaning.

Thank you in advance for light and maybe some lemmas or theorems of reference that it is valuable (are when is valuable).

I have ranted numerous times on this site about that horrendous notation. It really means nothing and can be very misleading. I would suggest you write $$\frac{df}{dx} = af(x)g(x) = -\frac ab f(x)\frac{dg}{dx},$$ and then divide by $$f(x)$$ to get $$\frac1{f(x)}\frac{df}{dx} = -\frac ab \frac{dg}{dx}.$$ Now integrate both sides (with respect to $$x$$) and you get $$\ln |f(x)| = -\frac ab g(x) + c.$$ [You could write the previous equation as $$\frac{df}f = -\frac ab dg$$, and then you get where your textbook should end up.]

• For better or for worse, this is a very common notational abuse. For example, the chain rule is often written as $$\frac{dy}{dx}=\frac{dy}{du} \cdot \frac{du}{dx} \, ,$$ where you are differentiating $y$ with respect to the function (!?) $u$. – Joe Dec 30 '20 at 20:33
• @TedShifrin Yes, although I have changed my profile, I was one of the person that you bicker about this confused notation (rs). However, this time, I take the notation in a very consecrated article (two very consecrated articles in fact, that I just rewrote to post as question). As Joe said, this is a very common notational abuse, but I'd like to thank you so much for show an alternative way that avoid it! Thank once again, Prof. Shifrin. – Quiet_waters Dec 30 '20 at 20:37
• @Joe: No, when we write the chain rule, we really have $y=f(u)$ where then we substitute $u=g(x)$, so $u$ is the independent variable for $f$, not a function. I did teach calculus for mire than 45 years, and it can be done in a way that makes sense. – Ted Shifrin Dec 30 '20 at 20:52
• @TedShifrin That's what I meant—the usual formula is an abuse of notation because it makes it seem as if you are differentiating a function with respect to a function. If $y=f(g(x))$, and $u=g(x)$, then $$\frac{dy}{du} = \frac{df(g(x))}{dg(x)} \, .$$ However, the RHS is 'overloading' the function $g(x)$. It is being used both as a dummy variable to illustrate that we are talking about $f'$, and also as the point at which $f'$ is being evaluated. Hence, we could write this is more clearly as $$\frac{df(u)}{du}\Biggr|_{u=g(x)} \, .$$ – Joe Dec 30 '20 at 20:57
• I discovered the question was being discussed here math.stackexchange.com/questions/291376/… and here math.stackexchange.com/questions/954073/… – Quiet_waters Dec 30 '20 at 21:09

This notation is often difficult to make sense of. What, for instance, would it mean to differentiate $$\sin(x)$$ with respect to $$\cos(x)$$? To begin with, we must write $$\sin(x)$$ in terms of $$\cos(x)$$: $$\sin(x)=\sqrt{1-\cos(x)^2} \, ,$$ ignoring the $$\pm$$ signs that should be on the square root for now. This means that $$\frac{d\sin(x)}{d\cos(x)}=\frac{d\sqrt{1-\cos(x)^2}}{d\cos(x)} \, .$$ But this is the same as $$\frac{d}{du}\left(\sqrt{1-u^2}\right)\Biggr|_{u=\cos(x)} \, .$$ So every time you see $$\frac{df(x)}{dg(x)} \, ,$$ note that $$f(x)=h(g(x))$$ for some function $$h$$, and write $$\frac{dh(g(x))}{dg(x)}=\frac{dh(u)}{du}\Biggr|_{u=g(x)} \, .$$ The $$u$$ is a dummy variable that can then be replaced by whatever function you are 'differentiating with respect to'. You can use $$g(x)$$ as a dummy variable, but it often leads to confusion, and is considered by many people to be poor style.

To give another example, let's consider the chain rule, $$\frac{dy}{dx}=\frac{dy}{du} \cdot \frac{du}{dx}$$ Say $$y=\sin(u)$$, where $$u=x^2$$. Then, the chain rule appears to say $$\frac{d}{dx}(\sin(x^2))=\frac{d}{dx^2}\left(\sin(x^2)\right) \cdot \frac{d}{dx}(2x) \, .$$ It seems difficult to parse the first term on the RHS. The easiest way to do this is to write it instead as $$\frac{d}{du}(\sin(u)) \Biggr|_{u=x^2} \, .$$ However, we can also treat $$x^2$$ just as we would any other variable, and make sense of the term that way, too.

• Joe, I accepted Prof. Shifrin's answer and would like to bount your answer as well as soon as system liberate. But I'd like to confess you a confusion that hurt my mind. And if the function $g(x)$ is not one-to-one, this "variable" could lead to some mathematical confusion maybe?! Thank you. @TedShifrin – Quiet_waters Dec 30 '20 at 20:41
• @Quiet_waters I wouldn't worry too much about it—I think your comment has demonstrated how imprecise Leibnizian notation can be. If I can find a way to make sense of $df/dg$, then I'll edit my post. – Joe Dec 30 '20 at 21:00
• Yes Thank you @Joe – Quiet_waters Dec 30 '20 at 21:06
• I discovered the question was being discussed here math.stackexchange.com/questions/291376/… and here math.stackexchange.com/questions/954073/… – Quiet_waters Dec 30 '20 at 21:09
• @Quiet_waters: My feelings won't be hurt if you accept Joe's answer instead. There are really two issues going on here. One is the Leibniz notation and its abuse; the other (which was more what I cared about here) is the usual separation of variables game for differential equations (which has been discussed numerous times on here, too), where I have argued before that it's really just an application of the chain rule to justify it. – Ted Shifrin Dec 30 '20 at 21:31