To find the maximum and minimum value of this expression I have a function of the form of $$f(x,y)=\frac{ax+by+c}{\sqrt{dx^2+ey^2+fxy+gx+hy+i}}$$
I want to find its maximum and minimum values.
I used the limits on $x$ and $y$ to find the function tends to $\pm\frac{a}{\sqrt{d}}$ when $x\to\pm\infty$ and $\pm\frac{b}{\sqrt{e}}$ when $y\to\pm\infty$. But I am having trouble analyzing the function behavior with variation of both $x$ and $y$. I am looking for an expression of maxima and minima in terms of the constants $a,b,c,d,e,f,g,h$ and $i$. 
I was able to plot the function in MATLAB but still having trouble in deriving the exact maximum and minimum value. Can someone guide me on how to do it?
Thanks
 A: Proceeding in the usual way, find critical points of the function by setting its partial derivatives to zero and solving. You’re using $f$ for both the function and one of the coefficients in its definition, so I’ll call the function $F$ here. To reduce clutter, let $G(x,y)=dx^2+ey^2+fxy+gx+hy+i$, so that $F(x,y) = (ax+by+c) G(x,y)^{-1/2}$. Differentiating, we have 
$$\begin{align} F_x(x,y) &= (a G(x,y) - \frac12 (ax+by+c) (2dx+fy+g))G(x,y)^{-3/2} = 0 \\
F_y(x,y) &= (b G(x,y) - \frac12(ax+by+c)(fx+2ey+h))G(x,y)^{-3/2} = 0, \end{align}$$ so the problem becomes that of finding the intersections of a pair of conics. A general strategy for doing this is to find a degenerate linear combination of the two conics, split it into linear factors and then solve the simpler line-conic intersections. In this case, we’re already most of the way there: subtract $2a$ times the second equation from $2b$ times the first to get $$(ax+by+c)\left[ (af-2bd)x + (2ae-bf)y + (ah-bg)\right] = 0,$$ which is already split into linear terms. The intersection points of the two conics are thus the intersections of the two lines defined by these factors with either of the two original conics.  
Turning to the first line, setting $ax+by+c=0$ reduces the partial derivative equations to $aG(x,y)=0$ and $bG(x,y)=0$. Unless $a=b=0$, this means that $G(x,y)=0$, but $F$ is undefined in this region, so there can be no critical points there. That leaves the intersections of the line $$(af-2bd)x + (2ae-bf)y + (ah-bg) = 0$$ with either of the other conics, which I’ll leave to you to work out.  
If you’re interested in exploring the qualitative behavior of this family of functions, I’d suggest examining the simpler cases in which $G(x,y)=0$ is one of the canonical examples of the different types of conics. All of the functions in this family can be obtained via an affine coordinate transformation from one of these canonical equations, which will move the critical points in a well-defined way.
