Whether derivative of $\ln(x)$ is $\frac{1}{x}$ for $x>0$ only?

Whether derivative of $\ln(x)$ is $\frac{1}{x}$ for $x>0$ only? Can't we write $$\frac{d}{dx} {\ln|x|} = \frac{1}{x}$$ so that we can get the corresponding integration formula for $\frac{1}{x}$ easily as $$\ln|x|$$ I have gone thorough this but it discusses only about integration Is the integral of $\frac{1}{x}$ equal to $\ln(x)$ or $\ln(|x|)$?

• Are you asking about derivative or primitive? 'Cos if you are asking about the derivative of $x\mapsto\log(x)$ when $x\lt0$, what is $\log(-4)$? – Did Feb 24 '14 at 15:16
• You don't need to worry about $x=0$ since $\ln 0$ doesn't exist (since $e^y=0$ has no solution) -- at least in your situation, I expect. – Ian Coley Feb 24 '14 at 15:16

for $x>0$ $\frac{d}{dx}\ln |x|=\frac{d}{dx}\ln x=\frac{1}{x}$

for $x<0$ $\frac{d}{dx}\ln |x|=\frac{d}{dx}\ln (-x)=\frac{1}{-x}\times \frac{d}{dx}(-x)=\frac{1}{-x}\times (-1)=\frac{1}{x}$

Therefore $\int \frac{1}{x}dx=\ln |x|+C, x \ne 0$

• In the second step in $$\frac{d}{dx}\ln (-x)=\frac{1}{-x}\times \frac{d}{dx}(-x)$$your (-x) is positive, that is what I want to ask whether derivative of ln(x) is 1/x for x>0 only? – user22180 Feb 24 '14 at 15:26
• The derivative of $\ln x$ is $1/x$ for $x>0$ only because $\ln x$ is defined for $x>0$ only. – kmitov Feb 24 '14 at 15:53

Actually you have to split the case whether $x$ is greater than zero or it is lower.

The reason is that you could deal with different integration constant. So the steps you have to go through are:

• Find the range of $x$
• If the range is all within positive/negative number, thus you can apply $\frac{d}{dx}\ln|x|=\frac{1}{x}.$ Otherwise you have to split the cases.

Since $|x|=\sqrt{x^2}$ we have $\bigl(\ln|x|\bigr)'=\bigr(\ln(\sqrt{x^2})\bigr)'=\dfrac{1}{\sqrt{x^2}}\dfrac{1}{2\sqrt{x^2}}\cdot2x=\dfrac{x}{|x|^2}=\dfrac{x}{x^2}=\dfrac{1}{x}$.