IB Maths and GCSE Maths Resources for IB Maths explorations and investigations. Real life maths. Theory of Knowledge (ToK). Maths careers. Maths videos. Maths puzzles and Maths lesson resources.

IB Maths Resources from British International School Phuket:

My name is Andrew Chambers and I am currently working at British International School Phuket. I am running my site as the school’s maths resources website for both our students and students around the world.

We are a British international school located on the tropical island of Phuket in Southern Thailand. We offer a number of scholarships each year, catering for a number of national and international standard sports stars as well as for academic excellence.

There are a huge amount of resources to explore – especially for students doing their IAs and for students looking for revision videos. You may also like to try our school code breaking site – where you can compete with over 10,000 students from around the world who have made it onto our school leaderboard.

There’s a really great website been put together to help IB students with topic revision both for during the course and for the end of Year 12 school exams and Year 13 final exams. I would strongly recommend students use this as a resource during the course (not just for final revision in Y13!) There are specific resources for HL, SL and Studies students.

You choose your subject (HL/SL/Studies if your exam is in 2020 or Applications/Analysis if your exam is in 2021) and get the following screen:

The Questionbank takes you to a breakdown of each main subject area (e.g. Algebra, Calculus etc) and each area then has a number of graded questions like:

What I like about this is that you are given a difficulty rating, as well as a mark scheme and also a worked video tutorial. Really useful!

The Practice Examssection takes you to ready made exams on each topic – again with worked solutions. This also has some harder exams for those students aiming for 6s and 7s.

The Past IB Exams section takes you to full worked solutions to each full paper.

and lastly you can also get a prediction exam for the upcoming year.

For Studies students (exam in 2020) you can click here

For Analysis students and Applications students (exam in 2021) you can click here

You can also download the Mathematics Studies SL Formula booklet and the Standard Level Formula booklet from here if your teachers haven’t given you a copy.

I would really recommend everyone making use of this – there is a mixture of a lot of free content as well as premium content so have a look and see what you think.

Find the average distance between 2 points on a square

This is another excellent mathematical puzzle from the MindYourDecisions youtube channel. I like to try these without looking at the answer – and then to see how far I get. This one is pretty difficult (and the actual solution exceptionally difficult!) The problem is to take a square and randomly choose 2 points somewhere inside. If you calculate the distance between the 2 points, then do this trial approaching an infinite number of times what will the average distance be? Here is what I did.

Simplify the situation: 1×1 square

This is one of the most important strategies in tackling difficult maths problems. You simplify in order to gain an understanding of the underlying problem and possibly either develop strategies or notice patterns. So, I started with a unit square and only considered the vertices. We can then list all the possible lengths:

We can then find the average length by simply doing:

2×2 square

We can then follow the same method for a 2×2 square. This gives:

Which gives an average of:

Back to a 1×1 square

Now, we can imagine that we have a 1 x 1 square with dots at every 0.5. This is simply a scaled version of the 2×2 square, so we can divide our answer by 2 to give:

3×3 square

Following the same method we have:

This gives an average of:

Back to a 1×1 square

and if we imagine a 1×1 square with dots at every 1/3. This is simply a scaled version of the 3×3 square, so we can divide our answer by 3 to give:

We can then investigate what happens as we consider more and more dots inside our 1×1 square. When we have considered an infinite number then we will have our average distance – so we are looking the limit to infinity. This suggests using a graph. First I calculated a few more terms in the sequence:

Then I plotted this on Desmos. The points looked like they fit either an exponential or a reciprocal function – both which have asymptotes, so I tried both. The reciprocal function fit with an R squared value of 1. This is a perfect fit so I will use that.

This was plotted using the regression line:

And we can find the equation of the horizontal asymptote by seeing what happens when x approaches infinity. This will give a/c. Using the values provided by Desmos’ regression I got 0.515004887. Because I have been using approximate answers throughout I’ll take this as 0.52 (2sf). Therefore I predict that the average distance between 2 points in a 1×1 square will be approximately 0.52. And more generally, the average distance in an n x n square will be 0.52(n). This is somewhat surprising as a result – it’s not obvious why it would be a little over half the distance from 0 to 1.

Brute forcing using Python

