You are currently browsing the category archive for the ‘graphing’ category.

**GPT-4 vs ChatGPT. The beginning of an intelligence revolution?**

The above graph (image source) is one of the most incredible bar charts you’ll ever see – this is measuring the capabilities of GPT4, Open AI’s new large language model with its previous iteration, ChatGPT. As we can see, GPT4 is now able to score in the top 20% of takers across a staggering field of subjects. This on its own is amazing – but the really incredible part is that the green sections represent improvements since ChatGPT – and that ChatGPT was only released **3 ½ months ago**.

GPT4 is now able to successfully pass nearly all AP subjects, would pass the bar exam to qualify as a lawyer and is now even making headway on Olympiad style mathematics papers. You can see that ChatGPT had already mastered many of the humanities subjects – and that now GPT4 has begun to master the sciences, maths, economics and law.

We can see an example of the mathematical improvements in GPT4 below from a recently released research paper. Both AIs were asked a reasonably challenging integral problem:

**GPT4 response:**

GPT4 is correct – and excellently explained, whereas the ChatGPT response (viewable in the paper) was just completely wrong. It’s not just that GPT4 is now able to do maths like this – after all, so can Wolfram Alpha, but that the large language model training method allows it do complicated maths as well as everything else. The research paper this appears in is entitled “Sparks of Artificial General Intelligence” because this appears to be the beginning of the holy grail of AI research – a model which has intelligence across multiple domains – and as such begins to reach human levels of intelligence across multiple measures.

**An intelligence explosion?**

Nick Bostrom’s Superintelligence came out several years ago to discuss the ideas behind the development of intelligent systems and in it he argues that we can probably expect explosive growth – perhaps even over days or weeks – as a system reaches a critical level of intelligence and then drives its own further development. Let’s look at the maths behind this. We start by modelling the rate of growth of intelligence over time:

Optimisation power is a measure of how much resource power is being allocated to improving the intelligence of the AI. The resources driving this improvement are going to come the company working on the project (in this case Open AI), and also global research into AI in the nature of published peer review papers on neural networks etc. However there is also the potential for the AI itself to work on the project to improve its own intelligence. We can therefore say that the optimisation power is given by:

Whilst the AI system is still undeveloped and unable to contribute meaningfully to its own intelligence improvements we will have:

If we assume that the company provides a constant investment in optimising their AI, and similarly there is a constant investiment worldwise, then we can treat this as a constant:

Responsiveness to optimisation describes how easily a system is able to be improved upon. For example a system which is highly responsive can be easily improved upon with minimal resource power. A system which shows very little improvements despite a large investment in resource power has low responsiveness.

If we also assume that responsiveness to optimization, *R*, remains constant over some timeframe then we can write:

We can then integrate this by separating the variables:

This means that the intelligence of the system grows in a linear fashion over time.

However when the AI system reaches a certain threshold of intelligence it will become the main resource driving its own intelligence improvements (and much larger than the contribution of the company or the world). At this point we can say:

In other words the optimization power is a function of the AI’s current level of intelligence. This then creates a completely different growth trajectory:

Which we again solve as follows:

Which means that now we have the growth of the intelligence of the system exhibiting exponential growth.

**What does this mean in practice in terms of AI development?**

We can see above an example of how we might expect such intelligence development to look. The first section (red) is marked by linear growth over short periods. As R or D is altered this may create lines with different gradient but growth is not explosive.

At the point A the AI system gains sufficient intelligence to be the main driving force in its own future intelligence gains. Note that this does not mean that it has to be above the level of human intelligence when this happens (though it may be) – simply that in the narrow task of improving intelligence it is now superior to the efforts of the company and the world researchers.

So, at point A the exponential growth phase begins (purple) – in this diagram taking the AI system explosively past human intelligence levels. Then at some unspecified point in the future (B on the diagram), this exponential growth ends and the AI approaches the maximum capacity intelligence for the system.

So it is possible that there will be an intelligence explosion once an AI system gets close to human levels of intelligence – and based on current trends it looks like this is well within reach within the next 5 years. So hold on tight – things could get very interesting!

**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.

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:*

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

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

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

This regression line is given by the equation:

