
Toads and snakes: an investigation!
We have 2 populations: Toads who live inside a circle (a pond) and snakes which live inside a square (field). If the circle is completely surrounded by the square then no toads can live, and if the square is completely surrounded by the circle, no snakes can live. We want to investigate the habitable area for both animals as the circle varies in radius.
We can define A(r) as the region that is inside the circle but outside the square. This is the habitable region for our toads. We can define B(r) as the region that is outside the circle but inside the square. This is the habitable region for our snakes.
Our model
Let’s take a square with fixed sided 2 units, centred at (0,0). We want to see how the total habitable area A(r) + B(r) changes as we vary the radius of the circle. We can have 3 possible configurations.
Case 1: The circle is completely enclosed by the square.
In this situation A(r) = 0. No toads can live in the pond. The maximum limiting case (r=1) is shown above. Therefore the total habitable region is just given by the area inside the square but outside the circle:

Case 2: The square is completely enclosed by the circle.

In this situation B(r) = 0. No snakes can live in the field. The minimum limiting case is shown above (r = root 2). Therefore the total habitable region is just given by the area inside the circle but outside the square:

Case 3: There are regions in which the circle is outside the square and regions where the square is outside the circle .

In this situation we have neither A(r) = 0 or B(r) = 0, so we have a habitable region for both toads and snakes. In order to find A(r) – the regions outside the square but inside the circle, we can use some integration. We can find where the circle intersects with the line CB, and then use integration to find the area between 2 curves.
First we have the equation of a circle centred at (0,0) with radius r:
![]()
We can find out when this intersects with the line y = 1:

And we can the do the following integration to find the area of the 4 regions inside the circle but outside the square:

We can then make use of a integration identity:

This means that we can get after some rearrangement:

We can now find the region B(r), the area inside the square but outside the circle by the following:

This gives:

Therefore we get our final equation for the habitable region as:

Plotting this on Desmos:

We can then plot this graph on Desmos to see how the habitable area changes with the change of the radius. We can see that the minimum habitable area is given when r = 1.08.
Generalising to an n by n square
For an n by n square we get the following equations:

Relationship between the minimum values and r
When we then plot this on Desmos for different values of n we notice something quite unexpected:

As n varies and we mark the minimum points (in black crosses) we notice that this points appear to lie on a quadratic curve. This is quite surprising!
Relationship between the minimum values and n

By also plotting the minimums of A(r) + B(r) against n we also can see that there is a quadratic relationship.
The equation of this is:

So, for example when the size of the square is 10 (n =10) we would expect the minimum habitable area to be approximately 17.16.
Can we explain why we get a quadratic relationship?
With some (slightly!) heavy duty maths we can actually explain why we see a quadratic relationship when plotting the minimums against n.
We start by differentiating A(r) + B(r):

We can then simplify this and set this equal to zero to find the minimum:

Now because we are interested in seeing the approximate behaviour, we can use the Maclaurin expansion of arcsin(u), which tells us that:
![]()
Some more rearrangement gives:

This denominator is a constant so we can write:
![]()
Therefore there is an approximate linear relationship between r and n. We can then sub this into our equation for A(r) + B(r):


and as this bracket is also a constant we can write:
![]()
Working out this value gives:
![]()
So we can see that we would expect a quadratic relationship to approximate these results. We can use the Desmos regression to find a slightly more accurate relationship:
![]()
So, when we know the value of n, we can now find an approximation for what the minimum habitable area will be – without the need for any complicated equations!
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.