TITLE: What is the Range of the function?
QUESTION [6 upvotes]: Q: Find the range and domain of the function $$f(x) = \sqrt{1-e^{x+2}}?$$
I've found the domain, which is $x \le -2$ by solving the inequality $1-e^{x+2} \ge 0$.
I've tried to find the range by taking the inverse of $f$, which gives me $f^{-1} = \ln(1-x^2)-2$. Then, since for $\ln(1-x^2)$ to be defined, $1-x^2>0$, so solving this inequality gives the interval $x \in (-1,1)$, which I thought is the range of $f$. However, graphing it out on desmos shows that the range is only $[0,1)$. What am I doing wrong?

REPLY [3 votes]: $\sqrt{1-e^{x+2}} $ is always $\ge0$ as we have a square root function.
The minimum value it can achieve is $0$ when $ e^{x+2} =1$ or $x=-2$ and the maximum it can achieve is $1$, when $e^{x+2} = 0$ or $x\to-\infty$.
So the range is $[0,1)$.
The mistake in your process is that first you've let,
$x = \sqrt{1-e^{f^{-1}(x)+2}} $. For this to hold we need $x\ge 0$(as we have the square root). If you use this fact in your solution, you'll get the required range $[0,1)$.

REPLY [3 votes]: Well since
\begin{eqnarray*}
f: \mathbf{R}&\longrightarrow& \mathbf{R}\\
x&\longmapsto& f(x)=\sqrt{1-e^{x+2}}.
\end{eqnarray*}
so the domain of $f$ is given by
$${\rm Dom}(f)=\{x\in \mathbb{R}:1-x^{x+2}\geqslant 0\}=]-\infty; -2] $$
and then
the image of $f$ is given by
$${\rm Im}(f)=f(]-\infty;-2])=[0;1[$$
because $f$ is injective function.
Remark: Note that $$\lim_{x\to-\infty} \sqrt{1-e^{x+2}}=1.$$