This graph is shown below:

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

This graph is shown below:

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:

When we plot this (green) versus our earlier linear approximation we can see a very close fit:

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

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

**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.

**The mathematics behind blockchain, bitcoin and NFTs.**

If you’ve ever wondered about the maths underpinning cryptocurrencies and NFTs, then here I’m going to try and work through the basic idea behind the Elliptic Curve Digital Signature Algorithm (ECDSA). Once you understand this idea you can (in theory!) create your own digital currency or NFT – complete with a digital signature that allows anyone to check that it has been issued by you.

Say I create 100 MATHSCOINS which I sell. This MATHSCOIN only has value if it can be digitally verified to be an original issued by me. To do this I share some data publicly – this then allows anyone who wants to check via its digital signature that this is a genuine MATHSCOIN. So let’s get into the maths! (Header image generated from here).

**Elliptical curves**

I will start with an elliptical curve and a chosen prime mod (here we work in mod arithmetic which is the remainder when dividing by a given mod). For this example I will be in mod 13 and my curve will be:

First I will work out all the integer solutions to this equation. For example (7,5) is a solution because:

The full set of integer solutions is given by:

Now we define addition of 2 non equal points (p_1, p_2) and (q_1, q_2) on the curve mod M by the following algorithm:

And we define the addition of 2 equal points (p_1, p_2) on the curve mod M by the following algorithm:

So in the case of (8,8) if we want to calculate (8,8) + (8,8) this gives:

This is a little tedious to do, so we can use an online generator here to calculate the full addition table of all points on the curve:

This shows that (say) (7,5) + (8,5) = (11,8) etc.

I can then chose a base point to find the order of this point (how many times it can be added to itself until it reaches the point at infinity). For example with the base point (8,8):

We can also see that the order of our starting point A(8,8) is 7 because there are 7 coordinate points (including the point at infinity) in the group when we calculate A, 2A, 3A…

**ECDSA: Elliptic Curve Signatures**

So I have chosen my curve mod M (say):

And I choose a base point on that curve (p_1, p_2) (say):

And I know the order of this base point is 7 (n=7). (n has to be prime). This gives the following:

I now chose a private key k_1:

Let’s say:

This is super-secret key. I never share this! I use this key to generate the following point on the curve:

I can see that 5(8,8) = (11,5) from my table when repeatedly adding (8,8) together.

Next I have some data z_1 which I want to give a digital signature to – this signature will show anyone who examines it that the data is authentic, has been issued by me and has not been tampered with. Let’s say:

I choose another integer k_2 such that:

Let’s say:

I am now ready to create my digital signature (s_1, s_2) by using the following algorithm:

Note, dividing by 2 is the same as multiplying by 4 in mod 7 (as this is the multiplicative inverse).

I can then release this digital signature alongside my MATHSCOIN (represented by the data z_1 = 100). Anyone can now check with me that this MATHSCOIN was really issued by me.

**Testing a digital signature**

So someone has bought a MATHSCOIN direct from me – and later on wants to sell to another buyer. Clearly this new buyer needs to check whether this is a genuine MATHSCOIN. So they have check the digital signature on the data. To allow them to do this I can share all the following data (but crucially not my private key):

This gives:

To verify someone then needs to do the following:

To verify that the data z_1 has a valid digital signature we need:

So with the shared data we have:

This verifies that the data had a valid digital signature – and that the MATHSCOIN is genuine! This is basically the foundation of all digital assets which require some stamp of authenticity.

In real life the numbers chosen are extremely large – private keys will be 256 digits long and primes very large. This makes it computationally impossible (at current speeds) to work out a private key based on public information, but still relatively easy to check a digital signature for validity.

I have also made some simple Python code which will provide a digital signature as well as check that one is valid. You can play around with these codes here:

(1) Digital signature code, (2) Checking a digital signature for validity

So time to create your own digital currency!

**Plotting Pi and Searching for Mona Lisa**

This is a very nice video from Numberphile – where they use a string of numbers (pi) to write a quick Python Turtle code to create some nice graphical representations of pi. I thought I’d quickly go through the steps required for people to do this by themselves.

