Chapter

Diophantine Equations I: Factorisation and Bounds

The module teaches first olympiad-style Diophantine equations: linear equations, completing a product, difference of squares, reciprocal equations, modular obstructions, and bounds.
Log in to track solved progress and bookmarks.

Theory

Key Idea

A Diophantine equation is an equation in which integer or positive integer solutions are required. One cannot simply solve over the real numbers and ignore the integer condition: every transformation must preserve integrality.

The main idea of this first module is to turn the equation into a form where divisibility, factors, residues, or bounds become visible. Often we should not expand; instead, we add the missing term and obtain a product.

Basic Facts

  • The linear equation \(ax+by=c\) has integer solutions if and only if \(\gcd(a,b)\mid c\).
  • If \(x_0,y_0\) is one solution of \(ax+by=c\), then all solutions are \(x=x_0+\frac{b}{d}t\), \(y=y_0-\frac{a}{d}t\), where \(d=\gcd(a,b)\) and \(t\in\mathbb Z\).
  • An equation of the form \(xy+ax+by=c\) is often solved by adding \(ab\): \((x+b)(y+a)=c+ab\).
  • The equation \(x^2-y^2=n\) becomes \((x-y)(x+y)=n\). The two factors must have the same parity.
  • If the right-hand side is small and the variables are positive, use bounds: a product grows faster than a sum.
  • If an expression cannot have the required residue modulo \(m\), then there are no solutions.

When to Use This Method

  • The problem asks for integer or positive integer solutions.
  • The equation contains a product \(xy\), a sum \(x+y\), a difference of squares, or a fraction such as \(\frac{1}{x}+\frac{1}{y}\).
  • You need to prove that there are no solutions, and parity or quadratic residues are visible.
  • The number of possible values can be sharply limited by an inequality.
  • After transformation, one side becomes a product of two integer factors with known value.

How to Recognise the Method

If you see \(xy+ax+by\), try adding \(ab\). If you see \(x^2-y^2\), immediately factor it as \((x-y)(x+y)\). If you see \(\frac{1}{x}+\frac{1}{y}=\frac{1}{n}\), multiply by \(nxy\) and complete the product \((x-n)(y-n)=n^2\).

If the equation seems too flexible, check residues modulo small moduli \(2,3,4,8\). If the variables are positive, order them, for example \(x\le y\), and derive an upper bound.

Typical Mistakes

  • Dividing a linear equation by a number without checking that the whole right-hand side is divisible.
  • After factorising \(AB=n\), forgetting negative factors or the positivity condition.
  • In \(x^2-y^2=n\), taking arbitrary factor pairs of \(n\) without checking that \(x-y\) and \(x+y\) have the same parity.
  • When completing a product, adding a term to one side but not to the other.
  • In positive-integer problems, finding integer parameters but not selecting the positive values.

Mini-Checklist

  • Which solutions are required: integer, positive integer, or nonnegative?
  • Can the equation be turned into a product of two integer factors?
  • Is there a parity condition on the factors?
  • Can we first prove impossibility modulo a small number?
  • If there are many solutions, can they be written parametrically?
  • If there are finitely many solutions, which bound limits the search?

Examples

Example 1. A Linear Equation in Integers

The first skill is to check the GCD and write all solutions with a parameter.

Problem. Solve the equation \(6x+10y=14\) in integers.

Solution.

Since \(\gcd(6,10)=2\) and \(2\mid14\), solutions exist. Divide by \(2\): \(3x+5y=7\).

One solution is \(x=-1\), \(y=2\), because \(3(-1)+5\cdot2=7\). All solutions are \(x=-1+5t\), \(y=2-3t\), where \(t\in\mathbb Z\).

Comment. The coefficients \(5\) and \(3\) in the parameters come from the coprime coefficients \(3\) and \(5\).

Example 2. Positive Solutions of a Linear Equation

After the general method, we must be able to select only positive solutions.

Problem. Find all positive integer solutions of \(3x+5y=41\).

Solution.

Consider the equation modulo \(3\): \(5y\equiv 41\pmod3\), so \(2y\equiv2\pmod3\). Hence \(y\equiv1\pmod3\).

