You are currently browsing the category archive for the ‘Real life maths’ category.

The Perfect Rugby Kick

This was inspired by the ever excellent Numberphile video which looked at this problem from the perspective of Geogebra.  I thought I would look at the algebra behind this.

In rugby we have the situation that when a try is scored, there is an additional kick (conversion kick) which can be taken.  This must be in a perpendicular line with where the try was scored, but can be as far back as required.

Screen Shot 2023-03-18 at 2.03.42 PM

We can represent this in the diagram above.  The line AB represents the rugby goals (5.6 metres across).  For a try scored at point D, a rugby player can then take the kick anywhere along the line DC.

Let’s imagine a situation where a player has scored a try at point D – which is a metres from the rugby post at B.  For this problem we want to find the distance, x  for this value of  a such that this maximises the value of θ .   The larger the value of θ, the more of the rugby goal the player can aim at and so we are assuming that this is the perfect angle to achieve.

Making an equation:

We can use the diagram to achieve the following equation linking θ and x:

Screen Shot 2023-03-18 at 2.03.47 PM

We can use Desmos to plot this graph for different values of a:

Screen Shot 2023-03-18 at 2.04.05 PM

We can then find the maximum points from Desmos and record these

Screen Shot 2023-03-18 at 2.04.11 PM

This then allows us to find the exponential regression line of the coordinates of the maximum points:

Screen Shot 2023-03-18 at 2.04.31 PM

This regression line is given by the equation:

Screen Shot 2023-03-18 at 2.04.44 PM

This graph is shown below:

Screen Shot 2023-03-18 at 2.04.56 PM

We can also plot the x values of the maximum points against a to give the following linear regression line:

Screen Shot 2023-03-18 at 2.04.50 PM

This graph is shown below:

Screen Shot 2023-03-18 at 2.05.04 PM

This means that if we know the value of a we can now very easily calculate the value of x which will provide the optimum angle.

Bring in the calculus!

We can then see how close our approximations are by doing some calculus:

We can find the x coordinate of the maximum point in terms of a by differentiating, setting equal to 0 and then solving.  This gives:

Screen Shot 2023-03-18 at 2.05.10 PMWhen we plot this (green) versus our earlier linear approximation we can see a very close fit:

Screen Shot 2023-03-18 at 2.05.34 PM

And if we want to find an equation for optimum theta in terms of x we can also achieve this as follow:

Screen Shot 2023-03-18 at 2.05.39 PM

When we plot this (green) we can also see a good fit for the domain required:

Screen Shot 2023-03-18 at 2.05.43 PM

Conclusion

A really nice investigation – could be developed quite easily to score very highly as an HL IA investigation as it has a nice combination of modelling, trigonometry, calculus and generalised functions.  We can see that our approximations are pretty accurate – and so we can say that a rugby player who scores a try a metres from the goal should then take the resultant conversion kick about a+2 metres perpendicular distance from the try line in order to maximise the angle to the goal.

Screen Shot 2022-04-06 at 11.15.38 AM

What is the average distance between 2 points in a rectangle?

Say we have a rectangle, and choose any 2 random points within it.  We then could calculate the distance between the 2 points.  If we do this a large number of times, what would the average distance between the 2 points be?

Monte Carlo method

The Monte Carlo method is perfect for this – we can run the following code on Python:

Screen Shot 2022-04-06 at 11.33.05 AM

This code will find the average distance between 2 points in a 10 by 10 square.  It does this by generating 2 random coordinates, finding the distance between them and then repeating this process 999,999 times.  It then works out the average value.  If we do this it returns:

Screen Shot 2022-04-06 at 11.36.13 AM

This means that on average, the distance between 2 random points in a 10 by 10 square is about 5.21.

Generalising to rectangles

I can now see what happens when I fix one side of the rectangle and vary the other side.  The code below fixes one side of the rectangle at 1 unit, and then varies the other side in integer increments.  For each rectangle it then calculates the average distance.

Screen Shot 2022-04-06 at 11.38.05 AM

This then returns the first few values as:

Screen Shot 2022-04-06 at 11.40.04 AM

This shows that for a 1 by 1 square the average distance between two points is around 0.52 and for a 1 by 10 rectangle the average distance is around 3.36.

Plotting some Desmos graphs

Screen Shot 2022-04-05 at 8.32.49 PM

Because I have included the comma in the Python code I can now copy and paste this straight into Desmos.  The dotted green points show how the average distance of a 1 by x rectangle changes as x increases.  I then ran the same code to work out the average distance of a 10 by x rectangle (red), 20 by x rectangle (black), 30 by x rectangle (purple) and 100 by x rectangle (yellow).

We can see if we continue these points further that they all appear to approach the line y = 1/3 x (dotted green).  This is a little surprising – i.e when x gets large, then for any n by x rectangle (with n fixed), an increase in x by one will tend towards an increase in the average distance by 1/3.

Heavy duty maths!

There is actually an equation that fits these curves – and will give the average distance, a(X) between any 2 points in a rectangle with sides a and b (a≥b).  Here it is:

Screen Shot 2022-04-06 at 5.38.59 PM

I added this equation into Desmos, by changing the a to x, and then adding a slider for b.  So, when I set b=1 this generated the case when the side of a rectangle is fixed as 1 and the other side is increased:

Screen Shot 2022-04-06 at 8.00.28 PM

Plotting these equations on Desmos then gives the following:

Screen Shot 2022-04-06 at 5.46.51 PM

Pleasingly we can see that the points created by our Monte Carlo method fit pretty much exactly on the lines generated by these equations.  By looking at these lines at a larger scale we can see that they do all indeed appear to be approaching the line y = 1/3 x.

General equation for a square

We can now consider the special case when a=b (i.e a square).  This gives:

Screen Shot 2022-04-06 at 6.11.34 PM

Which we can simplify to give:

Screen Shot 2022-04-06 at 6.11.42 PM

We can see therefore that a square of side 1 (a=1) will have an average distance of 0.52 (2dp) and a square of side 10 (a=10) will have an average distance of 5.21  – which both agree with our earlier results.

If you are a teacher then please also visit my new site: intermathematics.com for over 2000+ pdf pages of resources for teaching IB maths!

