Senior Mentoring – Solving equations in integers

At school, we learn how to solve equations like 4x+3=-5. Sometimes the answer is an integer (that is, a whole number), sometimes it isn’t. If we change that -5 to a -6, the solution to the equation above won’t be an integer any more. What is more, if we change the 5 to \sqrt{5}, the solution won’t even be rational (that is, a normal fraction that looks like \frac{p}{q}). But, the key point is that in the introduction to the chapter on linear equations, or whatever they call it, in a textbook, there will be an explanation of how to solve this generic class of problems, which will work whether the numbers in the equation are integers, fractions, or even complex numbers!

Later, we move on to quadratic equations. Spotting factorisations is a good way to get started, then you could learn the quadratic formula to use in those cases where the factors are harder to spot. Alternatively, there’s the method of ‘completing the square’, which takes more steps, but means you can do the arithmetic in clear stages. Then, if you think about why the quadratic formula works, you realise that you are just completing the square for all quadratics (using a, b, c in place of any numerical coefficients). In other words, though there are a few different ways of approaching the problem, the sensible methods are essentially the same. And then you might get problems about logarithms or matrices for which you use your new knowledge about these objects to turn the question into a quadratic equation, say. At all times, there’s an implicit assumption that any question can be turned into an equation which you ‘know how to solve’.

So when you first come across a problem which asks you to find integer solutions to an equation, as have appeared a few times on this year’s Senior Mentoring scheme, it is hard to know where to start. You could try to solve it as if it wasn’t about integers, then select the integer solutions at the end. But this could be difficult, or might not even make sense. You might have a condition that x is odd: what does this mean if x isn’t even an integer? You also often start making sensible-looking substitutions: x is odd, so write x=2n+1 for some n which is also an integer, then work with n. But this can sometimes cause you to end with a huge number of variables which you can’t really relate to, and horribly complicated expressions.

As with so much of maths, experience is very useful. If you’ve seen solutions to twenty moderately tricky integer equations, you’ll have more ideas about how to think about starting another problem. So here are a few tricks that might come in handy.

Smallest solution: Are you stuck trying to prove there aren’t any solutions? Do all your substitutions just give more complicated versions of the original equation? What about considering the smallest solution? You might have to be careful about what you mean by ‘small’, but suppose you consider the smallest solution x, and end up finding a smaller solution x'<x. What could this mean? Well it can only mean that there isn’t a smallest solution! In other words, there are no solutions. You should think about why the fact that we are working with integers means that if there is any solution there must be a smallest one. Then see if you can find all solutions in positive (>0) integers to x^2-2y^2=0.

Divisibility: You can get a lot of information from looking at divisors. Which integers divide 64? What integers divide p^2 where p is a prime. And this applies whether the factors are integers, or algebraic expressions.

Modulo Arithmetic: Are there solutions in integers to 4x+3=2y^2-16? Look at the equation carefully. The left hand side is always odd, while the right hand side is always even. So no, there can’t be any solutions. This idea works in more complicated situations too. ‘Odd’ or ‘even’ tells us what the remainder is when we divide by 2. But we can also consider the remainders when we divide by other integers. This is called modulo arithmetic (or clock arithmetic), and has lots of nice properties, like the fact that it is easy to calculate remainders under multiplication. For example, how would you go about finding the remainder when 10^100 is divided by 7? Do you need to perform an enormous long division, or can you take some shortcuts? I will write a bit more about modulo arithmetic at another time, but an excellent example is to take the squares 1,4,9,16,… and look at the remainders obtained when we divide these by 4. Is this useful? Try to find all solutions to 2^x+7=y^2.

Sandwiching: Integer equations often involve squares and we’ll be trying to show that there aren’t many solutions apart from perhaps a few small ones. It can be good to consider how close together squares can be. Which perfect squares are next to n^2? So how many solutions are there to x^2+x=y^2? And you can make similar deductions for powers of two for example. If I tell you that I have two powers of two and their difference is 8, you can probably tell me what they are.

To put some of the ideas into practice, let’s try two problems from this year’s sheet.

Find all solutions to \binom{n}{r}=120.

  • We have a look at Pascal’s triangle, and suspect that there won’t be too many solutions. For example, if n>120, there certainly aren’t any solutions, but that is still a lot to check. You could check by looking at n, but why not consider r?
  • We know n\geq r is a necessary condition. But can we do better? Remember that \binom{n}{r}=\binom{n}{n-r}, so the solutions will by and large come in pairs, with the same n, but values of r reflected in n/2. So we may assume that r\leq \frac{n}{2}. Suddenly this is quite a useful bound.
  • For example, if r=5,n\geq 10, therefore \binom{n}{r}\geq \binom{10}{5}>120, and similarly for larger r. So we only need to check r=1,2,3,4.
  • For each of these cases, it is not too hard to find all the suitable n. Then, remembering that we need the symmetric copies too, the solutions are: (n,r)=(120,1), (120,119), (16,2), (16,14), (10,3), (10,7),.

Find all solutions to 3^m=2^n+1.

  • Note the solution (m,n)=(1,1). For larger n, the power of two is divisible by 4. Checking modulo 4, we realise that we need m to be even. But then 3^m-1=(3^{m/2})^2-1 is a difference of two squares. Write a=m/2.
  • So 2^n=(3^a+1)(3^a-1). Is this progress? What can we say about the two factors on the right hand side?
  • They need to be powers of two, since the only divisors of a power of two are other powers of two. (Why?) But what is the relationship between the factors, and how does this enable us to identify all the solutions to the problem?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s