Sheep and grass problem

640 Views Asked by At

There's a square shaped grass field and there's a rope in of the corners and a sheep tied to that rope. The rope is so long that the sheep can eat 90% of the field's grass. How long, compared to the diagonal of the square (in percents, accuracy of two numbers will suffice, e.g. 86%) is the rope? This problem requires a numerical answer.

I've tried using proportionality, in a way that the diagonal corresponds to 100% of the area, and the asked portion of the diagonal corresponds to 90% of the diagonal, but it got me nowhere. I also tried solving it by calculating areas under curves by integrating, but I soon realized there's really no way to do that (at least I couldn't find any way to make it work).

3

There are 3 best solutions below

1
On

Center the field at $(0,0)$ and put the corners at $(\pm1, \pm 1)$ so the area of the field is $4$.

Let the length of the rope by $r$. If $r \le 1$ then the area grazed by the sheep $\le\pi < 0.9\cdot4$. So $r > 1$. So the circle described by $r$ will have parts that are outside the field. Let the area of one of these be $A(r)$ and the area grazed by the sheep will be $\pi\cdot r^2 - 4A(r) = 0.9\cdot 4 = 3.6$. So we have to find the value or $A(r)$.

We'll find the area of the top one. The one above $y=1$.

The area is described by an arc of the circle $x^2 + y^2 = r^2$. So we want to find the area under the curved bounded by $y=1$. If $y=1$, $x= \pm\sqrt{r^2 - 1}$ So we need to integrate $y= \sqrt{r^2 - x^2}$ from $ \sqrt{r^2 - 1}$ to $-\sqrt{r^2 - 1}$. That'll be $A(r)$.

Solve for $r$. Express are in terms of the diagonal. And you are done.

0
On

If the rope has length $L$, the sheep can go anywhere in the field within $L$ of the corner post. Assume the rope is fixed at $(0,0)$, and the field is $1$x$1$, so the far corner is at $(1,1)$. First note that if the rope has length $1$, the sheep will be able to eat $A(1)=\pi/4$ units squared of grass, which is a bit over $75\%$, so $L>1$. Also, $L<\sqrt2$, because $A(\sqrt2)=1$.

So we need to find the area of the blue region in the following enter image description here

and since the field has area $1$, $A(L)$ will be the proportion of the field the sheep can eat. The circular boundary is defined by $x^2+y^2=L^2$.

To find the area, we will calculate the area of the rectangular region and circular part separately. The boundary of the circular region is given by $y=\sqrt{L^2-x^2}$, so the boundary between the rectangular and circular regions is $x=\sqrt{L^2-1}$, and thus the area of the rectangle is $\sqrt{L^1-1}$. For the circular part, we need to calculate an integral, giving the total area as

$$ A(L)=\underbrace{\sqrt{L^2-1}}_{\text{rectangle}}+\underbrace{\int^{1}_{\sqrt{L^2-1}}{\sqrt{L^2-x^2}}\,\mathrm dx}_{\text{circular part}} $$

the integral actually isn't too bad, use the substitution $L\sin(u)=x$ and using the cosine double angle formula, you get

$$ A(L)=\sqrt{L^2-1}+\frac{L^2}{2}\left(\arcsin\left(\frac{1}{L}\right)-\arcsin\left(\frac{\sqrt{L^2-1}}{L}\right)\right). $$

Now we want to solve $A(L)=k$, where in your case, $k=0.9$. I don't think this equation has an analytic solution, however there are plenty of ways to get a numerical approximation. The simplest for me is to use a Matlab builtin function to find the $L$ that minimises $|A(L)-k|$:

%// The area function
A=@(L) sqrt(L^2-1)+L^2/2*(asin(1/L)-asin(sqrt(L^2-1)/L));
%// Since we know 1<L<sqrt(2), use a minimisation function that respects this
L=fminbnd(@(L) abs(A(L)-k),1,sqrt(2))
%// And then find the relative length of the rope compared to the diagonal
percentage=100*L/sqrt(2)

This code gives that the length of the rope is $79\%$ of the length of the diagonal of the field.

I also did a quick Monte-Carlo method to give an estimate of the area to check the results:

N=5e5;
%// Make some random points, and find the proportion of them that are
%// within L of the post, the area the sheep can eat will be the same
%// proportion of the area of the field
A=nnz(sqrt(sum(rand(2,N).^2))<L)/N

and got $A=0.9000$.

0
On

Just some ideas here:

enter image description here

By sine formula,

$$\frac r{\sin{\frac{\pi}4}}=\frac{l\sqrt2}{\sin{(\frac{\pi}4+\phi)}}\implies l=\frac{r(\cos\phi+\sin\phi)}{\sqrt2}$$

Consider the area $A$

\begin{align} A&=2\cdot\frac{lr}2\sin{(\frac{\pi}4-\phi)}+\frac12 r^2\cdot2\phi\\&=\frac{r^2(\cos\phi+\sin\phi)}{\sqrt2}\cdot[\frac1{\sqrt2}(\cos\phi-\sin\phi)]+r^2\phi\\&=\frac12r^2\cos{(2\phi)}+r^2\phi\\&=r^2(\frac12\cos{(2\phi)+\phi}) \end{align}

Also

$$A=\frac9{10}l^2=\frac9{20}r^2(1+\sin(2\phi))$$

So

$$r^2(\frac12\cos{(2\phi)+\phi})=\frac9{20}r^2(1+\sin(2\phi))$$ $$\frac12\cos{(2\phi)}-\frac9{20}\sin{(2\phi)}-\phi-\frac9{20}=0$$

Solving with Wolfarm Alpha,

$$\phi=0.327197\ldots$$

Hence

$$\frac{r}{l\sqrt2}=\frac1{\cos\phi+\sin\phi}=0.788433\ldots$$