feb15display

Inverse Functions

Two functions f and g are inverse functions if they "undo" each other. That is, f and g are inverses if f o g (x)=x and if g o f (x)=x.

When two functions are inverses, their graphs are reflections across the line y=x.

For example:

> f:= x -> ln(x); g:= x -> exp(x);

f := ln

g := exp

> g(f(x));

x

> f(g(x));

ln(exp(x))

For reasons that at the moment I am not figuring out, Maple doesn't want to simplify this any more.

We should be able to tell that f(g(x))=x simply by plugging in a variety of values for x and checking that indeed that's what comes out of f(g(x)).

> f(g(1));

1

> f(g(2));

2

> f(g(-2));

-2

> f(g(exp(1)));

exp(1)

> f(g(Pi));

Pi

Okay, I plugged in positive and negative values, rational and irrational values, and I always got out what I plugged in. Thus I am willing to believe that indeed ln(x) and exp(x) are inverses. I suspect that Maple's unwillingness to simplify the f(g(x)) has to do with the fact that the domain of ln(x) is limited to only positive numbers while the domain of exp(x) is not.

Looking at the graphs of f(x) and g(x), along with the line y=x:

> plot([f(x),g(x),x], x=-3..10, y=-3..10, color=[blue, red, black], scaling=constrained);

[Maple Plot]

You can see that the point (x,y) on one graph corresponds to the point (y,x) on the other point.

Another example:

> f:= x -> x^3+5; g := x -> (x-5)^(1/3);

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

g := proc (x) options operator, arrow; (x-5)^(1/3) ...

> f(g(x));

x

> g(f(x));

(x^3)^(1/3)

This has a few problems in that we don't really define fractional powers of negative numbers ... but graphically we *could* ...

> plot([f(x),g(x),x], x=0..30, y=-5..30, color=[red, blue, black], scaling=constrained);

[Maple Plot]

If any horizontal line crosses a function more than once, the function is not one-to-one . (If a horizontal line crosses a function more than once, that means that there are two (or more) values of x that produce the same value of y -- 2 points go to 1 point or two-to-one. )

Such functions do not have inverses: we've already seen that if (x,y) is on the graph of f, then (y,x) must be on the graph of its inverse.

Consider f(x)=x^2. f(2)=f(-2)=4, so (2,4) and (-2,4) are on the graph of f. In order for g(x) to be an inverse of f, (4,2) and (4,-2) must both lie on the graph of g -- but in that case, is g(4)=2 or is g(4)=-2? g would fail the vertical line test, and so g is not a function.

> f := x -> x^2;

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

> plot(f(x),x=-5..5);

[Maple Plot]

>