# Vieta jumping

In number theory, Vieta jumping, also known as root flipping, is a proof technique. It is most often used for problems in which a relation between two integers is given, along with a statement to prove about its solutions. In particular, it can be used to produce new solutions of a quadratic Diophantine equation from known ones. There exist multiple variations of Vieta jumping, all of which involve the common theme of infinite descent by finding new solutions to an equation using Vieta's formulas.

## History

Vieta jumping is a classical method in the theory of quadratic Diophantine equations and binary quadratic forms. For example, it was used in the analysis of the Markov equation back in 1879 and in the 1953 paper of Mills.
In 1988, the method came to the attention to mathematical olympiad problems in the light of the first olympiad problem to use it in a solution that was proposed for the International Mathematics Olympiad and assumed to be the most difficult problem on the contest:
    Let a and b be positive integers such that ab + 1 divides a$^2$ + b$^2$. Show that ${\frac {a^{2}+b^{2}}{ab+1}}$ is the square of an integer.
Arthur Engel wrote the following about the problem's difficulty:
   Nobody of the six members of the Australian problem committee could solve it. Two of the members were husband and wife George and Esther Szekeres, both famous problem solvers and problem creators. Since it was a number theoretic problem it was sent to the four most renowned Australian number theorists. They were asked to work on it for six hours. None of them could solve it in this time. The problem committee submitted it to the jury of the XXIX IMO marked with a double asterisk, which meant a superhard problem, possibly too hard to pose. After a long discussion, the jury finally had the courage to choose it as the last problem of the competition. Eleven students gave perfect solutions.
Among the eleven students receiving the maximum score for solving this problem were Ngô Bảo Châu, Ravi Vakil, Zvezdelina Stankova, and Nicușor Dan. Emanouil Atanassov (from Bulgaria) solved the problem in a paragraph and received a special prize.

## Standard Vieta jumping

The concept of standard Vieta jumping is a proof by contradiction, and consists of the following four steps:
* Assume toward a contradiction that some solution (a$_1$, a$_2$, ...) exists that violates the given requirements.
* Take the minimal such solution according to some definition of minimality.
* Replace some a$_i$ by a variable x in the formulas, and obtain an equation for which a$_i$ is a solution.
* Using Vieta's formulas, show that this implies the existence of a smaller solution, hence a contradiction.

### Example

Problem #6 at IMO 1988: Let a and b be positive integers such that ab + 1 divides a$^2$ + b$^2$. Prove that ⁠a$^2$ + b$^2$/ab + 1⁠ is a perfect square.
* Fix some value k that is a non-square positive integer. Assume there exist positive integers (a, b) for which k = ⁠a$^2$ + b$^2$/ab + 1⁠.
* Let (A, B) be positive integers for which k = ⁠A$^2$ + B$^2$/AB + 1⁠ and such that A + B is minimized, and without loss of generality assume A ≥ B.
* Fixing B, replace A with the variable x to yield x$^2$ – (kB)x + (B$^2$ – k) = 0. We know that one root of this equation is x$_1$ = A. By standard properties of quadratic equations, we know that the other root satisfies x$_2$ = kB – A and x$_2$ = ⁠B$^2$ – k/A⁠.
* The first expression for x$_2$ shows that x$_2$ is an integer, while the second expression implies that x$_2$ ≠ 0 since k is not a perfect square. From ⁠x$_2$$^2$ + B$^2$/x$_2$B + 1⁠ = k > 0 it further follows that x$_2$B > −1, and hence x$_2$ is a positive integer. Finally, A ≥ B implies that x$_2$ = ⁠B$^2$ − k/A⁠ < ⁠B$^2$/A⁠ ≤ A, hence x$_2$ < A, and thus x$_2$ + B < A + B, which contradicts the minimality of A + B.

## Constant descent Vieta jumping

The method of constant descent Vieta jumping is used when we wish to prove a statement regarding a constant k having something to do with the relation between a and b. Unlike standard Vieta jumping, constant descent is not a proof by contradiction, and it consists of the following four steps:
* The equality case is proven so that it may be assumed that a > b.
* b and k are fixed and the expression relating a, b, and k is rearranged to form a quadratic with coefficients in terms of b and k, one of whose roots is a. The other root, x$_2$ is determined using Vieta's formulas.
* For all (a, b) above a certain base case, show that 0 < x$_2$ < b < a and that x$_2$ is an integer. Thus, while maintaining the same k, we may replace (a, b) with (b, x$_2$) and repeat this process until we arrive at the base case.
* Prove the statement for the base case, and as k has remained constant through this process, this is sufficient to prove the statement for all ordered pairs.

