Skip to content

Advanced Diophantine Equations

Updated · Equations updated; Sections updated; Examples or practice updated; Explanations expanded What changed?
  1. — Equations updated; Sections updated; Examples or practice updated; Explanations expanded

Infinite descent proves that a certain positive integer solution cannot exist by showing that any such solution produces a smaller one. Choose a size measure that is a positive integer, such as the largest variable or the sum of the variables. The existence of a smallest solution then contradicts the construction of a smaller one.

A descent needs three checks: the transformed values are integers, they remain in the required domain, and the chosen measure strictly decreases. An algebraic transformation without those checks does not establish a contradiction.

Example. Prove that x2=2y2x^2=2y^2 has no solution in positive integers.

Assume a solution exists and choose one with yy as small as possible. The equation makes x2x^2 even, hence xx even. Write x=2ux=2u; then y2=2u2y^2=2u^2, so y=2vy=2v is even as well.

Substitution gives u2=2v2u^2=2v^2. This is another positive integer solution, but v=y/2<yv=y/2<y. It contradicts the minimal choice of yy, so there is no positive solution.


A modular obstruction may not rule out a solution immediately. Instead, it may force every variable to contain the same prime factor, which gives a descent after division.

Example. Find all integer solutions of x2+y2=3z2x^2+y^2=3z^2.

Modulo three, squares are zero or one. The only way for x2+y2x^2+y^2 to be zero is for both squares to be zero, so 3∣x3\mid x and 3∣y3\mid y. Write x=3ux=3u, y=3vy=3v. Then

3(u2+v2)=z2,3(u^2+v^2)=z^2,

so 3∣z3\mid z as well. Writing z=3wz=3w recovers

u2+v2=3w2.u^2+v^2=3w^2.

If a nonzero solution existed, choose one minimizing the positive integer ∣x∣+∣y∣+∣z∣\lvert x\rvert+\lvert y\rvert+\lvert z\rvert. Dividing all three variables by three produces a nonzero solution with a smaller measure, a contradiction. Therefore the only solution is (0,0,0)(0,0,0).

This combines congruences with scaling. The modulus identifies a forced common factor; homogeneity ensures that dividing it out preserves the equation.


Suppose an integer equation is quadratic in one variable:

y2−B(x)y+C(x)=0.y^2-B(x)y+C(x)=0.

If yy is an integer root and B(x)B(x) is integer, the other root

y′=B(x)−yy'=B(x)-y

is also integer. Vieta’s product formula also gives yy′=C(x)yy'=C(x), which can help prove positivity or a size bound. Replacing yy by y′y' is called Vieta jumping.

Example. Show that every positive integer solution of x2+y2+1=3xyx^2+y^2+1=3xy can be reduced to (1,1)(1,1) by swaps and Vieta jumps.

The equation is symmetric, so order the variables as x≤yx\le y. If x=yx=y, then x2=1x^2=1, giving (1,1)(1,1). If x=1x=1, the equation factors as

y2−3y+2=(y−1)(y−2)=0.y^2-3y+2=(y-1)(y-2)=0.

The only additional pair is (1,2)(1,2), which jumps to (1,1)(1,1).

Now suppose 2≤x<y2\le x<y. Viewed as a quadratic in yy, the equation has other root

y′=3x−y=x2+1y.y'=3x-y=\frac{x^2+1}{y}.

The first expression proves integrality, and the second proves positivity. Because y≥x+1y\ge x+1,

y′≤x2+1x+1<xy'\le\frac{x^2+1}{x+1}<x

