Doing some rudimentary mental differentiation in my fluid mechanics homework, I encountered the following derivative:
$\dfrac{d}{dr}\ln(r/a)$
I applied the chain rule, said it equaled $\dfrac{1}{ar}$
Needless to say, my final answer had this term off by a factor of 1/a and a bit of research showed me that the actual derivative evaluates to 1/r instead. Thinking about the properties of logarithms, this makes sense because the $\ln(a)$ can be pulled out as a constant, subtracted term that disappears in the derivative.
But my question asks for the calculus explanation of this. Why does the general form of \dfrac{d}{dx}f(ax)=af'(ax) not seem to hold in this case without first expanding the logarithm? It's been years since I had single variable calculus and I have a vague recollection that something like this happens but I can't remember why for the life of me.