The Barnsley Fern: Mathematical Art

This pattern of a fern pictured above was generated by a simple iterative program designed by mathematician Michael Barnsely.  I downloaded the Python code from the excellent Tutorialspoint and then modified it slightly to run on repl.it.  What we are seeing is the result of 40,000 individual points – each plotted according to a simple algorithm.  The algorithm is as follows:

Transformation 1: (0.85 probability of occurrence)

xi+1 = 0.85xi +0.04yi

yi+1= -0.04xi+0.85yi+1.6

Transformation 2: (0.07 probability of occurrence)

xi+1 = 0.2xi -0.26yi

yi+1= 0.23xi+0.22yi+1.6

Transformation 3: (0.07 probability of occurrence)

xi+1 = -0.15xi -0.28yi

yi+1= 0.26xi+0.24yi+0.44

Transformation 4: (0.01 probability of occurrence)

xi+1 = 0

yi+1= 0.16yi

So, I start with (0,0) and then use a random number generator to decide which transformation to use.  I can run a generator from 1-100 and assign 1-85 for transformation 1, 86-92 to transformation 2, 93-99 for transformation 3 and 100 for transformation 4.  Say I generate the number 36 – therefore I will apply transformation 1.

xi+1 = 0.85(0)+0.04(0)

yi+1= -0.04(0)+0.85(0)+1.6

and my new coordinate is (0,1.6).  I mark this on my graph.

I then repeat this process – say this time I generate the number 90.  This tells me to do transformation 2.  So:

xi+1 = 0.2(0) -0.26(1.6)

yi+1= 0.23(0)+0.22(1.6)+1.6

and my new coordinate is (-0.416, 1.952).  I mark this on my graph and carry on again.  The graph above was generated with 40,000 iterations – let’s see how it develops over time:

1000 iterations:

10,000 iterations:

100,000 iterations:

500,000 iterations:

If we want to understand what is happening here we can think of each transformation as responsible for a different part of our fern.  Transformation 1 is most likely and therefore this fills in the smaller leaflets. Transformations 2 and 3 fill in the bottom left and right leaflet (respectively) and transformation 4 fills in the stem.

It’s quite amazing to think that a simple computer program can create what looks like art – or indeed that is can replicate what we see in nature so well.  This fern is an example of a self-similar pattern – i.e one which will look the same at different scales.  You could zoom into a detailed picture and see the same patterns repeating.  You might want to explore the idea of fractals in delving into this topic in more detail.

Changing the iterations

We can explore what happens when we change the iterations very slightly.

Christmas tree

Crazy spiral

Modern art

You can modify the code to run this here.  Have a go!

Essential Resources for IB Teachers

1) Intermathematics.com

Screen Shot 2021-08-21 at 1.07.49 PM

If you are a teacher then please also visit my new site.  This has been designed specifically for teachers of mathematics at international schools.  The content now includes over 2000 pages of pdf content for the entire SL and HL Analysis syllabus and also the SL Applications syllabus.  Some of the content includes:

  1. Original pdf worksheets (with full worked solutions) designed to cover all the syllabus topics.  These make great homework sheets or in class worksheets – and are each designed to last between 40 minutes and 1 hour.
  2. Original Paper 3 investigations (with full worked solutions) to develop investigative techniques and support both the exploration and the Paper 3 examination.
  3. Over 150 pages of Coursework Guides to introduce students to the essentials behind getting an excellent mark on their exploration coursework.
  4. A large number of enrichment activities such as treasure hunts, quizzes, investigations, Desmos explorations, Python coding and more – to engage IB learners in the course.

There is also a lot more.  I think this could save teachers 200+ hours of preparation time in delivering an IB maths course – so it should be well worth exploring!

Essential Resources for both IB teachers and IB students

1) Exploration Guides and Paper 3 Resources

Screen Shot 2021-12-01 at 1.19.14 PM

I’ve put together a 168 page Super Exploration Guide to talk students and teachers through all aspects of producing an excellent coursework submission.  Students always make the same mistakes when doing their coursework – get the inside track from an IB moderator!  I have also made Paper 3 packs for HL Analysis and also Applications students to help prepare for their Paper 3 exams.  The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.

If you are a teacher then please also visit my new site: intermathematics.com for over 2000+ pdf pages of resources for teaching IB maths!

Galileo’s Inclined Planes

This post is based on the maths and ideas of Hahn’s Calculus in Context – which is probably the best mathematics book I’ve read in 20 years of studying and teaching mathematics.  Highly recommended for both students and teachers!

Hahn talks us though the mathematics, experiments and thought process of Galileo as he formulates his momentous theory that in free fall (ignoring air resistance) an object falling for t seconds will fall a distance of ct² where c is a constant.  This is counter-intuitive as we would expect the mass of an object to be an important factor in how far an object falls (i.e that a heavier object would fall faster).  Galileo also helped to overturned Aristotle’s ideas on motion.  Aristotle had argued that any object in motion would eventually stop, Galileo instead argued that with no friction a perfectly spherical ball once started rolling would roll forever.  Galileo’s genius was to combine thought experiments and real data to arrive at results that defy “common sense” – to truly understand the universe humans had to first escape from our limited anthropocentric perspective, and mathematics provided an opportunity to do this.

Inclined Planes

Galileo conducted experiments on inclined planes where he placed balls at different heights and then measured their projectile motion  when they left the ramp, briefly ran past the edge of a flat surface and then fell to the ground.  We can see the set up of one ramp above.  The ball starts at O, and we mark as h this height.  At an arbitrary point P we can see that there are 2 forces acting on the ball, F which is responsible for the ball rolling down the slope, and f, which is a friction force in the opposite direction.  At point P we can mark the downwards force mg acting on the ball.  We can then use some basic rules of parallel lines to note that the angles in triangle PCD are equal to triangle AOB.

Galileo’s times squared law of fall

We have the following equation for the total force acting on the ball at point P:

We also have the following relationship from physics, where m is the mass and a(t) the acceleration:

This therefore gives:

Next we can use trigonometry on triangle PCD to get an equation for F:

and so:

