Skip to main content
Home
plus.maths.org

Secondary menu

  • My list
  • About Plus
  • Sponsors
  • Subscribe
  • Contact Us
  • Log in
  • Main navigation

  • Home
  • Articles
  • Collections
  • Podcasts
  • Maths in a minute
  • Puzzles
  • Videos
  • Topics and tags
  • For

    • cat icon
      Curiosity
    • newspaper icon
      Media
    • graduation icon
      Education
    • briefcase icon
      Policy

      Popular topics and tags

      Shapes

      • Geometry
      • Vectors and matrices
      • Topology
      • Networks and graph theory
      • Fractals

      Numbers

      • Number theory
      • Arithmetic
      • Prime numbers
      • Fermat's last theorem
      • Cryptography

      Computing and information

      • Quantum computing
      • Complexity
      • Information theory
      • Artificial intelligence and machine learning
      • Algorithm

      Data and probability

      • Statistics
      • Probability and uncertainty
      • Randomness

      Abstract structures

      • Symmetry
      • Algebra and group theory
      • Vectors and matrices

      Physics

      • Fluid dynamics
      • Quantum physics
      • General relativity, gravity and black holes
      • Entropy and thermodynamics
      • String theory and quantum gravity

      Arts, humanities and sport

      • History and philosophy of mathematics
      • Art and Music
      • Language
      • Sport

      Logic, proof and strategy

      • Logic
      • Proof
      • Game theory

      Calculus and analysis

      • Differential equations
      • Calculus

      Towards applications

      • Mathematical modelling
      • Dynamical systems and Chaos

      Applications

      • Medicine and health
      • Epidemiology
      • Biology
      • Economics and finance
      • Engineering and architecture
      • Weather forecasting
      • Climate change

      Understanding of mathematics

      • Public understanding of mathematics
      • Education

      Get your maths quickly

      • Maths in a minute

      Main menu

    • Home
    • Articles
    • Collections
    • Podcasts
    • Maths in a minute
    • Puzzles
    • Videos
    • Topics and tags
    • Audiences

      • cat icon
        Curiosity
      • newspaper icon
        Media
      • graduation icon
        Education
      • briefcase icon
        Policy

      Secondary menu

    • My list
    • About Plus
    • Sponsors
    • Subscribe
    • Contact Us
    • Log in
    • Solution to Puzzle No. 8

      1 September, 1999
      September 1999

      For the question see Puzzle No 8 - The Gobbling Goat in issue 8.

      Solution diagram 1
      Let the circular field have radius r. \par Let the length of the rope, which is anchored at point A on the circumference of the field, be R. \par Now, with the rope at full stretch, the goat will be able to move in an arc from point B on the circumference to point C.

      Solution diagram 2
      Let O be the centre of the field. \par Clearly, the angle OAB is equal to the angle OAC. Let the magnitude of OAB be x radians. \par Thus, the area accessible to the goat will be a circle sector with radius R and angle 2x (yellow), plus two circle segments (pink) from a circle of radius r, cut off by the chords AB and AC respectively.

      Now, the area of the circle sector is: 12(R2.2x)=R2x The area of each circle segment is: (1/2)r2(π−2x)−(1/2)r2sin⁡(π−2x) (because each is a sector of a circle minus a triangle) and so the total area accessible by the goat is: R2x+r2[π−2x−sin⁡(2x)] (the yellow sector plus the two pink segments).

      Solution diagram 3
      Currently, we have two different variables in our area equations: r and R. Let's try to eliminate one. \par Obviously, the length of the line segment AO is r, the radius of the field. Similarly, the radius of the line segment OC must be r. \par Therefore, by similar triangles, if we drop a perpendicular from O to the line segment AC, the perpendicular will bisect AC. Therefore the length of AP (and PC, of course) is R/2. \par We now have a right-angled triangle and enough information to calculate the relationship between r and R: cos⁡x=R/(2r)R=2rcos⁡x \par So the total area accessible to the goat is: (4r2cos2⁡x)x+r2[π−2x−sin⁡(2x)]. \par We wish for this area to be half the area of the total field; therefore we have: 4r2xcos2⁡x+r2[π−2x−sin⁡(2x)]=πr2/24xcos2⁡x+π−2x−sin⁡(2x)=π/24xcos2⁡x+π/2−2x−sin⁡(2x)=0

      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 x is approximately 0.953, and therefore cos⁡x=0.579. \par Now, since R=2rcos⁡x and r, the radius of the field, is 100m, we have R=200cos⁡x 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: 4xcos2⁡x+π/2−2x−sin⁡(2x)=0 The Newton-Raphson method is an approximate method for finding roots of equations that are differentiable. \par Let f(x) be a differentiable function. Since f(x) is differentiable, every point on the graph of f(x) must have a gradient and a unique tangent line. \par Now, the tangent at x0 is an approximation to the graph of f(x) near the point (x0,f(x0)). \par Therefore the zero of the tangent line (the point where the tangent line crosses the x-axis) is an approximation (perhaps a very bad one, however!) of the zero of f(x) (the point where f(x) crosses the x-axis, i.e. the root of f(x)). It's like we're pretending that f(x) is really a straight line, like the tangent line, and therefore crosses the x-axis at the same place the tangent does.
      Newton-Raphson diagram

      In the Newton-Raphson method, we start with a "best guess" x0 as to the zero of f(x). We then calculate the first approximation, x1, as the zero of the tangent line to f(x) at x0. \par We then calculate the second approximation, x2, as the zero of the tangent line crossing the x-axis at x1, and so forth. \par The diagram above shows the initial guess x0, the first approximations x1 and the relevant tangents. The second approximation x2 is the coordinate where the second tangent crosses the x-axis. As you can see, the approximations are getting closer to the actual zero point of f(x). If we continue iterating like this, we will get better and better estimates for the zero point of f(x).

      How do we do it?

      We wish to solve 4xcos2⁡x+π/2−2x−sin⁡(2x)=0. Obviously, plotting f(x)=4xcos2⁡x+π/2−2x−sin⁡(2x) and drawing tangents is not going to be very much fun! However, we can perform Newton-Raphson numerically. \par Our initial point is x0. The gradient of f(x) at x0 is given by f′(x0), and the tangent line to f(x) at x0 is therefore given by: y−f(x0)=f′(x0)(x−x0) To find x1, we must find the point where this tangent crosses the x-axis, i.e. to let: 0−f(x0)=f′(x0)(x1−x0) and therefore x1−x0=−f(x0)f′(x0) so that x1=x0−f(x0)f′(x0) Similarly, in the general case we obtain: xn+1=xn−f(xn)f′(xn) \par Now, our function is f(x)=4xcos2⁡x+π/2−2x−sin⁡(2x). Via standard differential calculus, the gradient f′(x) of this function is 4cos2⁡x−8xcos⁡xsin⁡x−2−2cos⁡(2x). Therefore, to find the approximate root of f(x) we can use the following: xn+1=xn−4xncos2⁡xn+π/2−2xn−sin⁡(2xn)4cos2⁡xn−8xncos⁡xnsin⁡xn−2−2cos⁡(2xn) \par So, we know how to calculate xn+1 from xn. But how do we find our starting value, x0? Well, in this particular case we know that the magnitude of x must be between 0 and π/2 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) π/4. \par As it turns out, all sorts of values will do: here's a table of the iterative steps of Newton-Raphson on our function f(x) for a range of initial values of x0. As you can see, they all converge quite rapidly to the same twelve-significant-digit approximation.
      x0=π/4 x0=π/6 x0=π/3 x0=π/5
      x0 0.785398163398 0.523598775598 1.047197551200 0.628318530718
      x1 0.967088277216 1.200834484702 0.952802703860 1.050054911254
      x2 0.952847864655 0.929999518111 0.952847865014 0.952745530049
      x3 0.952847864655 0.952962588691 0.952847864656 0.952847866503
      x4 0.952847864655 0.952847866978 0.952847868401 0.952847864653
      x5 0.952847864655 0.952847864656 0.952847864655 0.952847864656
      x6 0.952847864655 0.952847864655 0.952847864655 0.952847864655
      • Log in or register to post comments

      Anonymous

      13 January 2011

      Permalink
      Comment

      the derivative wrt x of -sin(2x) is -2cos(2x), not -2sin(2x)cos(2x) as you have it in the solution to the goat problem. -- James Richard Spriggs at jrspriggs2000@yahoo.com

      • Log in or register to post comments

      Marianne

      20 January 2011

      In reply to wrong derivative by Anonymous

      Permalink
      Comment

      Thanks very much for spotting the mistake, we've corrected it.

      • Log in or register to post comments
      University of Cambridge logo

      Plus Magazine is part of the family of activities in the Millennium Mathematics Project.
      Copyright © 1997 - 2025. University of Cambridge. All rights reserved.

      Terms