# Shortest Fence in a Quarter-Circle Pasture

suppose that there is following problem A farmer needs to divide equally a quarter-circle pasture between two of his cows. He seeks to build a shortest straight line fence. Which of the three ways below should he choose?

i think that ,it should be third figure because in any rectangle diagonals are equal and are more then radius,In the first variant, the fence is built along a radius of the circle and is equal the radius in length. In a square, like in any rectangle, diagonals are equal. Therefore, in the second variant the fence is longer than the radius. In the third variant, the fence is clearly shorter than the radius. This is the way to go.am i correct?it is not homework

-
It's not obvious to me that the second one is longer than a radius, but it should be easy to use standard formulas to calculate its length. – Gerry Myerson Feb 26 '12 at 11:56
@dato Why wouldn't you take a screenshot instead of taking a picture? – Pedro Tamaroff Feb 26 '12 at 17:09

Let's assume a radius of $1$.

As you say, in the first case, the length of the fence is the radius, $1$.

In the second case, though the fence is the diagonal of a square, it's not evident whether the top right corner of that square is inside or outside the circle, so you can't conclude from that alone that the fence is longer than the radius in this case. The area of the triangle is $a^2/2$, where $a$ is the length of one of its legs, and the length of the fence is $\sqrt2a$. The area must be $\pi/8$, so $a^2/2=\pi/8$ and thus $a=\sqrt\pi/2$, and the length of the fence is $\sqrt2\sqrt\pi/2=\sqrt{\pi/2}\approx1.2533\gt1$, as you suspected.

In the third case, you're right to conclude that the fence is shorter than the radius, so this is the shortest of the three fences.

However, that doesn't tell us whether this is an optimal fence. In fact it probably isn't, since you can tilt the fence sideways a little to make it hit the circle earlier, then move it to the left a bit make the two areas equal again.

A fence that meets the quarter-circle twice can't divide the area in half, so the fence has to either meet both straight edges or one straight edge and the quarter-circle. It's well-known that the diagonal fence is the optimal solution for the first case, and we've already shown that that's not optimal, so we can conclude that the second case has to obtain; the fence has to meet one straight edge and the quarter-circle. Without loss of generality, assume that the straight edge that it meets is the bottom one, as in your third figure.

Let the optimal fence meet the quarter-circle at $\def\yopt{y_{\mathrm o}}\def\xopt{x_{\mathrm o}}(\xopt,\yopt)$. Then the area under the quarter-circle up to that point is

$$\begin{eqnarray} \int_0^{\xopt}\sqrt{1-x^2}\mathrm dx &=& \frac12\left(\xopt\sqrt{1-\xopt^2}+\arcsin \xopt\right) \\ &=& \frac12\left(\yopt\sqrt{1-\yopt^2}+\arccos \yopt\right)\;. \end{eqnarray}$$

Let the slope of the fence be $1/a$. Then the area of the triangle under the fence is $\frac12a\yopt^2$. The difference of these two areas must be half the area of the quarter-circle, that is, $\pi/8$:

$$\frac12\left(\yopt\sqrt{1-\yopt^2}+\arccos \yopt\right)-\frac12a\yopt^2=\frac\pi8\;,\\ a=\frac{\yopt\sqrt{1-\yopt^2}+\arccos \yopt-\frac\pi4}{\yopt^2}\;.$$

The square of the length of the fence is

$$\yopt^2+(a\yopt)^2=\yopt^2+\left(\sqrt{1-\yopt^2}+\frac{\arccos \yopt-\frac\pi4}{\yopt}\right)^2\;.$$

The optimal fence is determined by minimizing this expression with respect to $y_0$. I doubt there is a closed-form solution for the minimum; Wolfram|Alpha finds the minimum at $\yopt\approx0.854563$, and thus $x_0\approx0.519348$ and a squared length of approximately $0.787547$, which yields an optimal fence length of about $0.887438$. For comparison, the length of the vertical line in your third figure, which corresponds to the case $a=0$, is the solution of the equation $\yopt\sqrt{1-\yopt^2}+\arccos \yopt-\frac\pi4$, which Wolfram|Alpha says is about $0.914771$, not that much worse.

Here's a diagram of the optimal fence. This problem might serve as a warning not to assume that an optimal solution shares the symmetries of the problem (which I would have had a tendency to do in this case).

-
Well, the optimal solution(s) do share the symmetries of the original problem if you bear in mind that there are two solutions (one formed by mirroring the other through the line $y=x$. – bubba Jan 6 '13 at 2:55
@bubba: Yes, certainly the set of solutions will always share the symmetries of the problem, almost by definition; still it's relevant whether the individual solutions do or don't; in this case they don't. – joriki Jan 6 '13 at 7:13
Semantics/pedantics, I guess. My view is that "the solution" is a set of two lines, and that set is symmetric. What you have calculated is half the solution, so it's not symmetric. It doesn't matter much, except that I (like you perhaps) have a vague feeling that there is some deep general truth here -- that symmetric problems always have symmetric solutions, in some fuzzy sense. If we could do a better job of describing that principle, it might provide a very useful problem-solving technique. Some other day, perhaps. – bubba Jan 6 '13 at 8:00
@bubba: It so happens that I have quite a precise sense of this principle; it plays a very important role in physics, e.g. in spontaneous symmetry breaking. You're of course right that's it's just a matter of definition whether we call this "the solution" being symmetric or "the set of solutions" being symmetric; what's important is that what I would call the set of solutions and what you would call the solution is invariant under the symmetries and what I would call the solutions and what you might call its elements needn't be. – joriki Jan 6 '13 at 8:07
@joricki. Interesting link. Thanks very much. – bubba Jan 6 '13 at 9:02

Clearly the length of fence in the third picture is less than the radius, but you really ought to do some calculations to be sure that the length in the second picture is more than the radius: it’s possible that the picture is misleading.

Suppose that the radius is $r$, and the fence in the second picture hits the $x$-axis at $a$. Then the area of the triangle is $\frac12a^2$, and it’s required to be half the area of the quarter-disk, so $$\frac12a^2=\frac12\cdot\frac14\pi r^2=\frac{\pi}8r^2$$ Thus, $a^2=\dfrac{\pi}4r^2$, and $a=\dfrac{\sqrt{\pi}}2 r<r$.

Oops: While adding a note on the length of the fence in the third picture, I realized that this is $a$, not the length of the fence. The latter is of course $\sqrt2 a=\sqrt{\dfrac{\pi}2}r>r$, so your hunch was right after all, since the length of the fence in the third picture is clearly less than $r$.

-
The length of the fence is $\sqrt2a=\sqrt{\pi/2}r\approx1.2533r\gt r$. – joriki Feb 26 '12 at 11:59
@joriki: Thanks. Definitely time for bed. – Brian M. Scott Feb 26 '12 at 12:19