# Integral of 1 over x

As we know, $\int \frac {1}{x} \, dx = ln (x) + C$
But, what it would be, if $x$ is negative?
I calculated this way,
$\int \frac {1}{x} \, dx = - \int \frac {1}{-x} \, dx = \int \frac {1}{-x} \, d(-x) = ln (-x) + C$ [because, $-x$ has a positive value.]

The variable ##x## can be either positive or negative because the fact is, $$\int \frac{1}{x} dx = \ln({|x|}) + C$$

dextercioby
Homework Helper
The function 1/x is (maximally) defined at all points in R minus 0, the natural logarithm only at points >0. It turns out that ## \ln -x ## is not a valid expression in the reals, because it conflicts with the known ##\ln ab = \ln a + \ln b## by being forced to consider ##\ln -1##.

pwsnafu
The function 1/x is (maximally) defined at all points in R minus 0, the natural logarithm only at points >0. It turns out that ## \ln -x ## is not a valid expression in the reals, because it conflicts with the known ##\ln ab = \ln a + \ln b## by being forced to consider ##\ln -1##.
##ln(-x)## is a valid expression for negative x.

##\ln(ab) = \ln(a) + \ln(b)## is a property which is valid for positive a and b, it is not a definition of the logarithm. The property being unsatisfied for negatives has nothing to do with whether ##\ln(-x)## is defined or not.

Last edited:
Svein