What is the integral of \frac{1}{x}? Do you get \ln(x) or \ln|x|?

In general, does integrating f'(x)/f(x) give \ln(f(x)) or \ln|f(x)|?

Also, what is the derivative of |f(x)|? Is it f'(x) or |f'(x)|?

**Answer**

You have \int {1\over x}{\rm d}x=\ln|x|+C (Note that the “constant” C might take different values for positive or negative x. It is really a locally constant function.)

In the same way,

\int {f'(x)\over f(x)}{\rm d}x=\ln|f(x)|+C

The last derivative is given by

{{\rm d}\over {\rm d}x}|f(x)|={\rm sgn}(f(x))f'(x)=\cases{f'(x) & if $f(x)>0$ \cr -f'(x) & if $f(x)<0$}

**Attribution***Source : Link , Question Author : hollow7 , Answer Author : Per Manne*