Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

What is the integral of $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)|$?

share|cite|improve this question
@Potato Fair enough. – M Turgeon Oct 2 '12 at 15:19
This question is missing the domain of definition, when working in complex domain the restriction for $\ln x$ is not required – Arjang Feb 10 '13 at 2:05
In summary, the answer is not $\log x$, $\log |x|$, or "$\log |x| + C$". The answer is that $F'(x)=1/x$ on $\mathbb{R}$ implies that there are constants $C_1,C_2\in\mathbb{R}$ such that $F(x)=\log(x)+C_1$ for all $x>0$ and $F(x)=\log(-x)+C_2$ for all $x<0$. There is no such thing as "the integral of $1/x$". – wj32 Feb 10 '13 at 2:09
@Arjang Do you mean if $z$ is complex, then $\int 1/z \mathrm{d}z = \ln z +C$, so that there is no modulus symbol required? – buzhidao Oct 6 at 10:12

2 Answers 2

up vote 11 down vote accepted

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$}$$

share|cite|improve this answer

Answers to the question of the integral of 1 over x are all based on an implicit assumption that the upper and lower limits of the integral are both positive real numbers. If we allow more generality, we find an interesting Paradox. For instance, suppose the limits on the integral are from -A to +A where A is a real, positive number. The posted answer in term of ln would give ln(A) - ln(-A) = ln (A/-A) = ln (-1) = i* Pi a complex number --- rather strange. Now if you do the same integral from - to + infinity (i.e. A = infinity) using Contour Integration, you get i*2Pi or twice the above value.

If you use simple reasoning, and also numerical integration, this integral for any value of A ( as long as the limits are -A to + A) is clearly 0. So one must be careful in evaluating real integrals with a singularity of this kind. Same applies to any integral of 1 over (x - k) where k is any constant real number) or

share|cite|improve this answer
Usually Paradox comes from misunderstanding :-) – Ram Feb 10 '13 at 2:25

protected by Zev Chonoles Nov 12 at 2:02

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.