BHS Calculus logo

The Graph of y = |ln x|

on the TI-89



The TI-89 is a very good calculator, and it is very unusual to catch it in a "mistake", but it happens. Examining situations where the calculator produces strange results points out that the calculator, no matter how "smart" it seems, is just a tool - you have to be the mathematician.


The Problem:

Enter the function y1 = abs(ln(x)) on the "y =" screen, and graph it in a standard window.

y = screen

The screen shot at right shows what you (probably) get. If you are alert, you are asking yourself, "The graph in the first quadrant looks ok, but what's going on in the second quadrant? The domain of y = ln(x) is x > 0, so y = |ln (x)| should also be undefined when x = 0, right?" Yes, you are right - we don't expect to see the part of the graph in II. Read on.

"strange" graph


The Solution:

Set your calculator's angle mode key to "degree", and re-graph the function.

mode screen

This time, you get the "correct" graph. (If you got this graph initially, switch to radian mode to see the graph above.) Since we usually (always?) work in radian mode in AP Calculus, this is a little disturbing. What's going on?

the "correct" graph


A Reason for This Strangeness:

Go back to the mode key screen again. Set Angle mode to RADIAN, and Complex Format to "2: Rectangular".

mode screen (again)

Now, some theory. Do you remember from pre-algebra (the "good old days"!) the equation involving the polar form of a complex number:

e^(itheta) = cos(theta) + i sin(theta)

If you let theta = pi, this becomes:

e^(i pi) = -1

This is a form of the Euler equation e^(i pi) + 1 = 0, an equation that contains all of the important constants of elementary mathematics ("The Meaning of Life")! Suppose we try to evaluate ln(-3) as a complex number:

ln((-3) = ln 3 + pi i

This is the result that the TI-89 gives you if you evaluate ln(-3).

ln(-3) = ln(3) + pi i

OK, so what about |ln(-3)|? Well, in "complex number land", the "| |" symbol means "magnitude", not "absolute value"! Remember graphing complex numbers on the complex (Argand) plane?

graph of y = ln(-3)

The magnitude of the complex number ln(-3) is:

! ln(-3) |

which is a real number! (approximately 3.328)!

abs(ln(-3)) = stuff

The screen shot at right shows that the calculator is indeed plotting the point (-3, 3.32815)! So, the calculator isn't wrong - it is just applying a little fancier math than we really want to see in this case. Remember that you can shut this off by switching to DEGREE mode key. The reason that this works is that the identity

is only valid if theta is in radians.

"incorrect" graph


last update April 14, 2008 by JL Stanbrough