<s>[INST] Applications of the identity $ab + \left(\frac{a+b}{2} - b\right)^2 = \left(\frac{a+b}{2}\right)^2$ I am reading Euclid's elements
I found the algebraic identity
$ab + \left(\frac{a+b}{2} - b\right)^2 = \left(\frac{a+b}{2}\right)^2$
I ponder on usage of this identity for $2$ hours.
but I can't click anything.
$a^2 + b^2 = c^2$ can be used when you want to know the direction between $2$ coordinates.
Any example involving this identity?
 [/INST] This equation can be rewritten as $$ab=\frac{(a+b)^2}4-\frac{(a-b)^2}4.$$ This is the basis of tables of quarter-squares. Such a table tabulated $\left\lfloor \frac{n^2}4\right\rfloor$ for various integer values $n$. It was used as an aid to multiplying integers. To find $ab$, look up the quarter-squares of $a+b$ and $a-b$, then subtract.
If $a$ and $b$ have different parities, $a+b$ and $a-b$ are both odd, so the tabulated quarter-squares are too low by a quarter, but those quarters cancel.
</s>