Consider the functions defined by
> f:=x->exp(x)+exp(-x); > plot(f(x),x=-5..5); > g:=x->exp(x)-exp(-x); > plot(g(x),x=-5..5);Both satisfy the vertical-line test but is not invertible since it does not satisfy the horizontal-line test. Indeed is not one-to-one, for instance . From the plot it seems that the function is one-to-one. In order to determine its inverse we solve for x.
> solve(g(x)=y,x);We observe that one of the solutions is not defined since the arguement of the logarithm can only be positive. Thus:
> ginv:=y->ln(y/2+sqrt(y^2+4)/2);Let's look at the plot along with the line to see if our functions seem to make sense.
> plot({x,g(x),ginv(x)},x=-20..20,y=-20..20,scaling=constrained);Let's check that we have computed the right inverse. By definition the composotion of the functions should be the line since an inverse is the reflection about this line.
>simplify( g(ginv(y))); > simplify(ginv(g(x)));We are having difficulty getting for the last composition. Think about what issue the computer has in dealing with this simplification.