The given equation of the sides are x = −2, x = 4, y = −2, y = 5
∴ The ends of any one of the diameter are A(−2, −2) and B(4, 5).
We know equation of a circle with (x1,y1), (x2, y2 ) as the two ends of any of its diameter is
(x − x1 )(x − x2 ) + (y− y1 )(y − y2 ) = 0 (1)
So, let (x1, y1 ) = (−2, −2) and (x2, y2 ) = (4, 5).
(1) ⇒ (x + 2)(x − 4) + (y + 2)(y− 5) = 0
⇒ x2 − 2x − 8 + y2 − 3y − 10 = 0
⇒ x2 + y2 − 2x − 3y − 18 = 0, is the required equation of the circle.