# Proving $f(x,y) = |xy| + a(x^2 + y^2)$ is convex for $a \ge 1/2$

I am working on a problem to prove $$f(x,y) = |xy| + a(x^2 + y^2)$$ is convex for $a \ge 1/2$.

My approach is to show that the Hessian is PSD for the cases where $x \not= 0, y \not= 0$.

However, this approach breaks down for cases when $x$ or $y$ are zero since the function is not differentiable at these points.

Any suggestions on other approaches that get around this?

$\begin{array}\\ f(x,y) &= |xy| + a(x^2 + y^2)\\ &= |xy| + (a-\tfrac{1}{2})(x^2+y^2)+\tfrac{1}{2}|x|^2+\tfrac{1}{2}|y|^2\\ &= (a-\tfrac{1}{2})(x^2+y^2) + \tfrac{1}{2}(|x|+|y|)^2\\ \end{array}$

The first term, $(a-\tfrac{1}{2})(x^2+y^2)$, is clearly convex.
The second term is the composition of the (outer) convex increasing nonnegative function $\xi\mapsto \tfrac{1}{2}\max\{0,\xi^2\}$ and the inner function $(x,y)\mapsto |x|+|y|$.

• Hi Max, forgot to ask. What was the intuition that guided you to deriving this expression for $f(x,y)$? – ted Mar 16 '18 at 18:20
• I knew that $xy$ is not convex, so completing the squares seems natural. Plus you should have to use that $a\geq \tfrac{1}{2}$. – max_zorn Mar 16 '18 at 22:22

Possible hint:

$\begin{array}\\ f(x,y) &= |xy| + a(x^2 + y^2)\\ &= |xy| + a(x^2+2|xy| + y^2)-2a|xy|\\ &= (1-2a)|xy| + a(|x|+|y|)^2\\ \end{array}$

• When $a=1$, $(1-2a)|xy|$ is not convex. – max_zorn Mar 4 '18 at 6:34