Unit 5, lesson 42

Natural Logarithm of Absolute Value

Why ln|x| is defined for every nonzero x, how its graph splits into two mirror image branches, and how to find exclusions and zeros when the center shifts.

  • Theory part 83
  • Practice part 84
  • Logarithms

The natural logarithm refuses negative inputs, yet calculus keeps meeting quantities like 1x\frac{1}{x} that make sense on both sides of zero. Putting an absolute value inside the logarithm gives a logarithm that also accepts negative inputs. The input first becomes its distance from zero, and only that positive distance reaches the logarithm. The result is a graph with two separate pieces, one on each side of a forbidden point.

Key terms

The function ln of absolute x

Definition The function f(x)=ln⁡∣x∣f(x) = \ln \lvert x \rvert is the composition of the absolute value with the natural logarithm. To evaluate it at a real number xx, first compute ∣x∣\lvert x \rvert, then apply ln⁡\ln. It is defined exactly for those xx with ∣x∣>0\lvert x \rvert > 0.

In plain words Strip the sign off the input, then take the natural logarithm of what is left.

Example Two inputs with the same distance from zero give the same output.

ln⁡∣−e3∣=ln⁡(e3)=3,ln⁡∣e3∣=3.\begin{gathered} \ln \lvert -e^3 \rvert = \ln\left(e^3\right) = 3, \\[0.4em] \ln \lvert e^3 \rvert = 3. \end{gathered}

The order matters. The expression ∣ln⁡x∣\lvert \ln x \rvert applies the logarithm first and is a different function, defined only for x>0x > 0.

Positive argument and the nonzero domain

Definition The natural logarithm ln⁡u\ln u is defined exactly when its argument satisfies u>0u > 0. For ln⁡∣x∣\ln \lvert x \rvert the argument is ∣x∣\lvert x \rvert, and ∣x∣>0\lvert x \rvert > 0 holds precisely when x≠0x \ne 0. So the domain of ln⁡∣x∣\ln \lvert x \rvert is

(−∞,0)∪(0,∞).(-\infty, 0) \cup (0, \infty).

In plain words The absolute value makes every negative input positive, so negatives are now allowed. Zero stays zero, and ln⁡0\ln 0 is undefined, so x=0x = 0 is still excluded.

Example At x=−2x = -2 the argument is ∣−2∣=2>0\lvert -2 \rvert = 2 > 0, so ln⁡∣−2∣=ln⁡2≈0.693\ln \lvert -2 \rvert = \ln 2 \approx 0.693 is defined. At x=0x = 0 the argument is 00 and there is no output. Near zero the outputs fall without bound. For instance ln⁡∣±0.001∣≈−6.91\ln \lvert \pm 0.001 \rvert \approx -6.91, and ln⁡∣x∣→−∞\ln \lvert x \rvert \to -\infty as x→0x \to 0 from either side, so the line x=0x = 0 is a vertical asymptote.

Piecewise description

Definition Since ∣x∣=x\lvert x \rvert = x for x>0x > 0 and ∣x∣=−x\lvert x \rvert = -x for x<0x < 0,

