8
$\begingroup$

Given the property of the logarithm that $\log{xy} = \log{x} + \log{y}$, how would one take the 'derivative' of this?

To be more clear,

$\log{xy} = \log{x} + \log{y}$ (property of $\log$)

$D(\log{xy}) = D(\log{x} + \log{y})$ (i) (Take derivative on both sides)

Now, $D(\log{x} + \log{y}) = D(\log{x}) + D(\log{y})$ (ii) (Derivative of sum is sum of derivatives)

Combining (i) and (ii): $D(\log{xy}) = D(\log{x}) + D(\log{y})$ (iii)

Implies: $\frac{1}{xy} = \frac{1}{x} + \frac{1}{y}$ (Evaluate derivative of logarithm using $D(\log{x}) = \frac{1}{x}$

$\frac{1}{xy} = \frac{1}{x} + \frac{1}{y}$ looks false to me; e.g. while $\log{6}$ does equal $\log{2} + \log{3}$, $\frac{1}{6}$ does not equal $\frac{1}{2} + \frac{1}{3}$.

My first guess was that the issue was related to what variable I take the derivative with respect to, but I'd like to understand this a little more formally if someone could guide me.

What's going wrong in this example?

$\endgroup$
  • $\begingroup$ Like the comment above said- you can’t take derivatives with respect to all different variables and expect them to be equal. $\endgroup$ – MathIsLife12 Jan 5 at 4:19
  • $\begingroup$ (This comment was from me -- deleted when reading the fact that ayt the end of your question you acknowledged something was sketchy in the variables you differentiated with respect to. Essentially, I was saying you were "differentiating simultaneously wrt 3 variables," in different places: $xy$, $x$, $y$ -- and that's not allowed.) $\endgroup$ – Clement C. Jan 5 at 4:21
  • $\begingroup$ Thanks guys; this clears things up! I appreciate the fast responses. $\endgroup$ – user2192320 Jan 5 at 4:24
22
$\begingroup$

Yes, as you noted, it matters which variable you take a derivative with respect to. Since we have two variables, if we assume they are independent, then we need to use partial derivatives. If we chose $x$, then $$\frac{\partial \log(xy)}{\partial x}=\frac{y}{xy}=\frac1x$$and $$\frac{\partial}{\partial x}(\log x+\log y)=\frac1x+0=\frac1x$$So the answers agree. (the same thing happens if we chose $y$ instead).

Alternatively, you could take a total derivative. $$\mathrm d(\log xy)=\frac{\partial \log xy}{\partial x}\mathrm dx+\frac{\partial \log xy}{\partial y}\mathrm dy=\frac1x\mathrm dx+\frac1y \mathrm dy$$This agrees with $$d(\log x+\log y)=\frac1x\mathrm dx+\frac1y \mathrm dy$$ So there are no inconsistencies.

$\endgroup$
  • $\begingroup$ Thank you for the quick response; this is my favorite answer posted so far. $\endgroup$ – user2192320 Jan 5 at 4:25
  • $\begingroup$ No problem, happy to help! $\endgroup$ – John Doe Jan 5 at 5:02
  • 2
    $\begingroup$ @user2192320 you may want to accept it then by clicking the tick mark on the left of the answer. $\endgroup$ – Ruslan Jan 5 at 16:24
  • $\begingroup$ Hey Ruslan, sorry for the late follow up; I accepted the response and checked the tick mark. Thanks for the guidance. $\endgroup$ – user2192320 Jan 16 at 20:10
10
$\begingroup$

The issue is that your differential operator $D$ does not behave in the way you think it does! $$ D(\log(xy))=\frac{1}{xy}D(xy)=\frac{1}{xy}(ydx+xdy)=\frac{1}{x}dx+\frac{1}{y}dy=D(\log(x))+D(\log(y)) $$ At no point in this computation do we actually have $\frac{1}{xy}=\frac{1}{x}+\frac{1}{y}$ -- we are working with differentials, and not derivatives.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.