Elementary inequalities exercise - how to 'spot' the right sum of squares? I have been working through CJ Bradley's Introduction to Inequalities with a high school student and have been at loss to see how one could stumble upon the solution given for Q3 in Exercise 2c.
Question:
If $ad-bc=1$ prove that $a^2+b^2+c^2+d^2+ac+bd \geq \sqrt{3}$.
Solution:
Make the inequality homogenous by multiplying both sides by $ad-bc=1$. [That seems sensible.] Take everything onto one side so we now want to show
$$a^2+b^2+c^2+d^2+ac+bd -\sqrt{3}(ad-bc) \geq 0 \tag{1}.$$
[That's also a reasonable thing to do. The trouble is coming next...]
Now play around until you notice the left hand side can be written as
$$\frac{1}{4}(2a+c-\sqrt{3}d)^2 + \frac{1}{4}(2b+d+\sqrt{3}c)^2 \tag{2}.$$
[What??]
I played around for a fair while and didn't get to this. I have a suspicion that this question was created by reverse-engineering. What thought processes get you from (1) to (2), without knowing (2) beforehand? How can you get to the solution without pulling a rabbit out of a hat?

Rather than  $\sqrt 3 $   here is the matrix algorithm for coefficient $1.$  I will try $\sqrt 3$  in a few minutes
Positivity is shown in matrix $D.$   It is then matrix $Q$   that fills in the linear terms, as in: double your form (coefficient $1$)  is
$$ 2 \left( a + \frac{c}{2} - \frac{d}{2} \right)^2  +  2 \left( b + \frac{c}{2} + \frac{d}{2}  \right)^2  +   \left(c \right)^2  +   \left( d\right)^2  $$
$$ Q^T D Q = H  $$
$$\left( 
\begin{array}{rrrr} 
1 & 0 & 0 & 0 \\ 
0 & 1 & 0 & 0 \\ 
 \frac{ 1 }{ 2 }  &  \frac{ 1 }{ 2 }  & 1 & 0 \\ 
 -  \frac{ 1 }{ 2 }  &  \frac{ 1 }{ 2 }  & 0 & 1 \\ 
\end{array}
\right) 
\left( 
\begin{array}{rrrr} 
2 & 0 & 0 & 0 \\ 
0 & 2 & 0 & 0 \\ 
0 & 0 & 1 & 0 \\ 
0 & 0 & 0 & 1 \\ 
\end{array}
\right) 
\left( 
\begin{array}{rrrr} 
1 & 0 &  \frac{ 1 }{ 2 }  &  -  \frac{ 1 }{ 2 }  \\ 
0 & 1 &  \frac{ 1 }{ 2 }  &  \frac{ 1 }{ 2 }  \\ 
0 & 0 & 1 & 0 \\ 
0 & 0 & 0 & 1 \\ 
\end{array}
\right) 
 = \left( 
\begin{array}{rrrr} 
2 & 0 & 1 &  - 1 \\ 
0 & 2 & 1 & 1 \\ 
1 & 1 & 2 & 0 \\ 
 - 1 & 1 & 0 & 2 \\ 
\end{array}
\right) 
$$
$$  \bigcirc \bigcirc  \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc     \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc $$
Allowing the coefficient $\sqrt 3$  to be replaced by variable $x$ we get
$$ Q^T D Q = H  $$
$$\left( 
\begin{array}{rrrr} 
1 & 0 & 0 & 0 \\ 
0 & 1 & 0 & 0 \\ 
 \frac{ 1 }{ 2 }  &  \frac{ x }{ 2 }  & 1 & 0 \\ 
 -  \frac{ x }{ 2 }  &  \frac{ 1 }{ 2 }  & 0 & 1 \\ 
\end{array}
\right) 
\left( 
\begin{array}{rrrr} 
2 & 0 & 0 & 0 \\ 
0 & 2 & 0 & 0 \\ 
0 & 0 & \frac{3-x^2}{2} & 0 \\ 
0 & 0 & 0 & \frac{3-x^2}{2} \\ 
\end{array}
\right) 
\left( 
\begin{array}{rrrr} 
1 & 0 &  \frac{ 1 }{ 2 }  &  -  \frac{ x }{ 2 }  \\ 
0 & 1 &  \frac{ x }{ 2 }  &  \frac{ 1 }{ 2 }  \\ 
0 & 0 & 1 & 0 \\ 
0 & 0 & 0 & 1 \\ 
\end{array}
\right) 
 = \left( 
\begin{array}{rrrr} 
2 & 0 & 1 &  - x \\ 
0 & 2 & x & 1 \\ 
1 & x & 2 & 0 \\ 
 - x & 1 & 0 & 2 \\ 
\end{array}
\right) 
$$
with resulting expansion
$$ 2 \left( a + \frac{c}{2} - \frac{dx}{2} \right)^2  +  2 \left( b + \frac{cx}{2} + \frac{d}{2}  \right)^2  + \left( \frac{3-x^2}{2} \right)  \left(c \right)^2  +  \left( \frac{3-x^2}{2} \right) \left( d\right)^2  $$
Once we set $ x = \sqrt 3$  we get
$$ 2 \left( a + \frac{c}{2} - \frac{d\sqrt3}{2} \right)^2  +  2 \left( b + \frac{c\sqrt3}{2} + \frac{d}{2}  \right)^2  $$
$$  \bigcirc \bigcirc  \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc     \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc \bigcirc  \bigcirc $$