Since \(y>0\) and \(5y<41\), we get \(y\in\{1,4,7\}\). Then \(x=\frac{41-5y}{3}\), giving the solutions \((12,1)\), \((7,4)\), \((2,7)\).

Comment. A congruence modulo one coefficient quickly removes unnecessary search.

Example 3. Completing a Product

The expression \(xy+x+y\) is almost the product \((x+1)(y+1)\).

Problem. Find all positive integers \(x,y\) such that \(xy+x+y=35\).

Solution.

Add \(1\) to both sides: \(xy+x+y+1=36\), hence \((x+1)(y+1)=36\).

Now \(x+1\) and \(y+1\) are positive divisors of \(36\), and both are at least \(2\). Therefore the pairs \((x,y)\) are \((1,17)\), \((2,11)\), \((3,8)\), \((5,5)\), \((8,3)\), \((11,2)\), \((17,1)\).

Comment. The main idea is to notice the missing \(1\).

Example 4. Difference of Squares

Factoring \(x^2-y^2\) also requires checking the parity of the factors.

Problem. Find all positive integer solutions of \(x^2-y^2=45\).

Solution.

We have \((x-y)(x+y)=45\). Both factors are positive and have the same parity, because their sum is \(2x\). Since \(45\) is odd, both factors must be odd.

Take the factor pairs of \(45\): \((1,45)\), \((3,15)\), \((5,9)\). They give respectively \((x,y)=(23,22)\), \((9,6)\), \((7,2)\).

Comment. The pair \((x-y,x+y)\) determines \(x\) and \(y\) uniquely.

Example 5. An Equation with Reciprocals

A fractional equation often becomes a product after multiplying by a common denominator.

Problem. Find all positive integers \(x,y\) such that \(\frac{1}{x}+\frac{1}{y}=\frac{1}{6}\).

Solution.

Multiply by \(6xy\): \(6x+6y=xy\). Move terms and complete a product: \(xy-6x-6y=0\), so \((x-6)(y-6)=36\).

If \(d\) is a positive divisor of \(36\), then \(x=6+d\), \(y=6+\frac{36}{d}\). This gives all solutions.

Comment. This move is often called completing a rectangle.

Example 6. A Hidden Product

The coefficients of \(x\) and \(y\) indicate exactly what must be added.

Problem. Find all positive integer solutions of \(xy=3x+4y\).

Solution.

Rewrite as \(xy-3x-4y=0\). Add \(12\): \((x-4)(y-3)=12\).

Let \(d\mid12\), \(d>0\). Then \(x=4+d\), \(y=3+\frac{12}{d}\). For \(d=1,2,3,4,6,12\), we obtain all positive solutions.

Comment. We do not need to guess \(x\) and \(y\); after factorisation only divisors remain.

Example 7. A Modular Obstruction

Sometimes it is better to prove first that no solutions can exist.

Problem. Prove that the equation \(x^2+y^2=8z+6\) has no integer solutions.

Solution.

A square modulo \(8\) can only have residue \(0,1,4\). Therefore a sum of two squares modulo \(8\) can only have residues \(0,1,2,4,5\).

The right-hand side \(8z+6\) has residue \(6\) modulo \(8\), which is impossible for a sum of two squares. Hence there are no integer solutions.

Comment. Modulo \(8\) is especially useful for squares and parity.

Example 8. Bounding Instead of Long Search

If a product divides a small sum, positivity sharply limits the possibilities.

Problem. Find all positive integers \(x,y\) such that \(xy\mid x+y+1\).

Solution.

The condition is symmetric, so assume \(x\le y\). Then \(xy\le x+y+1\). If \(x\ge3\), then \(xy\ge3y\), while \(x+y+1\le2y+1\), impossible for \(y\ge3\).

Thus \(x=1\) or \(x=2\). For \(x=1\), we get \(y\mid y+2\), so \(y\mid2\), hence \(y=1,2\). For \(x=2\), \(2y\mid y+3\), so \(y\le3\); checking \(y=2,3\) leaves only \(y=3\). By symmetry, the solutions are \((1,1)\), \((1,2)\), \((2,1)\), \((2,3)\), \((3,2)\).