Next we can use another equation from physics which gives us the frictional force on a perfectly spherical, homogenous body rolling down a plane is:

So this gives:

We can then integrate to get velocity (our constant of integration is 0 because the velocity is 0 when t = 0)

and integrate again to get the distance travelled of the ball (again our constant of integration is 0):

When Galileo was conducting his experiments he did not know g, instead he noted that the relationship was of the form;

where c is a constant related to a specific incline.  This is a famous result called the times squared law of fall.  It shows that the distance travelled is independent of the mass and is instead related to the time of motion squared.

Velocity also independent of the angle of incline

Above we have shown that the distance travelled is independent of the mass – but in the equation it is still dependent on the angle of the incline.  We can go further and then show that the velocity of the ball is also independent of the angle of incline, and is only dependent on the height at which the ball starts from.

If we denote as t_b as the time when the ball reaches point A in our triangle we have:

This is equal to the distance from AO, so we can use trigonometry to define:

This can then be rearranged to give:

this is the time taken to travel from O to A.  We can the substitute this into the velocity equation we derived earlier to give the velocity at point A.  This is:

This shows that the velocity of the ball at point A is only dependent on the height and not the angle of incline or mass.  The logical extension of this is that if the angle of incline has no effect on the velocity, that this result would still hold as the angle of incline approaches and then reaches 90 degrees – i.e when the ball is in free fall.

Galileo used a mixture of practical experiments on inclined planes, mathematical calculations and thought experiments to arrive at his truly radical conclusion – the sign of a real genius!

Essential Resources for IB Teachers

1) Intermathematics.com

Screen Shot 2021-08-21 at 1.07.49 PM

If you are a teacher then please also visit my new site.  This has been designed specifically for teachers of mathematics at international schools.  The content now includes over 2000 pages of pdf content for the entire SL and HL Analysis syllabus and also the SL Applications syllabus.  Some of the content includes:

  1. Original pdf worksheets (with full worked solutions) designed to cover all the syllabus topics.  These make great homework sheets or in class worksheets – and are each designed to last between 40 minutes and 1 hour.
  2. Original Paper 3 investigations (with full worked solutions) to develop investigative techniques and support both the exploration and the Paper 3 examination.
  3. Over 150 pages of Coursework Guides to introduce students to the essentials behind getting an excellent mark on their exploration coursework.
  4. A large number of enrichment activities such as treasure hunts, quizzes, investigations, Desmos explorations, Python coding and more – to engage IB learners in the course.

There is also a lot more.  I think this could save teachers 200+ hours of preparation time in delivering an IB maths course – so it should be well worth exploring!

Essential Resources for both IB teachers and IB students

1) Exploration Guides and Paper 3 Resources

Screen Shot 2021-12-01 at 1.19.14 PM

I’ve put together a 168 page Super Exploration Guide to talk students and teachers through all aspects of producing an excellent coursework submission.  Students always make the same mistakes when doing their coursework – get the inside track from an IB moderator!  I have also made Paper 3 packs for HL Analysis and also Applications students to help prepare for their Paper 3 exams.  The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.

Screen Shot 2020-04-15 at 10.20.21 AM

If you are a teacher then please also visit my new site: intermathematics.com for over 2000+ pdf pages of resources for teaching IB maths!

Time dependent gravity and cosmology!

In our universe we have a gravitational constant – i.e gravity is not dependent on time.  If gravity changed with respect to time then the gravitational force exerted by the Sun on Earth would lessen (or increase) over time with all other factors remaining the same.

Interestingly time-dependent gravity was first explored by Dirac and some physicists have tried to incorporate time dependent gravity into cosmological models.  As yet we have no proof that gravity is not constant, but let’s imagine a university where it is dependent on time.

Inversely time dependent gravity

The standard models for cosmology use G, where G is the gravitational constant.  This fixes the gravitational force as a constant.  However if gravity is inversely proportional to time we could have a relationship such as:

Screen Shot 2020-04-15 at 10.28.17 AM

Where a is a constant.  Let’s look at a very simple model, where we have a piecewise function as below:

Screen Shot 2020-04-15 at 10.28.35 AM

This would create the graph at the top of the page.  This is one (very simplistic) way of explaining the Big Bang.  In the first few moments after t = 0, gravity would be negative and thus repulsive [and close to infinitely strong], which could explain the initial incredible universal expansion before “regular” attractive gravity kicked in (after t = 1).  The Gravitational constant has only been measured to 4 significant figures:

G = 6.674 x 10-11m3kg-1s-2.

Therefore if there is a very small variation over time it is possible that we simply haven’t the accuracy to test this yet.

Universal acceleration with a time dependent gravitational force

Warning: This section is going to touch on some seriously complicated maths – not for the faint hearted!  We’re going to explore whether having a gravitational force which decreases over time still allows us to have an accelerating expansion of the universe.

We can start with the following equation:

Screen Shot 2020-04-15 at 1.44.09 PM

To work through an example:

Screen Shot 2020-04-15 at 1.46.19 PM

This would show that when t = 1 the universe had an expansion scale factor of 2.  Now, based on current data measured by astronomers we have evidence that the universe is both expanding and accelerating in its expansion.  If the universal scale factor is accelerating in expansion that requires that we have:

Screen Shot 2020-04-15 at 1.49.45 PM

Modelling our universe

We’re going to need 4 equations to model what happens when gravity is time dependent rather than just a constant.

Equation 1

Screen Shot 2020-04-15 at 1.50.45 PM

This equation models a relationship between pressure and density in our model universe.  We assume that our universe is homogenous (i.e the same) throughout.

Equation 2

Screen Shot 2020-04-15 at 1.50.54 PM

This is one of the Friedmann equations for governing the expansion of space.  We will take c =1 [i.e we will choose units such that we are in 1 light year etc]

Equation 3

Screen Shot 2020-04-15 at 1.51.00 PM

This is another one of the Friedmann equations for governing the expansion of space.  The original equation has P/(c squared) – but we we simplify again by taking c = 1.

Equation 4

Screen Shot 2020-04-15 at 1.51.06 PM

This is our time dependent version of gravity.

Finding alpha

We can separate variables to solve equation (3).

