Completing the square by area (source code)

= Completing the square by area

Start with a <square> of side length $x>0$ and add two <rectangles>, each with side lengths $x$ and $3$. The total <area> is $x^2+6x$. Place the <rectangles> along two adjacent sides of the <square>: the missing corner is a $3$ by $3$ <square>, of <area> $9$. Filling it produces a <square> of side length $x+3$.

\Image[/completing-square-area-assembly.png]
{title=Two rectangles and a missing corner explain $(x+3)^2=x^2+6x+9$}
{description=An original <area> assembly, drawn at the stipulated positive side length $x=2$. The corner has <area> $9$; the remaining constant $13-9=4$ gives $x^2+6x+13=(x+3)^2+4$. The diagram uses positive side lengths, while the <polynomial identity> holds for every $x$ in the <real numbers>.}

The <area> picture explains why the half-coefficient is squared. It also separates two operations that are easy to confuse: adding $9$ changes $x^2+6x$, whereas adding and subtracting $9$ preserves the expression. When solving an <equation> instead, adding $9$ to one side requires adding $9$ to the other side too.