Comment. The bound tells us which small cases actually need checking.

Problems

Problems

#8.1
#8.1

A Linear Equation

Diophantine Grade 8 Grade 9 ★☆☆☆☆

Solve the equation \(4x+6y=10\) in integers.

Details
Problem: NT-B1-M05-P001
Difficulty: Level 1 of 5
Tag: Diophantine
Grade: Grade 8, Grade 9
#8.2
#8.2

Positive Solutions

Positive Integers Grade 8 Grade 9 ★☆☆☆☆

Find all positive integer solutions of \(2x+3y=18\).

Details
Problem: NT-B1-M05-P002
Difficulty: Level 1 of 5
Tag: Positive Integers
Grade: Grade 8, Grade 9
#8.3
#8.3

A Product Equals a Number

Factorisation Grade 8 Grade 9 ★☆☆☆☆

Find all ordered pairs of positive integers \((x,y)\) such that \(xy=24\).

Details
Problem: NT-B1-M05-P003
Difficulty: Level 1 of 5
Tag: Factorisation
Grade: Grade 8, Grade 9
#8.4
#8.4

Difference of Squares

Factorisation Grade 8 Grade 9 ★☆☆☆☆

Find all positive integer solutions of \(x^2-y^2=15\).

Details
Problem: NT-B1-M05-P004
Difficulty: Level 1 of 5
Tag: Factorisation
Grade: Grade 8, Grade 9
#8.5
#8.5

Impossible Difference of Squares

Parity Grade 8 Grade 9 ★☆☆☆☆

Prove that the equation \(x^2-y^2=2\) has no integer solutions.

Details
Problem: NT-B1-M05-P005
Difficulty: Level 1 of 5
Tag: Parity
Grade: Grade 8, Grade 9
#8.6
#8.6

The Equation \(7x+11y=1\)

GCD Grade 8 Grade 9 ★★☆☆☆

Solve the equation \(7x+11y=1\) in integers.

Details
Problem: NT-B1-M05-P006
Difficulty: Level 2 of 5
Tag: GCD
Grade: Grade 8, Grade 9
#8.7
#8.7

The Equation \(5x+8y=67\)

Modular Arithmetic Grade 8 Grade 9 ★★☆☆☆

Find all positive integer solutions of \(5x+8y=67\).

Details
Problem: NT-B1-M05-P007
Difficulty: Level 2 of 5
Tag: Modular Arithmetic
Grade: Grade 8, Grade 9
#8.8
#8.8

Almost a Product

Factorisation Grade 8 Grade 9 ★★☆☆☆

Find all positive integer solutions of \(xy+x+y=47\).

Details
Problem: NT-B1-M05-P008
Difficulty: Level 2 of 5
Tag: Factorisation
Grade: Grade 8, Grade 9
#8.9
#8.9

The Equation \(xy=2x+5y\)

Factorisation Grade 8 Grade 9 ★★☆☆☆

Find all positive integer solutions of \(xy=2x+5y\).

Details
Problem: NT-B1-M05-P009
Difficulty: Level 2 of 5
Tag: Factorisation
Grade: Grade 8, Grade 9
#8.10
#8.10

Difference of Squares \(56\)

Factorisation Grade 8 Grade 9 ★★☆☆☆

Find all positive integer solutions of \(x^2-y^2=56\).

Details
Problem: NT-B1-M05-P010
Difficulty: Level 2 of 5
Tag: Factorisation
Grade: Grade 8, Grade 9
#8.11
#8.11

A Sum of Reciprocals

Factorisation Grade 8 Grade 9 ★★☆☆☆

Find all positive integers \(x,y\) such that \(\frac{1}{x}+\frac{1}{y}=\frac{1}{8}\).

Details
Problem: NT-B1-M05-P011
Difficulty: Level 2 of 5
Tag: Factorisation
Grade: Grade 8, Grade 9
#8.12
#8.12

Obstruction Modulo \(3\)