We can also write a quick code to approximate this answer using Python (This is a Monte Carlo method). I generate 4 random numbers to represent the 2 x-coordinates and 2-y coordinates of 2 random points. I then work out the distance between them and repeat this 10 million times, then calculate the average distance. This gives:

Checking with the actual answer

Now for the moment of truth – and we watch the video to find out how accurate this is. The correct answer is indeed 0.52 (2sf) – which is great – our method worked! The exact answer is given by:

Our graphical answer is not quite accurate enough to 3 sf – probably because we relied on rounded values to plot our regression line. Our Python method with 10 million trials was accurate to 4 sf. Just to keep my computer on its toes I also calculated this with 100 million trials. This gave 0.5214126210834646 (now accurate to 5 sf).

We can also find the percentage error when using our graphical method. This is only:

Overall this is a decent result! If you are feeling extremely brave you might want to look at the video to see how to do this using calculus.

Extension: The average distance between 2 points in a unit circle

I modified the Python code slightly to now calculate the average distance between 2 points in a unit circle. This code is:

which returns an answer of 0.9054134561871364. I then looked up what the exact answer is. For the unit circle it is 128/(45 pi). This is approximately 0.9054147874. We can see that our computer method was accurate to 5 sf here. Again, the actual mathematical proof is extremely difficult.

Reflection

This is a nice example of important skills and techniques useful in mathematics – simplification of a problem, noticing patterns, graphical methods, computational power and perseverance!

This is a really beautiful solution to an interesting probability problem posed by fellow IB teacher Daniel Hwang, for which I’ve outlined a method for solving suggested by Ferenc Beleznay. The problem is as follows:

On average, how many random real numbers from 0 to 1 (inclusive) are required for the sum to exceed 1?

1 number

Clearly if we choose only 1 number then we can’t exceed 1.

2 numbers

Here we imagine the 2 numbers we pick as x and y and therefore we can represent them as a coordinate pair. The smallest pair (0,0) and the largest pair (1,1). This means that the possible coordinates fit inside the unit square shown above. We want to know for what coordinate pairs we have the inequality x + y > 1. This can be rearrange to give y > 1-x. The line y = 1-x is plotted and we can see that any coordinate points in the triangle BCD satisfy this inequality. Therefore the probability of a random coordinate pair being in this triangle is 1/2.

3 numbers

This time we want to find the probability that we exceed 1 with our third number. We can consider the numbers as x, y, z and therefore as 3D coordinates (x,y,z). From the fact that we are choosing a third number we must already have x +y <1. We draw the line x+y = 1, which in 3D gives us a plane. The volume in which our coordinate point must lie is the prism ABDEFG.

We now also add the constraint x+y+z >1. This creates the plane as shown. If our coordinate lies inside the pyramid ABDE then our coordinates will add to less than 1, outside this they will add to more than 1.

The volume of the pyramid ABDE = 1/3 (base area)(perpendicular height).

The volume of the prism ABDEFG = (base area)(perpendicular height).

Given that they share the same perpendicular height and base area then precisely 1/3 of the available volume would give a coordinate point that adds to less than 1, and 2/3 of the available volume would give a coordinate point that adds to more than 1.

Therefore we have the following tree diagram:

Exceeds 1 with 2 numbers = 1/2

Does not exceed 1 with 2 numbers, exceeds 1 with 3 numbers = 1/2 x 2/3 = 1/3.

Does not exceed 1 with 2 numbers, does not exceed 1 with 3 numbers = 1/2 x 1/3 = 1/6.

4 numbers

If you been following so far this is where things get interesting! We can now imagine a 4 dimensional unit cube (image above from Wikipedia) and a 4D coordinate point (x,y,z,a).

Luckily all we care about is the ratio of the 4-D pyramid and the 4-D prim formed by our constraints x+y+z <1 and x+y+z+a >1.

We have the following formula to help:

The n-D volume of a n-D pyramid = 1/n (base)(perpendicular height).

Therefore:

The 4-D volume of a 4-D pyramid = 1/4 (base 3D volume)(perpendicular height).

The 4-D volume of the prism ABDEFG = (base 3D volume)(perpendicular height).

