A mathematical expression that represents a circle when the circle touches the horizontal axis is called equation of a circle when the circle touches the $x$-axis.

A circle can be passed through the horizontal $x$-axis at a point on the plane in a special case. The circle can be expressed in an algebraic form equation to represent it mathematically. It can be derived in mathematical form by the geometric analysis with Cartesian coordinate system.

The equation of a circle can be derived in mathematics by using two different geometric approaches if the circle touches the $x$-axis and passes through a point.

1

Imagine a circle and its radius is $r$. The circle touches the horizontal $x$-axis at a point on the plane and the touching point is at a distance of $a$ units from the origin of the two dimensional space in the direction of horizontal axis.

The centre of the circle is at a distance of $b$ units from the $x$-axis. The distance from centre of the circle to touching $x$-axis is radius of the circle. Therefore, $r = b$.

The distance of the circle’s touching point at $x$-axis from origin is equal to the distance of centre of the circle from the origin in the point of view of $x$-axis. Therefore, the $x$-coordinate of the circle is $a$ and the $y$-coordinate of the centre of the circle is $b$ because the distance of the centre of the circle from origin is $b$. If centre is denoted by $C$, then centre of the circle is expressed in point form as $C (a, b)$.

Consider any point on the circumference of the circle and the point is called $P (x, y)$, which means the point $P$ is located at a distance of $x$ units from origin in the point of view of $x$-axis and $y$ units from origin in the point of $y$-axis.

Draw a line from centre $C$ but it should be parallel to the $x$-axis. Similarly, draw another line from point $P$ and it should be parallel to the $y$-axis. The two parallel lines intersect at point $Q$ perpendicularly. Thus, right angled triangle $QCP$ is constructed geometrically.

Now find lengths of all three sides.

- Length of the opposite side ($\overline{PQ}$) is $PQ = OP \, – \, OQ = y \, – \, b$
- Length of the adjacent side ($\overline{CQ}$) is $CQ = OQ \, – \, OC = x \, – \, a$
- Length of the hypotenuse ($\overline{CP}$) is $CP = r$.

Apply Pythagorean Theorem to $\Delta QCP$ to express relation between three sides.

${CP}^{\displaystyle \, 2} = {CQ}^{\displaystyle \, 2} + {PQ}^{\displaystyle \, 2}$

Substitute lengths of all three sides.

$r^{\displaystyle \, 2} = (x \,-\, a)^{\displaystyle \, 2} + (y \,-\, b)^{\displaystyle \, 2}$

$\implies (x-a)^{\displaystyle \, 2} + (y-b)^{\displaystyle \, 2} = r^{\displaystyle \, 2}$

In this case, $r = b$.

$\implies (x-a)^{\displaystyle \, 2} + (y-r)^{\displaystyle \, 2} = r^{\displaystyle \, 2}$

It can also be written as follows.

$\implies (x-a)^{\displaystyle \, 2} + (y-b)^{\displaystyle \, 2} = b^{\displaystyle \, 2}$

The above two mathematical equations represent a circle when the circle passes through the horizontal axis at a point.

Expand each squared term to express this equation in alternative form.

$\implies x^{\displaystyle \, 2} + a^{\displaystyle \, 2} \,-\, 2ax + y^{\displaystyle \, 2} + b^{\displaystyle \, 2} \,–\, 2by \,=\, b^{\displaystyle \, 2}$

$\implies x^{\displaystyle \, 2} + y^{\displaystyle \, 2} \,-\, 2ax \,\,–\, 2by + a^{\displaystyle \, 2} + b^{\displaystyle \, 2} \,- b^{\displaystyle \, 2} = 0$

$\implies \require{cancel} x^{\displaystyle \, 2} + y^{\displaystyle \, 2} \,-\, 2ax \,\,–\, 2by + a^{\displaystyle \, 2} + \cancel{b^{\displaystyle \, 2}} \,- \cancel{b^{\displaystyle \, 2}} = 0$

$\implies x^{\displaystyle \, 2} + y^{\displaystyle \, 2} \,-\, 2ax \,\,–\, 2by + a^{\displaystyle \, 2} = 0$

It is the equation of a circle when the circle is touching the $x$-axis at a point. It can also be expressed as follows by substituting $b$ by $r$.

$\implies x^{\displaystyle \, 2} + y^{\displaystyle \, 2} \,-\, 2ax \,\,–\, 2ry + a^{\displaystyle \, 2} = 0$

2

The distance of any point on the circumference from centre of the circle is equal to radius of the circle. The distance between any two points can be calculated mathematically by using a direct formula in geometry.

Now, calculate the distance between points $C (a, b)$ and $P (x, y)$ and it is equal to $r$.

$r = \sqrt{ {(x \,- a)}^{\displaystyle \, 2} + {(y \,- b)}^{\displaystyle \, 2} }$

$\implies r^{\displaystyle \, 2} = {(x \,- a)}^{\displaystyle \, 2} + {(y \,- b)}^{\displaystyle \, 2}$

$\implies {(x \,- a)}^{\displaystyle \, 2} + {(y \,- b)}^{\displaystyle \, 2} = r^{\displaystyle \, 2}$

In this case, the $y$-coordinate of the centre is equal to radius of the circle. It means $r = b$. Replace $r$ by $b$ and then $b$ by $r$.

$\implies {(x \,- a)}^{\displaystyle \, 2} + {(y \,- b)}^{\displaystyle \, 2} = b^{\displaystyle \, 2}$

$\implies {(x \,- a)}^{\displaystyle \, 2} + {(y \,- r)}^{\displaystyle \, 2} = r^{\displaystyle \, 2}$

The above two equations are equal and they both represent a circle when the circle touches the horizontal axis at a point. Now, expand either one of them to get the circle equation in another form.

$\therefore \,\, x^{\displaystyle \, 2} + y^{\displaystyle \, 2} \,-\, 2ax \,\,–\, 2ry + a^{\displaystyle \, 2} = 0$

$\implies \,\, x^{\displaystyle \, 2} + y^{\displaystyle \, 2} \,-\, 2ax \,\,–\, 2by + a^{\displaystyle \, 2} = 0$

If $a$ and $b$ are coordinates of the centre of the circle and $r$ is the radius of the circle, the equation of the circle when the circle touches the horizontal $x$-axis by passing through a point, can be written in following four mathematical forms.

${(x \,- a)}^{\displaystyle \, 2} + {(y \,- r)}^{\displaystyle \, 2} = r^{\displaystyle \, 2}$

${(x \,- a)}^{\displaystyle \, 2} + {(y \,- b)}^{\displaystyle \, 2} = b^{\displaystyle \, 2}$

$x^{\displaystyle \, 2} + y^{\displaystyle \, 2} \,-\, 2ax \,\,–\, 2ry + a^{\displaystyle \, 2} = 0$

$x^{\displaystyle \, 2} + y^{\displaystyle \, 2} \,-\, 2ax \,\,–\, 2by + a^{\displaystyle \, 2} = 0$