y=lnxy = \ln|x|

Graph of the Function y=lnxy = \ln|x|

y=lnxy = \ln|x| extends the logarithm to negative arguments. Where lnx\ln x is defined only for x>0x > 0, taking the absolute value inside gives a function defined for every real number except x=0x = 0. That small change is what makes it possible to write down the integral of 1x\dfrac{1}{x}.

Domain and range

The domain is x0x \neq 0 and the range is all of the real numbers. Every real yy is attained exactly twice, at x=±eyx = \pm e^{y}.

Symmetry

Since f(x)=lnx=lnx=f(x)f(-x) = \ln|-x| = \ln|x| = f(x), the function is even and the graph is symmetric about the yy-axis. The right half is exactly y=lnxy = \ln x and the left half is its mirror image.

Intercepts and asymptote

Because lnx=0\ln|x| = 0 precisely when x=1|x| = 1, there are two xx-intercepts, (1,0)(1, 0) and (1,0)(-1, 0). As x0x \to 0 from either side the value falls to -\infty, so the yy-axis is a vertical asymptote.

Monotonicity and concavity

The derivative is y=1xy' = \dfrac{1}{x}.

Rangeyy'BehaviorConcavity
x<0x < 0negativedecreasingconcave down
x>0x > 0positiveincreasingconcave down

The general rule that the derivative of an even function is odd shows up here directly. The second derivative y=1x2y'' = -\dfrac{1}{x^2} is negative throughout the domain, so both branches are concave down and there is no inflection point.

The antiderivative of 1x\dfrac{1}{x}

The point of this function is the following formula.

dxx=lnx+C\int \frac{dx}{x} = \ln|x| + C

The integrand 1x\dfrac{1}{x} is defined for x<0x < 0 while lnx\ln x is not, which is exactly why the absolute value is needed. Indeed for x<0x < 0 we have ddxln(x)=1x=1x\dfrac{d}{dx}\ln(-x) = \dfrac{-1}{-x} = \dfrac{1}{x}, so the formula is correct on the negative side too.

A caveat about the constant

Because the domain is split in two at x=0x = 0, the antiderivative strictly speaking carries independent constants on x>0x > 0 and on x<0x < 0. Writing lnx+C\ln|x| + C with a single constant is a shorthand valid only when one interval is under consideration. The same fact explains why the improper integral 11dxx\int_{-1}^{1}\dfrac{dx}{x} across the gap has no value.

How slowly it grows

The function does diverge as x|x| \to \infty, but so slowly that it never catches any positive power xa|x|^{a}. We have ln10613.82\ln 10^{6} \approx 13.82, and reaching y=100y = 100 requires x=e1002.7×1043|x| = e^{100} \approx 2.7 \times 10^{43}.

Applications

  • Logarithmic differentiation uses it as f(x)f(x)dx=lnf(x)+C\int \dfrac{f'(x)}{f(x)}\,dx = \ln|f(x)| + C, which stays valid on intervals where ff is negative
  • In the complex logarithm lnz=lnz+iargz\ln z = \ln|z| + i\arg z, this function is precisely the real part
  • The fundamental solution of the two-dimensional Laplace equation is lnr\ln r, so the potential of an infinite line charge and the flow around a two-dimensional vortex both take this form