Given that the 2 shapes share the same base and perpendicular height, the hyper-pyramid occupies exactly 1/4 of the 4-D space of the hyper-prism. So the probability of being in this space is 1/4 and 3/4 of being outside this space.

We can now extend our tree diagram:

Does not exceed 1 with 2 numbers, does not exceed 1 with 3 numbers, exceeds with 4 numbers = 1/2 x 1/3 x 3/4 = 1/8

Does not exceed 1 with 2 numbers, does not exceed 1 with 3 numbers, does not exceed with 4 numbers = 1/2 x 1/3 x 1/4 = 1/24.

In general a hyper-pyramid in n dimensional space occupies exactly 1/n of the space of the hyper-prism – so we can now continue this tree diagram.

Expected value

We can make a table of probabilities to find how many numbers we expect to use in order to exceed one.

Which gives us the following expected value calculation:

Which we can rewrite as:

But we have:

Therefore this gives:

So on average we would need to pick e numbers for the sum to exceed one! This is quite a remarkable result – e, one of the fundamental mathematical constants has appeared as if by magic on a probability question utilizing hyper-dimensional shapes.

Demonstrating this with Python

Running the Python code shown above will simulate doing this experiment. The computer generates a “random” number, then another and carries on until the sum is greater than 1. It then records how many numbers were required. It then does this again 1 million times and finds the average from all the trials.

1 million simulations gives 2.7177797177797176. When we compare this with the real answer for e, 2.7182818284590452353602874713527, we can see it has taken 1 million simulations to only be correct to 4sf.

Even 5 million simulations only gives 2.7182589436517888, so whilst we can clearly see that we will eventually get e, it’s converging very slowly. This may be because we are reliant on a random number generator which is not truly random (and only chooses numbers to a maximum number of decimal places rather than choosing from all values between 0 and 1).

I think this is a beautiful example of the unexpected nature of mathematics – we started out with a probability problem and ended up with e, via a detour into higher dimensional space! We can also see the power of computers in doing these kinds of brute force calculations.

Adapting and exploring maths challenge problems is an excellent way of finding ideas for IB maths explorations and extended essays. This problem is taken from the book: The first 25 years of the Superbrain challenges. I’m going to see how many different ways I can solve it.

The problem is to find all the integer solutions to the equation above. Finding only integer solutions is a fundamental part of number theory – a branch of mathematics that only deals with integers.

Method number 1: Brute force

This is a problem that computers can make short work of. Above I wrote a very simple Python program which checked all values of x and y between -99 and 99. This returned the only solution pairs as:

Clearly we have not proved these are the only solutions – but even by modifying the code to check more numbers, no more pairs were found.

Method number 2: Solving a linear equation

We can notice that the equation is linear in terms of y, and so rearrange to make y the subject.

We can then use either polynomial long division or the method of partial fractions to rewrite this. I’ll use partial fractions. The general form for this fraction can be written as follows:

Next I multiply by the denominator and the compare coefficients of terms.

This therefore gives:

I can now see that there will only be an integer solution for y when the denominator of the fraction is a factor of 6. This then gives (ignoring non integer solutions):

I can then substitute these back to find my y values, which give me the same 4 coordinate pairs as before:

Method number 3: Solving a quadratic equation

I start by making a quadratic in x:

I can then use the quadratic formula to find solutions:

Which I can simplify to give:

Next I can note that x will only be an integer solution if the expression inside the square root is a square number. Therefore I have:

Next I can solve a new quadratic as follows:

As before I notice that the expression inside my square root must be a square number. Now I can see that I need to find m and n such that I have 2 square numbers with a difference of 24. I can look at the first 13 square numbers to see that from the 12th and 13th square numbers onwards there will also be a difference of more than 24. Checking this list I can find that m = 1 and m = 5 will satisfy this equation.

This then gives:

which when I solve for integer solutions and then sub back into find x gives the same four solutions:

Method number 4: Graphical understanding

Without rearranging I could imagine this as a 3D problem by plotting the 2 equations:

This gives the following graph:

We can see that the plane intersects the curve in infinite places. I’ve marked A, B on the graph to illustrate 2 of the coordinate pairs which we have found. This is a nice visualization but doesn’t help find our coordinates, so lets switch to 2D.

In 2D we can use our rearranged equation:

This gives the following graph:

