Convexity of a rational function I am attempting to (dis)prove that the function
$$(x,y) \mapsto \frac{4x+3y+2}{x^2+xy+2x+y}$$
is convex for $x,y>0$.
Attempting to differentiate the function does not seem like a good idea (or am I making a mistake and this simplifies greatly?). I tried to search for useful rules of quotient of convex functions, however that did not yield and pertaining and/or useful information.
My best guess is I could somehow build an argument starting from the fact that the denominator is always positive.
Thanks for any help!
 A: Since no-one has answered this way or that...
The function is convex on $(0,\infty)^2$.
The direct brute-force approach (via Mathematica) considering derivatives works out fine:
Assume $x$ and $y$ are positive. The Hessian of the function at $(x,y)$ is
$$
\frac 1 {p(x,y)^3}
\left(
\begin{array}{cc}
 8 x^3+18 x^2y+12 x^2+18 xy^2 +24 xy+24 x+6 y^3+14 y^2+20 y+16 & 2 x^3-2 xy +8 x+4 y+8 \\
 2 x^3-2 xy+8 x+4 y+8 & 2 x^3+2 x^2+4 x+4 \\
\end{array}
\right).
$$
Here, $p(x,y) = x^2+x y+2 x+y$ is the denominator of the original function. Since it's positive, we can disregard this factor and consider the matrix without it, which we'll call $H$.
Considering the following equation for the eigenvalues of $H$:
$$\frac {\text{tr}(H)\pm \sqrt{\text{tr}(H)^2 - 4\det(H)}}2$$
(where $\text{tr}(H)$ is the trace of $H$), it's sufficient for positivity of the eigenvalues that

*

*$\text{tr}(H) > 0$, and

*$\det(H) > 0$.

The first is evident from the above matrix, since all coefficients of the polynomials on the diagonal are positive. Regarding the second, the determinant works out to be
$$\det(H) = 12 x^6+36 x^5 y+40 x^5+36 x^4 y^2+92 x^4 y+72 x^4+12 x^3 y^3+64 x^3 y^2+144 x^3 y+128 x^3+12 x^2 y^3+96 x^2 y^2+240 x^2 y+112 x^2+24 x y^3+144 x y^2+144 x y+32 x+24 y^3+40 y^2+16 y,$$
which is again a polynomial with all-positive coefficients.
That is, both eigenvalues of the Hessian are positive for all positive $x$ and $y$, hence the function is convex.
So in some sense, it does "simplify greatly" once the algebra handle is cranked. I'm sorry I don't know a more elegant approach!
Remark 1: The same method applies to show the function is log-convex, a stronger property.
Remark 2: While considering this in Mathematica, I first accidentally put $p(x,y) = x^2+x y+2 x+y{}^2$ as the denominator, in which case the function is convex almost nowhere in $(0,\infty)^2$! So the underlying reason for convexity seems to be somewhat subtle. It would be interesting to construct similar examples.
A: I guess you are right. Look at 
http://www.stanford.edu/~boyd/cvxbook/
examples 3.32 and 3.33, you may follows these ideas.