Screen Shot 2020-04-15 at 1.58.20 PM

Substitution

We can use this result, along with the equations (1) and (4) to substitute into equation (2).

Screen Shot 2020-04-15 at 2.00.23 PM

Our result

Now, remember that if the second differential of r is positive then the universal expansion rate is accelerating.  If Lamba is negative then we will have the second differential of r positive.  However, all our constants G_0, a, B, t, r are greater than 0.  Therefore in order for lamda to be negative we need:

Screen Shot 2020-04-15 at 2.05.57 PM

What this shows is that even in a universe where gravity is time dependent (and decreasing), we would still be able to have an accelerating universe like we see today.  the only factor that determines whether the universal expansion is accelerating is the value of gamma, not our gravity function.

This means that a time dependent gravity function can still gives us a result consistent with our experimental measurements of the universe.

A specific case

Solving the equation for the second differential of r is extremely difficult, so let’s look at a very simple case where we choose some constants to make life as easy as possible:

Screen Shot 2020-04-15 at 2.14.02 PM

Substituting these into our equation (2) gives us:

Screen Shot 2020-04-15 at 2.14.10 PM

We can then solve this to give:

Screen Shot 2020-04-15 at 2.14.19 PM

So, finally we have arrived at our final equation.  This would give us the universal expansion scale factor at time t, for a universe in which gravity follows the the equation G(t) = 1/t.

Screen Shot 2020-04-15 at 2.22.58 PM

For this universe we can then see that when t = 5 for example, we would have a universal expansion scale factor of 28.5.

So, there we go – very complicated maths, way beyond IB level, so don’t worry if you didn’t follow that.  And that’s just a simplified introduction to some of the maths in cosmology!  You can read more about time dependent gravity here (also not for the faint hearted!)

Essential Resources for IB Teachers

1) Intermathematics.com

Screen Shot 2021-08-21 at 1.07.49 PM

If you are a teacher then please also visit my new site.  This has been designed specifically for teachers of mathematics at international schools.  The content now includes over 2000 pages of pdf content for the entire SL and HL Analysis syllabus and also the SL Applications syllabus.  Some of the content includes:

  1. Original pdf worksheets (with full worked solutions) designed to cover all the syllabus topics.  These make great homework sheets or in class worksheets – and are each designed to last between 40 minutes and 1 hour.
  2. Original Paper 3 investigations (with full worked solutions) to develop investigative techniques and support both the exploration and the Paper 3 examination.
  3. Over 150 pages of Coursework Guides to introduce students to the essentials behind getting an excellent mark on their exploration coursework.
  4. A large number of enrichment activities such as treasure hunts, quizzes, investigations, Desmos explorations, Python coding and more – to engage IB learners in the course.

There is also a lot more.  I think this could save teachers 200+ hours of preparation time in delivering an IB maths course – so it should be well worth exploring!

Essential Resources for both IB teachers and IB students

1) Exploration Guides and Paper 3 Resources

Screen Shot 2021-12-01 at 1.19.14 PM

I’ve put together a 168 page Super Exploration Guide to talk students and teachers through all aspects of producing an excellent coursework submission.  Students always make the same mistakes when doing their coursework – get the inside track from an IB moderator!  I have also made Paper 3 packs for HL Analysis and also Applications students to help prepare for their Paper 3 exams.  The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.

Screen Shot 2020-04-06 at 1.11.43 PM

If you are a teacher then please also visit my new site: intermathematics.com for over 2000+ pdf pages of resources for teaching IB maths!

Envelope of projectile motion

For any given launch angle and for a fixed initial velocity we will get projectile motion. In the graph above I have changed the launch angle to generate different quadratics.  The black dotted line is then called the envelope of all these lines, and is the boundary line formed when I plot quadratics for every possible angle between 0 and pi.

Finding the equation of an envelope for projectile motion 

Let’s start with the equations for projectile motion, usually given in parametric form:

Screen Shot 2020-04-06 at 1.17.08 PM

Here v is the initial velocity which we will keep constant, theta is the angle of launch which we will vary, and g is the gravitational constant which we will take as 9.81.

First let’s rearrange these equations to eliminate the parameter t.

Screen Shot 2020-04-06 at 1.19.11 PM

Next, we use the fact that the envelope of a curve is given by the points which satisfy the following 2 equations:

Screen Shot 2020-04-06 at 1.19.48 PM

F(x,y,theta)=0 simply means we have rearranged an equation so that we have 3 variables on one side and have made this equal to 0.  The second of these equations means the partial derivative of F with respect to theta.  This means that we differentiate as usual with regards to theta, but treat x and y like constants.

Therefore we can rearrange our equation for y to give:

Screen Shot 2020-04-06 at 1.22.47 PM

and in order to help find the partial differential of F we can write:

Screen Shot 2020-04-06 at 1.26.52 PM

We can then rearrange this to get x in terms of theta:

Screen Shot 2020-04-06 at 1.28.17 PM

We can then substitute this into the equation for F(x,y,theta)=0 to eliminate theta:

Screen Shot 2020-04-06 at 1.22.47 PM

Screen Shot 2020-04-06 at 1.29.40 PM

We then have the difficulty of simplifying the second denominator, but luckily we have a trig equation to help:

Screen Shot 2020-04-06 at 1.31.09 PM

Therefore we can simplify as follows:

Screen Shot 2020-04-06 at 1.31.57 PM

and so:

Screen Shot 2020-04-06 at 1.33.08 PM

And we have our equation for the envelope of projectile motion!  As we can see it is itself a quadratic equation.  Let’s look at some of the envelopes it will create.  For example, if I launch a projectile with a velocity of 1, and taking g = 9.81, I get the following equation:

Screen Shot 2020-04-06 at 1.36.00 PM

This is the envelope of projectile motion when I take the following projectiles in parametric form and vary theta from 0 to pi:

Screen Shot 2020-04-06 at 1.37.50 PM

This gives the following graph:

Screen Shot 2020-04-06 at 1.11.43 PM

If I was to take an initial velocity of 2 then I would have the following:

Screen Shot 2020-04-06 at 1.40.29 PM

Screen Shot 2020-04-06 at 1.45.10 PM