Firstly you can run the Turtle code on trinket.io. If you type the above code this will take the decimal digits of pi one at a time and for each one move forward 10 steps and then turn by 36 degrees times by that digit. So for example the 1 will lead to a right turn of 36 degrees and the 4 will lead to a right turn of 36 x 4 = 144 degrees.

Next it would be nice to have more digits of pi to paste in rather than type. So we can go to the onlinenumbertools website and generate as many digits of pi as we want. Select them to be comma separated and also to not include the first digit 3. You can then copy and paste this string in place of the 1,4,1 in the code above.

**1000 digits of pi**

If we run this program after pasting the first 1000 digits of pi we get (after waiting a while!) the above picture. There are a number of questions that they then raise in the video – if this program was ran infinitely long would the whole screen eventually be black? Would this create every possible image that can be created by 36 degree turns? Would it be possible to send this picture (say to an alien civilization) and for the recipient to be able to reverse engineer the digits of pi?

**2000 digits of pi**

If you increase the digits of pi to around 2000 you get the above picture. The graph spends a large time in the central region before finally “escaping” to the left. It then left my screen at the top.

**3000 digits of pi**

We can see that the turtle “returned” from off the top of the screen and then joined back up with the central region. This starts to look like a coastline – maybe the south of the UK!

**Different bases: Base 3**

We can consider the digits of pi in base three – which means that they are all equivalent to 0,1,2. This means that we can use these to specify either 0 degree, 120 degree or 240 degree turns. We can change the code as shown above to achieve this. Note the i%3 gives i mod 3. For example if the digit is 8, then 8 mod 3 is 2 (the remainder when 8 is divided by 3) and so this would turn 120 x 2 = 240 degrees.

This then creates a pattern which looks similar to the Sierpinski triangle fractal design:

**Base 4**

Using a similar method, we can create the following using a base 4 design:

This creates what looks like a map layout.

**Base 5:**

In base 5 the turtle quickly departed from my screen! With turns of 72 we don’t see the tessellating shapes that we do with base 3 and 4.

**Base 6:**

With a 60 degree turn we can now see a collection of equilateral triangles and hexagons.

You can explore with different numbers and different bases to see what patterns you can create!

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!

**Weaving a Spider Web II: Catching mosquitoes**

First I thought I would have another go at making a spider web pattern – this time using Geogebra. I’m going to use polar coordinates and the idea of complex numbers to help this time.

Parametrically I will define my dots on my web by:

Here r will dictate the distance of the dot from the origin, p will dictate how many dots I will have before I return to the starting point, and then I will vary n from 1 to p.

For example, if I have a distance of 1 from the origin then r = 1. I decide to have 10 dots in one cycle, therefore p =10. This gives the following:

Now if I plot all these points as n varies from 1 to 10 I will get the following graph:

Here I joined up all the dots to their neighbors and also to the origin. If you know about complex numbers you might notice that we can represent these points as complex numbers, and these are the 10th roots of unity.

Following the same method I now change the distance from the origin (so r is changed). This then will give me the following web:

**Finding the optimum web design**

I’m now going to explore some maths suggested by the excellent Chalkdust magazine (recommended for some great exploration ideas). In their “Spider Witch Project” they suggest the following idea to work out how a spider can make sure they catch their prey.

We start with lots of assumptions and simplifications.

Say we have the web above, distances in cm. Let’s say that the inner green circle is no use for catching flies (this is where the spider wants to stay, and so flies will avoid this area). So excluding this circle we have 2 additional concentric circle-like rings, and 10 radial lines from the centre. This gives us a total of 20 areas (like the one shaded red).

**Changing to concentric circles **

Now let’s change our web into perfect circles. We still have 20 areas in which the spider aims to catch their prey. Let’s say that a spider will only catch their prey if the area it flies into is such that it is caught from all sides (i.e if the area is too large it may fly through the middle, or simply touch one strand but be able to escape).

For this particular design – with 2 concentric circles outside the centre area, the question is how many radial lines through the centre should the spider spin? If it spins too few radial lines then its prey will not be caught, but if it spins too many then it will be wasting precious time (and energy) spinning its web.

Next lets work out the average of one of these red areas (in cm squared). This will be:

