## Solution to Puzzle No. 8

Submitted by plusadmin on September 1, 1999For the question see Puzzle No 8 - The Gobbling Goat in issue 8.

Let the circular field have radius .

Let the length of the rope, which is anchored at point on the circumference of the field, be .

Now, with the rope at full stretch, the goat will be able to move in an arc from point on the circumference to point .

Let be the centre of the field.

Clearly, the angle is equal to the angle . Let the magnitude of be radians.

Thus, the area accessible to the goat will be a circle sector with radius and angle (yellow), plus two circle segments (pink) from a circle of radius , cut off by the chords and respectively.

Now, the area of the circle sector is:

Currently, we have two different variables in our area equations: and . Let’s try to eliminate one.

Obviously, the length of the line segment is , the radius of the field. Similarly, the radius of the line segment must be .

Therefore, by similar triangles, if we drop a perpendicular from to the line segment , the perpendicular will bisect . Therefore the length of (and , of course) is .

We now have a right-angled triangle and enough information to calculate the relationship between and :

(1) | |||||

(2) |

So the total area accessible to the goat is:

We wish for this area to be half the area of the total field; therefore we have:

We can't easily solve the equation but we can use a graphical calculator or numerical method such as Newton-Raphson to find an approximate solution.

Using the Newton-Raphson method as described in the Coda, we find that

is approximately , and therefore .

Now, since and , the radius of the field, is 100m, we have and thus the required length of rope is approximately 116m.

## Coda: Solving the equation using Newton-Raphson

### The basic idea

In the goat puzzle, we were left with the following equation to solve:

The Newton-Raphson method is an approximate method for finding roots of equations that are differentiable.

Let be a differentiable function. Since is differentiable, every point on the graph of must have a gradient and a unique tangent line.

Now, the tangent at is an approximation to the graph of near the point .

Therefore the zero of the tangent line (the point where the tangent line crosses the -axis) is an approximation (perhaps a very bad one, however!) of the zero of (the point where crosses the -axis, i.e. the root of ). It’s like we’re pretending that is really a straight line, like the tangent line, and therefore crosses the -axis at the same place the tangent does.

In the Newton-Raphson method, we start with a "best guess" as to the zero of . We then calculate the first approximation, , as the zero of the tangent line to at .

We then calculate the second approximation, , as the zero of the tangent line crossing the -axis at , and so forth.

The diagram above shows the initial guess , the first approximations and the relevant tangents. The second approximation is the coordinate where the second tangent crosses the -axis. As you can see, the approximations are getting closer to the actual zero point of . If we continue iterating like this, we will get better and better estimates for the zero point of .

### How do we do it?

We wish to solve . Obviously, plotting and drawing tangents is not going to be very much fun! However, we can perform Newton-Raphson numerically.

Our initial point is . The gradient of at is given by , and the tangent line to at is therefore given by:

To find , we must find the point where this tangent crosses the -axis, i.e. to let:

and therefore

so that

Similarly, in the general case we obtain:

Now, our function is . Via standard differential calculus, the gradient of this function is

Therefore, to find the approximate root of we can use the following:

So, we know how to calculate from . But how do we find our starting value, ? Well, in this particular case we know that the magnitude of must be between 0 and radians (go back to the second diagram and think about it if you’re not sure why!). So a good initial guess might be (for example) .

As it turns out, all sorts of values will do: here’s a table of the iterative steps of Newton-Raphson on our function for a range of initial values of . As you can see, they all converge quite rapidly to the same twelve-significant-digit approximation.

0.785398163397 | 0.523598775598 | 1.047197551200 | 1.570796326790 | |

0.967088277214 | 1.254847487960 | 0.956164730983 | 0.785398163397 | |

0.953058379193 | 0.966611488070 | 0.952884951928 | 0.967088277214 | |

0.952849994306 | 0.953049230238 | 0.952848237620 | 0.953058379193 | |

0.952847886046 | 0.952849901115 | 0.952847868401 | 0.952849994306 | |

0.952847864870 | 0.952847885110 | 0.952847864693 | 0.952847886046 | |

0.952847864657 | 0.952847864860 | 0.952847864655 | 0.952847864870 | |

0.952847864655 | 0.952847864657 | 0.952847864655 | 0.952847864657 | |

0.952847864655 | 0.952847864655 | 0.952847864655 | 0.952847864655 | |

0.952847864655 | 0.952847864655 | 0.952847864655 | 0.952847864655 |