IB Maths and GCSE Maths Resources from British International School Phuket. Theory of Knowledge (ToK). Maths explorations and investigations.  Real life maths. Maths careers. Maths videos. Maths puzzles and Maths lesson resources.

Screen Shot 2015-01-25 at 8.08.14 PM

British International School Phuket

Welcome to the British International School Phuket’s maths website. My name is Andrew Chambers and I am currently working at BISP.  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. You can find out more about our school here.

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.

 

Screen Shot 2018-03-19 at 4.35.19 PM

IB Revision with Revision Village

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:

Screen Shot 2018-03-19 at 4.40.40 PM.png

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:

Screen Shot 2018-03-19 at 4.42.05 PM.png

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 Exams section 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.

Screen Shot 2018-03-19 at 4.46.36 PM

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 HL students (exam in 2020) you can click here

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

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.

Screen Shot 2020-04-06 at 1.11.43 PM

Envelope of projectile motion

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

Finding the equation of an envelope for projectile motion 

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

Screen Shot 2020-04-06 at 1.17.08 PM

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

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

Screen Shot 2020-04-06 at 1.19.11 PM

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

Screen Shot 2020-04-06 at 1.19.48 PM

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

Therefore we can rearrange our equation for y to give:

Screen Shot 2020-04-06 at 1.22.47 PM

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

Screen Shot 2020-04-06 at 1.26.52 PM

 

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

Screen Shot 2020-04-06 at 1.28.17 PM

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

Screen Shot 2020-04-06 at 1.22.47 PM

Screen Shot 2020-04-06 at 1.29.40 PM

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

Screen Shot 2020-04-06 at 1.31.09 PM

Therefore we can simplify as follows:

Screen Shot 2020-04-06 at 1.31.57 PM

and so:

Screen Shot 2020-04-06 at 1.33.08 PM

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

Screen Shot 2020-04-06 at 1.36.00 PM

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

Screen Shot 2020-04-06 at 1.37.50 PM

This gives the following graph:

Screen Shot 2020-04-06 at 1.11.43 PM

 

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

Screen Shot 2020-04-06 at 1.40.29 PM

Screen Shot 2020-04-06 at 1.45.10 PM

 

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

Screen Shot 2020-04-06 at 1.51.18 PM

 

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

Other ideas for projectile motion

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

Screen Shot 2020-04-06 at 3.25.43 PM

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

Screen Shot 2020-04-06 at 8.34.58 PM

See if you can find the equation of this ellipse!

Classical Geometry Puzzle: Finding the Radius

This is another look at a puzzle from Mind Your Decisions.  The problem is to find the radius of the following circle:

We are told that line AD and BC are perpendicular and the lengths of some parts of chords, but not much more!  First I’ll look at my attempt to solve this.  It’s not quite as “nice” as the solution in the video as it requires the use of a calculator, but it still does the job.

Method 1, extra construction lines:

These are the extra construction lines required to solve this problem.  Here is the step by step thought process:

  1. Find the hypotenuse of triangle AGC.
  2. Use the circle theorem angles in the same segment are equal to show that angle CBD = angle CAG.
  3. Therefore triangle AGC and GBD are similar, so length BG = 4.  We can now use Pythagoras to find length BD.
  4. We can find length CD by Pythagoras.
  5. Now we have 3 sides of a triangle, CDB.  This allows use to find angle BDC using the cosine rule.
  6. Now we the circle theorem angles in the same segment are equal to show that angle BDC = angle BEC.
  7. Now we use the circle theorem angles in a semi circle are 90 degrees to show ECB = 90.
  8. Now we have a right angled triangle BCE where we know both an angle and a side, so can use trigonometry to find the length of BE.
  9. Therefore the radius is approximately 4.03.

Method 2, creating a coordinate system

This is a really beautiful solution – which does not require a calculator (and which is discussed in the video above).  We start by creating a coordinate system based around point G at (0,0).  Because we have perpendicular lines we can therefore create coordinates for A, B and C.  We also mark the centre of the circle as (p,q).

First we start with the equation of a circle centre (p.q):

Next we create 3 equations by substituting in our coordinates:


Next we can do equation (3) – equation (1) to give:

Next we can substitute this value for p into equations (1) and (3) and equate to get:

Lastly we can substitute both values for p and q into equation (1) to find r:

We get the same answer as before – though this definitely feels like a “cleaner” solution.  There are other ways to solve this – but some of these require the use of equations you may not already know (such as the law of sines in a circumcircle, or the equation for perpendicular chords and radius).  Perhaps explore any other methods for solving this – what are the relative merits of each approach?

Further investigation of the Mordell Equation

