470 DIOPHANTUS OF ALEXANDRIA
In order that this equation may reduce to a simple equation,
either
(1) the coefficient of x 2 must vanish, or a — /3 = 0,
or (2) the absolute term must vanish, that is,
p* — 2p 2 (a + h) + {a — h) 2 — 0,
or {p 2 — {a + h)}' 2 = 4 ah,
so that ah must be a square number.
As regards condition (1) we observe that it is really sufficient
if ocn 2 = (3m 2 , since, if cx.x + a is a square, (ax + a) n 2 is equally
a square, and, if (3x + h is a square, so is (/3x + b)m 2 , and
vice versa.
That is, (1) we can solve any pair of equations of the form
onn 2 x + a = u 2
ocn 2 x + h = w 2
Multiply by n 2 , m 2 respectively, and we have to solve the
equations
onn 2 n 2 x +an 2 = u' 2
, a m 2 n 2 x + hm 2 = w' 2
Separate the difference, an 2 — hm 2 , into two factors p, q and
put u' ±w' = p,
u' + w'=q;
therefore u' 2 — \ {p + qY, w' 2 = \ (p — q) 2 ,
and a m 2 n 2 x + an 2 = ^{p + q) 2 ,
<xm 2 n 2 x + hm 2 — %{p — q) 2 ',
and from either of these equations we get
, _ l( r p 2 + q 2 ) — \{an 2 + hm 2 )
ocm 2 n 2
since pq = an 2 — hm 2 .
Any factors p, q can be chosen provided that the resulting
value of x is positive.