I have a square that is $33\times33$ cm. I will put a circle in it that has a diameter of $33$ cm. How do I calculate the distance from the square's corner to the circle's closest perimeter in a straight line? For example, the green arrow below shows what I want to know.
[Math] Circle in square, calculate distance from square’s corner to circle’s perimeter
algebra-precalculusgeometry
Related Solutions
The expected distance from a unit circle to a randomly chosen point inside the circle is given by $$ \frac{1}{\pi}\int_{0}^{1}(1-r)(2\pi r)dr=\left(r^2-\frac{2}{3}r^3\right)\bigg\vert_{0}^{1}=\frac{1}{3}; $$ as a function of the area of the circle, then, the expected distance is $$ {d}_{\text{circle}}(A)=\frac{1}{3\sqrt{\pi}}\sqrt{A} \approx 0.1881 \sqrt{A} $$ (which holds for circles of any size). For a square of side length $2$, the expected distance from the square to a random interior point (which can be calculated by considering a single quadrant) is $$ \int_{0}^{1}y(2-2y)dy = \left(y^2-\frac{2}{3}y^3\right)\bigg\vert_{0}^{1}=\frac{1}{3} $$ as well, so $$ d_{\text{square}}(A)=\frac{1}{6}\sqrt{A} \approx 0.1667 \sqrt{A} $$ for an arbitrary square. Finally, for a $2\times 4$ rectangle, you need to consider the short and long sides differently. Essentially you have two $2 \times 1$ end caps that behave like the square (so the average distance is $1/3$), and a $2\times 2$ central block for which the average distance is just $1/2$. The two components have equal areas, so the overall average distance is the average of $1/2$ and $1/3$, or $5/12$. Since the area of the entire rectangle is $8$, we have $$ d_{\text{rect}}(A)=\frac{5}{24\sqrt{2}}\sqrt{A} \approx 0.1473 \sqrt{A} $$ for any rectangle with aspect ratio $2$.
If it helps, you can think of "unrolling" each shape, while preserving its area, so that the set of points at distance $d$ from the perimeter lies along $y=d$. For the circle and the square (and for any regular polygon), this gives a triangle with base equal to the original shape's perimeter. For the rectangle, though, it gives a trapezoid, because the points maximally distant from the perimeter are a line segment, not a single point.
Perhaps the examiner intended the students to notice the square is determined by a $(3, 4, 5)$ triangle, because $3 + 5 = 4 + 4$ (!):
Consequently, as several others have noted, $$ \frac{\text{perimeter of the circle}}{\text{perimeter of the square}} = \frac{5 \cdot 2\pi}{4 \cdot 8} = \frac{\pi}{3.2} < 1. $$
For an approach less dependent on inspiration, taking the origin of the coordinate system at the center of the circle seems easier than placing the origin at the center of the square. Without loss of generality, assume the circle has unit radius:
Equating the lengths of the horizontal and vertical sides of the square in this diagram, we read off $$ x + 1 = 2y\quad\text{(or $x = 2y - 1$).} $$ Invoking the Pythagorean theorem and substituting the preceding line, \begin{align*} 0 &= x^{2} + y^{2} - 1 \\ &= (2y - 1)^{2} + y^{2} - 1 \\ &= 5y^{2} - 4y \\ &= y(5y - 4). \end{align*} Clearly $y \neq 0$, so $y = 4/5$, $x = 3/5$, and we notice the Examiner's Favorite Triangle.
Best Answer
The diagonal of the square is $33\sqrt 2$, so the green arrow is $\frac 12 (33\sqrt 2 -33)=\frac {33}2(\sqrt 2-1)\approx 6.835$