Originally Posted by

**hollywood** A left inverse is a function g such that g(f(x)) = x for all x in $\displaystyle \mathbb{R}$, and a right inverse is a function h such that f(h(x)) = x for all x in $\displaystyle \mathbb{R}$. An inverse is both a right inverse and a left inverse.

In problem 1, the range of f is $\displaystyle [-\infty,1] \cup [2,\infty]$; you can define the function piecewise - something for $\displaystyle [-\infty,1]$ and something else for $\displaystyle [2,\infty]$. 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 $\displaystyle \mathbb{R}$ 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