Why do some integrals and derivatives have absolute values?

Solution 1:

Because if $x < 0$, $\log x$ is not defined, so certainly it's derivative it's not equal to $\frac 1x$; on the other hand $\log -x$ works just fine (check it!)

So one should write $\int \frac 1x$ equal to $\log x $ if $x > 0$ and equal to $\log -x$ if $x<0$. We summarize this by putting the absolute value of logarithm, even though in $0$ the function is not defined and not differentiable

Solution 2:

The antiderivative of $f(x)$ is a function $F(x)$ such that $F'(x)=f(x)$ for all $x$ in the domain of $f$.

Thus $\ln|x|$ is an antiderivative of $\frac{1}{x}$ because

  • if $x>0$, $\frac{d}{dx}(\ln|x|)=\frac{d}{dx}(\ln(x))=\frac{1}{x}$
  • if $x<0$, $\frac{d}{dx}(\ln|x|)=\frac{d}{dx}(\ln(-x))=\frac{1}{-x} \cdot \frac{d}{dx}(-x)=\frac{1}{-x}\cdot (-1)=\frac{1}{x}.$

It would be wrong to say that $\ln(x)$ is an antiderivative for $\frac{1}{x}$, because it is not defined when $x<0$. Hence $\frac{d}{dx}\ln(x)$ is not defined when $x<0$, so it cannot be equal to $\frac{1}{x}$ (which is defined for $x<0$).

Solution 3:

Simply because taking the derivative of those functions with absolute values will yield the original integrand.

Solution 4:

Suppose we know that $\dfrac d {dx}\ln x = \dfrac 1 x,$ and that that of course presupposes that $x$ is positive.

Now suppose we want an antiderivative of $1/x$ on the interval $(-\infty,0)$, i.e. all negative values of $x.$

$$ f'(x) = \frac 1 x, \quad x<0. $$ For $a<b<0$ we have $$ \int_a^b \frac 1 x \, dx = f(b) - f(a). $$

Let $u = -x$, so $du = -dx$. As $x$ goes from $a$ (which is negative) to $b$ (which is negative), then $u$ goes from $-a$ (which is positive) to $-b$ (which is positive), and we have $$ \int_a^b \frac 1 x \, dx = \int_{-a}^{-b} \frac 1 {(-u)}\, (-du) = \int_{-a}^{-b} \frac 1 u \, du = \ln(-b) - \ln(-a) = \ln|b| - \ln|a|. $$ Differentiating with respect to $b$ yields $$ \frac d {db} (\ln |b| - \ln |a|) = \frac d {db} \int_a^b \frac 1 x \, dx = \frac 1 b. $$ And this is with $b<0$.