Next let’s assume that our spider wants to catch a mosquito. Let’s say the mosquito is 3mm by 4mm with a 2D plan cross sectional area of 12 mm squared. And let’s say that the mosquito will not be caught in the web unless the area of the red area is the same size or smaller than the mosquito’s 2D plan cross sectional area. In this case we can see that the mosquito will escape:

So, let’s see how many radial lines the spider needs to spin if it only has 2 concentric rings outside the “green zone”. Here n will represent the number of radial lines from the centre:

So, we can see that a spider wanting to catch a mosquito might need to make at least 105 radial lines to catch its prey. This doesn’t seem to realistic. So, let’s modify our model to see how this compares to real life.

**Real life**

This particular spiderweb has around 20 concentric circles (counting double strands) and around 38 radial lines. Let’s see how many radial lines we would predict from our model.

If we have a radius of around 6cm for this web (around the average for a spider web), and take an inner radius of 1cm for simplicity, then with 20 concentric circles we would predict:

So a spider would need at least 46 radial lines to catch their prey. This is not too far away from the real life case in this case of 38 radial lines.

**Further study**

This could make a very interesting exploration. You can get some more ideas on this by reading the Chalkdust article where they go into ideas of optimisation for the time taken.

This topic shows how a good investigation should progress. Start with a very simple case, make lots of assumptions, then see what happens. If you reach a conclusion then go back and try to make your initial case more complicated, or revisit your assumptions to see how realistic they were.

**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.

**Weaving a Spider Web**

I often see some beautiful spider webs near my house, similar to the one pictured above (picture from here). They clearly have some sort of mathematical structure, so I decided to have a quick go at creating my own.

Looking at the picture above there are 2 main parts, an inner spiral, then a structure of hanging threads from lines which radiate from the centre.

Firstly I will use the general parametric equation of a hypocycloid:

and take the special case when a = 10 and b = 9:

This gives the following graph:

I can then vary the value of *n* in the following equations:

Which generates the following:

Next, I can generate the spiral in the centre by using an Archimedean spiral, plotting the curve in polar form as:

Which now gives:

Lastly, I want to have straight lines radiating from the centre going through the vertices of the graphs. I can notice that at these vertices the gradient will be undefined (as we can’t define the gradient at a sharp point). Therefore I can differentiate and look for when the gradient will be undefined.

I can see that this will be undefined when the denominator is zero. Therefore:

I can notice that all the vertices are are on the same lines, therefore I can simply choose n =9 to make my life easier, and then solve for t. I use the fact that sine is an odd function to help here.

Here p is an integer. I’ll then rearrange the first of these two equations for t to show how I can then find my equations of the lines.

If I now substitute this value of t back into my parametric equations I get:

So, this will tell me the coordinates of the vertices of the “sharp points” of the graph. Therefore the equation of the straight lines through these points and also through the origin are given by the first equation below. I can then choose my values of p (with p an integer) to get specific solutions. For example when I choose p = 1 above I get the equation of a line which will pass through one of these vertices:

Let’s check that this works:

Yes! So, we can use this method to find the other lines radiating from the centre. This gives us our final spider web:

So, there we go, a quick go at making a spider web – quite a simplistic pattern, but still utilising parametric equations, polar coordinates and also calculus and trigonometric equations.

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!

**Elliptical Curve Cryptography**

Elliptical curves are a very important new area of mathematics which have been greatly explored over the past few decades. They have shown tremendous potential as a tool for solving complicated number problems and also for use in cryptography.

Andrew Wiles, who solved one of the most famous maths problems of the last 400 years, Fermat’s Last Theorem, using elliptical curves. In the last few decades there has also been a lot of research into using elliptical curves instead of RSA encryption to keep data transfer safe online. So, what are elliptical curves? On a simple level they can be regarded as curves of the form:

y² = x³ +ax + b

If we’re being a bit more accurate, we also need 4a³ + 27b² ≠ 0. This stops the graph having “singular points” which cause problems with the calculations. We also have a “point at infinity” which can be thought of as an extra point added on to the usual x,y plane representing infinity. This also helps with calculations – though we don’t need to go into this in any more detail here!

**Addition of two **points **A and B**

