The log function
Background: Any positive number, y, can be written as 10 raised to some
power, x. We can write this relationship in equation form:
y = 10 x
For example it is obvious that 1000 can be written as 10 3.
It is not so obvious that 16 can be written as 10 1.2.
How do we know that this is the correct power of 10?
Because we get it from the graph shown below.
To make this graph we made a table of a few obvious values of
y = 10 x as shown below, left.
Then we plotted the values in the graph (they are the red dots) and drew a smooth
curve through them. Then we observed that the curve went through y = 16
and x = 1.2 (the black dot). This means that 16 = 10 1.2.
We next define a function called the logarithm that takes a number like 16
as input, calculates that it can be written as 10 1.2,
and returns the exponent 1.2 as its output value. Here is the formal definition.
Definition: log(x) is defined as the function that takes
any positive number x as input and returns the
exponent to which the base 10 must be raised to obtain x.
|
Example 1: Evaluate log ( 10 5.7 ).
In this example the argument of the
log function is already expressed
as 10 raised to an exponent, so the log function simply returns the exponent:
log ( 10 5.7 ) = 5.7
Example 2: Evaluate log ( 1000 ). The argument is a number that is easily expressed as 10
raised to an exponent. We do this and the log function then returns the exponent:
log ( 1000 ) = log ( 10 3 ) = 3
Example 3: Evaluate log ( 16 ). The argument is a number
which we don't know how to express as 10 raised to an exponent
(unless we remember the above discussion which said that 16 = 10 1.2 ).
Therefore we use a calculator or the Algebra Coach to evaluate it:
log ( 16 ) = 1.2
Example 4: log ( x ). The argument is an expression.
Until we can evaluate that expression we must leave this logarithm as is.
Graph: The blue curve shown to the right is the graph of the log function.
Notice that for any positive x it returns a single value.
For any negative x it is undefined.
If you compare this graph of the log function to the
graph of y = 10 x
then you see that one can be gotten from the other by interchanging
the x and y axes.
For comparison we have also shown the graph of the ln function
(the natural log function) in red. The ln graph has the same shape
as the log graph but is 2.3 times as tall.
The ln function is described below.
An important feature of the log function is that it increases very slowly
as x becomes very large. It describes nicely how the human
ear percieves loud sounds and the way the human eye percieves bright lights.
Domain and range:
The domain of the log function is all positive real numbers and the range is
all real numbers.
The log function can be
extended to the complex numbers,
in which case the domain is all complex numbers except zero.
The logarithm of zero is always undefined.
Some special values of the log function
Solving the Equation 10 x = y for x
by using the log function
Suppose that x is unknown but that 10 x equals
a known value y. Then finding x requires solving the
following equation for x:
10 x = y
The solution is:
x = log (y)
This is because finding log (y) means expressing
y as 10 to an exponent, and then returning that exponent.
But the original equation says that that exponent is x.
Note that if y is negative then there is no real solution.
However there is a complex solution.
Furthermore if y = 0 then there is no solution at all.
log (x) and 10 x are inverse functions
Consider the 10 x function which takes x and returns
10 x, like this:

The log function is defined to do exactly the opposite, namely:

