TITLE: Maximizing $a^2+b^2+c^2+d^2$ with given constraints
QUESTION [5 upvotes]: The following problem is from a local contest which ended today:

Let $a,b,c,d$ be positive real numbers such that $$(a+b)(c+d)=143\\ (a+c)(b+d)=150\\ (a+d)(b+c)=169$$ Find the maximum value of $a^2+b^2+c^2+d^2$.

Here are my workings:
We have $$\tag{1}ac+bc+bd+ad=143$$ $$\tag{2}{ab+bc+cd+ad=150}$$ $$\tag{3}{ab+bd+ac+cd=169}$$
Summing $(1)$, $(2)$ and $(3)$, we have $$2(ab+bc+cd+ac+ad+bd)=462$$
We have $$\begin{align} a^2+b^2+c^2+d^2 &=(a+b+c+d)^2-2(ab+bc+cd+ac+ad+bd)\\ &= (a+b+c+d)^2-462\end{align}$$
So we have to maximize $a+b+c+d$.
I can't proceed from here. Minimizing the expression seems easy by Cauchy-Schwarz or AM-GM but I don't know how to maximize this.

REPLY [2 votes]: Let $ a+b+c+d = A \geq 26$. (Do you know why we have this constraint?)
We have $ a+b, c+d$ are the roots of $x(A-x) = 143$, or that $ -x^2 + Ax - 143 = 0 $, so they are (with simplification) $ \frac{ A \pm \sqrt{ A^2 - 4 \times 143 }} { 2}$.
We have $a+c, b+d$ are the roots of $-x^2 + Ax - 150 = 0 $, so they are $\frac{  A\pm \sqrt{ A^2 - 4 \times 150 }} { 2} $.
We have $ a+d, b+c$ are the roots of $-x^2 + Ax - 169 = 0 $, so they are $ \frac{A \pm \sqrt{ A^2 - 4 \times 169 } } { 2} $.
We (wisely) choose $  a+b =  \frac{ A + \sqrt{ A^2 - 4 \times 143 }} { 2}, a + c = \frac{ A + \sqrt{ A^2 - 4 \times 150 }} { 2}, a + d = \frac{ A + \sqrt{ A^2 - 4 \times 169 }} { 2}$.
These, along with $a+b+c+d = A$ gives the unique solutions:
$$ a = \frac{A+\sqrt{ A^2 - 4 \times 143 } + \sqrt{ A^2 - 4 \times 150 } + \sqrt{ A^2 - 4 \times 169 } } { 4},\\   
b = \frac{A+\sqrt{ A^2 - 4 \times 143 } - \sqrt{ A^2 - 4 \times 150 } - \sqrt{ A^2 - 4 \times 169 } } { 4},\\    
c = \frac{A-\sqrt{ A^2 - 4 \times 143 } + \sqrt{ A^2 - 4 \times 150 } - \sqrt{ A^2 - 4 \times 169 } } { 4},\\    
d  = \frac{A-\sqrt{ A^2 - 4 \times 143 } - \sqrt{ A^2 - 4 \times 150 } + \sqrt{ A^2 - 4 \times 169 } } { 4}.$$
It remains to check that the terms are positive. Clearly $d$ is the smallest, and Wolfram says it's positive. (Sorry for the cop-out, my original approach didn't work, and I'm too tired to think. Sort-of approach shown below.).
Hence, there is no upper bound for $A$, and neither for $A^2 - 462$.

Notes

I did the selection because of how symmetric those solutions were.
$A = 26$ gives the minimum value, which we've shown can be achieved.
If desired, it's easy to verify that these solutions satisfy the equations. IE $ a  + b = \frac{ A + \sqrt{ A^2 - 4 \times 143 } } { 2 } $ and $ c+d = \frac{ A - \sqrt{ A^2 - 4 \times 143} } { 2 } $ (which was how we derived them), so their product is $143$.
If we didn't choose wisely and instead had $ a+d = \frac{A - \sqrt{ A^2 - 4 \times 169 }} { 2 } $ (and the other equations), then we have the solutions

$$ a' = \frac{A+\sqrt{ A^2 - 4 \times 143 } + \sqrt{ A^2 - 4 \times 150 } - \sqrt{ A^2 - 4 \times 169 } } { 4},\\   
b' = \frac{A+\sqrt{ A^2 - 4 \times 143 } - \sqrt{ A^2 - 4 \times 150 } + \sqrt{ A^2 - 4 \times 169 } } { 4},\\    
c' = \frac{A-\sqrt{ A^2 - 4 \times 143 } + \sqrt{ A^2 - 4 \times 150 } + \sqrt{ A^2 - 4 \times 169 } } { 4},\\    
d'  = \frac{A-\sqrt{ A^2 - 4 \times 143 } - \sqrt{ A^2 - 4 \times 150 } - \sqrt{ A^2 - 4 \times 169 } } { 4}.$$
Clearly $d'$ will be negative for some large enough $A$.

Attempt at proving the inequality$ d > 0$
WTS $A-\sqrt{ A^2 - 4 \times 143 } > \sqrt{ A^2 - 4 \times 150 } - \sqrt{ A^2 - 4 \times 169 }$
$\frac{143}{19} > \frac{ A+\sqrt{ A^2 - 4 \times 143 } }{\sqrt{ A^2 - 4 \times 150 } + \sqrt{ A^2 - 4 \times 169 }} $.
Using the approximation $ \sqrt{ A^2 - k } \approx A - \frac{k}{2A}$, the RHS is approximately $\frac{2A - \frac{2\times 143}{A} }{ 2A - \frac{2 \times 319 } { A } } = \frac{2A^2 - 286}{2A^2 - 638} $. This is decreasing in $A$, so the RHS is $\leq 1.5 $ for $ A \geq 26$, so we have a lot of wriggle room.