Diophantine Grade 8 Grade 9 ★★☆☆☆

Prove that the equation \(x^2=3y^2+2\) has no integer solutions.

Details
Problem: NT-B1-M05-P012
Difficulty: Level 2 of 5
Tag: Diophantine
Grade: Grade 8, Grade 9
#8.13
#8.13

A Mixed Product

Factorisation Grade 9 Grade 10 ★★★☆☆

Find all positive integer solutions of \(xy+2x+3y=54\).

Details
Problem: NT-B1-M05-P013
Difficulty: Level 3 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#8.14
#8.14

A Larger Difference of Squares

Factorisation Grade 9 Grade 10 ★★★☆☆

Find all positive integer solutions of \(x^2-y^2=68\).

Details
Problem: NT-B1-M05-P014
Difficulty: Level 3 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#8.15
#8.15

Reciprocals with \(10\)

Factorisation Grade 9 Grade 10 ★★★☆☆

Find all positive integer solutions of \(\frac{1}{x}+\frac{1}{y}=\frac{1}{10}\).

Details
Problem: NT-B1-M05-P015
Difficulty: Level 3 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#8.16
#8.16

A Square with a Linear Term

Difference Of Squares Grade 9 Grade 10 ★★★☆☆

Find all positive integer solutions of \(x^2+2x=y^2+20\).

Details
Problem: NT-B1-M05-P016
Difficulty: Level 3 of 5
Tag: Difference Of Squares
Grade: Grade 9, Grade 10
#8.17
#8.17

Product with a Remainder

Factorisation Grade 9 Grade 10 ★★★☆☆

Find all positive integer solutions of \(xy-x-2y=17\).

Details
Problem: NT-B1-M05-P017
Difficulty: Level 3 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#8.18
#8.18

A Sum of Squares Modulo \(8\)

Diophantine Grade 9 Grade 10 ★★★☆☆

Prove that the equation \(x^2+y^2=8z+6\) has no integer solutions.

Details
Problem: NT-B1-M05-P018
Difficulty: Level 3 of 5
Tag: Diophantine
Grade: Grade 9, Grade 10
#8.19
#8.19

A Small Hyperbola

Factorisation Grade 9 Grade 10 ★★★☆☆

Find all positive integer solutions of \(xy-x-y=1\).

Details
Problem: NT-B1-M05-P019
Difficulty: Level 3 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#8.20
#8.20

A Symmetric Equation

Diophantine Grade 9 Grade 10 ★★★☆☆

Find all positive integer solutions of \(xy=4x+4y+5\).

Details
Problem: NT-B1-M05-P020
Difficulty: Level 3 of 5
Tag: Diophantine
Grade: Grade 9, Grade 10
#8.21
#8.21

An Infinite Family

Diophantine Grade 9 Grade 10 ★★★★☆

Find all positive integer solutions of \(x^2+y^2=2xy+x+y\).

Details
Problem: NT-B1-M05-P021
Difficulty: Level 4 of 5
Tag: Diophantine
Grade: Grade 9, Grade 10
#8.22
#8.22

A Product Divides a Sum

Divisibility Grade 9 Grade 10 ★★★★☆

Find all positive integers \(x,y\) such that \(xy\mid x+y+2\).

Details
Problem: NT-B1-M05-P022
Difficulty: Level 4 of 5
Tag: Divisibility
Grade: Grade 9, Grade 10
#8.23
#8.23

Difference of Squares with a Shift

Factorisation Grade 9 Grade 10 ★★★★☆

Find all positive integer solutions of \(x^2-y^2=2x+2y+15\).

Details
Problem: NT-B1-M05-P023
Difficulty: Level 4 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#8.24
#8.24

A Strong Bounding Problem

Diophantine Grade 9 Grade 10 ★★★★★

Find all positive integer solutions of \(x^2+xy+y^2=x+y+30\).

Details
Problem: NT-B1-M05-P024
Difficulty: Level 5 of 5
Tag: Diophantine
Grade: Grade 9, Grade 10

Ladders

No published ladders were found.
Previous Chapter
Next Chapter