圆心在直线y=x上,经过原点,且在x轴上截得弦长为2的圆的方程为( )
A.(x-1)2+(y-1)2=2
B.(x-1)2+(y+1)2=2
C.(x-1)2+(y-1)2=2或(x+1)2+(y+1)2=2
D.(x-1)2+(y+1)2=或(x+1)2+(y-1)2=2
圆心在直线y=x上,经过原点,且在x轴上截得弦长为2的圆的方程为( )
A.(x-1)2+(y-1)2=2
B.(x-1)2+(y+1)2=2
C.(x-1)2+(y-1)2=2或(x+1)2+(y+1)2=2
D.(x-1)2+(y+1)2=或(x+1)2+(y-1)2=2
C
[解析] 由圆心在直线y=x上排除B、D;由对称轴知,若圆(x-1)2+(y-1)2=2满足题意,则(x+1)2+(y+1)2=2也必满足题意,故选C.