And an initial velocity of 4 would generate the following graph:

Screen Shot 2020-04-06 at 1.51.18 PM

So, there we have it, we can now create the equation of the envelope of curves created by projectile motion for any given initial velocity!

Other ideas for projectile motion

There are lots of other things we can investigate with projectile motion.  One example provided by fellow IB teacher Ferenc Beleznay is to fix the velocity and then vary the angle, then to plot the maximum points of the parabolas.  He has created a Geogebra app to show this:

Screen Shot 2020-04-06 at 3.25.43 PM

You can then find that the maximum points of the parabolas lie on an ellipse (as shown below).

Screen Shot 2020-04-06 at 8.34.58 PM

See if you can find the equation of this ellipse!

Essential Resources for IB Teachers

1) Intermathematics.com

Screen Shot 2021-08-21 at 1.07.49 PM

If you are a teacher then please also visit my new site.  This has been designed specifically for teachers of mathematics at international schools.  The content now includes over 2000 pages of pdf content for the entire SL and HL Analysis syllabus and also the SL Applications syllabus.  Some of the content includes:

  1. Original pdf worksheets (with full worked solutions) designed to cover all the syllabus topics.  These make great homework sheets or in class worksheets – and are each designed to last between 40 minutes and 1 hour.
  2. Original Paper 3 investigations (with full worked solutions) to develop investigative techniques and support both the exploration and the Paper 3 examination.
  3. Over 150 pages of Coursework Guides to introduce students to the essentials behind getting an excellent mark on their exploration coursework.
  4. A large number of enrichment activities such as treasure hunts, quizzes, investigations, Desmos explorations, Python coding and more – to engage IB learners in the course.

There is also a lot more.  I think this could save teachers 200+ hours of preparation time in delivering an IB maths course – so it should be well worth exploring!

Essential Resources for both IB teachers and IB students

1) Exploration Guides and Paper 3 Resources

Screen Shot 2021-12-01 at 1.19.14 PM

I’ve put together a 168 page Super Exploration Guide to talk students and teachers through all aspects of producing an excellent coursework submission.  Students always make the same mistakes when doing their coursework – get the inside track from an IB moderator!  I have also made Paper 3 packs for HL Analysis and also Applications students to help prepare for their Paper 3 exams.  The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.

wuhan flu

If you are a teacher then please also visit my new site: intermathematics.com for over 2000+ pdf pages of resources for teaching IB maths!

Using Maths to model the spread of Coronavirus (COVID-19)

This coronavirus is the latest virus to warrant global fears over a disease pandemic.  Throughout history we have seen pandemic diseases such as the Black Death in Middle Ages Europe and the Spanish Flu at the beginning of the 20th century. More recently we have seen HIV responsible for millions of deaths.  In the last few years there have been scares over bird flu and SARS – yet neither fully developed into a major global health problem.  So, how contagious is COVID-19, and how can we use mathematics to predict its spread?

Modelling disease outbreaks with real accuracy is an incredibly important job for mathematicians and all countries employ medical statisticians for this job .  Understanding how diseases spread and how fast they can spread through populations is essential to developing effective medical strategies to minimise deaths.  If you want to save lives maybe you should become a mathematician rather than a doctor!

Currently scientists know relatively little about the new virus – but they do know that it’s the same coronavirus family as SARS and MERS which can both cause serious respiratory problems.  Scientists are particularly interested in trying to discover how infectious the virus is, how long a person remains contagious, and whether people can be contagious before they show any symptoms.

In the case of COVID-19 we have the following early estimated values: [From a paper published by medical statisticians in the UK on January 24]

R0. between 3.6 and 4. This is defined as how many people an infectious person will pass on their infection to in a totally susceptible population.  The higher the R0. value the more quickly an infection will spread.  By comparison seasonal flu has a R0. value around 2.8.

Total number infected by January 21:  prediction interval 9,217–14,245.  Of these an estimated 3,050–4,017 currently with the virus and the others recovered (or died).  This is based on an estimation that only around 5% of cases have been diagnosed.  By February 4th they predict 132,751–273,649 will be infected.

Transmission rate β estimated at 1.07.  β represents the transmission rate per day – so on average an infected person will infect another 1.07 people a day.

Infectious period estimated at 3.6 days. We can therefore calculate μ (the per capita recovery rate) by μ = 1/(3.6). This tells us how quickly people will be removed from the population (either recovered and become immune or died)

SIR Model

The basic model is based on the SIR model.  The SIR model looks at how much of the population is susceptible to infection (S), how many of these go on to become infectious (I), and how many of these are removed (R) from the population being considered (i.e they either recover and thus won’t catch the virus again, or die).

ebola6

The Guardian datablog have an excellent graphic to show the contagiousness relative to deadliness of different diseases [click to enlarge, or follow the link].  We can see that seasonal flu has an R0. value of around 2.8 and a fatality rate of around 0.1%, whereas measles has an R0. value of around 15 and a fatality rate of around 0.3%.  This means that measles is much more contagious than seasonal flu.

You can notice that we have nothing in the top right hand corner (very deadly and very contagious). This is just as well as that could be enough to seriously dent the human population. Most diseases we worry about fall into 2 categories – contagious and not very deadly or not very contagious and deadly.

ebola

The equations above represent a SIR (susceptible, infectious, removed) model which can be used to model the spread of diseases like flu.

dS/dt represents the rate of change of those who are susceptible to the illness with respect to time.  dI/dt represents the rate of change of those who are infected with respect to time.  dR/dt represents the rate of change of those who have been removed with respect to time (either recovered or died).

For example, if dI/dt is high then the number of people becoming infected is rapidly increasing.  When dI/dt is zero then there is no change in the numbers of people becoming infected (number of infections remain steady).  When dI/dt is negative then the numbers of people becoming infected is decreasing.

Modelling for COVID-19

N is the total population.  Let’s take as the population of Wuhan as 11 million.

μ is the per capita recovery (Calculated by μ = 1/(duration of illness) ).  We have μ = 1/3.6 = 5/18.

β the transmission rate as approximately 1.07

Therefore our 3 equations for rates of change become:

