To find the equation of the circle that touches the coordinate axes and the line \( x + 2 = 0 \), we can follow these steps:
### Step 1: Understand the conditions
The circle must touch the x-axis and y-axis, which means that the distance from the center of the circle to both axes must equal the radius of the circle. Additionally, the circle must also touch the line \( x + 2 = 0 \) (which is the vertical line \( x = -2 \)).
### Step 2: Define the center and radius
Let the center of the circle be \( (h, k) \) and the radius be \( r \). Since the circle touches the x-axis, the distance from the center to the x-axis is \( k \) (which equals the radius \( r \)). Similarly, since it touches the y-axis, the distance from the center to the y-axis is \( h \) (which also equals the radius \( r \)). Therefore, we have:
- \( k = r \)
- \( h = r \)
### Step 3: Find the center's coordinates
Since the circle also touches the line \( x + 2 = 0 \), the distance from the center \( (h, k) \) to the line \( x = -2 \) must also equal the radius \( r \). The distance from a point \( (h, k) \) to the line \( x = -2 \) is given by:
\[
\text{Distance} = |h + 2|
\]
Setting this equal to the radius \( r \) gives us:
\[
|h + 2| = r
\]
### Step 4: Substitute \( h \) and \( k \)
Since \( h = r \) and \( k = r \), we can substitute \( h \) in the distance equation:
\[
|r + 2| = r
\]
### Step 5: Solve the equation
We can solve the equation \( |r + 2| = r \) by considering two cases:
**Case 1:** \( r + 2 = r \)
- This leads to \( 2 = 0 \), which is not possible.
**Case 2:** \( r + 2 = -r \)
- This simplifies to \( 2r + 2 = 0 \) or \( r = -1 \), which is not valid since radius cannot be negative.
Instead, we can consider:
\[
r + 2 = -r \implies 2r = -2 \implies r = -1
\]
This indicates that the center must be located in the third quadrant.
### Step 6: Determine the center coordinates
Since \( r = 1 \) (the radius must be positive), we have:
- \( h = -1 \)
- \( k = 1 \)
### Step 7: Write the equation of the circle
The general equation of a circle with center \( (h, k) \) and radius \( r \) is:
\[
(x - h)^2 + (y - k)^2 = r^2
\]
Substituting \( h = -1 \), \( k = 1 \), and \( r = 1 \):
\[
(x + 1)^2 + (y - 1)^2 = 1
\]
### Step 8: Expand the equation
Expanding the equation:
\[
(x^2 + 2x + 1) + (y^2 - 2y + 1) = 1
\]
Combining terms:
\[
x^2 + y^2 + 2x - 2y + 2 = 1
\]
Rearranging gives:
\[
x^2 + y^2 + 2x - 2y + 1 = 0
\]
### Final Answer
Thus, the equation of the circle is:
\[
x^2 + y^2 + 2x - 2y + 1 = 0
\]
---