4

Why does the integral of $\frac 1x dx$ equal the natural log of the absolute value of $x$?

$$\int \frac 1x\,dx = \ln|x| + C$$

amWhy
  • 209,954
user8028
  • 431

5 Answers5

10

When you write $$\int\frac1x\,dx$$ you are writing the symbols that represent the most general class of antiderivatives for $\frac1x$ with respect to $x$.

Since $\frac{1}{x}$ is defined for all nonzero $x$, and is continuous for all nonzero $x$, then you are seeking a class of functions that are defined for all nonzero $x$, and all have their derivatives equal to $\frac{1}{x}$.

The two-dimensional class of functions given by $\ln|x|+C_1\frac{x}{|x|}+C_2$ satisfy these needs, as we can show below. Also, since $\frac{1}{x}$ has exactly one discontinuity and it is at $0$, any two antiderivatives have to differ by $C_1\frac{x}{|x|}+C_2$ for some choice of constants $C_1$ and $C_2$. So this class of functions gives all antiderivatives for $\frac{1}{x}$.

Now why is $\frac{d}{dx}\left(\ln|x|+C_1\frac{x}{|x|}+C_2\right)$ equal to $\frac{1}{x}$? We have that $$\begin{aligned} \frac{d}{dx}\left(\ln|x|+C_1\frac{x}{|x|}+C_2\right) &=\frac{d}{dx}\left(\ln|x|\right)\\ &=\left.\frac{d}{dx}\left(\ln(x)\right)\right|_{x\to|x|}\cdot\frac{d}{dx}|x|\\ &=\left.\frac{d}{dx}\left(\ln(x)\right)\right|_{x\to|x|}\cdot\frac{x}{|x|}\\ \end{aligned}$$

So we need to know what $\frac{d}{dx}\left(\ln(x)\right)$ is. At this point, it all depends on what your definition of $\ln$ is. Any of the standard definitions (which can all be shown to be equivalent) all tell us that $\frac{d}{dx}\left(\ln(x)\right)=\frac{1}{x}$. We can discuss that more later, but for now, we continue:

$$\begin{aligned} \frac{d}{dx}\left(\ln|x|+C_1\frac{x}{|x|}+C_2\right) &=\left.\frac{d}{dx}\left(\ln(x)\right)\right|_{x\to|x|}\cdot\frac{x}{|x|}\\ &=\frac{1}{|x|}\cdot\frac{x}{|x|}\\ &=\frac{1}{|x|}\cdot\frac{|x|}{x}\\ &=\frac{1}{x} \end{aligned}$$

And this would prove the claim.

So how do you define $\ln(x)$?

  • As the inverse of $e^x$? Then establish that $\frac{d}{dx}e^x=e^x$, and apply the chain rule to the identity $e^{\ln(x)}=x$, and the fact that $\frac{d}{dx}\left(\ln(x)\right)=\frac{1}{x}$ will arise.

  • As $\int_1^x\frac{1}{t}\,dt$? Then establish the Fundamental Theorem of Calculus, and the fact that $\frac{d}{dx}\left(\ln(x)\right)=\frac{1}{x}$ is immediate.

  • Other ways? Prove they are equivalent definitions to one of the above, and go form there.

2'5 9'2
  • 54,717
4

The derivative

$$ \frac{d}{dx} \ln x = \frac{1}{x}; $$ however also $$ \frac{d}{dx}\ln(-x) = \frac{1}{-x}\frac{d(-x)}{dx} = \frac{1}{-x}(-1)=\frac{1}{x}. $$ Hence, fiding a primitive of $1/x$ amounts to taking both cases into account, which in orderly fashion is written as $\ln |x|.$

Brightsun
  • 6,693
  • 1
    And so? What is the explanation? – Did Jul 17 '14 at 18:35
  • Added further explanation – Brightsun Jul 17 '14 at 18:44
  • 1
    This reads as if you were trying hard to never write neither "if $x$ is positive" nor "if $x$ is negative". The result is difficult to decipher, even when one knows exactly why $|x|$ appears. (And MSE votes are as mysterious as ever.) – Did Jul 17 '14 at 18:50
  • I had in mind to write it that way, but then I remembered it was this way that I found it easier to understand it at the first calculus course. – Brightsun Jul 17 '14 at 18:58
  • 2
    So, in your first calculus course, they let you compute derivatives of functions without even checking that the functions were simply defined at this point? You should get REFUNDED, your teachers were a fraud... :-) – Did Jul 17 '14 at 19:02
  • Actually we already knew from previous teaching where the functions we were handling were defined, so that was pretty obvious. I don't know how it works elsewere... – Brightsun Jul 17 '14 at 19:05
  • So... if you know where the functions are defined, why don't you mention it in your post? – Did Jul 17 '14 at 22:28
2

In some cases (such as complex analysis) the formula is simply wrong. $$ \int \frac{dz}{z} = \ln(z)+C $$ is analytic, but $\ln|x|$ is not analytic.

......

But in the real case, it abbreviates two formulas: $$ \int\frac{dx}{x} = \ln(x)+C\qquad\text{on } x>0, \\ \int\frac{dx}{x} = \ln(-x)+C\qquad\text{on } x<0, $$

GEdgar
  • 111,679
1

You can think of integration as anti-derivative. The derivative of $ln(x)$ is $\frac{1}{x}$ (Check http://math2.org/math/derivatives/more/ln.htm), hence the result follows.

Juanito
  • 2,402
1

When $x>0$, $(\ln |x|)'=(\ln x)'=\frac{1}{x}$.

When $x<0$, $(\ln |x|)'=(\ln (-x))'=\frac{-1}{-x}=\frac{1}{x}$.