A geometry problem from the Riddler blog. Here it goes:
A farmer owns a circular field with radius R. If he ties up his goat to the fence that runs along the edge of the field, how long does the goat’s tether need to be so that the goat can graze on exactly half of the field, by area?
Here is my solution:
[Show Solution]
There are many ways to solve this problem, so I figured I would pick an unorthodox way: using calculus! Consider the diagram below.
The circular field is centered at $O$. The goat is tethered at $C$ and the tether has length $r$. Let $B$ be the point diametrically opposed to $C$ and let $A$ be the farthest point along the perimeter that the goat can reach. Let $\theta$ be the angle $BOA$, as shown. If $r$ changes a little bit, by some amount $dr$, then $\theta$ will change by some amount $d\theta$. Likewise, the fraction of the total area reachable by the goat will change by $dA$. Let’s calculate how these quantities are related.
First, note that $dA$ is simply the area between the two circular arcs centered at $C$ and passing through $A$ and $A’$, respectively. We must also divide by the total area of the field in order to get a ratio. As $dr\to 0$, we have:
\[
dA = \frac{\tfrac{1}{2} \theta\, d(r^2)}{\pi R^2}
\]Our next task is to find out how $d\theta$ is related to $d(r^2)$. Look at the triangle $OAC$. By the law of cosines, we have:
$r^2 = 2R^2(1 + \cos(\theta))$. Taking differentials, we obtain:
\[
d(r^2) = -2R^2 \sin(\theta)\,d\theta
\]Substituting back into our expression for $dA$, we obtain:
\[
dA = -\tfrac{1}{\pi} \theta\,\sin(\theta)\,d\theta
\]We can now integrate! Note that $A=1$ when $\theta=0$. Therefore, we have:
\begin{align}
A(\theta) &= 1 + \int_{0}^\theta \tfrac{1}{\pi} t\, \sin(t)\,dt \\
&= \frac{\pi + \theta\,\cos(\theta)-\sin(\theta)}{\pi}
\end{align}This tells us the ratio of areas as a function of $\theta$. If we want this as a function of $r$ instead, we can use the law of cosines again to eliminate $\theta$ and write $A$ as a function of $r$. This yields:
\[
A(\rho) = 1+\frac{\left(\frac{\rho ^2}{2}-1\right) \cos ^{-1}\left(\frac{\rho ^2}{2}-1\right)}{\pi }-\frac{\rho \sqrt{4-\rho ^2}}{2\pi}
\]where I made the substitution $\rho := r/R$. We can plot this quantity as a function of $\rho$, and we get:
As we might expect, when $r=0$, $A=0$. And the area ratio grows monotonically with $r$ until we reach $r=2R$, at which point the goat can reach the farthest point (which is point $B$) and therefore can reach the entire field. There is no closed-form expression for the exact tether length that leads to a particular area ratio, since that would require solving the above $A(\rho)$ for $\rho$. However, we can easily solve the equation numerically. Doing so, we obtain:
$\displaystyle
\frac{\text{length of tether}}{\text{radius of field}} \approx 1.15873
$
Finally, here is a diagram of what the field and tether look like when the area ratio is exactly 1/2.
I reached the same solution, using basically the same approach. I worked out the equation for the area of the lens, where the field is centered at (R,0) and the goat is tied up at (0,0). The lens has two halves spreading out from the intersection of the two circles, the right side bounded by the goat arc and the left side bounded by the field arc. I couldn’t quite resolve the equation, so instead I plugged in values for a field radius R and a goat leash length of R+N. I iterated for a bit and found that N = R/6.3. This works out to the same value you found.
Here’s the equation for half the area of the field equal to the area of the lens:
(1/2)(pi * R^2) =
(1/2)(R^2)[2 * arcsin( sqrt((R+N)^2 – (((R+N)^2)/(2R))^2)/R )
– sin(2 * arcsin( sqrt((R+N)^2 – (((R+N)^2)/(2R))^2)/R ) ) ] +
(R+N)^2)[2 * arcsin( sqrt((R+N)^2 – (((R+N)^2)/(2R))^2)/(R+N) )
– sin(2 * arcsin( sqrt((R+N)^2 – (((R+N)^2)/(2R))^2)/(R+N) ) ) ]
I also went for the area of the lens, but figured that WLOG, we could solve for R=1 and choose the coordinate system so that the stake is at (1,0). Then the x axis divides the lens into half, and the half above the x axis can in turn be split into the part bounded by the goat’s tether and that bounded by the field (aka unit circle). The switch comes at the place where those circles intersect, i.e. at the positive x for which sqrt(r^2 – (x – 1)^2) = sqrt(1 – x^2), which turns out to be (2 – r^2)/2.
I wimped out and calculated the integral numerically–shouldn’t have bothered to write an adaptive trapezoidal routine when there’s scipy.integrate.quad. (OTOH, there are online symbolic integrators; they’d be worth a try.) In any case, it does give a result consistent with Mr. Laurent’s.
You really don’t need calculus to solve this. The two pieces of the lens are pieces of two circles cut off by a common chord. The area cut off by a chord of a circle is the area of the pie slice less the area of the triangle defined by the chord, and radii extending to each end of the chord.
Tying the goat at (1,0) and using the unit circle as the circular enclosure, you can get the x coordinate of the chord by solving x^2 + y^2 = 1 and (x-1)^2 + y^2 = r^2 simultaneously.
x(chord) = 1-r^2/2.
y = sqrt (1-x^2)
a = theta + r^2 phi – y,
where theta is the angle at the center subtended by the chord, and phi is the angle at (1,0) subtended by the chord.
The last equation can be solved numerically in a spreadsheet to get the value Laurent posted.
I solved the grazing radius problem using computational math. I have a 2D Algorithmic Geometry library in Java (high school students I teach develop this library and a more advanced 3D one).
One of the watershed 2D problems we solve algorithmically is the two intersection points of two overlapping circles. You can apply this algo to solve for the area of the football-shaped grazing region, starting with a reasonable guess for grazing radius r. As James Jones notes, the football cleaves down the middle using the line segment bridging the two circle intersection points. Each of these “lens” shapes is the minor segment of a circle+chord. The area of a minor segment can be solved by subtracting two areas…..the pizza-pie slice minus the central (isoscoles) triangle.
A converging iterative search for the value of grazing radius is not hard to set up, using Gauss’s method. Compute the football area A using the latest estimate for r. Compute the error in A
( A – 0.5 * pi). Flip the sign of this error to make useful as a correction to be added to r, and scale the correction by 1 / 2*pi*r which is the local derivative of pi*r_squared with respect to change in r.
r = 1.3 (starting guess)
loop:
compute A (football area)
A_error = A – 0.5 * pi
r = r – A_error / (2 * pi * r) // Gauss’ method
until (abs (A_error) < 0ne_billionth)
r = 1.158728473 * R
You forgot to take into account the length of the goat’s head which should be subtracted from the length of the rope, otherwise it eats to much.
Looks like there is a closed form solution now:
https://www.quantamagazine.org/mathematician-solves-centuries-old-grazing-goat-problem-exactly-20201209/