dS/dt = -1.07 S I /11,000,000

dI/dt = 1.07 S I /11,000,000 – 5/18 I

dR/dt = 5/18 I

Unfortunately these equations are very difficult to solve – but luckily we can use a computer program  or spreadsheet to plot what happens.   We need to assign starting values for S, I and R – the numbers of people susceptible, infectious and removed.  With the following values for January 21: S = 11,000,000, I = 3500, R = 8200, β = 1.07, μ = 5/18, I designed the following Excel spreadsheet (instructions on what formula to use here):

wuhan flu

This gives a prediction that around 3.9 million people infected within 2 weeks!  We can see that the SIR model that we have used is quite simplistic (and significantly different to the expert prediction of around 200,000 infected).

So, we can try and make things more realistic by adding some real life considerations.  The current value of β (the transmission rate) is 1.07, i.e an infected person will infect another 1.07 people each day.  We can significantly reduce this if we expect that infected people are quarantined effectively so that they do not interact with other members of the public, and indeed if people who are not sick avoid going outside.  So, if we take β as (say) 0.6 instead we get the following table:

Screen Shot 2020-01-29 at 6.18.48 AM

Here we can see that this change to β has had a dramatic effect to our model.  Now we are predicting around 129,000 infected after 14 days – which is much more in line with the estimate in the paper above.

As we are seeing exponential growth in the spread, small changes to the parameters will have very large effects.  There are more sophisticated SIR models which can then be used to better understand the spread of a disease.  Nevertheless we can see clearly from the spreadsheet the interplay between susceptible, infected and recovered which is the foundation for understanding the spread of viruses like COVID-19.

[Edited in March to use the newly designated name COVID-19]
Essential Resources for IB Teachers

1) Intermathematics.com

Screen Shot 2021-08-21 at 1.07.49 PM

If you are a teacher then please also visit my new site.  This has been designed specifically for teachers of mathematics at international schools.  The content now includes over 2000 pages of pdf content for the entire SL and HL Analysis syllabus and also the SL Applications syllabus.  Some of the content includes:

  1. Original pdf worksheets (with full worked solutions) designed to cover all the syllabus topics.  These make great homework sheets or in class worksheets – and are each designed to last between 40 minutes and 1 hour.
  2. Original Paper 3 investigations (with full worked solutions) to develop investigative techniques and support both the exploration and the Paper 3 examination.
  3. Over 150 pages of Coursework Guides to introduce students to the essentials behind getting an excellent mark on their exploration coursework.
  4. A large number of enrichment activities such as treasure hunts, quizzes, investigations, Desmos explorations, Python coding and more – to engage IB learners in the course.

There is also a lot more.  I think this could save teachers 200+ hours of preparation time in delivering an IB maths course – so it should be well worth exploring!

Essential Resources for both IB teachers and IB students

1) Exploration Guides and Paper 3 Resources

Screen Shot 2021-12-01 at 1.19.14 PM

I’ve put together a 168 page Super Exploration Guide to talk students and teachers through all aspects of producing an excellent coursework submission.  Students always make the same mistakes when doing their coursework – get the inside track from an IB moderator!  I have also made Paper 3 packs for HL Analysis and also Applications students to help prepare for their Paper 3 exams.  The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.

Waging war with maths: Hollow squares

The picture above [US National Archives, Wikipedia] shows an example of the hollow square infantry formation which was used in wars over several hundred years.  The idea was to have an outer square of men, with an inner empty square.  This then allowed the men in the formation to be tightly packed, facing the enemy in all 4 directions, whilst the hollow centre allowed the men flexibility to rotate (and also was a place to hold supplies).  It was one of the infantry formations of choice against charging cavalry.

So, the question is, what groupings of men can be arranged into a hollow square?  This is a current Nrich investigation, so I thought I’d do a mini-investigation on this.

We can rethink this question as asking which numbers can be written as the difference between 2 squares. For example in the following diagram (from the Nrich task Hollow Squares)

We can see that the hollow square formation contains a larger square of 20 by 20 and a smaller hollow square of 8 by 8.  Therefore the number of men in this formation is:

202-82 = 336.

The first question we might ask therefore is how many numbers from 1-100 can be written as the difference between 2 squares?  These will all be potential formations for our army.

I wrote a quick code on Python to find all these combinations.  I included 0 as a square number (though this no longer creates a hollow square, rather just a square!). You can copy this and run it in a Python editor like Repl.it.


for k in range(1,50):

  for a in range(0, 100):
   for b in range(0,100):
    if a**2-b**2 == k :
     print(k,a,b)

This returned the following results:

1 1 0
3 2 1
4 2 0
5 3 2
7 4 3
8 3 1
9 3 0
9 5 4
11 6 5
12 4 2
13 7 6
15 4 1
15 8 7
16 4 0
16 5 3
17 9 8
19 10 9
20 6 4
21 5 2
21 11 10
23 12 11
24 5 1
24 7 5
25 5 0
25 13 12
27 6 3
27 14 13
28 8 6
29 15 14
31 16 15
32 6 2
32 9 7
33 7 4
33 17 16
35 6 1
35 18 17
36 6 0
36 10 8
37 19 18
39 8 5
39 20 19
40 7 3
40 11 9
41 21 20
43 22 21
44 12 10
45 7 2
45 9 6
45 23 22
47 24 23
48 7 1
48 8 4
48 13 11
49 7 0
49 25 24

Therefore we can see that the numbers with no solutions found are:

2,6,10,14,18,22,26,30,34,38,42,46,50

which are all clearly in the sequence 4n-2.

Thinking about this, we can see that this can be written as 2(2n-1) which is the product of an even number and an odd number. This means that all numbers in this sequence will require an odd factor in each of their factor pairs:

eg. 50 can be written as 10 (even) x 5 (odd) or 2 (even) x 25 (odd) etc.

But with a2-b2 = (a+b)(a-b), due to symmetries we will always end up with (a+b) and (a-b) being both even or both odd, so we can’t create a number with a factor pair of one odd and one even number. Therefore numbers in the sequence 4n-2 can’t be formed as the difference of 2 squares. There are some nicer (more formal) proofs of this here.

