Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My question goes like this:

Determine the equation of a circle tangent to the $x$-axis and passing through $(5,1)$ and $(12,8)$.

I need not only the answers, but also the steps on how you did it so that I can do it on similar questions.


share|cite|improve this question

A careful diagram should make one guess that there are two such circles.

Our circle(s) passes through $(5,1)$ and $(12,8)$. So the perpendicular bisector of the line segment through these two points passes through the centre of the circle.

The line through our two points has slope $(8-1)/(12-5)$, which is $1$. So the perpendicular bisector has slope $-1$.

Now we can find the equation of the perpendicular bisector. It has slope $-1$ and passes through the midpoint $(17/2,9/2)$ of our line segment. We find that the perpendicular bisector has equation $x+y=13$.

Let the centre be $(a,b)$. Then $a+b=13$. Furthermore, because the circle is tangent to the $x$-axis, and cannot go below the $x$-axis, the radius must be $b$. So the square of the distance from $(a,b)$ to $(5,1)$ must be equal to $b^2$. This gives us the equation $$(a-5)^2+(b-1)^2=b^2,$$ which expands to $$a^2-10a-2b+26=0.$$ But $b=13-a$. Substitute. We get $$a^2 -8a=0.$$ Solve. We get $a=0$ or $a=8$. The corresponding $b$ are $b=13$ and $b=5$. Now the equations of the two circles are easy to write down. The first has centre $(0,13)$ and radius $13$. The second has centre $(8,5)$ and radius $5$.

Another (faster) way: Let the radius of our target circle be $r$. Since the circle is tangent to the $x$-axis, the $y$-coordinate of the centre of the circle is $r$. Let the $x$-coordinate be $a$. Then the circle has equation $$(x-a)^2+(y-r)^2=r^2,$$ Substitute $(5,1)$ and $(12,8)$ in the equation of the circle. We get $a^2-10a-2r+26=0$ and $a^2-24a-16r+208=0$. Subtract to get rid of the $a^2$ term. We get $14a+14r=182$, which simplifies to $a+r=13$. Substitute $13-a$ for $r$ in the equation $a^2-10a-2r+26=0$. Quickly we arrive at $a^2-8a=0$, and it is almost all over.

share|cite|improve this answer

Well, we have a few equations to work with.

( 5-a)^2 + (1-b)^2 = R^2
(12-a)^2 + (8-b)^2 = R^2

Also, using the fact that y'=0 where y=0, we can implicitly differentiate the equation of the circle to discover:

(x-a)^2 + (y-b)^2 = R^2  equation of circle
2(x-a) + 2(y-b)y' = 0    implicit differentiation
2(x-a) = 0               use y' = 0, y = 0
x = a                    solution

So the point (a, 0) is also on the circle. Now we have a new equation:

(a-a)^2 + (0-b)^2 = R^2

And that's all there is to it.

EDIT: Well, of course, you still need to solve the system. If help is needed with that, I'll edit this answer accordingly. The basic idea is that b is +R or -R, and so you try to solve the other two equations under each of these possibilities.

share|cite|improve this answer

Patrick has given the correct equations but I will just add to the understanding part, as you've asked for it in the question. The basic idea is to figure out all the possibilities that fit the requirements. Going into the equation might lead you to an incorrect answer. It helps if you expect a certain solution. For eg, the given conditions imply clearly that the circle has to be above the x-axis if the x-axis is tangent to it and the points on its circumference are above the x-axis. Without writing an equation, you can tell that there are at most two possible circles that can lie above the x-axis and go through these points. So, all you need to find out is the origin of the circle and its radius - 3 variables. So you need 3 unique equations. Here, we start with the first two equations given by Patrick. The center is at a distance ( = R) from a point on its circumference. Two points give you two equations. Finally, the tangent is basically a line that is at a distance (= R) from the centre of circle. In the current case, the tangent was X=0, which simplified things. Usually, that will not be the case. You can make the third equation using this idea as explained here.

share|cite|improve this answer

Plot of the solution. The equations are $(6)$ (blue circle) and $(7)$ (black circle)

enter image description here

  1. Start with the equation of a circle centered at $(h,k)$ and radius $r$ $$ \begin{equation} (x-h)^{2}+(y-k)^{2}=r^{2}. \tag{1} \end{equation} $$

  2. Since the points $N(5,1)$ and $M(12,8)$ lay on the circle, we have the equations $$(5-h)^{2}+(1-k)^{2}=(12-h)^{2}+(8-k)^{2}=r^{2}.\tag{1'}$$

  3. Simplify the first two equations of $(1')$. They become $$k=13-h.$$ Substitute this value of $k$ in $(1)$ $$ (x-h)^{2}+(y-13+h)^{2}=r^{2}.\tag{2} $$

  4. Solve for $y$ $$y=13-h\pm \sqrt{-h^{2}-x^{2}+2xh+r^{2}}\tag{2'}$$ and compute the derivative $$y'=\pm \frac{h-x}{\sqrt{-h^{2}-x^{2}+2xh+r^{2}}}.\tag{3}$$

  5. Consequently, at $x=h,y=0$ the circle is tangent to the $x$-axis. Substitute these values in $(2)$ $$(-13+h)^{2}-r^{2}=0\tag{4}$$ and solve for $h$, getting $$h=13\pm r.$$

  6. Use the coordinates of e.g. $N(5,1)$ in $(2)$ and choose $h=13- r$ $$ (5-\left( 13-r\right) )^{2}+(1-13+\left( 13-r\right) )^{2}-r^{2}=0\tag{5} $$

  7. Solving for $r$ we get the solutions $r=5$ and $r=13$. One of the equations of the circle is $$ \boxed{(x-8)^{2}+(y-5)^{2}=5^{2}}\tag{6}$$ and the other $$\boxed{x^{2}+(y-13)^{2}=13^{2}.}\tag{7}$$

  8. The solution $h=13+r$ results in a radius $r<0$, which is impossible.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.