# What is the derivative of $H(f(x),g(x)) = f(x)*g(x)$ with respect to $f(x)$

I've been mulling over this quite a bit and I can't quite seem to figure it out. For context, I was given the equation for the volume of a sphere and asked to find the derivative of the volume with respect to the surface area. Now, in this particular example, we know that a sphere's volume is $$\frac{4}{3}*\pi*r^3$$ and the surface area is $$4*\pi*r^2$$.

Therefore we could write this as $$\frac{4}{3}*\pi*r^3 = 4*\pi*r^2*\frac{r}{3}$$ Which, equivalently, is $$Volume \ of \ Sphere = Surface\ Area\ of\ Sphere * \frac{r}{3}$$

The book goes on to solve this problem by basically solving for $$\frac{dV}{dS}$$ using the chain rule...(i.e. by algebraically manipulating $$\frac{dV}{dS} *\frac{ dS}{dr} = \frac{dV}{dr}$$, which is certainly fine...but seems slightly hand wavy and precludes me from really understanding what is going on).

I realized that $$\frac{r}{3}$$ is essentially a function of $$r$$...and therefore thought that maybe by generalizing it I could have a deeper insight into the problem. So, as the title inquires, how does one go about finding the following derivative?

Derivative of $$H(f(x),g(x)) = f(x)*g(x)$$ with respect to $$f(x)$$

• what do you mean by derivative of $H(f(x),g(x))$ with respect to $f(x)$? Commented Jun 29, 2019 at 1:44
• Is that not the proper notation? I guess I’m saying I want the derivative of H with respect to f
– S.C.
Commented Jun 29, 2019 at 1:49
• I really don't think that's what you want... in single variable calculus, you almost never differentiate with respect to a function. I have a feeling that what you want to ask isn't what you're actually saying/you're unable to say it properly. Anyway I'm currently writing an answer; hopefully it can clarify some things. Commented Jun 29, 2019 at 1:51

What's really going on here is there are a lot of hidden compositions with inverse functions. You're initially given volume and surface area as a function of radius. Or more technically, you're given two functions $$V:[0,\infty) \to \Bbb{R}$$, and $$S:[0,\infty) \to \Bbb{R}$$ defined by \begin{align} V(r) = \dfrac{4\pi r^3}{3} \quad \text{and} \quad S(r) = 4 \pi r^2 \end{align} Now, note that $$S$$ is an invertible function with inverse $$S^{-1}:[0,\infty) \to[0,\infty) \subset \Bbb{R}$$ defined by $$$$S^{-1}(\sigma) = \sqrt{\dfrac{\sigma}{4\pi}}$$$$