A battalion with 960 soldiers

Next we are asked to find how many different ways of arranging 960 soldiers in a hollow square. So let’s modify the code first:


for a in range(0, 1000):
 for b in range(0,1000):
  if a**2-b**2 == 960 :
   print(a,b)

Which gives us the following solutions:

31 1
32 8
34 14
38 22
46 34
53 43
64 56
83 77
122 118
241 239

General patterns

We can notice that when the number of soldiers is 1,3,5,7,9,11 (2n-1) we can always find a solution with the pair n and n-1. For example, 21 can be written as 2n-1 with n = 11. Therefore we have 10 and 11 as our pair of squares. This works because 112-102 = (11+10)(11-10) returns the factor pair 21 and 1. In general it always returns the factor pair, 2n-1 and 1.

We can also notice that when the number of soldiers is 4,8,12,16,20 (4n) we can always find a solution with the pair n+1 and n-1. For example, 20 can be written as 4n with n = 5. Therefore we have 6 and 4 as our pair of squares. This works because 62-42 = (6+4)(6-4) returns the factor pair 10 and 2. In general it always returns the factor pair, 2n and 2.

And we have already shown that numbers 2,6,10,14,18,22 (4n-2) will have no solution. These 3 sequences account for all the natural numbers (as 2n-1 incorporates the 2 sequences 4n-3 and 4n-1).

So, we have found a method of always finding a hollow square formation (if one exists) as well as being able to use some computer code to find other possible solutions. There are lots of other avenues to explore here – could you find a method for finding all possible combinations for a given number of men? What happens when the hollow squares become rectangles?

If you are a teacher then please also visit my new site: intermathematics.com for over 2000+ pdf pages of resources for teaching IB maths!

Normal Numbers – and random number generators

Numberphile have a nice new video where Matt Parker discusses all different types of numbers – including “normal numbers”.  Normal numbers are defined as irrational numbers for which the probability of choosing any given 1 digit number is the same, the probability of choosing any given 2 digit number is the same etc.  For example in the normal number 0.12345678910111213141516… , if I choose any digit in the entire number at random P(1) = P(2) = P(3) = … P(9) = 1/10.  Equally if I choose any 2 digit number at random I have P(10) = P(11) = P(12) = P(99) = 1/100.

It is incredibly hard to find normal numbers, but there is a formula to find some of them.

Screen Shot 2019-03-13 at 8.24.28 PM

In base 10, we are restricted to choosing a value of c such that 10 and c are relatively prime (i.e share no common factors apart from 1).  So if we choose c = 3 this gives:

Screen Shot 2019-03-13 at 8.24.33 PM

Screen Shot 2019-03-13 at 8.24.38 PM

We can now put this into Wolfram Alpha and see what number this gives us:

Screen Shot 2019-03-13 at 8.29.29 PM.png

So we can put the first few digits into an online calculator to find the distributions

0.000333333444444444444448148148148148148148148148148148148148148149382716049382716049382716049382716049382716049382716049382716049382716049382716049382716049382716049382716049382716049382716049827160493827160493827160479423863312 7572016460905349794238683127572016460905349794238683127572016460 9053497942386831275720164609053497942386831275720164609053497942

4: 61
1: 41
8: 40
3: 38
0: 36
2: 33
7: 33
9: 33
6: 32
5: 10

We can see that we are already seeing a reasonably similar distribution of single digits, though with 4 and 5 outliers.  As the number progressed we would expect these distributions to even up (otherwise it would not be a normal number).

One of the potential uses of normal numbers is in random number generators – if you can use a normal number and specify a digit (or number of digits) at random then this should give an equal chance of returning each number.

To finish off this,  let’s prove that the infinite series:

Screen Shot 2019-03-13 at 8.24.33 PM

does indeed converge to a number (if it diverged then it could not be used to represent a real number).  To do that we can use the ratio test (only worry about this bit if you have already studied the Calculus Option for HL!):

Screen Shot 2019-03-13 at 8.24.43 PM

Screen Shot 2019-03-13 at 8.24.46 PM

Screen Shot 2019-03-13 at 8.24.50 PM

We can see that in the last limit 3 to the power n+1 will grow faster than 3 to the power n, therefore as n increases the limit will approach 0.  Therefore by the ratio test the series converges to a real number.

Is pi normal?

Interestingly we don’t know if numbers like e, pi and ln(2) are normal or not.  We can analyse large numbers of digits of pi – and it looks like it will be normal, but as yet there is no proof.  Here are the distribution of the first 100,000 digits of pi:

1: 10137
6: 10028
3: 10026
5: 10026
7: 10025
0: 9999
8: 9978
4: 9971
2: 9908
9: 9902

Which we can see are all very close to the expected value of 10,000 (+/- around 1%).

So, next I copied the first 1 million digits of pi into a character frequency counter which gives the following:

5: 100359
3: 100230
4: 100230
9: 100106
2: 100026
8: 99985
0: 99959
7: 99800
1: 99758
6: 99548

This is even closer to the expected values of 100,000 with most with +/- 0.25 %.

Proving that pi is normal would be an important result in number theory – perhaps you could be the one to do it!

Essential Resources for IB Teachers

1) Intermathematics.com

Screen Shot 2021-08-21 at 1.07.49 PM

If you are a teacher then please also visit my new site.  This has been designed specifically for teachers of mathematics at international schools.  The content now includes over 2000 pages of pdf content for the entire SL and HL Analysis syllabus and also the SL Applications syllabus.  Some of the content includes:

  1. Original pdf worksheets (with full worked solutions) designed to cover all the syllabus topics.  These make great homework sheets or in class worksheets – and are each designed to last between 40 minutes and 1 hour.
  2. Original Paper 3 investigations (with full worked solutions) to develop investigative techniques and support both the exploration and the Paper 3 examination.
  3. Over 150 pages of Coursework Guides to introduce students to the essentials behind getting an excellent mark on their exploration coursework.
  4. A large number of enrichment activities such as treasure hunts, quizzes, investigations, Desmos explorations, Python coding and more – to engage IB learners in the course.

There is also a lot more.  I think this could save teachers 200+ hours of preparation time in delivering an IB maths course – so it should be well worth exploring!

