<s>[INST] Find the range of $\frac{\sqrt{(x-1)(x+3)}}{x+2}$ 
Find the range of $\frac{\sqrt{(x-1)(x+3)}}{x+2}$

My Attempt:$$y^2=\frac{x^2+2x-3}{x^2+4x+4}=z\\\implies  x^2(z-1)+x(4z-2)+4z+3=0$$
Discriminant greater than equal to zero, so, $$(4z-2)^2-4(z-1)(4z+3)\ge0\\\implies z\le\frac43\\\implies -\frac2{\sqrt3}\le y\le\frac2{\sqrt3}$$
But the answer given is $[-\frac2{\sqrt3},1]$
What am I missing?
 [/INST] What you have shown is that $|y| \leq \dfrac{2}{\sqrt{3}}$.  While that does imply that $-\dfrac{2}{\sqrt{3}} \leq y \leq \dfrac{2}{\sqrt{3}}$, you cannot necessarily conclude that the range is $\left[-\dfrac{2}{\sqrt{3}}, \dfrac{2}{\sqrt{3}}\right]$ since you obtained that result by squaring both sides of the equation, which is not a reversible step.
We are given the function
\begin{align*}
f(x) & = \frac{\sqrt{(x + 3)(x - 1)}}{x + 2}\\
     & = \frac{\sqrt{x^2 + 2x - 3}}{x + 2}
\end{align*}
Observe that its domain of the function $f$ is $(-\infty, -3] \cup [1, \infty)$.
Differentiating gives
\begin{align*}
f'(x) & = \frac{\frac{1}{2\sqrt{x^2 + 2x - 3}}(2x + 2)(x + 2) - \sqrt{x^2 + 2x - 3}}{(x + 2)^2}\\
      & = \frac{\frac{(x + 1)(x + 2)}{\sqrt{x^2 + 2x - 3}} - \sqrt{x^2 + 2x - 3}}{(x + 2)^2}\\
      & = \frac{\frac{x^2 + 3x + 2 - (x^2 + 2x - 3)}{\sqrt{x^2 + 2x - 3}}}{(x + 2)^2}\\
      & = \frac{x + 5}{(x + 2)^2\sqrt{x^2 + 2x - 3}}
\end{align*}
Setting the derivative equal to zero yields
\begin{align*}
f'(x) & = 0\\
\frac{x + 5}{(x + 2)^2\sqrt{x^2 + 2x - 3}} & = 0\\
x + 5 & = 0\\
x & = -5
\end{align*}
Thus, the function has a critical point at $x = -5$.
Observe that the denominator of the derivative function is always positive within the domain of the function. Therefore, the sign of the derivative depends only on the numerator.  Hence, $f'(x) < 0$ if $x < -5$, $f'(-5) = 0$, and $f'(x) > 0$ if $-5 < x < -3$.  Since the sign of the derivative changes from negative to positive at the critical point $x = -5$, the function has a relative minimum at $x = -5$ by the First Derivative Test.
Its relative minimum value is
\begin{align*}
f(-5) & = \frac{\sqrt{(-5)^2 + 2(-5) - 3}}{-5 + 2}\\
      & = \frac{\sqrt{25 - 10 - 3}}{-3}\\
      & = \frac{\sqrt{12}}{-3}\\
      & = \frac{2\sqrt{3}}{-3}\\
      & = -\frac{2}{\sqrt{3}}
\end{align*}
Also, note that $f'(x) > 0$ when $x > 1$.  Therefore, $f(x)$ is strictly increasing on the interval $[1, \infty)$.  Observe that $f(1) = 0$.  Moreover,
\begin{align*}
\lim_{x \to \infty} f(x) & = \lim_{x \to \infty} \frac{\sqrt{x^2 + 2x - 3}}{x + 2}\\
& = \lim_{x \to \infty} \frac{|x|\sqrt{1 + \frac{2}{x} - \frac{3}{x^2}}}{x\left(1 + \frac{2}{x}\right)}\\
& = \lim_{x \to \infty} \frac{x\sqrt{1 + \frac{2}{x} - \frac{3}{x^2}}}{x\left(1 + \frac{2}{x}\right)}\\
& = \lim_{x \to \infty} \frac{\sqrt{1  + \frac{2}{x} - \frac{3}{x^2}}}{1 + \frac{2}{x}}\\
& = 1 
\end{align*}
Since the function $f$ is continuous on the interval $[1, \infty)$, it assumes every value in the interval $[0, 1)$ by the Intermediate Value Theorem.
Observe that $f(-3) = 0$.  Since $f$ assumes the value $-\dfrac{2}{\sqrt{3}}$ at $x = -5$ and is continuous on the interval $[-5, 0]$, it assumes every value in the interval $\left[-\frac{2}{\sqrt{3}}, 0\right]$ in the interval $[-5, 0]$.  Moreover,
\begin{align*}
\lim_{x \to -\infty} f(x) & = \lim_{x \to -\infty} \frac{\sqrt{x^2 + 2x - 3}}{x + 2}\\
& = \lim_{x \to -\infty} \frac{|x|\sqrt{1 + \frac{2}{x} - \frac{3}{x^2}}}{x\left(1 + \frac{2}{x}\right)}\\
& = \lim_{x \to -\infty} \frac{-x\sqrt{1 + \frac{2}{x} - \frac{3}{x^2}}}{x\left(1 + \frac{2}{x}\right)}\\
& = \lim_{x \to -\infty} \frac{-\sqrt{1  + \frac{2}{x} - \frac{3}{x^2}}}{1 + \frac{2}{x}}\\
& = -1 
\end{align*}
Since $f$ is continuous on the interval $(-\infty, -5]$, it assumes every value in the interval $\left[-\dfrac{2}{\sqrt{3}}, -1\right)$ in the interval $(-\infty, -5]$.
Therefore, the range of $f$ is
$$\left[-\frac{2}{\sqrt{3}}, -1\right) \cup \left[-\frac{2}{\sqrt{3}}, 0\right] \cup [0, 1) = \left[-\frac{2}{\sqrt{3}}, 1\right)$$
</s>