Write the equation of a circle whose endpoints are (-1,2) and (5,8)

I will assume that the given points are the endpoints of a diameter.

so midpoint or the centre is (2,5)

equation:
(x-2)^ + (y-5)^2 = r^2
but (-1,2) lies on it, so
(-3)^2 + (-3)^2 = r^2
r^2 = 18

(x-2)^2 + (y-5)^2 = 18

Thanks

To write the equation of a circle when given the endpoints of a diameter, we need to find the center and radius of the circle.

Step 1: Find the coordinates of the center of the circle.
To find the center, we can find the average of the x-coordinates and the average of the y-coordinates of the diameter endpoints.
Average x-coordinate: (-1 + 5) / 2 = 2
Average y-coordinate: (2 + 8) / 2 = 5

So, the center of the circle is (2, 5).

Step 2: Find the radius of the circle.
To find the radius, we need to calculate the distance between one of the endpoints of the diameter and the center using the distance formula.
Let's use the point (-1, 2) as it is convenient.

Distance = √[(x2 - x1)^2 + (y2 - y1)^2]
Distance = √[(2 - (-1))^2 + (5 - 2)^2]
Distance = √[(2 + 1)^2 + (3)^2]
Distance = √[3^2 + 9]
Distance = √[9 + 9]
Distance = √18
Distance = 3√2

So, the radius of the circle is 3√2.

Step 3: Write the equation of the circle.
The equation of a circle with center (h, k) and radius r is given by (x - h)^2 + (y - k)^2 = r^2.

Using the values we found:
(h, k) = (2, 5)
r = 3√2

Substituting these values into the equation, we have:
(x - 2)^2 + (y - 5)^2 = (3√2)^2
(x - 2)^2 + (y - 5)^2 = 18

Therefore, the equation of the circle is (x - 2)^2 + (y - 5)^2 = 18.