ln⁡∣x∣={ln⁡x,x>0,ln⁡(−x),x<0.\ln \lvert x \rvert = \begin{cases} \ln x, & x > 0, \\ \ln(-x), & x < 0. \end{cases}

No case is written for x=0x = 0, because the function is not defined there.

In plain words On the right of zero it is the ordinary natural logarithm. On the left it is the natural logarithm of the positive number −x-x.

Example At x=−1ex = -\frac{1}{e} use the second case.

ln⁡(−(−1e))=ln⁡(1e)=−1.\ln\left(-\left(-\frac{1}{e}\right)\right) = \ln\left(\frac{1}{e}\right) = -1.

The second case never feeds a negative number to the logarithm, because −x>0-x > 0 whenever x<0x < 0.

Two branches

Definition The graph of y=ln⁡∣x∣y = \ln \lvert x \rvert consists of two disconnected branches, one over (0,∞)(0, \infty) and one over (−∞,0)(-\infty, 0). The right branch is the graph of ln⁡x\ln x and is increasing on (0,∞)(0, \infty). The left branch is the graph of ln⁡(−x)\ln(-x) and is decreasing on (−∞,0)(-\infty, 0). The zeros are x=1x = 1 and x=−1x = -1. The range is all real numbers, because for every real yy the two inputs x=eyx = e^y and x=−eyx = -e^y both give output yy.

In plain words You draw the familiar logarithm curve on the right, then a second curve on the left that falls as it moves toward zero. The pen has to lift at x=0x = 0.

Example Exact points are easy to build from powers of ee.

xx∣x∣\lvert x \rvertln⁡∣x∣\ln \lvert x \rvert
−e2-e^2e2e^222
−e-eee11
−1-11100
−1e-\frac{1}{e}1e\frac{1}{e}−1-1
1e\frac{1}{e}1e\frac{1}{e}−1-1
111100
eeee11
e2e^2e2e^222

Reading the left half from top to bottom, xx moves toward zero and the output drops from 22 to −1-1, so the left branch decreases. On the right half xx moves away from zero and the output climbs.

Even symmetry

Definition A function ff is even when −x-x is in its domain whenever xx is, and f(−x)=f(x)f(-x) = f(x) for every xx in the domain. The function ln⁡∣x∣\ln \lvert x \rvert is even, because its domain is symmetric about 00 and

ln⁡∣−x∣=ln⁡∣x∣for all x≠0.\ln \lvert -x \rvert = \ln \lvert x \rvert \qquad \text{for all } x \ne 0.

Its graph is symmetric about the yy-axis.

In plain words The left branch is the mirror image of the right branch across the yy-axis.

Example Reflecting the point (e,1)(e, 1) on the right branch gives (−e,1)(-e, 1), and indeed ln⁡∣−e∣=1\ln \lvert -e \rvert = 1. This also explains why one branch increases and the other decreases. A mirror reverses left and right, so a curve that rises as you move right becomes one that rises as you move left, which means it falls as xx increases.

Absolute value inside a logarithm

Definition For a function gg, the expression ln⁡∣g(x)∣\ln \lvert g(x) \rvert is defined exactly at the inputs xx in the domain of gg with g(x)≠0g(x) \ne 0. In particular, for a real number hh the function ln⁡∣x−h∣\ln \lvert x - h \rvert is the graph of ln⁡∣x∣\ln \lvert x \rvert shifted hh units to the right. Its domain is all x≠hx \ne h, its vertical asymptote is x=hx = h, its zeros are x=h−1x = h - 1 and x=h+1x = h + 1, and its graph is symmetric about the line x=hx = h.

In plain words Find where the inside is zero and remove that point. Everywhere else the absolute value turns the inside into a positive distance.

Example Consider f(x)=ln⁡∣x−3∣f(x) = \ln \lvert x - 3 \rvert. The inside is zero at x=3x = 3, so the domain is x≠3x \ne 3 and the line x=3x = 3 is the asymptote. The zeros solve ∣x−3∣=1\lvert x - 3 \rvert = 1, so

x=2orx=4.x = 2 \quad \text{or} \quad x = 4.

Points at equal distance from 33 match, for example f(3+e)=f(3−e)=1f(3 + e) = f(3 - e) = 1.

Logarithmic identity with absolute values

Definition For every real x≠0x \ne 0,

ln⁡(x2)=2ln⁡∣x∣.\ln\left(x^2\right) = 2 \ln \lvert x \rvert.

This follows from the power law applied to the positive number ∣x∣\lvert x \rvert, since x2=∣x∣2x^2 = \lvert x \rvert^2. The shorter form 2ln⁡x2 \ln x is correct only for x>0x > 0. More generally, for nonzero real numbers uu and vv,

ln⁡∣uv∣=ln⁡∣u∣+ln⁡∣v∣.\ln \lvert uv \rvert = \ln \lvert u \rvert + \ln \lvert v \rvert.

In plain words When you pull an even power out of a logarithm, an absolute value has to appear, or you lose the negative half of the domain.

Example At x=−ex = -e the left side is ln⁡(e2)=2\ln\left(e^2\right) = 2. The correct right side is 2ln⁡∣−e∣=2⋅1=22 \ln \lvert -e \rvert = 2 \cdot 1 = 2. The careless form 2ln⁡(−e)2 \ln(-e) is undefined, so writing ln⁡(x2)=2ln⁡x\ln\left(x^2\right) = 2 \ln x would wrongly throw away every negative input. Looking ahead, this matters in calculus. There you will learn that the slope of ln⁡∣x∣\ln \lvert x \rvert at any x≠0x \ne 0 is 1x\frac{1}{x}, on both sides of zero, so the absolute value is exactly what keeps the negative inputs.

Check yourself

  1. Find the domain and the zeros of f(x)=ln⁡∣x+2∣f(x) = \ln \lvert x + 2 \rvert.
Show the answer

The inside x+2x + 2 is zero at x=−2x = -2, so the domain is all x≠−2x \ne -2. The zeros solve ∣x+2∣=1\lvert x + 2 \rvert = 1, which gives x+2=1x + 2 = 1 or x+2=−1x + 2 = -1, so x=−1x = -1 or x=−3x = -3.

  1. Evaluate ln⁡∣−e3∣\ln \lvert -e^3 \rvert and ln⁡∣−1e2∣\ln \left\lvert -\frac{1}{e^2} \right\rvert exactly.
Show the answer

The absolute values are e3e^3 and e−2e^{-2}, so the outputs are 33 and −2-2.

  1. A student simplifies ln⁡(x2)\ln\left(x^2\right) to 2ln⁡x2 \ln x and then says the expression is undefined at x=−4x = -4. What went wrong, and what is the correct value?
Show the answer

The rewrite 2ln⁡x2 \ln x is valid only for x>0x > 0. The original ln⁡(x2)\ln\left(x^2\right) is defined at x=−4x = -4, and the correct identity gives

ln⁡((−4)2)=2ln⁡∣−4∣=2ln⁡4≈2.773.\begin{aligned} \ln\left((-4)^2\right) &= 2 \ln \lvert -4 \rvert \\[0.4em] &= 2 \ln 4 \approx 2.773. \end{aligned}

How this lesson connects