# Find the equation of all circles tangential to the lines $y = 0, x = 0$ and $y = - x + 2$

I have a question, to find the equation of all circles tangential to the lines $$y=0,\,x=0$$ and $$y=-x+2$$.

There should be $$4$$ circles. I understand so far that circles take the form $$(x - h)^2+(y - k)^2=r^2$$ I tried solving this, but am stuck, and don’t know how to approach it. I figured that to remain tangential to the axis, the circle would need to shift to a value equal to that of its radius, so the edges touch. Hence $$(x - b)^2 + (y - b)^2 = b^2$$ But I am lost after this point. I tried substituting in $$y = - x + 2$$ into that equation and try solving for $$x$$ in terms of $$b$$, but end up with $$2x^2 - 4x + 4 = -b^2 +4b$$ However I don’t know what I am achieving by doing this. I’m trying to understand how I will solve this logically. Any help or pointers would be appreciated, thanks!

Hint:

If the equation of the circle be $$(x-a)^2+(y-b)^2=r^2$$

The distance from the center = radius,

i.e., $$r=\dfrac{|b|}{1}=\dfrac{|a|}{1}=\dfrac{|a+b-2|}{\sqrt2}$$

If $$a=b$$

$$\sqrt2|a|=|2a-2|\implies2a^2=(2a-2)^2\implies a=?$$

What if $$a=-b?$$

• Sorry on the second line, where does the √2 in the denominator come from? Commented May 19, 2020 at 13:09
• @Subbota, What is the distance of $(a,b)$ from $$y=-x+2$$ Commented May 19, 2020 at 13:13

Continuing where OP finished:

$$2x^2 - 4x + 4 = -b^2 +4b$$ is a quadratic equation. The line is a tangent line when the solution is double (discriminant $$D=0.)$$

$$D=-8(b^2-4b+2)=0 \iff b=2\pm \sqrt2$$

I guess you can solve it similarly for two circles in the quadrants II and IV.