### Example

Let a and b be positive integers such that ab divides a$^2$ + b$^2$ + 1. Prove that 3ab = a$^2$ + b$^2$ + 1.
* If a = b, a$^2$ dividing 2a$^2$ + 1 implies that a$^2$ divides 1, and hence the positive integers a = b = 1, and 3(1)(1) = 1$^2$ + 1$^2$ + 1. So, without loss of generality, assume that a > b.
* For any (a, b) satisfying the given condition, let k = ⁠a$^2$ + b$^2$ + 1/ab⁠ and rearrange and substitute to get x$^2$ − (kb) x + (b$^2$ + 1) = 0. One root to this quadratic is a, so by Vieta's formulas the other root may be written as follows: x$_2$ = kb − a = ⁠b$^2$ + 1/a⁠.
* The first equation shows that x$_2$ is an integer and the second that it is positive. Because a > b and they are both integers, a ≥ b + 1, and hence ab ≥ b$^2$ + b; As long as b > 1, we always have ab > b$^2$ + 1, and therefore x$_2$ = ⁠b$^2$ + 1/a⁠ < b. Thus, while maintaining the same k, we may replace (a, b) with (b, x$_2$) and repeat this process until we arrive at the base case.
* The base case we arrive at is the case where b = 1. For (a, 1) to satisfy the given condition, a must divide a$^2$ + 2, which implies that a divides 2, making a either 1 or 2. The first case is eliminated because a = b. In the second case, k = ⁠a$^2$ + b$^2$ + 1/ab⁠ = ⁠6/2⁠ = 3. As k has remained constant throughout this process of Vieta jumping, this is sufficient to show that for any (a, b) satisfying the given condition, k will always equal 3.

## Geometric interpretation

Vieta jumping can be described in terms of lattice points on hyperbolas in the first quadrant. The same process of finding smaller roots is used instead to find lower lattice points on a hyperbola while remaining in the first quadrant. The procedure is as follows:
* From the given condition we obtain the equation of a family of hyperbolas that are unchanged by switching x and y so that they are symmetric about the line y = x.
* Prove the desired statement for the intersections of the hyperbolas and the line y = x.
* Assume there is some lattice point (x, y) on some hyperbola and without loss of generality x < y. Then by Vieta's formulas, there is a corresponding lattice point with the same x-coordinate on the other branch of the hyperbola, and by reflection through y = x a new point on the original branch of the hyperbola is obtained.
* It is shown that this process produces lower points on the same branch and can be repeated until some condition (such as x = 0) is achieved. Then by substitution of this condition into the equation of the hyperbola, the desired conclusion will be proven.

### Example

This method can be applied to problem #6 at IMO 1988: Let a and b be positive integers such that ab + 1 divides a$^2$ + b$^2$. Prove that ⁠a$^2$ + b$^2$/ab + 1⁠ is a perfect square.
* Let ⁠a$^2$ + b$^2$/ab + 1⁠ = q and fix the value of q. If q = 1, q is a perfect square as desired. If q = 2, then (a-b)$^2$ = 2 and there is no integral solution a, b. When q > 2, the equation x$^2$ + y$^2$ − qxy − q = 0 defines a hyperbola H and (a,b) represents an integral lattice point on H.
* If (x,x) is an integral lattice point on H with x > 0, then (since q is integral) one can see that x = 1. This proposition's statement is then true for the point (x,x).
* Now let P = (x, y) be a lattice point on a branch H with x, y > 0 and x ≠ y (as the previous remark covers the case x = y). By symmetry, we can assume that x < y and that P is on the higher branch of H. By applying Vieta's Formulas, (x, qx − y) is a lattice point on the lower branch of H. Let y′ = qx − y. From the equation for H, one sees that 1 + x y′ > 0. Since x > 0, it follows that y′ ≥ 0. Hence the point (x, y′) is in the first quadrant. By reflection, the point (y′, x) is also a point in the first quadrant on H. Moreover from Vieta's formulas, yy′ = x$^2$ - q, and y′ = ⁠x$^2$ - q/ y⁠. Combining this equation with x < y, one can show that y′ < x. The new constructed point Q = (y′, x) is then in the first quadrant, on the higher branch of H, and with smaller x,y-coordinates than the point P we started with.
* The process in the previous step can be repeated whenever the point Q has a positive x-coordinate. However, since the x-coordinates of these points will form a decreasing sequence of non-negative integers, the process can only be repeated finitely many times before it produces a point Q = (0, y) on the upper branch of H; by substitution, q = y$^2$ is a square as required.