Why is $\int \frac{du}{u}$ equal to $\ln|u|$?

415 Views Asked by At

Why is $\displaystyle \int\dfrac{dx}{x} = \ln|x|$?

What I am asking is about the absolute value. I know that it is used so that $\ln x$ will not have an undefined value for $x < 0$. How can we recheck if this is the correct antiderivative? We take the derivative.

Let $f(x) = \ln|x|$ and $u = |x|$. Then, $$\begin{align*}\dfrac{df}{dx} &= \dfrac{df}{du}\cdot\dfrac{du}{dx} \\ &=\frac{1}{u}\cdot\frac{x}{|x|} \\ &= \frac{1}{|x|}\cdot\frac{x}{|x|} \\ &=\frac{x}{|x|^{2}}\end{align*}$$

This seems odd. What did I do wrong? Should I get the derivative for $x < 0$ and $x > 0$ separately?


Edit: This might be similar to this, but what I am asking for is confirming that the antiderivative obtained is correct by taking the derivative.

3

There are 3 best solutions below

0
On BEST ANSWER

Since $\dfrac x{|x|^2}=\dfrac x{x^2}=\dfrac1x$, you get that $\dfrac{\mathrm df}{\mathrm dx}=\dfrac1x$.

Anyway, the simplest approach consists in using the fact that$$\ln|x|=\begin{cases}\ln(x)&\text{ if }x>0\\\ln(-x)&\text{ if }x<0.\end{cases}$$

3
On

$$\begin{align*}\dfrac{df}{dx} &= \dfrac{df}{du}\cdot\dfrac{du}{dx} \\ &=\frac{1}{u}\cdot\frac{|x|}{x} \\ &= \frac{1}{|x|}\cdot\frac{|x|}{x} \\ &=\frac{1}{x}\end{align*}$$

PS: $x\neq0$

0
On

As it was mentioned before, it is simply a matter of defining a primitive in the largest possible set. Taking $$ f(x)= \begin{cases} \ln x, & x>0\\ \ln (-x), & x <0 \end{cases} $$

you can check that $f'(x)=\frac 1x$, for all $x \ne 0$. As a side comment, saying that $\int \frac 1x dx = \ln|x| + C$ is not entirely correct, we should in fact say the family of all primitives of $\frac 1x$ is

$$ f(x)= \begin{cases} \ln x + C_1, & x>0\\ \ln (-x) + C_2, & x <0. \end{cases} $$