Let the numbers be p, q, r, s. Up to a permutation we may assume that p≥q≥r≥s. We first consider the case where p+q≥5. Then
p2+q2+2pq≥25=4+(p2+q2+r2+s2)≥4+p2+q2+2rs,
which is equivalent to pq−rs≥2.
Assume now that p+q<5; then
4<r+s≤p+q<5.(1)
Observe that
(pq+rs)+(pr+qs)+(ps+qr)=2(p+q+r+s)2−(p2+q2+r2+s2)=30.
Moreover,
pq+rs≥pr+qs≥ps+qr,
because (p−s)(q−r)≥0 and (p−q)(r−s)≥0.
We conclude that pq+rs≥10. From (1), we get 0≤(p+q)−(r+s)<1, therefore
(p+q)2−2(p+q)(r+s)+(r+s)2<1.
Adding this to (p+q)2+2(p+q)(r+s)+(r+s)2=92 gives
(p+q)2+(r+s)2<41.
Therefore
41=21+2⋅10≤(p2+q2+r2+s2)+2(pq+rs)=(p+q)2+(r+s)2<41,
which is a contradiction.
Second solution.
From a+b+c+d=9 with ordering a≥b≥c≥d we have
2a+b=49+ε1,2c+d=49−ε1
for some ε1≥0. Thus
a=49+ε1+ε2,b=49+ε1−ε2,c=49−ε1+ε3,d=49−ε1−ε3
for some ε2,ε3≥0. From b≥c we get
ε1−ε2≥−ε1+ε3orε2+ε3≤2ε1.
From
21=(a2+b2)+(c2+d2)=2⋅(49+ε1)2+2ε22+2⋅(49−ε1)2+2ε32==4⋅(49)2+4ε12+2ε22+2ε32=20+41+2⋅(2ε12+ε22+ε32)
we conclude that non-negative numbers εi satisfy
2ε12+ε22+ε32=83.(2)
Using ε2+ε3≤2ε1 and ε22+ε32≤(ε2+ε3)2 from (2) we obtain
83≤2ε12+(ε2+ε3)2≤2ε12+4ε12=6ε12.
Hence ε12≥(1/6)⋅(3/8)=1/16 or ε1≥1/4. For ab−cd we have
ab−cd=(49+ε1)2−ε22−(49−ε1)2+ε32=9ε1−ε22+ε32.
Substituting for ε22 from (2) we get
ab−cd=9ε1−(83−2ε12−ε32)+ε32=9ε1+2ε12−83+2ε32≥9⋅41+2⋅161−83=2.
This ends the proof.