<s>[INST] A circle is drawn with its centre on the line $x + y = 2$ to touch the line $4x – 3y + 4 = 0$ and pass through the point $(0, 1)$. Find its equation. A circle is drawn with its centre on the line $x + y = 2$ to touch the line $4x – 3y + 4 = 0$ and pass through the point $(0, 1)$. Find its equation.
My attempt is as follows:-
Let the equation of circle be $x^2+y^2+2gx+2fy+c=0$
As center lies on the line $x+y=2$
$$-g-f=2$$
$$g+f=-2\tag{1}$$
As circle passes through the point $(0,1)$
$$1+2f+c=0$$
$$2f+c=-1\tag{2}$$
As $4x – 3y + 4 = 0$ is tangent to the circle
$$\dfrac{\left|-4g+3f+4\right|}{5}=\sqrt{g^2+f^2-c}$$
Squaring both sides
$$16g^2+9f^2-24gf+16+8(-4g+3f)=25g^2+25f^2-25c$$
$$9g^2+16f^2+24gf+32g-24f-25c-16=0$$
Eliminating $g$ with the help of equation $(1)$
$$9(-2-f)^2+16f^2+24(-2-f)f+32(-2-f)-24f-25c-16=0$$
$$9(4+f^2+4f)+16f^2-48f-24f^2-64-32f-24f-25c-16=0$$
$$f^2-68f-44-25c=0$$
Eliminating $c$ with the help of equation $(2)$
$$f^2-68f-44-25(-1-2f)=0$$
$$f^2-18f-19=0$$
$$f^2-19f+f-19=0$$
$$f=19,-1$$
$$(g,f,c)\equiv (-1,-1,1),(-21,19,-39)$$
So equations are $x^2+y^2-2x-2y+1=0$, $x^2+y^2-42x+38y-39=0$
But this got too long, any shorter method?
 [/INST] Let $(a, 2 - a)$ be a center of circle A.
Line $L_0 : 4x - 3y + 4 = 0$ is tangent of A, so point of tangency P has minimum distance with A.
For all X = $(x, y) \in L_0$,
$$
\begin{align*}
d (X, A)^2 = \left( 4^2 + 3^2 \right) \left( \left( x - a \right)^2 + \left(y - 2 + a\right)^2 \right) & \geq \left( 4 \left(x - a\right) - 3 \left(y - 2 + a\right) \right)^2 \\
& = (4x - 3y + 6 - 7a )^2 \\
& = (7a  - 2)^2
\end{align*}
$$
has minimum at $P$.
Circle A has two points $P$, $(0, 1)$. From ${(7a-2)^2 \over 25} = (a - 0)^2 + (2 - a - 1)^2$, we obtain $a = 1 \lor a = 21$ and ${7a - 2 \over 5} = 1 \lor {7a - 2 \over 5} = 29$.
So, $A : x^2 + y^2 - 2x - 2y + 1 = 0$ and $A : x^2 + y^2 - 42x + 38y - 39=0$  are only exist.
</s>