# Find the range of function

We have the function \begin{equation*}f(x)=-\frac{(x-3)^2}{x+1}\end{equation*}

I want to determine the domain and the range of the function.

The root of the deniminator is $x=-1$. Therefore, the domain is $D_f=\mathbb{R}\setminus\{-1\}=(-\infty, -1)\cup (-1,+\infty )$.

Does it holds that \begin{equation*}W_f=f(D_f)=f\left ((-\infty, -1)\cup (-1,+\infty )\right )=f\left ((-\infty , -5)\cup (-5,-1) \cup (-1,3) \cup (3,+\infty)\right )\end{equation*} ?

If this is correct, then we have to know the monotonicity of $f$ at each of these intervalls.