Range of a multivariable function $f(x,y) = \frac{4x^2+(y+2)^2}{x^2+y^2+1}$

A function is defined in $$\mathbb{R}^2$$ \begin{align*} f(x,y) = \frac{4x^2+(y+2)^2}{x^2+y^2+1}\end{align*} Find the range of possible values for the function.

Here we can see that when $$x=0$$ and $$y=-2$$ the minimum value of the range is $$0$$. To find the maximum value of the range I have found the partial derivatives and equate them to zero, then I got $$y=\frac{4}{3}$$ and $$x^2= \frac{-25}{9}$$, but $$x$$ cannot be complex ($$x \in \mathbb{R}$$). So how do we find the max values of this function? Could anyone please give me a hint, is this the way of finding the range of a multivariable function?

• Lagrange mulipliers – Will Jagy Nov 7 '20 at 2:48
• yes, but what are the constraints for this function? – Priya Nov 7 '20 at 3:01
• denominator ... – Will Jagy Nov 7 '20 at 3:04
• Actually, Lagrange multipliers are used to minimise some function $f(x_1,...,x_n)$ under constraint $g(x_1,...,x_n)=0$. I don't think that's very relevant here since you have no such constraint. – YiFan Nov 7 '20 at 4:20
• Note that$$(a-f)(x^2+y^2+1)=(a-4)x^2+(a-1)\bigg(y-\frac{2}{a-1}\bigg)^2+\frac{a(a-5)}{a-1}$$ – mathlove Nov 7 '20 at 6:01

You've already noticed that the minimum of $$f$$ is $$0$$.
The $$x^2$$ term in the numerator can be easily removed by considering $$g(x,y):=f(x,y)-4=\frac{\frac{4}{3}-3(y-\frac{2}{3})^2}{x^2+y^2+1}.$$
It is easy to show that $$\max_{x,y}{g(x,y)}=\max_y{g(0,y)=\max_y{\frac{4y-3y^2}{y^2+1}}}=1.$$
Therefore, the range of $$f$$ is $$[0,5]$$. The maximum is obtained when $$x=0,y=\frac{1}{2}$$.
• Yes your answer is completely right. I am a student, I have little doubt part could you please explain to me a little bit? what is the clarification on "$\max_{x,y}g(x,y) =\max_y g(0,y)$"? Is this the clarification, the function $g_{x,y}$ will be large when its denominator is going to small? Moreover, at this time, $x$ is not in the numerator, so we can just equate $x$ to zero to large the equation. Am I right? (sorry for my english) – Priya Nov 7 '20 at 10:10
• Yes, you are totally right. However, note that equating $x$ to zero to "maximize" $g(x,y)$ come after the implicit fact that we are considering only the region where $g(x,y)$ is positive, that is $0<y<4/3$. – Noah Tang Nov 7 '20 at 11:04