Points $A$ , $B$ , $C$ and $D$ are the vertices of a rectangle. Point $E$ is in the interior of this rectangle. $AE = 8$, $EC = 21$. The lengths of $DE$ , $BE$ and $BC$ are integers. If $DE < BE$ , find the largest possible value for the length of BC .
Answer given: 19
Observations: I was playing around with numbers and noticed that $\sqrt{21^{2}-8^{2}}\approx 19$, though I'm not sure that this is relevant. In addition, I thought that BC would be longest if AE and EC formed a diagonal. Later, I reasoned that it cannot be a diagonal since DE < BE, so E must be closer to the edge AD, though I don't know how to work within the integer constraints. Any help is appreciated.
Let $ED=x$,$BE=y$ and
$EP$, $EQ$, $ER$ and $ES$ be altitudes of $\Delta ABE$, $\Delta BCE$, $\Delta CDE$ and $\Delta DAE$ respectively.
Hence, by Pythagoras theorem we obtain
$$x^2+y^2=ER^2+RD^2+PE^2+BP^2=ER^2+PA^2+PE^2+CR^2=$$ $$=ER^2+CR^2+PE^2+PA^2=21^2+8^2$$ or $$x^2+y^2=505$$ and since $x<y$ and $\{x,y\}\subset\mathbb N$, we obtain $(x,y)=(8,21)$ or $(x,y)=(12,19)$, which says $x\leq12$.
In another hand, by the triangle inequality $$BC<AE+ED=8+x\leq20.$$
Thus, $BC\leq19.$
The equality occurs for $x=12$, $y=19$, $BC=19.$
Easy to see that there is a rectangle $ABCD$ with these given and we are done!