Therefore these are inverse functions.
Note the following:
- Because the 10 x function is the inverse of
the log function it is sometimes called the antilog function.
- We saw above that the solution of
10 x = y is
x = log (y). We should look at these two equations
as expressing the same relationship between x and y but
from different points of view. The first equation is the relationship solved for
y and the second one is the relationship solved for x.
(An analogy is that the statement “Tom is Jane’s brother”
is equivalent to the statement that “Jane is Tom’s sister”.)
- In the previous bullet we saw that the two equations,
10 x = y and
x = log (y), said the same thing.
If we replace x in the first equation
by the x of the second equation we get this identity:
10 log( y) = y
and if we replace y in the second equation
by the y of the first equation we get this identity:
x = log (10 x )
These identities are useful for showing how the log and antilog
functions cancel each other.
- If you compare the graph
of y = log (x) to the
graph
of y = 10 x
then you see that one can be gotten from the other by interchanging
the x and y axes. This always happens with inverse functions.
How to use the log function in the Algebra Coach
- Type log(x) into the textbox, where x is the argument.
The argument must be enclosed in brackets.
- Set the relevant options:
- Set the exact / floating point option.
In floating point mode the log of any number is evaluated.
In exact mode the log of an integer is not evaluated because
doing so would result in an approximate number.
- Turn on complex numbers if you want to be able to evaluate the
log of a negative or complex number.
- Click the Simplify button.
Algorithm for the log function
Click here
to see the algorithm that computers use to evaluate the log function.
The ln function
Background: You might find it useful to read the previous section
on the log function before reading this section.
Recall that the log function takes a number like 16
as input, calculates that it can be written as 10 1.2,
and then returns the exponent 1.2 as its output value. But why use base 10?
After all, probably
the only reason that the number 10 is important to humans is that
they have 10 fingers with which they first learned to count.
Maybe on some other planet they use base 8!
In fact probably the most important number in
all of mathematics (click here to see why)
is the number 2.7182818284590…, which we give the name e,
in honor of Leonard Euler, who first discovered it.
It will be important to be able to take any positive number, y, and express
it as e raised to some power, x.
We can write this relationship in equation form:
y = e x
For example 5 can be written as e 1.6
(the exponent is approximate).
How do we know that this is the correct power of e?
Because we get it from the graph shown below.
To make this graph we made a table of a few obvious values of
y = e x as shown below, left.
Then we plotted the values in the graph (they are the red dots) and drew a smooth
curve through them. Then we observed that the curve went through y = 5
and x = 1.6 (the black dot). This means that 5 = e 1.6.
If you compare this graph to that of
y = 10 x
you see that both have the same so-called exponential growth shape
but that this graph grows more slowly.
We next define a function called the natural logarithm that takes a number like 5
as input, calculates that it can be written as e 1.6,
and returns the exponent 1.6 as its output value. Here is the formal definition.
Definition: ln(x) is defined as the function that takes
any positive number x as input and returns the
exponent to which the base e must be raised to obtain x.
(e denotes the number 2.7182818284590…)
|
From now on, to avoid confusion, we will call
ln(x) the natural logarithm function and
log(x) the base 10 logarithm function.
Example 1: Evaluate ln ( e 4.7 ).
In this example the argument of the
ln function is already expressed
as e raised to an exponent, so the ln function simply returns the exponent:
ln ( e 4.7 ) = 4.7
Example 2: Evaluate ln ( 8.6 ). The argument is a number
which we don't know how to express as e raised to an exponent .
Therefore we use a calculator or the Algebra Coach to evaluate it:
ln ( 8.6 ) = 2.15
Example 3: ln ( x ). The argument is an expression.
Until we can evaluate that expression we must leave this natural logarithm as is.
Example 4: Evaluate ln ( e ). Express the argument
as e raised to the exponent 1 and return the exponent:
ln ( e ) = ln ( e 1 ) = 1
Example 5: Evaluate ln ( 1 ). Express the argument
as e raised to the exponent 0 and return the exponent:
ln ( 1 ) = ln ( e 0 ) = 0
Graph: The red curve shown to the right is the graph of the ln function.
Notice that for any positive x it returns a single value.
For any negative x it is undefined.
If you compare this graph of the ln function to the
graph of y = e x
then you see that one can be gotten from the other by interchanging
the x and y axes.
For comparison we have also shown the graph of the
base 10 log function in blue. The log graph has the same shape
as the ln graph but is only 43% as tall.
Domain and range:
The domain of the ln function is all positive real numbers and the range is
all real numbers.
The ln function can be
extended to the complex numbers,
in which case the domain is all complex numbers except zero.
The natural logarithm of zero is always undefined.
Solving the Equation e x = y for x
by using the ln function
Suppose that x is unknown but that e x equals
a known value y. Then finding x requires solving this equation
for x:
e x = y
The solution is:
x = ln (y)
because finding ln (y) means expressing
y as e to an exponent, and then returning that exponent.
But the original equation says that that exponent is x.
Note that if y is negative then there is no real solution.
However there is a complex solution.
Furthermore if y = 0 then there is no solution at all.
ln (x) and e x are inverse functions
Consider the e x function which takes x and returns
e x, like this:

The ln function is defined to do exactly the opposite, namely:

