# Finding equation of circle knowing 1 point, radius and that it touches the x-axis

I'm currently studying circle co-ordinate geometry, and this problem has puzzled me.

Find the equations of the circles of radius $5$, which touch the x-axis, and pass through the point $(3,1)$.

I would imagine if you drew this out, there would be two circles on either side. Also, because we know that they touch the x-axis, then another point A would be $(a - 5, 0)$, where $a$ is the centre of the circle.

The equations I've been using is: $r^2 = (x - a)^2 + (y - b)^2$, as well as the distance formula based on Pythagoras.

Where do I go from here?

Draw a picture. The circle cannot go below the $x$-axis, for if it did and touched the $x$-axis, it could not go through point $(3,1)$.
So the centre $(a,b)$ is above the $x$-axis. The distance from $(a,b)$ to the $x$-axis is the radius $5$ of the circle, so $b=5$. It follows that the circle has equation of the shape $$(x-a)^2+(y-5)^2=25.$$ Plug in $x=3$, $y=1$. We get an equation in $a$. Solve for $a$. There will be two solutions, both "nice."