We are given that the circle touches both the x-axis and y-axis.
This implies that the radius \( r \) of the circle is equal to the x and y coordinates of the center (since distance from the center to each axis = radius).
Let the center be at \( (a, a) \) so the equation becomes:
\[
(x - a)^2 + (y - a)^2 = a^2
\]
Given that the circle passes through the point \( (1, 2) \), we substitute into the equation:
\[
(1 - a)^2 + (2 - a)^2 = a^2
\]
Expanding and simplifying:
\[
(1 - a)^2 = a^2 - 2a + 1\\
(2 - a)^2 = a^2 - 4a + 4\\
\Rightarrow (1 - a)^2 + (2 - a)^2 = a^2\\
\Rightarrow a^2 - 2a + 1 + a^2 - 4a + 4 = a^2\\
\Rightarrow 2a^2 - 6a + 5 = a^2\\
\Rightarrow a^2 - 6a + 5 = 0
\]
Solving the quadratic equation:
\[
a^2 - 6a + 5 = 0 \Rightarrow a = 5 \text{ or } a = 1
\]
Let's check both values:
1. If \( a = 5 \):
Center = (5, 5), Radius = 5
Equation: \( (x - 5)^2 + (y - 5)^2 = 25 \)
Check if it passes through (1, 2):
\[
(1 - 5)^2 + (2 - 5)^2 = 16 + 9 = 25 \Rightarrow \text{Yes, satisfies}
\]
2. If \( a = 1 \):
Center = (1, 1), Radius = 1
Equation: \( (x - 1)^2 + (y - 1)^2 = 1 \)
Check if it passes through (1, 2):
\[
(1 - 1)^2 + (2 - 1)^2 = 0 + 1 = 1 \Rightarrow \text{Yes, satisfies}
\]
So, both values of \( a = 1 \) and \( a = 5 \) satisfy the condition. Therefore, there are two such circles.