<s>[INST] Range of $f(x,y)=\frac{4x^2+(y+2)^2}{x^2+y^2+1}$ I am trying to find the range of this function:
$$f(x,y)=\frac{4x^2+(y+2)^2}{x^2+y^2+1}$$ 
So I think that means I have to find minima and maxima. Using partial derivatives gets messy, so I was wondering if I could do some change of variables to make it easier computationally. But no change of coordinates that I can think of have really simplified it much. If I set $2w=y+2$, then I get a problem below. Am I thinking of the right strategy, or is there something better I could do?
 [/INST] For
$$f(x,y)=\frac{4x^2+(y+2)^2}{x^2+y^2+1}$$
partial derivatives are not so terrifying:
\begin{align}
D_1f(x,y)&=\frac{8x(x^2+y^2+1)-2x(4x^2+(y+2)^2)}{(x^2+y^2+1)^2}\\[4px]
&=\frac{2xy(3y-4)}{(x^2+y^2+1)^2}
\\[8px]
D_2f(x,y)&=\frac{2(y+2)(x^2+y^2+1)-2y(4x^2+(y+2)^2)}{(x^2+y^2+1)^2}\\[4px]
&=\frac{2(-3x^2y+2x^2-2y^2-3y+2)}{(x^2+y^2+1)^2}
\end{align}
The first derivative vanishes for $x=0$, $y=0$ or $y=4/3$.
We have (the denominator is irrelevant as it doesn't vanish)
\begin{align}
D_2f(0,y)&=\frac{-2(2y^2+3y-2)}{\dots} \\[4px]
D_2f(x,0)&=\frac{4(x^2+1)}{\dots} \\[4px]
D_2f(x,4/3)&=\frac{-4(x^2+19/3)}{\dots}
\end{align}
Thus we only get critical points for $x=0$ and $2y^2+3y-2=0$, that is, $y=-2$ or $y=1/2$.
Since $f(0,-2)=0$ and $f(0,1/2)=5$, the minimum is $0$ and the maximum is $5$.
Well, how do we know that $0$ is the minimum? Because obviously the function only takes on nonnegative values. Why $(0,5)$ is a point of maximum and not a saddle point? Because $f(x,y)$ is bounded:
$$
f(x,y)\le\frac{4x^2+4(y+2)^2}{x^2+y^2+1}=4+\frac{16y+12}{x^2+y^2+1}\le16+\frac{16y}{x^2+y^2+1}
$$
Now note that $|y|\le x^2+y^2+1$, because $|y|^2-|y|+1\ge0$. Thus
$$
|f(x,y)|\le 32
$$
Hence the function must have an absolute maximum which has to be at a critical point. Checking with the Hessian would be indeed a nuisance.
</s>