Essential Resources for both IB teachers and IB students

1) Exploration Guides and Paper 3 Resources

Screen Shot 2021-12-01 at 1.19.14 PM

I’ve put together a 168 page Super Exploration Guide to talk students and teachers through all aspects of producing an excellent coursework submission.  Students always make the same mistakes when doing their coursework – get the inside track from an IB moderator!  I have also made Paper 3 packs for HL Analysis and also Applications students to help prepare for their Paper 3 exams.  The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.

Screen Shot 2019-03-08 at 8.03.56 PM.png

If you are a teacher then please also visit my new site: intermathematics.com for over 2000+ pdf pages of resources for teaching IB maths!

Volume optimization of a cuboid

This is an extension of the Nrich task which is currently live – where students have to find the maximum volume of a cuboid formed by cutting squares of size x from each corner of a 20 x 20 piece of paper.  I’m going to use an n x 10 rectangle and see what the optimum x value is when n tends to infinity.

First we can find the volume of the cuboid:

Screen Shot 2019-03-08 at 8.08.09 PM

Next we want to find when the volume is a maximum, so differentiate and set this equal to 0.

Screen Shot 2019-03-08 at 8.08.14 PM

Next we use the quadratic formula to find the roots of the quadratic, and then see what happens as n tends to infinity (i.e we want to see what the optimum x values are for our cuboid when n approaches infinity).  We only take the negative solution of the + – quadratic solutions because this will be the only one that fits the initial problem.

Screen Shot 2019-03-08 at 8.08.22 PM

Next we try and simplify the square root by taking out a factor of 16, and then we complete the square for the term inside the square root (this will be useful next!)

Screen Shot 2019-03-08 at 8.08.32 PM

Next we make a u substitution.  Note that this means that as n approaches infinity, u approaches 0.

Screen Shot 2019-03-08 at 8.08.39 PM

Substituting this into the expression gives us:

Screen Shot 2019-03-08 at 8.08.48 PM

We then manipulate the surd further to get it in the following form:

Screen Shot 2019-03-08 at 8.08.55 PM

Now, the reason for all that manipulation becomes apparent – we can use the binomial expansion for the square root of 1 + u2 to get the following:

Screen Shot 2019-03-08 at 8.09.09 PM

Therefore we have shown that as the value of n approaches infinity, the value of x that gives the optimum volume approaches 2.5cm.

So, even though we start with a pretty simple optimization task, it quickly develops into some quite complicated mathematics.  We could obviously have plotted the term in n to see what its behavior was as n approaches infinity, but it’s nicer to prove it.  So, let’s check our result graphically.

Screen Shot 2019-03-08 at 8.27.58 PM

Screen Shot 2019-03-08 at 8.26.35 PM

As we can see from the graph, with n plotted on the x axis and x plotted on the y axis we approach x = 2.5 as n approaches infinity – as required.

An m by n rectangle.

So, we can then extend this by considering an n by m rectangle, where m is fixed and then n tends to infinity.  As before the question is what is the value of x which gives the maximum volume as n tends to infinity?

We do the same method.  First we write the equation for the volume and put it into the quadratic formula.

Screen Shot 2019-03-08 at 9.15.00 PM

Next we complete the square, and make the u substitution:

Screen Shot 2019-03-08 at 9.15.07 PM

Next we simplify the surd, and then use the expansion for the square root of 1 + u2

Screen Shot 2019-03-08 at 9.15.14 PM

This then gives the following answer:

Screen Shot 2019-03-08 at 9.15.19 PM

So, we can see that for an n by m rectangle, as m is fixed and n tends to infinity, the value of x which gives the optimum volume tends to m/4.  For example when we had a 10 by n rectangle (i.e m = 10) we had x = 2.5.  When we have a 20 by n rectangle we would have x = 5 etc.

And we’ve finished!  See what other things you can explore with this problem.

Essential Resources for IB Teachers

1) Intermathematics.com

Screen Shot 2021-08-21 at 1.07.49 PM

If you are a teacher then please also visit my new site.  This has been designed specifically for teachers of mathematics at international schools.  The content now includes over 2000 pages of pdf content for the entire SL and HL Analysis syllabus and also the SL Applications syllabus.  Some of the content includes:

  1. Original pdf worksheets (with full worked solutions) designed to cover all the syllabus topics.  These make great homework sheets or in class worksheets – and are each designed to last between 40 minutes and 1 hour.
  2. Original Paper 3 investigations (with full worked solutions) to develop investigative techniques and support both the exploration and the Paper 3 examination.
  3. Over 150 pages of Coursework Guides to introduce students to the essentials behind getting an excellent mark on their exploration coursework.
  4. A large number of enrichment activities such as treasure hunts, quizzes, investigations, Desmos explorations, Python coding and more – to engage IB learners in the course.

There is also a lot more.  I think this could save teachers 200+ hours of preparation time in delivering an IB maths course – so it should be well worth exploring!

Essential Resources for both IB teachers and IB students

1) Exploration Guides and Paper 3 Resources

Screen Shot 2021-12-01 at 1.19.14 PM

I’ve put together a 168 page Super Exploration Guide to talk students and teachers through all aspects of producing an excellent coursework submission.  Students always make the same mistakes when doing their coursework – get the inside track from an IB moderator!  I have also made Paper 3 packs for HL Analysis and also Applications students to help prepare for their Paper 3 exams.  The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.

Website Stats

  • 9,460,858 views

About

All content on this site has been written by Andrew Chambers (MSc. Mathematics, IB Mathematics Examiner).

New website for International teachers

I’ve just launched a brand new maths site for international schools – over 2000 pdf pages of resources to support IB teachers.  If you are an IB teacher this could save you 200+ hours of preparation time.

Explore here!

Free HL Paper 3 Questions

P3 investigation questions and fully typed mark scheme.  Packs for both Applications students and Analysis students.

Available to download here

IB Maths Super Exploration Guide

A Super Exploration Guide with 168 pages of essential advice from a current IB examiner to ensure you get great marks on your coursework.

Available to download here.

Recent Posts

Follow IB Maths Resources from Intermathematics on WordPress.com