This post carries on from the previous post on the Mordell Equation – so make sure you read that one first – otherwise this may not make much sense.  The man pictured above (cite: Wikipedia) is Louis Mordell who studied the equations we are looking at today (and which now bear his name).

In the previous post I looked at solutions to the difference between a cube and a square giving an answer of 2.  This time I’ll try to generalise to the difference between a cube and a square giving an answer of k.  I’ll start with the same method as from the previous post:

In the last 2 lines we outline the 2 possibilities, either b = 1 or b = -1.  First let’s see what happens when b = 1:

This will only provide an integer solution for a if we have:

Which generates the following first few values for k when we run through m = 1, 2,3..:

k = 2, 11, 26, 47

We follow the same method for b = -1 and get the following:

Which generates the following first few values for k when we run through m = 1, 2,3…:

k = 4, 13, 28, 49

These are the values of k which we will be able to generate solutions to. Following the same method as in the previous post this generates the following solutions:

Let’s illustrate one of these results graphically.  If we take the solutions for k = 13, which are (17,70) and (17,-70), these points should be on the curve x cubed – y squared = 13.

This is indeed the case.  This graph also demonstrates how all solutions to these curves will have symmetrical solutions (e, f) and (e, -f).

We can run a quick computer program to show that this method does not find all the solutions for the given values of k, but it does ensure solutions will be found for the k values in these lists.

In the code solutions above, results are listed k, x, y, x cubed, y squared.  We can see for example that in the case of k = 11 our method did not find the solution x = 3 and y = 4 (though we found x = 15 and y = 58).  So, using this method we now have a way of finding some solutions for some values of k – we’ve not cracked the general case, but we have at least made a start!

 

The Mordell Equation [Fermat’s proof]

Let’s have a look at a special case of the Mordell Equation, which looks at the difference between an integer cube and an integer square.  In this case we want to find all the integers x,y such that the difference between the cube and the square gives 2.  These sorts of problems are called Diophantine problems and have been studied by mathematicians for around 2000 years.  We want to find integer solution to:

First we can rearrange and factorise, using the property of imaginary numbers.

Next we define alpha and beta such that:

For completeness we can say that alpha and beta are part of an algebraic number field:

Next we use an extension of the Coprime Power Trick, which ensures that the following 2 equations have solutions (if our original equation also has a solution). Therefore we define:

We can then substitute our definition for alpha into the first equation directly above and expand:

Next we equate real and imaginary coefficients to give:

This last equation therefore requires that either one of the following equations must be true:

If we take the case when b = 1 we get:

Therefore:

If we take the case when b = -1 we get

