# Find the equation of the circle that touches these three lines $x= 0$, $y=0$, $x = a$.

Find the equation of the circle that touches these three lines $$x= 0$$, $$y=0$$, $$x = a$$.

Here is my attempt:

$$x = 0$$ and $$y = 0$$, these both line go through the $$x$$ and $$y$$ axes. And also the circle touches those two lines. So the center will be $$C(p,p)$$. That means $$r = k = h = p$$. The circle also touches the $$x = a$$ line. That means $$r = a/2$$. From that, I determined the center as $$C(a/2, a/2)$$.

The equation:

$$\left(x - \frac{a}{2}\right)^2 + \left(y - \frac{a}{2}\right)^2 = \left(\frac{a}{2}\right)^2$$

$$x^2 + y^2 - 2ax - 2ay + \frac{a^2}{4} = 0$$

which is not the correct answer.

Now can anyone tell me what's wrong with this attempt?

• Be careful expanding your squares! – Blue Aug 7 at 16:44

Your error is very simple: you have wronged expanding the square, in fact $$\left(x - \frac{a}{2}\right)^2 + \left(y - \frac{a}{2}\right)^2 = \left(\frac{a}{2}\right)^2$$ is not $$x^2 + y^2 - 2ax - 2ay + \frac{a^2}{4} = 0$$, but: $$x^2-ax+\frac{a^2}{4}+y^2+ay=0$$ In other words: $$4x^2+4y^2-4ax-4ay+a^2=0$$

Also, by simmetry, I get $$\left(x - \frac{a}{2}\right)^2 + \left(y + \frac{a}{2}\right)^2 = \left(\frac{a}{2}\right)^2$$: $$4x^2+4y^2-4ax+4ay+a^2=0$$

To clarify, see this graph where $$a=6$$: • Also, by symmetry, is missing another solution: circle with center $(a/2,-a/2)$ and radius $a/2$. – Julian Mejia Aug 7 at 17:07
• Yes, it's correct. – Matteo Aug 7 at 17:10
• why (-a/2).I actually didn't get it.How did you get two solutions and if a is negative then It feels like c(+- a/2, +-a/2).I get confused>can you please explain. – Ghost Aug 7 at 17:17
• @Ghost: see the graph in my answer. – Matteo Aug 7 at 17:30
• Please check coefficients $4$ after expansion in last equations of both the numerators ! – Narasimham Aug 7 at 19:41

If the simple error in your calculation [coefficient in middle $$2xy$$ term in expansion of $$(x+y)^2$$ ] is removed the correct equation is

$$(x^2+y^2)-a (x+y)+ \frac{a^2}{4}=0$$

The origin/corner touching circle is in the first or fourth quadrant according as odd term $$y$$ is positive or negative.

$$(x^2+y^2)-a (x-y)+ \frac{a^2}{4}=0$$

Everything else is quite OK.