Hi,
I understand that differentiate both ln x and ln |x| will give 1/x.
But why $\displaystyle \int \frac{1}{x} dx=ln|x|+c$.
Is it ok if I write $\displaystyle \int \frac{1}{x} dx=ln x+c$
Can someone help?
It depends on the interval x is defined on.
If $\displaystyle x\in\left(0,\infty\right)$, then its safe to say that $\displaystyle \int\frac{1}{x}\,dx=\ln x+C$. However, if $\displaystyle x\in\left(-\infty,0\right)$, then $\displaystyle \int\frac{1}{x}\,dx=\ln\left(-x\right)+C$.
Thus, it would be best to define $\displaystyle \int\frac{1}{x}\,dx=\ln\!\left|x\right|+C$ for $\displaystyle x\in\mathbb{R}\backslash\{0\}$ (any real number except zero)