Skip to main content
2 of 3
added 196 characters in body
Iosif Pinelis
  • 127.7k
  • 8
  • 107
  • 229

Your objective function is already convex. This follows because the Hessian matrix $$\frac2{y^3}\,\begin{bmatrix} y^2&-xy\\-xy&x^2 \end{bmatrix}$$ of the map $\mathbb R\times(0,\infty)\ni(x,y)\to y\Big(\dfrac xy-r\Big)^2$ is positive semidefinite, for any given real $r$.

Iosif Pinelis
  • 127.7k
  • 8
  • 107
  • 229