Therefore the maximum value of the sum of the fractions is attained when y is minimum, which is 1. When y=1, since ac<xy, the optimum value for x is ac+1 (we want to choose x so that it is as small as possible). Thus for fixed a,c, the maximum value is
a+ac+1a+c+1c=1−(a+ac+1)(c+1)1.
By checking all pairs (a,c)=(1,19),(2,18),…,(10,10), we find that the maximum value of (a+ac+1)(c+1) is 1386, attained when (a,c)=(7,13). Therefore the maximum value is 1−13861=13861385.
We shall use the following result. Let p,q,k be positive integers. Then p+kp<q+kq iff p<q.
First fix a,c. Without loss of generality, we assume that a≤c. Let b=a+x and d=c+y where x,y are positive integers. Then it is easy to see that
a+xa+c+yc≥a+ya+c+xc
if y≤x. Thus we may assume that y≤x. Also
1>ba+dc=a+xa+c+yc=ac+ay+xy+cxac+ay+ac+cx
Thus ac<xy and xy−ac is the difference of the denominator and numerator of the fraction on the RHS. Thus if x′,y′ are positive integers such that y′≤x′ and xy=x′y′, then ∣y−y′∣≤∣x−x′∣. Therefore
a+xa+c+yc⇔(a+x)(c+y)⇔a(y−y′)⇔y≤a+x′a+c+y′c≤(a+x′)(c+y′)≤c(x′−x)≥yandx′≥x