This expression is always a perfect square

113 Views Asked by At

How to show that for $x,y\in \Bbb R$, the expression $xy+\left(\frac{x-y}{2} \right)^2$ is always a perfect square?

For example $x=7, y=3$, $7\times 3+\left(\frac{7-3}{2} \right)^2=25=5^2$

2

There are 2 best solutions below

0
On

Expand out the square term, add it to the $xy$ term and factorise the result. You'll find it comes to $((x+y)/2)^2$, which is a perfect square if $x=y\mod 2$

0
On

$$xy+\left(\frac{x-y}{2} \right)^2\\ =\frac{4xy+x^2+y^2-2xy}{4}\\ =\left(\frac{x+y}{2}\right)^2$$