Here I have marked on the solution pairs that we found. The oblique asymptote (red) is y = 2x-1 because as x gets large the fraction gets very small and so the graph gets closer and closer to y = 2x -1.

All points on this curve are solutions to the equation – but we can see that the only integer solution pairs will be when x is small. When x is a large integer then the curve will be close to the asymptote and hence will return a number slightly bigger than an integer.

So, using this approach we would check all possible integer solutions when x is small, and again should be able to arrive at our coordinate pairs.

So, 4 different approaches that would be able to solve this problem. Can you find any others?

You can download all 17 of the Paper 3 questions for free here: [PDF].

The full typed mark scheme is available to download at the bottom of the page.

Seventeen IB Higher Level Paper 3 Practice Questions

With the new syllabus just started for IB Mathematics we currently don’t have many practice papers to properly prepare for the Paper 3 Higher Level exam. As a result I’ve put together 17 full investigation questions – each one designed to last around 1 hour, and totaling around 40 pages of questions and 600 marks worth of content. This has been specifically written for the Analysis and Approaches syllabus – though some parts would also be suitable for Applications.

Below I have split the questions into individual pdfs, with more detail about each one. For each investigation question I have combined several areas of the syllabus in order to create some level of discovery – and in many cases I have introduced some new mathematics (as will be the case on the real Paper 3).

Topics explored:

Paper 1: Rotating curves: [Individual question downloadhere. Mark-scheme downloadhere.]

Students explore the use of parametric and Cartesian equations to rotate a curve around the origin. You can see a tutorial video on this above. The mathematics used here is trigonometry (identities and triangles), functions and transformations.

Paper 12: Circumscribed and inscribed polygons [Individual question download here].

Students explore different methods for achieving an upper and lower bound for pi using circumscribed and inscribed polygons. You can see a video solution to this investigation above. The mathematics used here is trigonometry and calculus (differentiation and L’Hopital’s rule).

Paper 2: Who killed Mr. Potato? [Individual question download here.]

Students explore Newton’s Law of Cooling to predict when a potato was removed from an oven. The mathematics used here is logs laws, linear regression and solving differential equations.

Paper 3: Graphically understanding complex roots [Individual question download here.]

Students explore graphical methods for finding complex roots of quadratics and cubics. The mathematics used here is complex numbers (finding roots), the sum and product of roots, factor and remainder theorems, equations of tangents.

Paper 4: Avoiding a magical barrier [Individual question download here.]

Students explore a scenario that requires them to solve increasingly difficult optimization problems to find the best way of avoiding a barrier. The mathematics used here is creating equations, optimization and probability.

Paper 5 : Circle packing density [Individual question download here.]

Students explore different methods of filling a space with circles to find different circle packing densities. The mathematics used here is trigonometry and using equations of tangents to find intersection points.

Paper 6: A sliding ladder investigation [Individual question download here.]

Students find the general equation of the midpoint of a slipping ladder and calculate the length of the astroid formed. The mathematics used here is trigonometry and differentiation (including implicit differentiation). Students are introduced to the ideas of parametric equations.

Paper 7: Exploring the Si(x) function [Individual question download here.]

Students explore methods for approximating non-integrable functions and conclude by approximating pi squared. The mathematics used here is Maclaurin series, integration, summation notation, sketching graphs.

Paper 8: Volume optimization of a cuboid [Individual question download here.]

Students start with a simple volume optimization problem but extend this to a general case of an m by n rectangular paper folded to make an open box. The mathematics used here is optimization, graph sketching, extended binomial series, limits to infinity.

Paper 9: Exploring Riemann sums [Individual question download here.]

Students explore the use of Riemann sums to find upper and lower bounds of functions – finding both an approximation for pi and also for ln(1.1). The mathematics used here is integration, logs, differentiation and functions

Paper 10 : Optimisation of area [Individual question download here.]

Students start with a simple optimisation problem for a farmer’s field then generalise to regular shapes. The mathematics used here is trigonometry and calculus (differentiation and L’Hopital’s rule)

Paper 11: Quadruple Proof [Individual question download here.]

Students explore 4 different ways of proving the same geometrical relationship. The mathematics used here is trigonometry (identities) and complex numbers.

