Let $f$ be a differentiable function. Is the following identity true for all such $f$? $$ \int \frac{f'(x)}{f(x)} \ dx = \log |f(x)| + C $$
I ask because there exist differentiable functions whose derivatives are not Riemann integrable (see here for instance). On the other hand, if we use the substitution $u = f(x)$ for $f$ on $[a,b]$, $$ \int_a^b \frac{f'(x)}{f(x)} \ dx = \int_{f(a)}^{f(b)} \frac{1}{u} \ du $$ and the RHS appears to be integrable. How can we reconcile this?
Any comments, help and explanations are welcome.
If you wonder what goes wrong when doing the substitution, it is because the conditions needed for doing an integration by substitution are not met. Indeed (using your notation), if $f\colon [a,b]\rightarrow I$ is a differentiable function with a continuous derivative, and $g\colon I\rightarrow \mathbb{R}$ is continuous (and $I$ is an interval), then $$\int_a^b g(f(x))f'(x) dx = \int_{f(a)}^{f(b)} g(u) du.$$ In your case $f$ does not have a continuous derivative, so we cannot expect this equality to hold.