# Optimization in Four Variables with Two Constraints

### Proof 1

Let $a^2=u,\,$ $b^2=v,\,$ $c^2=w\,$ and $d^2=t.\,$ We have: $a+v+w+t=10\,$ and $uvwt=4.\,$ Also let $u+w=2m,\,$ $uw=n^2,\,$ $v+t=2s,\,$ $vt=p^2.\,$ Then $0\lt n\le m\,$ and $0\lt p\le s.\,$ Moreover, $m+s=5\,$ and $np=4.\,$

We need to find $\max [(\sqrt{u}+\sqrt{w})(\sqrt{v}+\sqrt{t})].\,$ But $\sqrt{u}+\sqrt{w}=\sqrt{2(m+n)}\,$ and $\sqrt{v}+\sqrt{t}=\sqrt{2(s+p)}\,$ such that $(\sqrt{u}+\sqrt{w})(\sqrt{v}+\sqrt{t})=2\sqrt{(m+n)(s+p)}.$

Further, $\displaystyle (m+n)(s+p)=\left(5-s+\frac{4}{p}\right)(s+p).\,$ From $p\le s\,$ and $\displaystyle\frac{4}{p}\le 5-s,\,$ we obtain $\displaystyle p+\frac{4}{p}\le 5,\,$ i.e., $p\in [1,4].\,$

Now, $\displaystyle\left(5-s+\frac{4}{p}\right)(s+p)= \left(5+\frac{4}{p}-p\right)s-s^2+5p+4.\,$ Since $\displaystyle\frac{\displaystyle 5-\frac{4}{p}-p}{2}\ge 1,\,$ the quadratic function

$f(s)=\displaystyle\left(5\frac{4}{p}-p\right)s-s^2+5p+4$

is decreasing on its domain, so that

$\max f=f(p)=2(-p^2+5p+4)=g(p).$

but $\displaystyle\max g=g\left(\displaystyle\frac{5}{2}\right)=\frac{41}{2}\,$ and it is attained for $s=p=\displaystyle\frac{5}{2}.\,$ For these $s\,$ and $p,\,$ $m=\displaystyle\frac{5}{2}\,$ and $n=\displaystyle\frac{8}{2}.\,$ Thus $u\,$ and $w\,$ are positive too and

$\max [(\sqrt{u}+\sqrt{w})(\sqrt{v}+\sqrt{t})]=\sqrt{82}.\,$

### Proof 2

\displaystyle\begin{align} (a+c)^2+(b+d)^2&=(a^2+b^2+c^2+d^2)+2(ac+bd)\\ &\ge 10+4\sqrt{abcd}\\ &=18. \end{align}

\displaystyle\begin{align} ab+bc+cd+da &= (a+c)(b+d)\le\frac{(a+c)^2+(b+d)^2}{2}\\ &=9. \end{align}

Equal holds when if and only if $ac=bd,\,$ $a+c=b+d,\,$ which implies that $(a,c)\sim(1,2)$ and $(b,d)\sim(1,2)$.

### Proof 3

Denote $x=ab+bc+cd+da=(a+c)(b+d).\,$ By the AM-GM inequality.

\displaystyle\begin{align} x &= (a+c)(b+d)=\sqrt{(a^2+c^2+2ac)(b^2+d^2+2bd)}\\ &=\sqrt{(a^2+c^2)(b^2+d^2)+2ac(b^2+d^2)+2bd(a^2+c^2)+4abcd}\\ &\le\sqrt{\left(\frac{a^2+b^2+c^2+d^2}{2}\right)^2+2(ab+cd)(ad+bc)+16}\\ &\le\sqrt{25+2\cdot\left(\frac{ab+bc+cd+da}{2}\right)^2+16}\\ &=\sqrt{41+\frac{1}{2}x^2}. \end{align}

For $x\gt 0,\,$ this is equivalent to $x\le\sqrt{82}.\,$ "I omit finding equal cases here."

### Proof 4

We have $(ab+bc+cd+da)=(a+c)(b+d),\,$

\begin{align}(a+c)^2(b+d)^2 &= (a^2+c^2ac)(b^2+d^2+2bd)\\ &=(a^2+c^2)(b^2+d^2)+4abcd+2ac(b^2+d^2)+2bd(a^2+c^2). \end{align}

Hence,

$(a^2+c^2-2ac)(b^2+d^2-2bd)\ge 0,$

implying

$2ac(b^2+d^2)+2bd(a^2+c^2)\le(a^2+c^2)(b^2+d^2)+4abcd,$

so that

\displaystyle\begin{align} (a+c)^2(b+d)^2&\le 2(a^2+c^2)(b^2+d^2)+2abcd\\ &\le 2\left(\frac{a^2+b^2+c^2+d^2}{2}\right)^2+32\\ &=82. \end{align}

It follows that $\max (a+c)(b+d)=\sqrt{82}.\,$ Equality holds if

$\begin{cases} (a^2+c^2-2ac)(b^2+d^2-2bd)=0,&\\ abcd=4,&\\ a^2+c^2=b^2+d^2=5.& \end{cases}$

I.e., $(a,b,c,d)=\displaystyle\left(\frac{\sqrt{10}}{2},\sqrt{\frac{25+3\sqrt{41}}{10}},\frac{\sqrt{10}}{2},\sqrt{\frac{25-3\sqrt{41}}{10}}\right),\,$ and any cyclic permutations.

### Proof 5

We have, using Lagrange multipliers and ignoring the "$\gt 0\,$" constraints:

$f=ab+bc+cd+da;\\ L=f-\lambda_1(a^2+b^2+c^2+d^2)-\lambda_2(abcd-4),$

Hence to get the solutions for

$J_1=\left(\begin{array}{c} b+d-2a\lambda_1-bcd\lambda_2\\ a+c-2b\lambda_1-acd\lambda_2\\ b+d-2c\lambda_1-abd\lambda_2\\ a+c-2d\lambda_1-abc\lambda_2\\ 10-a^2-b^2-c^2-d^2\\ 4-abcd \end{array}\right)=0.$

Solving for $\lambda_1\,$ and $\lambda_2\,$ first,

$\displaystyle J_2=\left(\begin{array}{c} -\frac{(a-c)(b(a^2-b^2+ac+c^2)-(b^2+ac)d)}{(a-b)(a+b)c}\\ \frac{(b-d)(-a^3-a^2c-bcd+a(b^2+bd+d^2)}{(a^2-b^2)d}\\ 10-a^2-b^2-c^2-d^2\\ 4-abcd \end{array}\right)=0.$

Mp>Starting from the bottom, and eliminating the negative solutions manually, one by one, and checking the second orders, the maximum is reached for

$\displaystyle a=\sqrt{\frac{5}{2}-\frac{3\sqrt{41}}{10}},\,b=\sqrt{\frac{5}{2}},\,c=\sqrt{\frac{5}{2}+\frac{3\sqrt{41}}{10}},\,d=\sqrt{\frac{5}{2}},$

which gives us $f=ab+bc+cd+da=\sqrt{82}.$

### Acknowledgment

The problem above has been communicated to me by Leo Giugiuc, along with a solution of his (Proof 1) and a link to a discussion at the artofproblemsolving forum. The discussion contained several solutions (one of these as Proof 2 here, another as Proof 3.) and a link to a solution by Vo Quoc Ba Can which under the caption "Inequality from Czech-Polish-Slovak Match 2012". Notably, Proofs 2 & 3 have been authored by the same user gxggs; Proof 4 is by Richdad Phuc; Proof 5 by Nassim Nicholas Taleb.

Note that one of the three proofs above is wrong. Can you spot a mistake?