Paper 13: Using the binomial expansion for bounds of accuracy [Individual question download here.]

Students explore methods of achieving lower and upper bounds for and non-calculator methods for calculating logs. The mathematics used here is the extended binomial expansion for fractional and negative powers and integration.

Paper 14: Radioactive Decay [Individual question download here.]

Students explore discrete decay models, using probability density functions to investigate the decay of Carbon-14 and then explore the use of Euler’s method to approximate more complex decay chains. The mathematics used here is integration, probability density functions and Euler’s method of approximation

Paper 15: Probability generating functions [Individual question download here.]

Students explore the use of probability generating functions to find probabilities, expected values and variance for the binomial distribution and Poisson distribution for predicting the eruption of a volcano.

Paper 16: Finding the Steiner inellipse using complex numbers [Individual question download here]

Students use a beautiful relationship between complex numbers and an ellipse tangent to the midpoints of a triangle. This relationship allows you to find the equation of an ellipse from coordinate points of a triangle.

Paper 17: Elliptical curves [Individual question download here]

Students explore a method for adding points on an elliptical curve. This has links with elliptical curve cryptography.

Mark-scheme download

[If you don’t have a PayPal account you can just click on the relevant credit card icon]

IB HL Paper 3 Practice Questions and markscheme.

100 pages of preparatory questions with answers for the IB HL Analysis P3 exam. Please note this is not an automatic download and will be sent the same day.

$9.00

IB HL Paper 3 Practice Questions and markscheme AND Exploration Guide

All the Paper 3 questions and mark scheme AND the 63 page Exploration Guide. The Exploration Guide includes: Investigation essentials, Marking criteria guidance, 70 hand picked interesting topics, Useful websites for use in the exploration, A student checklist for top marks, Avoiding common student mistakes, A selection of detailed exploration ideas, Advice on using Geogebra, Desmos and Tracker. And more! Please note this is not an automatic download and will be sent the same day.

Using Desmos or Geogebra to design a picture or pattern is quite a nice exploration topic – but here’s an idea to make your investigation stand out from the crowd – how about converting your image to a 3D printed design?

Step 1

Create an image on Desmos or Geogebra. Remove the axes and grid pattern. This image is a pre-drawn image already on Desmos available here.

Step 2

Take a screen capture image of your picture (jpeg, gif, png). We need to convert this to a SVG file. You can convert these for free at sites like picsvg.

Step 3

Lastly we need to use a 3D editing site . You can join up with a site like Tinkercad for free.

Step 4

Making our 3D model. We import our SVG file and we get the image above. We can then resize this to whatever dimensions we wish – and also add 3D depth.

Lastly I would then save this file and send it to a 3D printer. You can see the finished file below:

So, if we printed this we’d get something like this:

3D printing the Eiffel Tower

Let’s use another Desmos art work. The Eiffel Tower above was a finalist in their annual art competition drawn by Jerry Yang from the USA.

This is then converted to the SVG file above.

And this is the result on Tinkercad when I add some depth and change the colour scheme. Let’s see what that would look like printed:

Pretty good- we’ve created a cheap tourist souvenir in about 5 minutes!

Mathematical art

I thought I’d have a go at making my own mathematical art. I started with using some polar coordinates to create this nice pattern:

Which then creates the following 3D shape:

This topic has a lot of scope for exploration and links with art, design technology and engineering. Thanks to our ever resourceful ICT wizz at school Jon for assistance, and also thanks for this excellent method which was posted by Ryan on Thingiverse. You can also explore huge numbers of ready made 3D templates on the site.

Euler’s Identity below is regarded as one of the most beautiful equations in mathematics as it combines five of the most important constants in mathematics:

I’m going to explore whether we can still see this relationship hold when we represent complex numbers as matrices.

Complex Numbers as Matrices

First I’m I’m going to define the following equivalences between the imaginary unit and the real unit and matrices:

The equivalence for 1 as the identity matrix should make sense insofar as in real numbers, 1 is the multiplicative identity. This means that 1 multiplied by any real number gives that number. In matrices, a matrix multiplied by the identity matrix also remains unchanged. The equivalence for the imaginary unit is not as intuitive, but let’s just check that operations with complex numbers still work with this new representation.

