30
$\begingroup$

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)|$?

  • 0
    @Potato Fair enough.2012-10-02
  • 0
    This question is missing the domain of definition, when working in complex domain the restriction for $\ln x$ is not required2013-02-10
  • 4
    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$".2013-02-10
  • 0
    @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?2015-10-06

2 Answers 2

37

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

  • 0
    What is $\text{sgn}(\cdot)$? Please explain to me. $(+1)$ though :)2018-04-23
  • 0
    $\operatorname{sgn}(a)$ is the sign of $a$. If $a>0$ then $\operatorname{sgn}(a)=1$, and if $a<0$ then $\operatorname{sgn}(a)=-1$.2018-04-23
  • 0
    You know what, that is actually quite useful. Thank you for telling me :)2018-04-23
8

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

  • 2
    Usually Paradox comes from misunderstanding :-)2013-02-10
  • 0
    Well, calling Ln(-1) = i*Pi is already expanding the **standard** definition of Ln. In the context described (where A & -A are both real, and the log used is standard), Ln(-1) is undefined. But I'd say the intelligent thing is to break it into two undefined improper integrals with one of the limits at 0 (where it is unbounded). At that point, they can be seen as fully symmetric. Recognizing this symmetry, you can "safely" say the answer is 0.2015-12-04