Cowculus – the farmer and the cow

The Numberphile video linked the end of this is an excellent starting point for an investigation – so I thought I’d use this to extend the problem to a more general situation. The simple case is as follows:
A farmer is at point F and a cow at point C. There is a river represented by the line passing through 𝐴𝐵. The distance 𝐴𝐹 is 2km, the distance 𝐵𝐶 is 6km and the distance 𝐴𝐵 is 4km. This information is shown in the diagram below:

The farmer needs to walk to the river, fill up his bucket and then deliver this to the cow. The farmer walks in a straight line from 𝐹 to a point 𝑥 on the line 𝐴𝐵. He then walks in a straight line from 𝑥 to 𝐶. The problem is to find the best point 𝑥 such that we minimise the total distance walked.
Solving the simple case
We can make an equation f(x) for the total distance travelled:

Let’s use a graph to find the value of 𝑥 that gives a minimum:

This tells us that when x = 1 we get a minimum distance of 8.94. We notice that this x value is exactly one quarter of the distance from AB – perhaps this provides a general rule? So next let’s consider a more general case, when the distance AB is m.
Solving a more general case
Now equation f(x) for the total distance travelled is given by:

This time we’ll have to differentiate and set our gradient equal to zero to find any minimums:

Now this requires a bit of algebraic rearranging. Firstly I move one of the fractions to the other side, then square then rearrange to give:

Next I can factorise and rearrange:

This does then with a bit more work give the positive solution as:

As hypothesised the best place to aim for is exactly one quarter of the distance along AB.
Thinking about this problem is a different way
The nice aspect of this problem is that we can redraw the geometry to create an equivalent problem (which is significantly easier to solve). The farmer, F, now begins on the alternate side of the river to the cow with AB 𝑚 km and walks in the straight line path FC. This is shown below:

Clearly the shortest distance in this case is the straight line joining FC. We can then consider the point where we cross the river as x. The triangles AFx and xBC are similar with a scale factor of 3, and this leads to the distance Ax being 1/4 of the distance AB – i.e m/4. We see that the total distance FC will be the same as for the minimum found for the previous problem. So with some creativity we can solve this without any need for calculus!
Changing the initial problem – minmising the time taken
In the next post I’ll look at more significant changes to the problem (where we change the slope of the river) – but for now how about if we change the speed at which the farmer walks when carrying a full bucket compared with an empty bucket. Clearly this is a more realistic scenario. Say for example we have the following:

The farmer returns to his original position on the same side of the river as the cow. The distance 𝐴𝐹 is 2km, the distance 𝐵𝐶 is 6km and the distance 𝐴𝐵 is 4km. The farmer walks at a speed of 𝑘 km/h, 𝑘 ∈ Z, when his bucket is empty and 3 km/h when his bucket is full. For this scenario we decise to minimise the time taken.
We can now vary 𝑘 to see what happens to the optimum position of x to minimise the time the farmer takes. Say if k = 5 we would have the following equation for the time taken:

Now if we plot this we get the following:

So we can see that now we have x=1.59 and now this gives a minimum time of 2 hours and 40 mins.
This is an excellent example of how a relatively simple problem can be solved using completely different approaches (graphing, calculus and geometry), and then generalised and then modified. Think about what else could be explored – there is a lot of scope for further investigation!
Numberphile video:
IB teacher? Please visit my new site http://www.intermathematics.com ! Hundreds of IB worksheets, unit tests, mock exams, treasure hunt activities, paper 3 activities, coursework support and more. Take some time to explore!
Please visit the site shop: http://www.ibmathsresources.com/shop to find lots of great resources to support IB students and teachers – including the brand new May 2025 prediction papers.