In complex numbers we have the following fundamental definition:

Does this still work with our new matrix equivalences?

Yes, we can see that the square of the imaginary unit gives us the negative of the multiplicative identity as required.

More generally we can note that as an extension of our definitions above we have:

Complex number multiplication

Let’s now test whether complex multiplication still works with matrices. I’ll choose to multiply the following 2 complex numbers:

Now let’s see what happens when we do the equivalent matrix multiplication:

We can see we get the same result. We can obviously prove this equivalence more generally (and check that other properties still hold) but for the purposes of this post I want to check whether the equivalence to Euler’s Identity still holds with matrices.

Euler’s Identity with matrices

If we define the imaginary unit and the real unit as the matrices above then the question is whether Euler’s Identity still holds, i.e:

First I can note that:

Next I can note that the Maclaurin expansion for e^(x) is:

Putting these ideas together I get:

This means that:

Next I can use the matrix multiplication to give the following:

Next, I look for a pattern in each of the matrix entries and see that:

Now, to begin with here I simply checked these on Wolfram Alpha – (these sums are closely related to the Macluarin series for cosine and sine).

Therefore we have:

So, this means I can write:

And so this finally gives:

Which is the result I wanted! Therefore we can see that Euler’s Identity still holds when we define complex numbers in terms of matrices. Complex numbers are an incredibly rich area to explore – and some of the most interesting aspects of complex numbers is there ability to “bridge” between different areas of mathematics.

This pattern of a Sierpinski triangle pictured above was generated by a simple iterative program. I made it by modifying the code previously used to plot the Barnsley Fern. You can run the code I used on repl.it. What we are seeing is the result of 30,000 iterations of a simple algorithm. The algorithm is as follows:

Transformation 1:

x_{i+1} = 0.5x_{i}

y_{i+1}= 0.5y_{i}

Transformation 2:

x_{i+1} = 0.5x_{i} + 0.5

y_{i+1}= 0.5y_{i}+0.5

Transformation 3:

x_{i+1} = 0.5x_{i} +1

y_{i+1}= 0.5y_{i}

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-3 and assign 1 for transformation 1, 2 for transformation 2, and 3 for transformation 3. Say I generate the number 2 – therefore I will apply transformation 2.

x_{i+1} = 0.5(0) + 0.5

y_{i+1}= 0.5(0)+0.5

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

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

x_{i+1} = 0.5(0.5) +1

y_{i+1}= 0.5(0.5)

and my new coordinate is (1.25, 0.25). I mark this on my graph and carry on again. The graph above was generated with 30,000 iterations.

Altering the algorithm

We can alter the algorithm so that we replace all the 0.5 coefficients of x and y with another number, a.

a = 0.3 has disconnected triangles:

When a = 0.7 we still have a triangle:

By a = 0.9 the triangle is starting to degenerate

By a = 0.99 we start to see the emergence of a line “tail”

By a = 0.999 we see the line dominate.

And when a = 1 we then get a straight line:

When a is greater than 1 the coordinates quickly become extremely large and so the scale required to plot points means the disconnected points are not visible.

If I alternatively alter transformations 2 and 3 so that I add b for transformation 2 and 2b for transformation 3 (rather than 0.5 and 1 respectively) then we can see we simply change the scale of the triangle.

When b = 10 we can see the triangle width is now 40 (we changed b from 0.5 to 10 and so made the triangle 20 times bigger in length):

Fractal mathematics

This triangle 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. Amazingly fractal patterns don’t fit into our usual understanding of 1 dimensional, 2 dimensional, 3 dimensional space. Fractals can instead be thought of as having fractional dimensions.

The Hausdorff dimension is a measure of the “roughness” or “crinkley-ness” of a fractal. It’s given by the formula:

D = log(N)/log(S)

For the Sierpinski triangle, doubling the size (i.e S = 2), creates 3 copies of itself (i.e N =3)

This gives:

D = log(3)/log(2)

Which gives a fractal dimension of about 1.59. This means it has a higher dimension than a line, but a lower dimension than a 2 dimensional shape.

Sphere packing problems are a maths problems which have been considered over many centuries – they concern the optimal way of packing spheres so that the wasted space is minimised. You can achieve an average packing density of around 74% when you stack many spheres together, but today I want to explore the packing density of 4 spheres (pictured above) enclosed in a pyramid.

