# Derivative and integral of the natural log

1. Feb 26, 2013

### phospho

not really a problem, but more curious

if we differentiate ln(2x) we get 2/(2x) = 1/x by the chain rule, but if we integrate 1/x we get ln|x|? Could anyone explain why this is the case, thanks.

2. Feb 26, 2013

### SammyS

Staff Emeritus
ln(2x) = ln(x) + ln(2)

Don't forget the constant of integration.

$\displaystyle \int \frac{1}{x}\,dx=\ln(|x|)+C_0=\ln(|x|)+\ln(2)+C_1\,,\$ where C0 = C1 + ln(2) .

3. Feb 26, 2013

### Ferramentarius

As to the absolute value it is a generalization which works in the case of negative numbers for which the real logarithm $ln(x)$ is undefined. That it applies can be seen by forming the derivative in the separate cases when $x > 0$ and $x < 0$ respectively. One should still watch for intervals which include zero for there neither $ln(x)$ nor $ln|x|$ are defined.

4. Feb 27, 2013

thanks!