Overview

Vieta Jumping (also called root flipping) is an advanced technique for Diophantine equations. It applies when a rational expression in positive integers is asserted to equal an integer kk, and the relation can be rearranged into a quadratic in one variable. The idea is that if (a,b)(a, b) is a solution, Vieta's formulas produce a second root xx that is also an integer, still paired with bb, but strictly smaller than aa. Since positive integers cannot decrease indefinitely, this forces either a contradiction or a checkable base case.


Key Idea

Suppose we have a relation involving positive integers a,ba, b and an integer kk, which rearranges into a quadratic in tt:

t2(kb)t+(b2k)=0t^2 - (kb)\,t + (b^2 - k) = 0

The known value aa is one root. Let xx denote the other. Vieta's formulas give:

x+a=kb    x=kbax + a = kb \implies x = kb - a xa=b2k    x=b2kax \cdot a = b^2 - k \implies x = \frac{b^2 - k}{a}

The first expression proves xZx \in \mathbb{Z} (since k,a,bk, a, b are all integers).

The second expression is used to bound xx and establish x<ax < a, which produces the descent.

The two expressions give different information about the same quantity; combining them is what drives the argument.


Steps to Reproduce

Here is the standard structure of a Vieta Jumping argument:

  1. Define kk. Let k=f(a,b)k = f(a,b) where ff is the expression asserted to be an integer (or a specific value).
  2. Fix kk, take the minimal pair. Among all pairs (a,b)(a, b) of positive integers with f(a,b)=kf(a, b) = k, choose the one minimizing a+ba + b (or just aa after WLOG aba \geq b).
  3. Form the quadratic. Rearrange the equation into a quadratic in aa: the existing value aa is one root.
  4. Produce the second root. Let xx be the other root. By Vieta's sum formula, x=(something)aZx = (\text{something}) - a \in \mathbb{Z}.
  5. Show x>0x > 0. Use the product formula xa=(constant)xa = (\text{constant}). If kk is not a perfect square or if the constant is positive, show x0x \neq 0; rule out x<0x < 0 separately.
  6. Show x<ax < a. Use the assumption aba \geq b and the product formula: x=b2kaa2ka<ax = \frac{b^2 - k}{a} \leq \frac{a^2 - k}{a} < a.
  7. Conclude. The pair (x,b)(x, b) satisfies the same relation with x+b<a+bx + b < a + b, contradicting minimality. Hence no such pair exists (or kk must equal the forced value).

Worked Examples

Example 1 (IMO 1988 Problem 6). Let a,ba, b be positive integers such that ab+1a2+b2ab + 1 \mid a^2 + b^2. Prove that a2+b2ab+1\dfrac{a^2 + b^2}{ab + 1} is a perfect square.

Proof. Let k=a2+b2ab+1k = \dfrac{a^2+b^2}{ab+1}. We want to show kk is always a perfect square.

Suppose for contradiction that kk is a fixed positive integer that is not a perfect square, and that there exists at least one pair (a,b)(a,b) of non-negative integers with a2+b2ab+1=k\frac{a^2+b^2}{ab+1} = k. Pick the pair (a,b)(a, b) with ab0a \geq b \geq 0 that minimizes aa.

Rewrite the equation as a2+b2=k(ab+1)a^2 + b^2 = k(ab + 1), then rearrange into a quadratic in aa:

a2kba+(b2k)=0a^2 - kb\,a + (b^2 - k) = 0

The value aa is one root. Let xx be the other root. By Vieta's formulas:

  • Sum: x+a=kbx + a = kb, so x=kbaZx = kb - a \in \mathbb{Z}.
  • Product: xa=b2kx \cdot a = b^2 - k, so x=b2kax = \dfrac{b^2 - k}{a}.

Since xx is an integer satisfying the same quadratic, the pair (x,b)(x, b) satisfies x2kbx+(b2k)=0x^2 - kbx + (b^2 - k) = 0, which means x2+b2=k(xb+1)x^2 + b^2 = k(xb + 1), i.e., x2+b2xb+1=k\frac{x^2 + b^2}{xb + 1} = k — so (x,b)(x, b) is also a valid solution, provided x0x \geq 0 and xb+1>0xb + 1 > 0.

