As shown in the figure, the coordinates of the center of the circle C are (1,1), and the circle C is tangent to the x-axis and y-axis. (1) find the equation of the circle C; (2) find the equation of the line which is tangent to the circle C and has the same intercept on the x-axis and y-axis

As shown in the figure, the coordinates of the center of the circle C are (1,1), and the circle C is tangent to the x-axis and y-axis. (1) find the equation of the circle C; (2) find the equation of the line which is tangent to the circle C and has the same intercept on the x-axis and y-axis

(1) If the coordinates of the center of the circle C are (1,1), and the circle C is tangent to the X and Y axes, then the radius r = 1, so the equation of the circle C is: (x-1) 2 + (Y-1) 2 = 1; (2) if the intercept of the straight line on the X and Y axes is equal, the slope must be - 1, which can be set as y = - x + B, ∵ the straight line is tangent to the circle, ∩ 1 + 1 − B | 2 = 1, ∩ B = 2 ± 2, so the equation of the straight line is x + Y-2 ± 2 = 0