Therefore these are inverse functions.
Note the following:
- We saw above that the solution of
e x = y is
x = ln (y). We should look at these two equations
as expressing the same relationship between x and y but
from different points of view. The first equation is the relationship solved for
y and the second one is the relationship solved for x.
(An analogy is that the statement “Tom is Jane’s brother”
is equivalent to the statement that “Jane is Tom’s sister”.)
- In the previous bullet we saw that the two equations,
e x = y and
x = ln (y), said the same thing.
If we replace x in the first equation
by the x of the second equation we get this identity:
e ln (y) = y
and if we replace y in the second equation
by the y of the first equation we get this identity:
x = ln (e x )
These identities are useful for showing how the ln and e x
functions cancel each other.
- If you compare the graph
of y = ln (x) to the
graph
of y = e x
then you see that one can be gotten from the other by interchanging
the x and y axes. This always happens with inverse functions.
How to use the ln function in the Algebra Coach
- Type ln(x) into the textbox, where x is the argument.
The argument must be enclosed in brackets.
- Set the relevant options:
- Set the exact / floating point option.
In floating point mode the ln of any number is evaluated.
In exact mode the ln of an integer is not evaluated because
to do so would result in an approximate number.
- Set the e does / does not represent 2.718… option.
(Set this to does represent
so that for example ln(e 3 ) simplifies to 3.)
- Turn on complex numbers if you want to be able to evaluate the
ln of a negative or complex number.
- Click the Simplify button.
Algorithm for the ln function
Click here
to see the algorithm that computers use to evaluate the natural logarithm function.
The exp or e x function
Background: You might find it useful to read the previous section
on the ln function before reading this section.
There we saw that it is possible to use the number e
(which is approximately 2.7182818284590…) as a base and to raise it to
any power, x, and produce any positive number y.
We can write this relationship in equation form:
y = e x
Here is a graph of y = e x (the blue curve).
For comparison we also show graphs of y = 2 x
and y = 4 x.
Because the number e is between 2 and 4
the curve y = e x lies between the curves
y = 2 x and
y = 4 x.
All three of these curves are called exponential functions because the
independent variable x is in the exponent. All three have the property
that the higher up the curve you go the steeper they get. However
y = e x has the special property that at every
point along the curve the slope equals the height.
This property concerning slopes makes it a very important function in
calculus.
Definition: We define a function called the exp function that takes an argument x
and returns the value of e raised to the power x:

|
You can think of exp(x) as just an alternative (functional) notation for
the expression e x.
So of course the functional form exp(x) has all the
properties that the exponential form e x has.
The Algebra Coach has an option that allows you to use one form or the other.
Here is a table comparing the “look” of the various properties in the two forms:
|
Graph: The blue curve is the graph of
y = e x
(i.e. of the exp function).
It has the property that its slope equals its height everywhere.
The dotted red lines show the slope of the curve at various points along
the curve. Notice that the slope is 5 when the height is 5, and so on.
If you compare this graph of the exp function to the
graph of the ln function
then you see that one can be gotten from the other by interchanging
the x and y axes.
Domain and range:
The domain of the exp function is all real numbers and the range is
all positive real numbers.
The exp function can be
extended to the complex numbers,
in which case the domain and the range is all complex numbers.
Solving the Equation ln (x) = y for x
by using the e x or exp function
Suppose that x is unknown but that ln (x) equals
a known value y. Then finding x requires solving this equation
for x:
ln (x) = y.
The solution is:
x = e y,
or
x = exp (y).
This was explained in the previous section on the ln function.
ln (x) and e x are inverse functions
This was explained in the previous section on the ln function.
How to use the exp function in the Algebra Coach
- Type exp(x) into the textbox, where x is the argument.
The argument must be enclosed in brackets.
- Set the relevant options:
- Set the exponential function option to this:

- Set the exact / floating point option.
In floating point mode the exp of any number is evaluated.
In exact mode the exp of an integer is not evaluated because
to do so would result in an approximate number.
- Turn on complex numbers if you want to be able to evaluate the
exp of a complex number.
- Click the Simplify button.
Note: You never need to use the functional
notation exp (x) in the Algebra Coach.
You can always use the notation e x instead.
In fact the default setting for the exponential function option is
exp (x) → e x.
Algorithm for the e x or exp function
Click here
to see the algorithm that computers use to evaluate
e x or exp (x).