The function is
.
A function
has an inverse
if and only if no horizontal line intersects its graph of the function in at most one point.
The Domain of
is
.
Observe the graph,
\The horizontal line intersects the function more than once, the function is not an one-to-one.
\Therefore the inverse of the function doesnot exist.
\To find the inverse of the function, restrict the domain of the function such that it is one to one function.
\Restricted Domain of
is
or
.
The horizontal line intersects the function at one point.
\The function passes the horizontal line test, the function is an one-to-one in the intervals
or
.
Hence the inverse of the function exist in the interval
or
.
.
Case 1:
\
in the domain
is
.
To find the inverse of the function, consider
and solve
in terms of
.



Now interchange
and
.

Replace
.
The inverse of
is
in the domain
.
Case 2:
\
in the domain
is 
To find the inverse of the function, consider
and solve
in terms of
.



Now interchange
and
.

The inverse of
is
in the domain
.
\
The inverse of
is
in the domain
.
The inverse of
is
in the domain
.