A left inverse is a function g such that g(f(x)) = x for all x in

, and a right inverse is a function h such that f(h(x)) = x for all x in

. An inverse is both a right inverse and a left inverse.

In problem 1, the range of f is

; you can define the function piecewise - something for

and something else for

. The function needs to undo what f has done, and it doesn't matter what g does on (1,2) since g will never see an input in that interval.

For problem 2, you need to think the other way - you need to figure out what to feed f so that it will give you back your original input. The range of f is

since the two pieces of f overlap on the interval [-2,-1]. On that interval, you can choose what you want h to do - either output something that will trigger the first piece and give you back x or output something that will trigger the second piece and give you back x. Above and below [-2,-1] you don't have a choice - only one piece will work.

- Hollywood