# Let $f(x)=\left\{\begin{array}{l}x^3-1, x<2\\x^2+3,x\geq2\\\end{array}\right.$. Find $f^{-1}(x)$

This question seems quite straightforward, but it isn't. Let $$f^{-1}(x)=g(x)$$

$$f(x)=\left\{\begin{array}{l}x^3-1, x<2\\x^2+3,x\geq2\\\end{array}\right.$$

$$f(g(x))=x$$

If $$x<2,(g(x)) ^3=x+1 \implies g(x)=(x+1)^{1/3}, x<2$$

Similarly, if $$x\geq2, g(x)=(x-3)^{1/2}$$. We know that $$f(x)$$ is one one function, so it passes the horizontal line test.

However my book says $$g(x)=\left\{\begin{array}{l}(x+1)^{1/3}, x<7\\(x-3)^{1/2},x\geq7\\\end{array}\right.$$

Edit 1: The strange thing is that when I substitute values, the answer given in my books seems correct, even though it doesn't make sense mathematically.

Edit 2: Since we have to consider the domain of another variable $$y$$ is it appropriate to write the inverse as a function of $$x$$.

How did this happen?

• Why do you consider the $x<2$ case? Think again. Sep 11, 2021 at 6:04
• When $x < 2$ and $y = x^3 - 1$ then [1] $y < 7$ and [2] $y + 1 = x^3 \implies (y + 1)^{(1/3)} = x.$ Sep 11, 2021 at 6:10
• The book's answer would probably have been clearer if it had said that $f(x) = y, g(y) = x$, and that $g(y) = (y + 1)^{(1/3)} ~: ~y < 7.$ Sep 11, 2021 at 6:13

Infinity_hunter gave you the correct solution so let me tell you your mistake. Where you considered $$x<2$$ is not correct. You should consider $$g(x)<2$$ as the restriction is in the input value of f then everything will be clear.
Consider the case $$x<2$$. Then $$y = f(x) = x^3-1$$ and let $$g(y)$$ denote the inverse. Since $$x<2$$ we see that $$y < 2^3-1=7$$. So $$x = (y+1)^{\frac13} = g(y)$$ where $$y <7$$. So when $$y<7$$ we have $$g(y) = (y+1)^{\frac13}$$.