The given circle is x2+y2−2x=0.
Substituting y=x,
we get
x2+x2−2x=0.
2x2−2x=0.
2x(x−1)=0.
Hence the points of intersection are A(0,0) and B(1,1).
The circle having AB as diameter has equation (x−x1)(x−x2)+(y−y1)(y−y2)=0.
Substituting
A(0,0),B(1,1),
x(x−1)+y(y−1)=0.
x2+y2−x−y=0.
Therefore, the required circle is x2+y2−x−y=0.