Why is $\ln|x| = \int \frac{1}{x}$?

106 Views Asked by At

This is a question that I've had for a while now. I feel like it should be easy, but I can't figure it out. Why is $\ln|x| = \int \frac{1}{x}$? Furthermore, why does $x$ become $|x|$ after integration?

Extra question: $\int_a^b \frac{1}{x} = \ln|x||_a^b = \ln|b| - \ln|a| = \ln|-b| - \ln|-a| = \int_{-a}^{-b} \frac{1}{x}$ holds, right? (for $a,b \neq 0$)

3

There are 3 best solutions below

3
On BEST ANSWER

Integration is the opposite to differentiation. If $x > 0$, then $$ \frac{d}{dx} \ln(x) = \frac 1x .$$ If $x < 0$, then $$ \frac{d}{dx} \ln(-x) = -\frac 1{-x} = \frac1x .$$ So $$ \frac{d}{dx} \ln|x| = \frac 1x .$$ And you are correct about the second part. (If you draw a picture, it will confirm you are correct.)

1
On

(I haven't answered the main question here about the relationship between $\ln x$ and $1/x$, but the thoughts below are too long for a comment.)

Careful:

$$\int\frac1x\ dx = \begin{cases} \ln x + C^+, & \text{if $x>0$} \\ \ln (-x) + C^-, & \text{if $x<0$} \\ \end{cases}$$

It's often written that $\int\frac1x\ dx = \ln|x| + C$, but this is not accurate; the discontinuity at $x=0$ means that the constant on the left half might not be the same as the constant on the right half. Many textbooks make this mistake, sadly.

For a similar reason, your condition $a,b\neq0$ is not enough in your extra question. You need to ensure that $0$ is not contained in the interval $(a,b)$. Apart from that, you're right that $\int_a^b\frac1x\ dx = \int_{-a}^{-b}\frac1x\ dx$.

Don't forget your $dx$ at the end of the integrals, nor the constant of integration.

0
On

One way you can see this is by looking at the graph of ${\ln|x|}$, noting that the slope of this function should be ${\frac{1}{x}}$. You'll see why the ${x}$ should be ${|x|}$ (I won't put a graphic for this here, but you can easily find any graphing software. Upon request - I can highlight the graph and explain - but definitely take a look for yourself first).

Otherwise - you have pretty much got it. If we assume ${0<a<b}$, then we can agree ${\int_{a}^{b}\frac{1}{x}dx=\ln(b)-\ln(a)}$. Instead, if we integrate ${\int_{-a}^{-b}\frac{1}{x}dx}$- now making the substitution ${u=-x}$ you end up with

$${\Rightarrow \int_{a}^{b}-\frac{1}{-u}du=\int_{a}^{b}\frac{1}{u}du}$$

In other words,

$${\int_{a}^{b}\frac{1}{x}dx=\int_{-a}^{-b}\frac{1}{x}dx}$$

So we can just add the absolute value and we would be correct for all pairs ${(a,b)}$ (as long as neither ${a}$ or ${b}$ are equal to $0$, or contain $0$ in it's inverval). At no point can we just integrate over any region containing $0$. The function ${\frac{1}{x}}$ has a discontinuity at ${x=0}$ - and in fact - we can show that any integral for the function ${\frac{1}{x}}$ containing the point $0$ will diverge.