As shown in the figure, equation of line is
L=x−y+1=0points A and B are endpoints of diameter as shown in figure. (Property of angle subtended in semicircle)
Equation of family of circles touching a line L=0 at point (x1,y1) is,
(x−x1)2+(y−y1)2+λL=0
where, λ = constant parameter
Here, x1=1, y1=2
∴(x−1)2+(y−2)2+λ(x−y+1)=0
∴x2−2x+1+y2−4y+4+λx−λy+λ=0
∴x2+y2+x(λ−2)+y(−λ−4)+(5+λ)=0
∴x2+y2+2(λ−22)x+2(−λ−42)y+(5+λ)=0
Comparing this equation with standard equation of circle i.e. x2+y2+2gx+2fy+c=0, we get,
g=λ−22
f=(−λ−42)
c=5+λ
Thus, radius of circle is given as,
r=√g2+f2−c
∴r=√(λ−22)2+(−(λ+42))2−(5+λ)
∴r=√(λ−22)2+(λ+42)2−5−λ
∴r=√λ2−4λ+44+λ2+8λ+164−5−λ
∴r=√λ2−4λ+4+λ2+8λ+16−20−4λ4
∴r=√2λ24
∴r=√λ22
∴r=±λ√2 (1)
Now, AB is diameter and l(AB)=2√2 (given)
∴d=2√2
∴r=√2 (2)
From (1) and (2),
∴√2=±λ√2
∴λ=±2
Thus, equations of circles touching line L and passing through (1,2) are-
1) (x−1)+(y−2)+2(x−y+1)=0
∴x−1+y−2+2x−2y+2=0
∴3x−y−1=0
2) (x−1)+(y−2)−2(x−y+1)=0
x−1+y−2−2x+2y−2=0
∴−x+3y−5=0
∴x−3y+5=0