圆心在直线3x-y=0上,y=3x,
设圆心坐标为(m,3m),
它与X轴相切,则半径为3m,
设圆方程为:(x-m)^2+(y-3m)^2=9m^2,
设直线y=x与圆相交于A(x1,y1),B(x2,y2),
x1=y1,x2=y2,
y=x代入圆方程,
2x^2-8mx+m^2=0,
根据韦达定理,
x1+x2=4m,
x1*x2=m^2/2,
(x2-x1)^2=(x1+x2)^2-4x1x2=16m^2-2m^2=14m^2,
(y2-y1)^2=(x2-x1)^2=14m^2,
(x2-x1)^2+(y2-y1)^2=AB^2=28,
28m^2=28,
m=±1,
则圆方程为:
(x-1)^2+(y-3)^2=9,
或:
(x+1)^2+(y+3)^2=9.
若用求弦心距法,
则根据勾股定理,设弦心距=d,
d^2=(3m)^2-(√7)^2=9m^2-7,
根据点线距离公式,d=|m-3m|/√2=√2m,
(√2m)^2=9m^2-7,
7m^2=7,
m=±1,
则圆方程为:
(x-1)^2+(y-3)^2=9,
或:
(x+1)^2+(y+3)^2=9.
结果相同.