Therefore our solution set is (a,b): (1,1), (1,-1), (-1,1), (-1,-1.  We substitute these possible answers into our definition for y to give the following:

We can then substitute these 2 values for y into the definition for x to get:

These therefore are the only solutions to our original equation.  We can check they both work:

We can see this result illustrated graphically by plotting the graph:

and then seeing that we have our integer solutions (3,5) and (3,-5) as coordinate on this curve.

This curve also clearly illustrates why we have a symmetrical set of solutions, as our graph is symmetrical about the x axis.

This particular proof was first derived by Fermat (of Fermat’s Last Theorem fame) in the 1600s and is an elegant example of a proof in number theory.  You can read more about the Mordell Equation in this paper (the proof above is based on that given in the paper, but there is a small mistake in factorization so that y = 7 and y = -7 is erroneously obtained)

 

Can you solve Oxford University’s Interview Question?

The excellent Youtube channel Mind Your Decisions is a gold mine for potential IB maths exploration topics.  I’m going to follow through my own approach to problem posed in the video. The problem is to be able to trace the movement of the midpoint of a ladder as it slides down a wall.  This has apparently been used as an Oxford interview question to test the ability to investigate novel problems.

Specific case

It’s normally a good idea to start with a specific case with some nice numbers, to see what happens.  So, I’ll choose a 3,4,5 triangle, where the ladder has a fixed length of 5 and has endpoints with coordinates (0,4) and (3,0).  The midpoint is given by ((0+3)/2, (4+0)/2) = (1.5, 2).

Next I imagine what would happen to the point (3,0) if the ladder slipped down the wall.  (3,0) would become (3+t,0) where t is a parameter.  Given that the length is fixed as 5, I can now find the new height of the ladder up the wall using Pythagoras:

The new height is given by:

Therefore the new midpoint is given by:

We can now define our curve parametrically:

Therefore we can make t the subject in the first equation to get an equation just in terms of x and y.

Therefore we can rearrange to get:

This is the equation of a circle centred at (0,0) with radius 2.5:

This graph therefore traces the movement of the midpoint of the ladder (note that when the ladder was vertical against the wall the midpoint would be 2.5 high hence the graph starts at (0,2.5).

The general case

Now we have worked through the maths for a specific case, the general case isn’t too much extra work.  For a triangle with base a and height b we would have the following midpoint coordinates:

This would lead to the following equation:

Which would rearrange to give the equation of the circle:

This is a circle centered at (0,0) with radius:

Another approach

This method is an alternative to the version above – this time using trigonometry.  We start with the triangle below:

 

and then let the ladder slide to get the following (as the angle will get smaller t will be negative):

We can then define the midpoint coordinates as:

We can then rearrange and square both sides to get the following:

 

We can then use the trig identity for cosine squared theta + sine squared theta = 1:

Which rearranges to give the same result as before:

So, there we go – we’ve passed an Oxford interview question with a couple of different methods!  The approach of first exploring the topic with a simple case is often a good starting point for these sorts of problems – as it allows you to gain an understanding of what is happening without getting too bogged down with variables.  You can watch the video for a quicker solution – are there any other ways of approaching this problem you can find?  How could this problem be modified?

 

 

 

wuhan flu

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

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

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

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

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

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

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

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

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

SIR Model

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

ebola6

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

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

ebola

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

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

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

Modelling for COVID-19

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

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

β the transmission rate as approximately 1.07

Therefore our 3 equations for rates of change become:

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

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

dR/dt = 5/18 I

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

wuhan flu

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

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

Screen Shot 2020-01-29 at 6.18.48 AM

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

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

[Edited in March to use the newly designated name COVID-19]

Square Triangular Numbers

Square triangular numbers are numbers which are both square numbers and also triangular numbers – i.e they can be arranged in a square or a triangle.  The picture above (source: wikipedia) shows that 36 is both a square number and also a triangular number.  The question is how many other square triangular numbers we can find?

The equation we are trying to solve is:

a2 = 0.5(b2+b)

for some a, b as positive integers. The LHS is the formula to generate square numbers and the RHS is the formula to generate the triangular numbers.

We can start with some simple Python code (which you can run here):

for c in range(1,10001):
 for d in range(1,10001):
  if c**2 == (d**2+d)/2:
   print(c**2, c,d)

This checks the first 10000 square numbers and the first 10000 triangular numbers and returns the following:

1 1 1
36 6 8
1225 35 49
41616 204 288
1413721 1189 1681
48024900 6930 9800

i.e 1225 is the next square triangular number after 36, and can be formed as 352 or as 0.5(492+49). We can see that there are very few square triangular numbers to be found in the first 50 million numbers. The largest we found was 48,024,900 which is made by 69302 or as 0.5(98002+9800).

We can notice that the ratio between each consecutive pair of square triangular numbers looks like it converges as it gives:

36/1 = 36
1225/36 = 34.027778
41616/1225 = 33.972245
1413721/41616 = 33.970612
48024900/1413721 = 33.970564

So, let’s use this to predict that the next square triangular number will be around

48024900 x 33.9706 = 1,631,434,668.

If we square root this answer we get approximately 40391
If we solve 0.5(b2+b) = 1,631,434,668 using Wolfram we get approximately 57120.

Therefore let’s amend our code to look in this region:

for c in range(40380,40400):
 for d in range(57100,57130):
  if c**2 == (d**2+d)/2:
   print(c**2, c,d)

This very quickly finds the next solution as:

1631432881 40391 57121

This is indeed 403912 – so our approximation was very accurate. We can see that this also gives a ratio of 1631432881/48024900 = 33.97056279 which we can then use to predict that the next term will be 33.970563 x 1631432881 = 55,420,693,460. Square rooting this gives a prediction that we will use the 235,416 square number. 235,4162 gives 55,420,693,056 (using Wolfram Alpha) and this is indeed the next square triangular number.

So, using a mixture of computer code and some pattern exploration we have found a method for finding the next square triangular numbers. Clearly we will quickly get some very large numbers – but as long as we have the computational power, this method should continue to work.

Using number theory

The ever industrious Euler actually found a formula for square triangular numbers in 1778 – a very long time before computers and calculators, so let’s have a look at his method:

We start with the initial problem, and our initial goal is to rearrange it into the following form:

Next we make a substitution:

Here, when we get to the equation 1 = x2 – 2y2 we have arrived at a Pell Equation (hence the rearrangement to get to this point).  This particular Pell Equation has the solution quoted above where we can define Pk  as

 

Therefore we have

Therefore for any given k we can find the kth square triangular number.  The a value will give us the square number required and the b value will give us the triangular number required.  For example with k = 3:

This tells us the 3rd square triangular number is the 35th square number or the 49th triangular number.  Both these give us an answer of 1225 – which checking back from our table is the correct answer.

So, we have arrived at 2 possible methods for finding the square triangular numbers – one using modern computational power, and one using the skills of 18th century number theory.

Rational Approximations to Irrational Numbers

This year two mathematicians (James Maynard and Dimitris Koukoulopoulos) managed to prove a long-standing Number Theory problem called the Duffin Schaeffer Conjecture.  The problem is concerned with the ability to obtain rational approximations to irrational numbers.  For example, a rational approximation to pi is 22/7.  This gives 3.142857 and therefore approximates pi to 2 decimal places.  You can find ever more accurate rational approximations and the conjecture looks at how efficiently we can form these approximation, and to within what error bound.

Finding Rational Approximations for  pi

The general form of the inequality I want to solve is as follows:

Here alpha is an irrational number, p/q is the rational approximation, and f(q)/q can be thought of as the error bound that I need to keep my approximation within.

If I take f(q) = 1/q then I will get the following error bound:

So, the question is, can I find some values of q (where p and q are integers) such that the error bound is less than 1/(q squared)?

Let’s see if we can solve this for when our irrational number is pi, and when we choose q = 6.

We can see that this returns a rational approximation, 19/6 which only 0.02507… away from  pi. This is indeed a smaller error than 1/36.  We won’t be able to find such solutions to our inequality for every value of q that we choose, but we will be able to find an infinite number of solutions, each getting progressively better at approximating pi.

The General Case (Duffin Schaeffer Conjecture)

The general case of this problem states that there will be infinite solutions to the inequality for any given irrational number alpha if and only if the following condition holds:

For:

We will have infinitely many solutions (with p and q as integers in their lowest terms) if and only if:

Here the new symbol represents the Euler totient.  You can read about this at the link if you’re interested, but for the purposes of the post we can transform into something else shortly!

Does f(q) = 1/q provide infinite solutions?

When f(q) = 1/q we have:

Therefore we need to investigate the following sum to infinity:

Now we can make use of an equivalence, which shows that:

 

Where the new symbol on the right is the Zeta function.  The Zeta function is defined as:

So, in our case we have s = 2.  This gives:

But we know the limit of both the top and the bottom sum to infinity.  The top limit is called the Harmonic series, and diverges to infinity. Therefore:

Whereas the bottom limit is a p-series with p=2, this is known to converge. In fact we have:

Therefore because we have a divergent series divided by a convergent one, we will have the following result:

This shows that our error bound 1/(q squared) will be satisfied by infinitely many values of q for any given irrational number.

Does f(q) = 1/(q squared) provide infinite solutions?

With f(q) = 1/(q squared) we follow the same method to get:

But this time we have:

Therefore we have a convergent series divided by a convergent series which means:

So we can conclude that f(q) = 1/(q squared) which generated an error bound of 1/(q cubed) was too ambitious as an error bound – i.e there will not be infinite solutions in p and q for a given irrational number.  There may be solutions out there but they will be rare.

Understanding mathematicians 

You can watch the Numberphile video where James Maynard talks through the background of his investigation and also get an idea what a mathematician feels like when they solve a problem like this!

When do 2 squares equal 2 cubes?

Following on from the hollow square investigation this time I will investigate what numbers can be written as both the sum of 2 squares, 2 cubes and 2 powers of 4. i.e a2+b2 = c3+d3 = e4+f4.

Geometrically we can think of this as trying to find an array of balls such that we can arrange them into 2 squares, or we can rearrange them and stack them to form 2 cubes, or indeed we can arrange them into 2 4-dimensional cubes. I’ll add the constraints that all of a,b,c,d,e,f should be greater than 1 and that the pair of squares or cubes (etc) must be distinct. Therefore we can’t for example have 2 squares the same size.

Infinite solutions

Let’s look at why we can easily find infinite solutions if the squares or cubes (etc) can be the same size.

We want to find solutions to:
a2+b2 = c3+d3 = e4+f4.

so we look at the powers 2,3,4 which have LCM of 12. Therefore if we choose powers with the same base we can find a solution. For example we chose to work with base 2. Therefore we choose

a = 26, b = 26, which gives 212+212
c = 24, d = 24, which gives 212+212
e = 23, f = 23, which gives 212+212

Clearly these will be the same. So we can choose any base we wish, and make the powers into the same multiples of 12 to find infinite solutions.

Writing some code

Here is some code that will find some other solutions:


list1=[]
for a in range(2, 200):
 for b in range(2,200):
  list1.append(a**2+b**2)

list2=[]
for j in list1:
 for c in range(2,200):
  for d in range(2,200):
   if c**3+d**3 == j:
    list2.append(c**3+d**3)
print(list2)

for k in list2:
 for e in range(2,200):
  for f in range(2,200):
   if k == e**4+f**4:
    print(k,e,f)

This returns the following solutions: 8192, 18737, 76832. Of these we reject the first as this is the solution 212+212 which we found earlier and which uses repeated values for the squares, cubes and powers of 4. The 3rd solution we also reject as this is formed by 14 4 + 14 4. Therefore the only solution up to 79202 (we checked every value up to and including 1992 + 1992) is:

18737 = 642+1212 = 173+243 = 114+84.

Therefore if we had 18,737 balls we could arrange them into 2 squares, a 64×64 square and a 121×121 square. Alternatively we could rearrange them into 2 cubes, one 17x17x17 and one 24x24x24. Or we could enter a higher dimensional space and create 2 tesseracts one with sides 11x11x11x11 and the other with 14x14x14x14.

With only 1 solution for around the first 80,000 numbers it looks like these numbers are quite rare – could you find another one? And could you find one that also satisfies g5+h5?

Hollow Cubes investigation

Hollow cubes like the picture above [reference] are an extension of the hollow squares investigation done previously.  This time we can imagine a 3 dimensional stack of soldiers, and so try to work out which numbers of soldiers can be arranged into hollow cubes.

Therefore what we need to find is what numbers can be formed from a3-b3

Python code

We can write some Python3 code to find this out (this can be run here):


for k in range(1,200):

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

This gives the following: (the first number is the number of soldiers and the 2 subsequent numbers are the 2 cubes).

1 1 0
7 2 1
8 2 0
19 3 2
26 3 1
27 3 0
37 4 3
56 4 2
61 5 4
63 4 1
64 4 0
91 6 5
98 5 3
117 5 2
124 5 1
125 5 0
127 7 6
152 6 4
169 8 7
189 6 3

We could perhaps investigate any patterns in these numbers, or explore how we can predict when a hollow cube has more than one solution. I’ll investigate which numbers can be written as both a hollow square and also a hollow cube.

Hollow squares and hollow cubes

list1=[]
for a in range(2, 50):
 for b in range(2,50):
  if a**2-b**2 !=0:
   if a**2-b**2 > 0:
    list1.append(a**2-b**2)

list2=[]
for j in list1:
 for c in range(2,50):
  for d in range(2,50):
   if c**3-d**3 == j:
    list2.append(c**3-d**3)
print(list2)

This returns the following numbers which can all be written as both hollow squares and hollow cubes.

[56, 91, 19, 117, 189, 56, 208, 189, 217, 37, 279, 152, 117, 448, 513, 504, 448, 504, 387, 665, 504, 208, 875, 819, 936, 817, 61, 999, 988, 448, 728, 513, 189, 1216, 936, 784, 335, 469, 1323, 819, 1512, 1352, 1197, 992, 296, 152, 1519, 1512, 1197, 657, 1664, 1323, 1647, 1736, 1701, 1664, 936, 504, 2107, 1387, 1216, 1027, 91, 2015, 279, 2232]

Hollow squares, cubes and hypercubes

Taking this further, can we find any number which can be written as a hollow square, hollow cube and hollow hypercube (4 dimensional cube)? This would require our soldiers to be able to be stretch out into a 4th dimensional space – but let’s see if it’s theoretically possible.

Here’s the extra code to type:

list1=[]
for a in range(2, 200):
 for b in range(2,200):
  if a**2-b**2 !=0:
   if a**2-b**2 > 0:
    list1.append(a**2-b**2)

list2=[]
for j in list1:
 for c in range(2,200):
  for d in range(2,200):
   if c**3-d**3 == j:
    list2.append(c**3-d**3)
print(list2)

for k in list2:
 for e in range(2,200):
  for f in range(2,200):
   if k == e**4-f**4:
    print(k)

Very pleasingly this does indeed find some solutions:

9919: Which can be formed as either 1002-92 or 223-93 or 104-34.

14625: Which can be formed as either 1212-42 or 253-103 or 114-24.

Given that these took some time to find, I think it’ll require a lot of computer power (or a better designed code) to find any number which is a hollow square, hollow cube, hollow hypercube and hollow 5-dimensional cube, but I would expect that there is a number out there that satisfies all criteria. Maybe you can find it?

Website Stats

  • 6,925,845 views

Recent Posts

Follow IB Maths Resources from British International School Phuket on WordPress.com