(i.e a surface area of $$\sigma$$ corresponds to a radius of $$\sqrt{\frac{\sigma}{4\pi}}$$) So, when you wrote the symbol $$\dfrac{dV}{dS}$$, you were thinking of volume as a function of surface area. More technically, you were considering the derivative of the composite function $$V \circ S^{-1}$$. So, now, let's compute its derivative \begin{align} (V \circ S^{-1})'(\sigma) &= V'(S^{-1}(\sigma)) \cdot (S^{-1})'(\sigma) \tag{directly chain rule} \\ &= V'(S^{-1}(\sigma)) \cdot \dfrac{1}{S'(S^{-1}(\sigma))} \tag{*}\\ &= S(S^{-1}(\sigma)) \cdot \dfrac{1}{S'(S^{-1}(\sigma))} \end{align} It is easy to verify that $$V'(r)=S(r) = 4 \pi r^2$$, that's why in the third line, I changed $$V'$$ to $$S$$. Also, if you look up the formula for the derivative of an inverse function, that's where the second term came from. Substituting everything, we get: \begin{align} (V \circ S^{-1})'(\sigma) &= \sigma \cdot \dfrac{1}{8\pi\left(\sqrt{\dfrac{\sigma}{4\pi}} \right)} \\ &= \dfrac{\sqrt{\sigma}}{4 \sqrt{\pi}} \end{align}

This is how a technically precise computation would proceed if you carefully mention where all the derivatives are being evaluated. However, as you can see, it is very cumbersome. Hence, people just shorten it to \begin{align} \dfrac{dV}{dS} = \dfrac{dV/dr}{dS/dr} = \dfrac{4 \pi r^2}{8 \pi r} = \dfrac{r}{2} = \dfrac{\sqrt{S}}{4 \sqrt{\pi}} \end{align} if $$S = 4 \pi r^2$$, or equivalently, $$r = \sqrt{\frac{S}{4 \pi}}$$.

By the way, formula $$(*)$$ is as general as you can get, and assuming you write it very pedantically. In formula $$(*)$$, I made no use of the given formula for $$V$$ and $$S$$; only the chain rule.

• To get from the 1st line to the 2nd line of the chain rule equations, I'm guessing you used the property that derivative of the composition of a function and its inverse is equal to 1. However, using that equation, I found that $d(S^{-1}(\sigma)/d\sigma = d(S^{-1}(\sigma)/d(S(S^{-1}(\sigma)))$. Did I do something wrong here? (I have the denominator right but the numerators do not match...your numerator is 1)
– S.C.
Commented Jun 29, 2019 at 15:18
• @S.Cramer for every $\sigma \in [0,\infty)$, we have that $(S \circ S^{-1})(\sigma) = \sigma$. If you assume that $S$ and $S^{-1}$ are differentiable functions (which they are in this case), then using the chain rule, you'll find that $S'(S^{-1}(\sigma)) \cdot (S^{-1})'(\sigma)= 1$. Dividing both sides implies that $(S^{-1})'(\sigma) = \dfrac{1}{S'(S^{-1}(\sigma))}$ Commented Jun 29, 2019 at 15:23
• thank you, I think what I wrote is actually equivalent to what you wrote...it's just expressed differently. Cheers~
– S.C.
Commented Jun 29, 2019 at 15:24
• @S.Cramer Also, please don't ever write things like $\dfrac{d S^{-1}}{d \sigma} = \dfrac{d S^{-1}}{d(S(S^{-1}(\sigma)))}$, even though $S(S^{-1}(\sigma)) = \sigma$. This is just terrible notation. People who know what they're doing might write this kind of thing, but only because they know what they're doing... but even then, it's not so common. However, if you're just learning calculus, you should completely avoid such abuse of notation, because it is very easy to make mistakes if you have bad notation. Commented Jun 29, 2019 at 15:27
• @S.Cramer one way is to write it as I have. Because this notation clarifies what is the function, vs where it is being evaluated. A direct example is when we write $\dfrac{dV}{dS}$ like I said above. This really means "derivative of volume when thought of as a function of surface area" So, like I said in my answer, this really means $(V \circ S^{-1})'$ Commented Jun 29, 2019 at 15:56

An alternative method from the book's solution is to write $$S(r) = 4\pi r^2, \quad V(r) = \frac{4}{3}\pi r^3,$$ solve for $$r$$ in terms of $$S$$: $$r = \sqrt{\frac{S}{4 \pi}},$$ then $$V(S) = \frac{4}{3} \pi \left(\sqrt{\frac{S}{4\pi}}\right)^3 = \frac{ S^{3/2}}{6 \pi^{1/2}}.$$ Then $$\frac{dV}{dS} = \frac{1}{6\pi^{1/2}} \frac{3}{2} S^{1/2} = \frac{S^{1/2}}{4\pi^{1/2}}.$$ Expressed in terms of $$r$$, this is simply $$r/2$$, which is consistent with using the formula $$\frac{dV}{dS} \cdot \frac{dS}{dr} = \frac{dV}{dr}.$$

• Thank you for the alternative method for solving that specific case, but I am looking for a generalized answer that doesn’t require that I know any of the formulas
– S.C.
Commented Jun 29, 2019 at 1:45

This might not be rigorous but I am going to assume that $$f$$ and $$g$$ are continuous and differentiable everywhere. This thus reduces to a problem of applying a "product rule".

Here, $$\frac{d}{df}(f*g) = g + f*\frac{dg}{df}$$

Thus, for your problem, since we have $$V = S \times r/3$$, then $$\frac{dV}{dS} = \frac{r}{3} + S \times \frac{d(r/3)}{dS}$$.

Here, we evaluate $$\frac{dS}{d(r/3)} = 3 \frac{dS}{dr} = 3 * \frac{d}{dr}(4 \pi r^2) = 24 \pi r$$.

Substitute the expression back in, we thus have $$\frac{dV}{dS} = \frac{r}{3} + 4\pi r^2 \times \frac{1}{24\pi r} = \boxed{\frac{1}{2}r}$$.