What makes elliptical curves so useful is that we can create a group structure using them. Groups are very important mathematical structures because of their usefulness in being applied to problem solving. A group needs to have certain properties. For example, we need to be able to combine 2 members of the group to create a 3rd member which is also in the group. This is how it is done with elliptical curves:

Take 2 points A and B on y² = x³ -4x + 1. In the example we have A = (2,1) and B = (-2,-1). We now want to find an answer for A + B which also is on the elliptical curve. If we add them as we might vectors we get (0,2) – but unfortunately this is not on the curve. So, we define the addition A + B through the following geometric steps.

We join up the points A and B. This line intersects the curve in one more place, C.

We then reflect the point C in the x axis. We then define this new point C’ = A + B. In this case this means that (2,1) + (-2,-1) = (1/4, -1/8).

**Addition of 2 points when A = B**

We have to also be able to cope with the situation when the point A and B are the same. Here we create the line through A which is the tangent to the curve at that point:

We then use the same transformation as before to say that A+B = C’. For example with the curve y² = x³ -12x, if we start with the point A(-2,4) then this transformation tells us that A + A = (4,-4).

**Elliptical curves over finite fields**

For the purposes of cryptography we often work with elliptical curves over finite fields. This means we (say) only consider integer coordinate solutions and work in modulo arithmetic (mod prime).

Say we start with the curve y² = x³ +x+1, and just look at the positive integer solutions mod 7. (Plotted using the site here).

When x = 1,

y² = 1³ +1 + 1

y² = 3

So this has no integer solution.

Next, when x = 2 we have:

y² = 2³ +2 +1 = 11.

However when we are working mod 7 we look at the remainder when 11 is divided by 7 (which is 4). So:

y² = 4 (mod 7)

y = 2 or y = -2 = 5 (mod 7)

When x = 3 we have:

y² = 3³ +3 +1 = 31

y² = 3 (mod 7)

which has no integer solutions.

In fact, all the following coordinate points satisfy the equation (mod 7):

(2,2), (0,1), (0,6), (2,5).

**Addition under modulo arithmetic**

Let’s look at the coordinate points we calculated before for the elliptical curve y² = x³ +x+1 (integers solutions and mod 7) – they form a group under addition. (Table generated here)

In order to calculate addition of points when dealing with elliptical curves with integer points mod prime we use the same idea as expressed above for general graphs.

The table tells us that (0,1) + (0,1) = (2,5). If we were doing this from the graph we would draw the tangent to the curve at (0,1), find where it intersects the graph again, then reflect this point in the x axis. We can do all this algebraically.

First we find the gradient of the tangent when x = 0:

Next we have to do division modulo 7 (you can use a calculator here, and you can also read more about division modulo p here).

Next we find the equation of the tangent through (0,1):

Next we find where this tangent intersects the curve again (I used Wolfram Alpha to solve this mod 7)

We then substitute the value x = 2 into the original curve to find the y coordinates:

(2,2) is the point where the tangent would touch the curve and (2,5) is the equivalent of the reflection transformation. Therefore our answer is (2,5). i.e (0,1) + (0,1) = (2,5) as required.

When adding points which are not the same we use the same idea – but have to find the gradient of the line joining the 2 points rather than the gradient of the tangent. We can also note that when we try and add points such as (2,5) and (2,2) the line joining these does not intersect the graph again and hence we affix the point an infinity as (2,5) + (2,2).

**Using elliptical codes for cryptography**

Even though all this might seem very abstract, these methods of calculating points on elliptical curves form the basis of elliptical cryptography. The basic idea is that it takes computers a very long time to make these sorts of calculations – and so they can be used very effectively to encrypt data.

Say for example two people wish to create an encryption key.

They decide on an elliptical curve and modulo. Let’s say they decide on y² = x³ +x+1 for integers, mod 7.

This creates the addition group

Next they choose a point of the curve. Let’s say they choose P(1,1).

Person 1 chooses a secret number n and then sends nP (openly). So say Person 1 chooses n = 2. 2(1,1) = (1,1) + (1,1) = (0,2). Person 1 sends (0,2).

