You are currently browsing the tag archive for the ‘modelling’ tag.
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!
Modelling more Chaos
This post was inspired by Rachel Thomas’ Nrich article on the same topic. I’ll carry on the investigation suggested in the article. We’re going to explore chaotic behavior – where small changes to initial conditions lead to widely different outcomes. Chaotic behavior is what makes modelling (say) weather patterns so complex.
f(x) = sin(x)
This time let’s do the same with f(x) = sin(x).
Starting value of x = 0.2
Starting value of x = 0.2001
Both graphs superimposed
This time the graphs do not show any chaotic behavior over the first 40 iterations – a small difference in initial condition has made a negligible difference to the output. Even after 200 iterations we get the 2 values x = 0.104488151 and x = 0.104502319.
f(x) = tan(x)
Now this time with f(x) = tan(x).
Starting value of x = 0.2
Starting value of x = 0.2001
Both graphs superimposed
This time both graphs remained largely the same up until around the 38th data point – with large divergence after that. Let’s see what would happen over the next 50 iterations:
Therefore we can see that tan(x) is much more susceptible to small initial state changes than sin(x). This makes sense by considering the graphs of tan(x) and sin(x). Sin(x) remains bounded between -1 and 1, whereas tan(x) is unbounded with asymptotic behaviour as we approach pi/2.
Essential resources for IB students:
Essential Resources for IB Teachers
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:
- 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.
- Original Paper 3 investigations (with full worked solutions) to develop investigative techniques and support both the exploration and the Paper 3 examination.
- Over 150 pages of Coursework Guides to introduce students to the essentials behind getting an excellent mark on their exploration coursework.
- 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
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!
Modelling Chaos
This post was inspired by Rachel Thomas’ Nrich article on the same topic. I’ll carry on the investigation suggested in the article. We’re going to explore chaotic behavior – where small changes to initial conditions lead to widely different outcomes. Chaotic behavior is what makes modelling (say) weather patterns so complex.
Let’s start as in the article with the function:
f(x) = 4x(1-x)
We can then start an iterative process where we choose an initial value, calculate f(x) and then use this answer to calculate a new f(x) etc. For example when I choose x = 0.2, f(0.2) = 0.64. I then use this value to find a new value f(0.64) = 0.9216. I used a spreadsheet to plot 40 iterations for the starting values of x = 0.2 and x = 0.2001. This generated the following spreadsheet (cut to show the first 10 terms):
I then imported this table into Desmos to map how the change in the starting value from 0.2 to 0.2001 affected the resultant graph.
Starting value of x = 0.2
Starting value of x = 0.2001
Both graphs superimposed
We can see that for the first 10 terms the graphs are virtually the same – but then we get a wild divergence, before the graphs seem to synchronize more closely again. One thing we notice is that the data is bounded between 0 and 1. Can we prove why this is?
If we start with a value of x such that:
0<x<1.
then when we plot f(x) = 4x – 4x2 we can see that the graph has a maximum at x = 1/2:
.
Therefore any starting value of x between 0 and 1 will also return a new value bounded between 0 and 1. Starting values of x > 1 and x < -1 will tend to negative infinity because x2 grows much more rapidly than x.
f(x) = ax(1-x)
Let’s now explore what happens as we change the value of a whilst keeping our initial starting values of x = 0.2 and x = 0.2001
a = 0.8
both graphs are superimposed but are identical at the scale we are using. We can see that both values are attracted to 0 (we can say that 0 is an attractor for our system).
a = 1.2
Again both graphs are superimposed but are identical at the scale we are using. We can see that both values are attracted to 1/6 (we can say that 1/6 is an attractor for our system).
In general, for f(x) = ax(1-x) with -1≤x≤1, the attractors are given by x = 0 and x = 1 – 1/a, but it depends on the starting conditions as to whether we will end up being attracted to this point.
f(x) = 0.8x(1-x)
So, let’s look at f(x) = 0.8x(1-x) for different starting values 1≤x≤1. Our attractors are given by x = 0 and x = 1 – 1/0.8 = -0.25.
When our initial value is x = 0 we remain at the point x = 0.
When our initial value is x = -0.25 we remain at the point x = -0.25.
When our initial value is x < -0.25 we tend to negative infinity.
When our initial value is -0.25 < x ≤ 1 we tend towards x = 0.
Starting value of x = -0.249999:
Therefore we can say that x = 0 is a stable attractor, initial values close to x = 0 will still tend to 0.
However x = -0.25 is a fixed point rather than a stable attractor, as
x = -0.250001 will tend to infinity very rapidly,
x = -0.25 stays at x = -0.25.
x = -0.249999 will tend towards 0.
Therefore there is a stable equilibria at x = 0 and an unstable equilibria at x = -0.25.
Essential Resources for IB Teachers
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:
- 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.
- Original Paper 3 investigations (with full worked solutions) to develop investigative techniques and support both the exploration and the Paper 3 examination.
- Over 150 pages of Coursework Guides to introduce students to the essentials behind getting an excellent mark on their exploration coursework.
- 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
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.
Making Music With Sine Waves
Sine and cosine waves are incredibly important for understanding all sorts of waves in physics. Musical notes can be thought of in terms of sine curves where we have the basic formula:
y = sin(bt)
where t is measured in seconds. b is then connected to the period of the function by the formula period = 2π/b.
When modeling sound waves we normally work in Hertz – where Hertz just means full cycles (periods) per second. This is also called the frequency. Sine waves with different Hertz values will each have a distinct sound – so we can cycle through scales in music through sine waves of different periods.
For example the sine wave for 20Hz is:
20Hz means 20 periods per second (i.e 1 period per 1/20 second) so we can find the equivalent sine wave by using
period = 2π/b.
1/20 = 2π/b.
b = 40π
So, 20Hz is modeled by y = sin(40πt)
You can plot this graph using Wolfram Alpha, and then play the sound file to hear what 20Hz sounds like. 20Hz is regarded as the lower range of hearing spectrum for adults – and is a very low bass sound.
The middle C on a piano is modeled with a wave of 261.626Hz. This gives the wave
which has the equation, y = sin(1643.84πt). Again you can listen to this sound file on Wolfram Alpha.
At the top end of the sound spectrum for adults is around 16,000 – 20,000Hz. Babies have a ability to hear higher pitched sounds, and we gradually lose this higher range with age. This is the sine wave for 20,000Hz:
which has the equation, y = sin(40,000πt). See if you can hear this file – warning it’s a bit painful!
As well as sound waves, the whole of the electromagnetic spectrum (radio waves, microwaves, infrared, visible light, ultraviolet, x rays and gamma rays) can also be thought of in terms of waves of different frequencies. So, modelling waves using trig graphs is an essential part of understanding the physical world.
If you enjoyed this post you might also like:
Fourier Transforms – the most important tool in mathematics? – how we can use advanced mathematics to understand waves – with applications for everything from WIFI, JPEG compression, DNA analysis and MRI scans.
Some mathematicians at the University of Ottawa have just released a paper looking at the mathematics behind a zombie apocalypse. What are the best strategies for avoiding being eaten? How quickly would zombies spread through the population? This may seem a little silly as zombies aren’t real – but actually the mathematics behind how diseases spread through a population is very useful – and, well, zombies are as good a way as any to introduce this.
The graphic above from the paper shows how zombie movement can be modelled. Given that zombies randomly move around, and any bumping would lead to a tendency towards finding space, they are modelled in the same way that we model the diffusion of gas. If you start with a small concentrated number of particles they will spread out to fill the given space like shown above.
Diffusion can be modelled by the diffusion equation above. We have:
t: time (in specified units)
x: position of the x axis.
w: the density of zombies at time t and point x. We could also write w(t,x) in function notation.
a: a is a constant.
The “curly d” in the equation means the partial differential. This works the same as normal differentiation but when we differentiate we are only interested in differentiating the denominator letter – and act as though all other letters are constants. This is easier to show with an example.
z = 3xy2
The partial differential of z with respect to x is 3y2
The partial differential of z with respect to y is 6xy
So, going back to our diffusion equation, we need to find a function w(x,t) which satisfies this equation – and then we can use this function to model the spread of zombies through an area. There are lots of different solutions to this equation (see a list here). One of the easiest is:
w(x,t) = A(x2 + 2at) + B
where we have introduced 2 new constants, A and B.
We can check that this works by finding the left handside and right handside of the diffusion equation:
Therefore as the LHS and RHS are equal, the diffusion equation is satisfied. Therefore we have the following zombie density model:
w(x,t) = A(x2 + 2at) + B
this will tell us at point x and time t what the zombie density is. We would need particular values to then find A, B and a. For example, we can restrict x between 0 and 1 and t between 1 and 5, then set A = -1, B = 21, a = 2 to give:
w(x,t) = (-x2 + -4t) + 21
This begins to fit the behavior we want – at any fixed point x the density will decrease with time, and as we move further away from the initial point (x = 0) we have lower density. This is only very rough however.
A more complicated solution to the diffusion equation is given above. In this equation Z(x,t) stands for the density of zombies at point x and time t. Z0 stands for the initial zombie density – where all zombies are starting at the same point (x between 0 and 1). L stands for the edge of the domain. This is a 1 dimensional model – where zombies only travel in a straight line. For modelling purposes, this would be somewhat equivalent to being trapped in a 50 metre by 1 metre square fenced area – with (0,0) as the bottom left corner of the fence. L would be 50 in this case, and all zombies would initially be in the 1 metre square which went through the origin.
Luckily as t gets large this equation can be approximated by:Which means that after a long length of time our 50 metre square fenced area will have an equal density of zombies throughout. If we started with 100 zombies in our initial 1 metre square area (say emerging from a tomb), then with Z0 = 100 and with L = 50 we would have an average density of 100/2 = 2 zombies per metre squared. In other words zombies would be evenly spaced out across all available space.
So, what advice can you take from this when faced with a zombie apocalypse? Well if zombies move according to diffusion principles then initially you have a good advantage to outrun them – after-all they will be moving randomly and you will be running linearly as far away as possible. That will give you some time to prepare your defences for when the zombies finally reach you. As long as you get far enough away, when they do reach your corner their density will be low and therefore much easier to fight.
Good luck!
If you liked this post you might also like:
Surviving the Zombie Apocalypse – more zombie maths. How long before the zombies arrive?
How contagious is Ebola? – using differential equations to model infections.
Simulations -Traffic Jams and Asteroid Impacts
You can study the mathematics behind traffic flow using this simulator. Why do traffic jams form? How does the speed limit or traffic lights or the number of lorries on the road affect road conditions? You can run a number of different simulations – looking at ring road traffic, lane closures and how robust the system is by applying an unexpected perturbation (like an erratic driver).
There is a lot of scope for investigation – with some prompts on the site. For example, just looking at one variable – the speed limit – what happens in the lane closure model? Interestingly, with a homogenous speed of 80 km/h there is no traffic congestion – but if the speed is increased to 140km/h then large congestion builds up quickly as cars are unable to change lanes. This is why reduced speed limits are applied on motorways during lane closures.
Another investigation is looking at how the style of driving affects the models. You can change the politeness of the drivers – do they change lanes recklessly? How many perturbations (erratic incidents) do you need to add to the simulation to cause a traffic jam?
This is a really good example of mathematics used in a real life context – and also provides some good opportunities for a computer based investigation looking at the altering one parameter at a time to note the consequences.
Another good simulation is on the Impact: Earth page. This allows you to investigate the consequences of various asteroid impacts on Earth – choosing from different parameters such as diameter, velocity, density and angle of impact. It then shows a detailed breakdown of thee consequences – such as crater size and energy released. You can also model some famous impacts from history and see their effects. Lots of scope for mathematical modelling – and also for links with physics. Also possible discussion re the logarithmic Richter scale – why is this useful?
Student Handout
Asteroid Impact – Why is this important?
Comets and asteroids impact with Earth all the time – but most are so small that we don’t even notice. On a cosmic scale however, the Earth has seen some massive impacts – which were they to happen again today could wipe out civilisation as we know it.
The website Impact Earth allows us to model what would happen if a comet or asteroid hit us again. Jay Melosh professor of Physics and Earth Science says that we can expect “fairly large” impact events about every century. The last major one was in Tunguska Siberia in 1908 – which flattened an estimated 80 million trees over an area of 2000 square km. The force unleashed has been compared to around 1000 Hiroshima nuclear bombs. Luckily this impact was in one of the remotest places on Earth – had the impact been near a large city the effects could be catastrophic.
Jay says that, ”The biggest threat in our near future is the asteroid Apophis, which has a small chance of striking the Earth in 2036. It is about one-third of a mile in diameter.”
Task 1: Watch the above video on a large asteroid impact – make some notes.
Task 2:Research about Apophis – including the dimensions and likely speed of the asteroid and probability of collision. Use this data to enter into the Impact Earth simulation and predict the damage that this asteroid could do.
Task 3: Investigate the Tunguska Event. When did it happen? What was its diameter? Likely speed? Use the data to model this collision on the Impact Earth Simulation. Additional: What are the possible theories about Tunguska? Was it a comet? Asteroid? Death Ray?
Task 4: Conduct your own investigation on the Impact Earth Website into what factors affect the size of craters left by impacts. To do this you need to change one variable and keep all the the other variables constant. The most interesting one to explore is the angle of impact. Keep everything else the same and see what happens to the crater size as the angle changes from 10 degrees to 90 degrees. What angle would you expect to cause the most damage? Were you correct? Plot the results as a graph.
If you enjoyed this post you might also like:
Champagne Supernovas and the Birth of the Universe – some amazing photos from space.
Fractals, Mandelbrot and the Koch Snowflake – using maths to model infinite patterns.
Student resources
Exploration Guides and Paper 3 Resources
I’ve put together four comprehensive pdf guides to help students prepare for their exploration coursework and Paper 3 investigations. The exploration guides talk through the marking criteria, common student mistakes, excellent ideas for explorations, technology advice, modeling methods and a variety of statistical techniques with detailed explanations. I’ve also made 17 full investigation questions which are also excellent starting points for explorations. The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.