for x>1x>1. Thus (y′,x)(y',x) is a positive integer solution whose largest coordinate is smaller than yy. Repeating must terminate, and only the base case (1,1)(1,1) remains.

The positivity proof matters: the other root of an integer quadratic need not be positive in a different problem.


When the transformation is reversible, descent can classify solutions as well as prove impossibility. For the preceding equation, the forward step is

(x,y)⟼(y,3y−x).(x,y)\longmapsto(y,3y-x).

Starting from (1,1)(1,1) gives

(1,1), (1,2), (2,5), (5,13), (13,34),….(1,1),\ (1,2),\ (2,5),\ (5,13),\ (13,34),\ldots.

The new pair satisfies the equation by the same quadratic-root relation. The descent proves that there are no other positive solutions apart from swapping coordinates: every ordered pair with x<yx<y reduces to a unique smaller ordered pair, and reversing those steps returns to this chain.

Example. Find all positive solutions of x2+y2+1=3xyx^2+y^2+1=3xy with max⁡(x,y)≤20\max(x,y)\le20.

The chain gives (1,1),(1,2),(2,5),(5,13)(1,1),(1,2),(2,5),(5,13) before the next pair has largest coordinate 3434. Include the reverses of the unequal pairs:

(1,1),(1,2),(2,1),(2,5),(5,2),(5,13),(13,5).(1,1),(1,2),(2,1),(2,5),(5,2),(5,13),(13,5).

The reduction argument proves this list is complete.


A Pell equation has the form x2−Dy2=1x^2-Dy^2=1 for a positive nonsquare integer DD. Multiplication of expressions x+yDx+y\sqrt D preserves the relation because their product with the conjugate is one.

Example. Construct infinitely many positive integer solutions to x2−2y2=1x^2-2y^2=1.

Begin with 32−2⋅22=13^2-2\cdot2^2=1. If (x,y)(x,y) is a positive solution, multiply by 3+223+2\sqrt2:

(x+y2)(3+22)=(3x+4y)+(2x+3y)2.(x+y\sqrt2)(3+2\sqrt2)=(3x+4y)+(2x+3y)\sqrt2.

Thus (3x+4y,2x+3y)(3x+4y,2x+3y) is another positive integer solution. Both coordinates increase, so the repeated construction produces infinitely many distinct solutions, beginning (3,2),(17,12),(99,70)(3,2),(17,12),(99,70).

This proves an infinite family exists. Classifying every solution would require an additional completeness argument.

A useful descent does not always produce smaller values of the original variables directly. It may reinterpret a solution as another mathematical object whose size can decrease. Integer right triangles provide a classical example.

Example. Prove that no integer-sided right triangle has area equal to a positive integer square.

Assume such a triangle exists and choose one with smallest hypotenuse. It must be primitive: dividing a common factor from all sides divides the area by its square, preserving the square-area property and decreasing the hypotenuse.

Write its legs as m2−n2m^2-n^2 and 2mn2mn, with coprime opposite-parity m>n>0m>n>0. The area condition says

mn(m+n)(m−n)mn(m+n)(m-n)

is a square. The four positive factors are pairwise coprime. For example, gcd⁡(m+n,m−n)\gcd(m+n,m-n) divides two and both factors are odd, so their GCD is one. Hence each factor is a square. Write

m=u2,n=v2,m+n=w2,m−n=t2.m=u^2,\quad n=v^2,\quad m+n=w^2,\quad m-n=t^2.

The integers w,tw,t are odd. Thus w2−t2=2v2w^2-t^2=2v^2 is divisible by eight, forcing vv even. Set

r=w+t2,s=w−t2.r=\frac{w+t}{2},\qquad s=\frac{w-t}{2}.

These are positive integers, and

r2+s2=w2+t22=m=u2.r^2+s^2=\frac{w^2+t^2}{2}=m=u^2.

They form a new integer right triangle with area

rs2=w2−t28=v24,\frac{rs}{2}=\frac{w^2-t^2}{8}=\frac{v^2}{4},

again a positive integer square. Its hypotenuse is u=mu=\sqrt m, strictly smaller than the original m2+n2m^2+n^2. This contradicts minimality.

Notice the separate roles of the hypotheses. Primitivity makes the factors coprime, the square-product condition makes each a square, parity makes the new coordinates integral, and the hypotenuse comparison completes the descent. Removing any one of those checks would leave a gap.


Some quotient problems hide a quadratic equation after introducing an integer parameter. Fix the quotient, preserve it under the jump, and descend among solutions with that same value.

Example. Positive integers a,ba,b satisfy ab+1∣a2+b2ab+1\mid a^2+b^2. Prove that the quotient is a perfect square.

Let k=(a2+b2)/(ab+1)k=(a^2+b^2)/(ab+1). Suppose a nonsquare value occurs, and choose a solution with minimal a+ba+b for that fixed kk. By symmetry assume a≥ba\ge b.

The value k=1k=1 is already square. If k=2k=2, the equation becomes (a−b)2=2(a-b)^2=2, impossible. Hence a nonsquare candidate has k≥3k\ge3.

Viewed as a quadratic in aa, the equation is

a2−kba+(b2−k)=0.a^2-kba+(b^2-k)=0.

The other root is the integer a′=kb−aa'=kb-a, and aa′=b2−kaa'=b^2-k.

First prove a′≥0a'\ge0. If a′≤−1a'\le-1, then a≥kb+1a\ge kb+1. But the original equation gives

a(a−kb)=k−b2≤k−1,a(a-kb)=k-b^2\le k-1,

while the left side is at least a≥kb+1≥k+1a\ge kb+1\ge k+1, a contradiction.

If a′=0a'=0, the product relation gives k=b2k=b^2, contrary to the nonsquare assumption. Thus a′>0a'>0. Also,

a′=b2−ka<b,a'=\frac{b^2-k}{a}<b,

since a≥ba\ge b and k>0k>0.

The pair (b,a′)(b,a') is therefore a positive integer solution with the same quotient kk and smaller sum than (a,b)(a,b). This contradicts the minimal choice. Every possible quotient must be a square.

The positivity argument is the difficult part. Integrality follows immediately from Vieta, but a negative other root would not be an admissible smaller solution. In many olympiad problems, most of the real work lies in proving that the jump stays inside the domain.


Classifying All Solutions of a Pell Equation

Section titled “Classifying All Solutions of a Pell Equation”

Multiplying by 3+223+2\sqrt2 constructs solutions of x2−2y2=1x^2-2y^2=1. To prove it constructs every positive solution, reverse the multiplication and show it decreases a coordinate.

For a solution with y>2y>2, define

x′=3x−4y,y′=3y−2x.x'=3x-4y,\qquad y'=3y-2x.

The norm identity preserves x′2−2y′2=1x'^2-2y'^2=1. Since x2/y2=2+1/y2x^2/y^2=2+1/y^2, we have

43<2<xy<32.\frac43<\sqrt2<\frac xy<\frac32.

Hence both new coordinates are positive. Also x>yx>y gives y′=3y−2x<yy'=3y-2x<y. Thus the positive integer yy decreases.

There is no solution with y=1y=1, and y=2y=2 gives x=3x=3. That solution reverses to (1,0)(1,0). Repeating the descent proves that every nonnegative solution with x>0x>0 is reached by reversing these steps:

x+y2=(3+22)n,n≥0.x+y\sqrt2=(3+2\sqrt2)^n,\qquad n\ge0.

The classification now has both directions: powers of the fundamental unit produce solutions, and descent proves every solution belongs to that family.

Example. Find all positive solutions to x2−2y2=1x^2-2y^2=1 with y<100y<100.

The classified sequence begins

(3,2), (17,12), (99,70), (577,408).(3,2),\ (17,12),\ (99,70),\ (577,408).

The update increases both positive coordinates, so once the second coordinate reaches 408 it can never return below one hundred. The complete list is the first three pairs.

For a different nonsquare DD, the smallest positive Pell solution may be much larger than expected. Do not assume a short search has found the fundamental one; a completeness method such as continued fractions is needed in general.


Rational Parametrization as an Alternative to Descent

Section titled “Rational Parametrization as an Alternative to Descent”

Not every infinite family needs a descent. An equation with a known rational point may admit a rational parametrization by lines through that point.

For the unit circle x2+y2=1x^2+y^2=1, draw a line of rational slope tt through (−1,0)(-1,0):

y=t(x+1).y=t(x+1).

Substitute into the circle equation. One intersection is the known point. Factoring that root gives the other as

x=1−t21+t2,y=2t1+t2.x=\frac{1-t^2}{1+t^2},\qquad y=\frac{2t}{1+t^2}.

Every rational tt gives a rational point, and every rational point other than (−1,0)(-1,0) has the rational slope t=y/(x+1)t=y/(x+1). The excluded point must be listed separately to make the classification complete.

Taking t=n/mt=n/m and clearing denominators produces the Pythagorean expressions m2−n2,2mn,m2+n2m^2-n^2,2mn,m^2+n^2. The usual parity and coprimality conditions then identify primitive integer triples.

This connects geometric parametrization with number theory. The construction explains why a formula has its particular shape rather than presenting it as a pattern to memorize.


A transformed solution can decrease one coordinate while increasing another. Therefore “the numbers get smaller” is not a valid measure unless the proof specifies which quantity is controlled.

Possible measures include the largest coordinate, the sum, the hypotenuse of an associated triangle, or a lexicographically ordered pair. The measure must belong to a set with no infinite strictly decreasing chain, such as positive integers or nonnegative integer pairs in a justified lexicographic order.

When a boundary case gives a known solution instead of a contradiction, stop there and reverse the transformations. This is how a descent becomes a classification. When no boundary case is admissible, the same mechanism proves impossibility.

The best descent is often suggested by the equation itself: a quadratic supplies its other root, a homogeneous equation supplies a common factor to remove, and a norm equation supplies multiplication by an inverse unit. Use the structure to choose the transformation, then let the domain restrictions determine whether it works.


Rational Consequences of an Integer Descent

Section titled “Rational Consequences of an Integer Descent”

An integer impossibility theorem can sometimes rule out rational objects by clearing denominators. Choose a common positive denominator for every rational length; multiplying all lengths by it produces an integer object with the same shape.

If a rational right triangle had area equal to a nonzero rational square q2q^2, clearing denominators by a factor dd would produce an integer right triangle of area (dq)2(dq)^2. This area is an integer square: a rational number whose square is an integer must itself be an integer, as prime exponents in a reduced fraction show.

The square-area descent therefore rules out such rational triangles as well.

Example. Prove x4+4y4=z2x^4+4y^4=z^2 has no solution in positive integers.

A solution would give a right triangle with legs x2x^2 and 2y22y^2 and hypotenuse zz. Its area would be x2y2=(xy)2x^2y^2=(xy)^2, a positive square, contradicting the square-area theorem proved above.

The same argument rules out positive rational solutions after clearing denominators.

Clearing denominators is essential before using a smallest-integer measure. Positive rational numbers can decrease forever, so choosing a “smallest positive rational solution” is not justified. The integer model supplies the well-ordering needed for descent.