Person 2 chooses a secret number m and then sends mP (openly). So say Person 2 chooses m = 3. 3(1,1) = (1,1) + (1,1) + (1,1) = (0,2) + (1,1) = (0,5). Person 2 sends (0,5).

Both Person 1 and Person 2 can easily calculate mnP (the secret key).

Person 1 receives (0,5) and so does 2(0,5) = (0,5) + (0,5) = (1,1). This is the secret key.

Person 2 receives (0,2) and so does 3(0,2) = (0,2) + (0,2) +(0,2) = (1,1). This is the same secret key.

But for a person who can see mP and nP there is no quick method for working out mnP – with a brute force approach extremely time consuming. Therefore this method can be successfully used to encrypt data.

**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!

**Hailstone Numbers**

Hailstone numbers are created by the following rules:

**if n is even:** divide by 2

**if n is odd:** times by 3 and add 1

We can then generate a sequence from any starting number. For example, starting with 10:

10, 5, 16, 8, 4, 2, 1, 4, 2, 1…

we can see that this sequence loops into an infinitely repeating 4,2,1 sequence. Trying another number, say 58:

58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 4, 2, 1…

and we see the same loop of 4,2,1.

Hailstone numbers are called as such because they fall, reach one (the ground) before bouncing up again. The proper mathematical name for this investigation is the Collatz conjecture. This was made in 1937 by a German mathematian, Lothar Collatz.

One way to investigate this conjecture is to look at the length of time it takes a number to reach the number 1. Some numbers take longer than others. If we could find a number that didn’t reach 1 even in an infinite length of time then the Collatz conjecture would be false.

The following graphic from wikipedia shows how different numbers (x axis) take a different number of iterations (y axis) to reach 1. We can see that some numbers take much longer than others to reach one. Some numbers take over 250 iterations – but every number checked so far does eventually reach 1.

For example, the number 73 has the following pattern:

73, 220, 110, 55, 166, 83, 250, 125, 376, 188, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242, 121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319, 958, 479, 1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, 3644, 1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232, 4616, 2308, 1154, 577, 1732, 866, 433, 1300, 650, 325, 976, 488, 244, 122, 61, 184, 92, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1…

**No proof yet**

Investigating what it is about certain numbers that leads to long chains is one possible approach to solving the conjecture. This conjecture has been checked by computers up to a staggering 5.8 x 10^{18} numbers. That would suggest that the conjecture could be true – but doesn’t prove it is. Despite looking deceptively simple, Paul Erdos – one of the great 20th century mathematicians stated in the 1980s that “mathematics is not yet ready for such problems” – and it has remained unsolved over the past few decades. Maybe you could be the one to crack this problem!

**Exploring this problem with Python.**

We can plot this with Python – such that we also generate a nice graphical representation of these numbers. The graph above shows what happens to the number 500 when we follow this rule – we “bounce” up to close to 10,000 before falling back into the closed loop after around 100 iterations.

**Numbers with large iterations:**

871 takes 178 steps to reach 1:

77,031 takes 350 steps to reach 1:

9,780,657,630 takes 1132 steps to reach 1:

If you want to explore this code yourself, the following code has been written to run on repl.it. You can see the code yourself here, and I have also copied it below:

Have a play – and see what nice graphs you can draw!

**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.

**Chaos and strange Attractors: Henon’s map**

Henon’s map was created in the 1970s to explore chaotic systems. The general form is created by the iterative formula:

The classic case is when a = 1.4 and b = 0.3 i.e:

To see how points are generated, let’s choose a point near the origin. If we take (0,0) the next x coordinate is given by:

We would then continue this process over several thousands iterations. If we do this then we get the very strange graph at the top of the page – the points are attracted to a flow like structure, which they then circulate round. The graph above was generated when we took our starting coordinate as (0.1,0.1), let’s take a different starting point. This time let’s have (1.1, 1.1):

We can see that exactly the same structure appears. All coordinates close to the origin will get attracted to this strange attractor – except for a couple of fixed points near the origin which remain where they are. Let’s see why. First we can rewrite the iterative formula just in terms of x:

Next we use the fact that when we have a fixed point the x coordinate (and y coordinate) will not change. Therefore we can define the following:

This allows us to then make the following equation:

