What is the inverse of the function $f(x)=x^2-9$? $f(x)= \sqrt{x+9}$ or $f(x)= -\sqrt{x+9}$ or both? What is the inverse of the function $f(x)=x^2-9$? $f(x)= \sqrt{x+9}$ or $f(x)= -\sqrt{x+9}$ or both?
I have to find the inverse of the function $f(x)=x^2-9$ for $x \in \mathbb{R}$.
I can see that the range of this function is $y \in [-9, ∞)$.
Inverse relation:

$f(x)= \sqrt{x+9}$ for  $x  \in [-9, ∞)$
$f(x)= -\sqrt{x+9}$ for  $x  \in [-9, ∞)$

So range becomes $y \in [0, ∞)$ for positive part inverse function and $y \in [0, -∞)$ for negative part inverse function. But since its a function It has to be either 1 to 1 or many to 1 mapped, hence it can't be both, so which part to keep as the answer and why?
Also I have read that range and domain of inverse functions are swapped, if so, we must include both parts of the inverse relation, but that would result in violation of the {(1 or many) to 1} mapping. I am a bit confused how to go about it. Thanks for the help.
 A: Whether you choose $f^{-1}(x)=\sqrt{x+9}$ or $f^{-1}(x)=-\sqrt{x+9}$ will depend on the restriction you put on the domain of $f(x)$. A restriction is necessary here because, as you correctly point out, $\pm\sqrt{x+9}$ is not a function. This is due to the fact that $f(x)$ is not injective ("one-to-one"), so its inverse will not pass the vertical line test (i.e. not be a function).
Let's say you restrict the domain of $f(x)$ to be $[0,\infty)$. This means the range of the function will be $[-9,\infty)$. The domain of $f(x)$ will be the range of $f^{-1}(x)$ and the range of $f(x)$ will be the domain of $f^{-1}(x)$, as you also correctly point out. Notice that the domain of $f(x)$ is nonnegative; this means the range of $f^{-1}(x)$ will be nonnegative, so $f^{-1}(x)=\sqrt{x+9}$ in that case.
In the case that you choose the domain restriction of $(-\infty,0]$, the range of the function will be $[-9,\infty)$. Notice that the domain of $f(x)$ is now nonpositive; this means the range of $f^{-1}(x)$ will be nonpositive, so $f^{-1}(x)=-\sqrt{x+9}$ in that case.
