InverseFunctions.mws

Functions and Models: Inverse Functions and Logarithms

Vocabulary

inverse function, one-to-one, injective, horizontal line test, laws of logarithms, natural logarithm, common logarithm, change of base formula

Objectives

Lecture Outline

The Idea of Inverse

Some functions have effects which are reversible. For example, the function which adds 3 to an input x has its effect reversed by the function which subtracts 3 from an input. Functions whose effects can be reversed are said to be invertible. Other examples of invertible functions include f(x) = x^3, g(x) = 1/x , and h(x) = (x+1)/(x-2) .

Not all functions are invertible. Functions such as f(x) = x^2 or g(x) = sin(x) do not have inverses. In each of these cases, the function takes on some values more than once. The effect of each function is not reversible because we have no way of knowing a priori what value of x gives rise to the observed effect of the function on x .

When does a function have an inverse?

If a function never takes on the same value twice, then it has an inverse.

Algebraic Criterion: One-to-One

Definition: A function f is one-to-one if it never takes on the same value twice; that is, f(x[1]) does not equal f(x[2]) whenever x[1] does not equal x[2] .

A function has an inverse if and only if the function is one-to-one. Hence each of our previous examples of invertible functions is also an example of a one-to-one function. The functions f(x) = x^3, g(x) = 1/x , and h(x) = (x+1)/(x-2) are all one-to-one.

Visual Criterion: the Horizontal Line Test

Often it will be expedient to determine whether a function is one-to-one by examining its graph. The Horizontal Line Test states that a function is one-to-one if and only if no horizontal line intersects its graph more than once.

Let us apply the horizontal line test to verify that f(x) = x^3, g(x) = 1/x , and h(x) = (x+1)/(x-2) are all one-to-one.

> f:=x->x^3;

f := proc (x) options operator, arrow; x^3 end proc...

> g:=x->1/x;

g := proc (x) options operator, arrow; 1/x end proc...

> h:=x->(x+1)/(x+2);

h := proc (x) options operator, arrow; (x+1)/(x+2) ...

> plot([f(x),2],x=-2..2);

[Maple Plot]

> plot([g(x),-0.5],x=-10..10,y=-1..1,discont=true);

[Maple Plot]

> plot([h(x),1],x=-8..5,y=-5..5,discont=true);

[Maple Plot]

In each case, every horizontal line intersects the graph of the function at most once (sometimes, the horizontal line does not intersect the graph at all).

Since we know that f(x) = x^2 does not have an inverse, its graph must fail the Horizontal Line Test.

> f:=x->x^2;

f := proc (x) options operator, arrow; x^2 end proc...

> plot([f(x),3],x=-2..2);

[Maple Plot]

As can be seen in the plot, the horizontal line y = 3 intersects the graph of f in two distinct points.

How does one find the inverse of a one-to-one function?

Algebraic Method

There is a three step method which is often useful for determining the formula for the inverse of a given function f(x) .

Step 1: Write y = f(x) .

Step 2: Solve for x in terms of y .

Step 3: The last equation in Step 2 represents the inverse of f as a function of y . Switch the variables x and y to obtain a representation of the inverse of f as a function of x .

Example: Find the inverse of f(x) = x^3+1 .

Solution

Graphing f and applying the horizontal line test reveals that f is indeed one-to-one and so has an inverse.

Step 1: y = x^3+1

Step 2: We solve for x algebraically:

y-1 = x^3

(y-1)^(1/3) = x

Step 3: Switching the variables x and y in the last equation, we have (f^(-1))(x) = (x-1)^(1/3) .

Visual Method: Reflection across the line y=x

Given the graph of an invertible function, we can find the graph of the inverse of the function by reflecting across the line y = x.

Example: Compare the graphs of f(x) = x^3+1 and (f^(-1))(x) = (x-1)^(1/3) .

Solution

> plot1:=plot(x^3+1,x=-2..2,y=-1.5..1.5,color=red):

> plot2:=plot(surd(x-1,3),x=-2..2,y=-1.5..1.5,color=blue):

> plot3:=plot(x,x=-2..2,y=-1.5..1.5,color=green):

> plots[display]({plot1,plot2,plot3});

[Maple Plot]

Note that the graph of the inverse of f (shown in blue) is the reflection of the graph of f (shown in red) across the line y = x (shown in green).

Logarithmic Functions

Inverse of Exponential Functions

Consider an elementary exponential function f(x) = a^x as introduced in Section 1.5. Every exponential functions is either strictly increasing or strictly decreasing. Hence every exponential function is one-to-one and has an inverse. The inverse of f(x) = a^x is the logarithmic function with base a , denoted by log[a](x) .

By the definition of inverse we thus have that log[a](a^x) = x and a^log[a](x) = x .

Examples:

1. log[2](8) = 3 since 2^3 = 8 .

2. log[3](9) = 2 since 3^2 = 9 .

3. log[8](2) = 1/3 since 8^(1/3) = 2 (that is, the cube root of 8 is 2).

Laws of Logarithms

It will be useful in the future to be able to compress sums or differences of logarithmic expressions into a single logarithmic quantity. The Laws of Logarithms provide us with means to accomplish this compression.

We suppose that x, y are positive numbers.

1. log[a](xy) = log[a](x)+log[a](y)

2. log[a](x/y) = log[a](x)-log[a](y)

3. log[a](x^r) = r*log[a](x)

Examples:

1. log[2](48)-log[2](3) = 4 since we can use the second law to rewrite log[2](48)-log[2](3) = log[2](48/3) , which is log[2](16) = 4 .

2. log[8](4) = 2/3 since we can rewrite log[8](4) = log[8](2*2) and apply the first law to obtain log[8](2*2) = log[8](2)+log[8](2) .

Common and Natural Logarithms

Many scientific and mathematical texts preferentially use particular bases in logarithms. The common logarithm, log[10](x) , often appears when metric measurements are used. The natural logarithm, log[e](x) , is often abbreviated to ln(x) in mathematical writing. As we will see, it is possible to express any logarithm log[a](x) in terms of any desired base b .

Change-of-Base Formula

The change-of-base formula states that log[a](x) = log[b](x)/log[b](a) . In particular, if we take the base b = e , the change-of-base formula may be written as log[a](x) = ln(x)/ln(a) . In this course, we will favor use of the natural logarithm since it is easier to perform calculations with logarithms to the base e .