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?
 A: 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 $$
A: There is a geometric interpretation. Let $v=(a,b),\ w=(c,d)$ denote two vectors in $\mathbb{R}^2.$ with lengths  $r$ and $s$ respectively, and the angle $\phi$ between them. Then $$ac+bd=rs\, \cos\phi, \quad ad-bc= rs\, \sin \phi.$$
The left hand of the inequality takes the form \begin{multline*} r^2+s^2 +rs\,\cos\phi \ge 2rs +rs\,\cos\phi \\ =rs(2 +\cos\phi)    \ge rs(2-|\cos\phi|).\end{multline*}
By the Cauchy-Schwarz inequality we get $$\sqrt{3}|\sin\phi| +|\cos\phi|\le 2.$$
Thus $$rs(2 -|\cos\phi|)\ge \sqrt{3}\,rs\,|\sin\phi|.$$ The last expression is equal to the right hand side of the desired inequality.
A: I agree that it's a bit of a leap, but it's not completely out of the question to arrive at this answer on your own. Here's my thought process on this:
I've got a big quadratic thing and I want to turn it into a sum of squares. The first thing I try is grouping, and the terms $ac$ and $bd$ give me an idea to group like that.
$$ (a^2 + c^2 + ac) + (b^2 + d^2 + bd) - \sqrt{3}ad + \sqrt{3}bc $$
That didn't quite work out because of those last two terms. Since we can't factor these independently, I want to try to find a "link" between them. Basically, if I can put a $c$ in the $ad$ term and a $d$ in the $bc$ term, then it suggests a grouping where $a$ and $b$ are independent but $c$ and $d$ are in both. With that in mind, it's a bit more clear that a $cd$ term would do the trick. Since I can't change anything, I need one positive and one negative, giving me something like
$$ (a^2 + c^2 + ac) + (b^2 + d^2 + bd) - \sqrt{3}(a-c)d + \sqrt{3}(b-d)c $$
That's all the confirmation I need to at least try those groups. That means I'm looking for some coefficients that let me factor as
$$ (x_aa+x_cc+ x_dd)^2 + (y_bb+y_dd +y_cc)^2$$
Since $a$ and $b$ are independent, their respective groups are the only way to get [$a^2$ and $ac$] and [$b^2$ and $bd$]. A quick check shows that $x_a = y_b = 1$ and $x_c = y_d = 1/2$. It remains to find values for $x_d$ and $y_c$. I know what their squares should be, so that gives me simple equations
$$ x_d^2 + (1/2)^2 = 1 \\ y_c^2 + (1/2)^2 = 1 $$
which I can solve directly or access the trig center of my brain to realize that $x_d = y_c = \pm\sqrt{3}/2$. This gives me a proposed factorization of
$$ \left(a + \frac{1}{2}c \pm \frac{\sqrt 3}{2}d\right)^2 + \left(b + \frac{1}{2}d \pm \frac{\sqrt 3}{2}c\right)^2 $$
and all that's left is to check that it is indeed a factorization (and resolve the signs) by evaluating the $ad$ and $bc$ terms. And, of course, I can factor the $1/2$ out of each square as $1/4$ to get the form that they show.
A: 
$a^2+b^2+c^2+d^2+ac+bd -\sqrt{3}(ad-bc) \geq 0 \tag{1}$

Completing the squares is made easier by introducing a factor of $\,2\,$, so
let $\,\lambda = \frac{1}{2}\,$ and $\,\mu = \frac{\sqrt{3}}{2}\,$, then the LHS of $(1)$ can be written as:
$$
a^2+b^2+c^2+d^2+ 2\lambda(ac+bd) - 2\mu(ad-bc)
$$
$$\begin{align}
= \;\;\;& a^2 + 2a(\lambda c - \mu d) \color{red}{+(\lambda c - \mu d)^2-(\lambda c - \mu d)^2}
\\ + \;&b^2+2b(\mu c + \lambda d) \color{blue}{+(\mu c + \lambda d)^2 -(\mu c + \lambda d)^2}
\\ + \;& c^2 + d^2
\end{align}
$$
$$
\require{cancel}
\begin{align}
= \;\;\;& (a+\lambda c - \mu d)^2 + (b + \mu c + \lambda d)^2
\\ - \;& \color{red}{\lambda^2c^2+ \cancel{2 \mu\lambda cd} - \mu^2 d^2} - \color{blue}{\mu^2 c^2 - \cancel{2 \mu\lambda cd} - \lambda^2d^2} + c^2 + d^2 
\end{align}
$$
$$
= (a+\lambda c - \mu d)^2 + (b + \mu c + \lambda d)^2 + (1 - \lambda^2 - \mu^2)(c^2+d^2)
$$
The expression reduces to the sum of two squares when $\,\lambda^2+\mu^2=1$, as in OP's question.
A: You could use the identity:
$$(ap+br+cs)^2+(aq+bs-cr)^2$$
$$=(a^2p^2+b^2r^2+c^2s^2+2abpr+2acps+2bcrs)+(a^2q^2+b^2s^2+c^2r^2+2abqs-2acqr-2bcrs)$$
$$=(a^2p^2+b^2r^2+c^2s^2+2abpr+2acps)+(a^2q^2+b^2s^2+c^2r^2+2abqs-2acqr)$$
$$=a^2(p^2+q^2)+(b^2+c^2)(r^2+s^2)+2ab(pr+qs)+2ac(ps-qr)$$
If $a^2=b^2+c^2$, dividing by $a^2$ leaves the four squares intact.
