To find the diameter of Mercury based on the distance halfway around it, you can use the formula for the circumference of a circle, which is:
\[ C = \pi \times D \]
where \(C\) is the circumference and \(D\) is the diameter.
Since the distance halfway around Mercury is given as 4,761 miles, this means the full circumference \(C\) is:
\[ C = 2 \times 4,761 = 9,522 \text{ miles} \]
Now, we can find the diameter \(D\) using the circumference:
\[ D = \frac{C}{\pi} = \frac{9,522}{\pi} \]
Using \(\pi \approx 3.14159\):
\[ D \approx \frac{9,522}{3.14159} \approx 3,031 \text{ miles} \]
Thus, the length of the diameter of Mercury to the nearest mile is:
3,031 mi.