Which we can then solve using the quadratic formula:

Which also gives y:

So therefore at these 2 fixed points the coordinates do not get drawn to the strange attractor.

Above we can see the not especially interesting graph of the repeated iterations when starting at this point!

But we can also see the chaotic behavior of this system by choosing a point very close to this fixed point. Let’s choose (0.631354477, 0.631354477) which is correct to 9 decimal places as an approximation for the fixed point.

We can see our familiar graph is back. This is an excellent example of chaotic behavior – a very small change in the initial conditions has created a completely different system.

This idea was suggested by the excellent Doing Maths With Python – which is well worth a read if you are interested in computer programing to solve mathematical problems.

**Essential Resources for IB Teachers**

**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.

**Essential Resources for both IB teachers and IB students**

1) Exploration Guides and Paper 3 Resources

**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.

**Finding focus with Archimedes**

*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!*

Hard as it is to imagine now, for most of the history of mathematics there was no coordinate geometry system and therefore graphs were not drawn using algebraic equations but instead were constructed. The ancient Greeks such as Archimedes made detailed studies of conic sections (parabolas, ellipses and hyperbola) using ideas of relationships in constructions. The nice approach to this method is that it makes clear the link between conic sections and their properties in reflecting light – a property which can then be utilized when making lenses. A parabolic telescope for example uses the property that all light collected through the scope will pass through a single focus point.

Let’s see how we can construct a parabola without any algebra – simply using the constructions of the Greeks. We start with a line and a focus point F not on the line. This now defines a **unique parabola**.

This unique parabola is defined as all the points A such that the distance from A to F is equal as the perpendicular distance from A to the line.

We can see above that point A must be on our parabola because the distance AB is the same as the distance AF.

We can also see that point C must be on our parabola because the length CD is the same as CF. Following this same method we could eventually construct every point on our parabola. This would finally create the following parabola:

**Focus point of a parabolic **mirror

We can now see how this parabola construction gives us an intrinsic understanding of reflective properties. If we have a light source entering parallel to the perpendicular though the focus then we can use the fact that this light will pass through the focus to find the path the light traces before it is reflected out.

Newton made use of this property when designing his parabolic telescope. It’s interesting to note how a different method leads to a completely different appreciation of the properties of a curve.

**Finding the area under a quadratic curve without calculus**

Amazingly a method for finding the area under a quadratic curve was also discovered by the Greek scientist and mathematician Archimedes around 2200 years ago – and nearly 2000 years before calculus. Archimedes’ method was as follows.

Choose 2 points on the curve, join them to make 2 sides of a triangle. Choose the 3rd point of the triangle as the point on the quadratic with the same gradient as the chord. This is best illustrated as below. Here I generated a parabola with focus at (0,1) and line with the x axis.

Here I chose points B and C, joined these with a line and then looked for the point on the triangle with the same gradient. This then gives a triangle with area 4. Archimedes then discovered that the area of the parabolic segment (i.e the total area enclosed by the line BC and the parabola) is 4/3 the area of the triangle. This gives 4/3 of 4 which is 5 1/3. Once we have this we can find the area under the curve (i.e the integral) using simple areas of geometric shapes.

**Using calculus**

We can check that Archimedes’ method does indeed work. We want to find the area enclosed by the 2 following equations:

This is given by:

It works! Now we can try a slightly more difficult example. This time I won’t choose 2 points parallel to the x-axis.

This time I find the gradient of the line joining B and C and then find the point on the parabola with the same gradient. This forms my 3rd point of the triangle. The area of this triangle is approximately 1.68. Therefore Archimedes’ method tells us the area enclosed between the line and the curve will be approximately 4/3 (1.68) = 2.24. Let’s check this with calculus:

Again we can see that this method works – our only error was in calculating an approximate area for the triangle rather than a more precise answer.

So, nearly 2000 years before the invention of calculus the ancient Greeks were already able to find areas bounded by line and parabolic curves – and indeed Archimedes was already exploring the ideas of the limit of sums of areas upon which calculus in based.

**Essential Resources for IB Teachers**

**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.

**Essential Resources for both IB teachers and IB students**

1) Exploration Guides and Paper 3 Resources

**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.