Considering 2 dimensions

First I’m going to consider the 2D cross section of the base 3 spheres. Each sphere will have a radius of 1. I will choose A so that it is at the origin. Using some basic Pythagoras this will give the following coordinates:

Finding the centre

Next I will stack my single sphere on top of these 3, with the centre of this sphere directly in the middle. Therefore I need to find the coordinate of D. I can use the fact that ABC is an equilateral triangle and so:

3D coordinates

Next I can convert my 2D coordinates into 3D coordinates. I define the centre of the 3 base circles to have 0 height, therefore I can add z coordinates of 0. E will be the coordinate point with the same x and y coordinates as D, but with a height, a, which I don’t yet know:

In order to find a I do a quick sketch, seen below:

Here I can see that I can find the length AD using trig, and then the height DE (which is my a value) using Pythagoras:

Drawing spheres

The general equation for spheres with centre coordinate (a,b,c) and radius 1 is:

Therefore the equation of my spheres are:

Plotting these on Geogebra gives:

Drawing a pyramid

Next I want to try to draw a pyramid such that it encloses the spheres. This is quite difficult to do algebraically – so I’ll use some technology and a bit of trial and error.

First I look at creating a base for my pyramid. I’ll try and construct an equilateral triangle which is a tangent to the spheres:

This gives me an equilateral triangle with lengths 5.54. I can then find the coordinate points of F,G,H and plot them in 3D. I’ll choose point E so that it remains in the middle of the shape, and also has a height of 5.54 from the base. This gives the following:

As we can see, this pyramid does not enclose the spheres fully. So, let’s try again, this time making the base a little bit larger than the 3 spheres:

This gives me an equilateral triangle with lengths 6.6. Taking the height of the pyramid to also be 6.6 gives the following shape:

This time we can see that it fully encloses the spheres. So, let’s find the density of this packing. We have:

Therefore this gives:

and we also have:

Therefore the density of our packaging is:

Given our diagram this looks about right – we are only filling less than half of the available volume with our spheres.

We can see that this task has been attempted before using computational power – the table above shows the average density for a variety of 2D and 3D shapes. The pyramid here was found to have a density of 46% – so our result of 44% looks pretty close to what we should be able to achieve. We could tweak our measurements to see if we could improve this density.

So, a nice mixture of geometry, graphical software, and trial and error gives us a nice result. You could explore the densities for other 2D and 3D shapes and see how close you get to the results in the table.

We can use computer coding to explore game strategies and also to help understand the underlying probability distribution functions. Let’s start with a simple game where we toss a coin 4 times, stake 1 counter each toss and always call heads. This would give us a binomial distribution with 4 trials and the probability of success fixed as 1/2.

Tossing a coin 4 time [simple strategy]

For example the only way of losing 4 counters is a 4 coin streak of T,T,T,T. The probability of this happening is 1/16. We can see from this distribution that the most likely outcome is 0 (i.e no profit and no loss). If we work out the expected value, E(X) by multiplying profit/loss by frequencies and summing the result we get E(X) = 0. Therefore this is a fair game (we expect to neither make a profit nor a loss).

Tossing a coin 4 time [Martingale strategy]

This is a more complicated strategy which goes as follows:

1) You stake 1 counter on heads.
b) if you lose you stake 2 counters on heads
c) if you lose you stake 4 counters on heads
d) if you lose you stake 8 counters on heads.

If you win, the your next stake is always to go back to staking 1 counter.

For example for the sequence: H,H,T,T

First you bet 1 counter on heads. You win 1 counter
Next you bet 1 counter on heads. You win 1 counter
Next you bet 1 counters on heads. You lose 1 counter
Next you bet 2 counters on heads. You lose 2 counters

[overall loss is 1 counter]

For example for the sequence: T,T,T,H

First you bet 1 counter on heads. You lose 1 counter
Next you bet 2 counter on heads. You lose 2 counters
Next you bet 4 counters on heads. You lose 4 counter
Next you bet 8 counters on heads. You win 8 counters

[overall profit is 1 counter]

This leads to the following probabilities:

