The equation of the circle having (4,−1) and (2,−1) as the endpoints of its diameter is
x2+y2−6x+2y+9=0
Equation of a circle when the end points (x1,y1) and (x2,y2) of its diameter are given, is given by,
(x−x1)(x−x2)+(y−y1)(y−y2)=0
So, when (4,−1) and (2,−1) are the end points of the diameter, equation of the circle would become:
(x−4)(x−2)+(y+1)(y+1)=0
x2−6x+8+y2+2y+1=0
x2+y2−6x+2y+9=0