x0x \neq 0: If x=0x = 0, then xa=b2k=0xa = b^2 - k = 0, so k=b2k = b^2, contradicting our assumption that kk is not a perfect square.

x0x \geq 0: Suppose x<0x < 0. Then x2+b2=k(xb+1)x^2 + b^2 = k(xb + 1). The left side is positive. We need xb+1>0xb + 1 > 0, i.e., x>1/bx > -1/b — but xx is a negative integer, so x1x \leq -1, giving xbb0xb \leq -b \leq 0, so xb+11xb + 1 \leq 1. Combined with x2+b2>0x^2 + b^2 > 0, we need xb+1>0xb + 1 > 0, i.e., xb0xb \geq 0. Since x<0x < 0 and b1b \geq 1, this is impossible. So x0x \geq 0, and since x0x \neq 0, we have x>0x > 0.

x<ax < a: Since ab1a \geq b \geq 1:

x=b2kax = \frac{b^2 - k}{a}

We need to show this is less than aa. Note k1k \geq 1, so b2kb21<b2a2b^2 - k \leq b^2 - 1 < b^2 \leq a^2, giving x=b2ka<a2a=ax = \frac{b^2-k}{a} < \frac{a^2}{a} = a.

But then (x,b)(x, b) is a valid pair achieving the same kk, with x<ax < a — contradicting the minimality of aa. Therefore, no non-perfect-square value of kk is achievable, and kk must be a perfect square. \blacksquare


Example 2. Let a,ba, b be positive integers with aba2+b2+1ab \mid a^2 + b^2 + 1. Show that a2+b2+1ab=3\dfrac{a^2 + b^2 + 1}{ab} = 3.

Proof. Let k=a2+b2+1abk = \frac{a^2+b^2+1}{ab}. First handle the diagonal: if a=ba = b, then a22a2+1a^2 \mid 2a^2 + 1, so a21a^2 \mid 1, forcing a=b=1a = b = 1 and k=3k = 3. Now assume a>b1a > b \geq 1 and pick the minimal-sum pair.

Rearrange as a quadratic in aa:

a2kba+(b2+1)=0a^2 - kb\,a + (b^2 + 1) = 0

The value aa is one root; let xx be the other. By Vieta's:

  • Sum: x=kbaZx = kb - a \in \mathbb{Z}.
  • Product: xa=b2+1>0xa = b^2 + 1 > 0.

Since xa=b2+1>0xa = b^2 + 1 > 0 and a>0a > 0, we have x>0x > 0.

x<ax < a: Since a>ba > b:

x=b2+1a<b2+1b=b+1bb+1ax = \frac{b^2 + 1}{a} < \frac{b^2 + 1}{b} = b + \frac{1}{b} \leq b + 1 \leq a

So (x,b)(x, b) is a valid pair with x<ax < a, contradicting minimality — unless no such pair with a>ba > b exists. The descent terminates when a=ba = b, which forces k=3k = 3 as shown above. Therefore k=3k = 3 for all valid pairs. \blacksquare


Common Pitfalls

Forgetting to prove x>0x > 0. The extremal argument only produces a contradiction if the new solution is a valid pair of positive integers. Always prove x>0x > 0, or handle x=0x = 0 as an explicit base case.

Skipping a=ba = b. The bound x<ax < a uses a>ba > b. The equality case a=ba = b must always be checked first, this often forces the answer immediately.

Not verifying the new pair satisfies the relation. Check that (x,b)(x, b) (not just (a,b)(a, b)) satisfies the original equation before claiming it's a valid smaller solution.

Negative variables. The extremal principle requires a+ba + b to be bounded below. If the problem allows negative integers, the descent has no floor. Establish that any solution can be transformed to a positive one before applying the method.


Practice Problems

StatusSourceProblem NameDifficultyTags

Module Progress:

Join the AoPS Community!

Stuck on a problem, or don't understand a module? Join the AoPS community and get help from other math contest students.