Once again we will have E(X) = 0, but a very different distribution to the simple 4 coin toss. We can see we have an 11/16 chance of making a profit after 4 coins – but the small chance of catastrophic loss (15 counters) means that the overall expectation is still zero.

Iterated Martingale:

Here we can do a computer simulation. This is the scenario this time:

We start with 100 counters, we toss a coin for a maximum of 3 times. We then define a completed round as when we get to a shaded box. We then repeat this process through 999 rounds, and model what happens. Here I used a Python program to simulate a player using this strategy.

We can see that we have periods of linear growth followed by steep falls – which is a very familiar pattern across many investment types. We can see that the initial starting 100 counters was built up to around 120 at the peak, but was closer to just 40 when we finished the simulation.

Let’s do another simulation to see what happens this time:

Here we can see that the 2nd player was actually performing significantly worse after around 600 rounds, but this time ended up with a finishing total of around 130 counters.

Changing the multiplier

We can also see what happens when rather than doubling stakes on losses we follow some other multiple. For example we might choose to multiply our stake by 5. This leads to much greater volatility as we can see below:

Multiplier x5

Here we have 2 very different outcomes for 2 players using the same model. Player 1 (in blue) may believe they have found a sure-fire method of making huge profits, but player 2 (green) went bankrupt after around 600 rounds.

Multiplier x1.11

Here we can see that if the multiplier is close to 1 we have much less volatility (as you would expect because your maximum losses per round are much smaller).

We can run the simulation across 5000 rounds – and here we can see that we have big winning and losing streaks, but that over the long run the account value oscillates around the starting value of 100 counters.

Forex charts

We can see similar graphs when we look at forex (currency exchange) charts. For example:

In this graph (from here) we plot the exchange between US dollar and Thai Baht. We can see the same sort of graph movements – with run of gains and losses leading to a similar jagged shape. This is not surprising as forex trades can also be thought of in terms of 2 binary outcomes like tossing a coin, and indeed huge amounts of forex trading is done through computer programs, some of which do use the Martingale system as a basis.

The effect of commission on the model

So, to finish off we can modify our system slightly so that we try to replicate forex trading. We will follow the same model as before, but this time we have to pay a very small commission for every trade we make. This now gives us:

E(X) = -0.000175. (0.0001 counters commission per trade)

E(X) = -0.00035. (0.0002 counters commission per trade)

Even though E(X) is very slightly negative, it means that in the long run we would expect to lose money. With the 0.0002 counters commission we would expect to lose around 20 counters over 50,000 rounds. The simulation graph above was run with 0.0002 counters commission – and in this case it led to bankruptcy before 3000 rounds.

Computer code

The Python code above can be used to generate data which can then be copied into Desmos. The above code simulates 1 player playing 999 rounds, starting with 100 counters, with a multiplier of 5. If you know a little bit about coding you can try and play with this yourselves!

I’ve also just added a version of this code onto repl. You can run this code – and also generate the graph direct (click on the graph png after running). It creates some beautiful images like that shown above.

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:

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

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^{-11}m^{3}kg^{-1}s^{-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:

To work through an example:

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:

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

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

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

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

This is our time dependent version of gravity.

Finding alpha

We can separate variables to solve equation (3).

Substitution

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

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:

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:

Substituting these into our equation (2) gives us:

We can then solve this to give:

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.

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

Website Stats

7,712,136 views

IB Maths Exploration Guide

IB Maths Exploration Guide

A comprehensive 63 page pdf guide to help you get excellent marks on your maths investigation. Includes:

Full revision notes for both SL Analysis (60 pages) and HL Analysis (112 pages). Beautifully written by an experienced IB Mathematics teacher, and of an exceptionally high quality. Fully updated for the new syllabus. A must for all Analysis students!

Seventeen full investigation questions – each one designed to last around 1 hour, and totaling around 40 pages and 600 marks worth of content. There is also a fully typed up mark scheme. Together this is around 120 pages of content.

A 60 page pdf guide full of advice to help with modelling and statistics explorations – focusing in on non-calculator methods in order to show good understanding. Includes:

Pearson’s Product: Height and arm span

How to calculate standard deviation by hand

Binomial investigation: ESP powers

Paired t tests and 2 sample t tests: Reaction times