Indian Mathematics - Redressing the balance

Ian G Pearce

The Classical period: VI. Pell's equation


Previous Page
(The Classical period: V. Bhaskaracharya II)
Next Page
(The Classical period: VII. The end of the Classic period)

Although there were great advancements in many areas of algebra, and the solution of many different forms of equations, from simple forms such as ax + c = by, to forms as complex as ax2 + bxy + cy2 = z2 , I have chosen to look in slightly more detail at solution(s) to the so called Pell's equation, Nx2 + 1 = y2. The equation was so called due to a mistake on the part of Euler, who attributed the solution of the equation to John Pell, a 17th century English scholar, who actually only referred to the equation in a text he wrote on algebra.

The equation was nearly solved by Brahmagupta (628 AD) and the solution was improved by Bhaskara II (1150 AD), leading some historians, including C Srinivasiengar, to suggest:
...It is therefore fitting that this equation be called the Brahmagupta-Bhaskara equation. [CS, P 110]

The complete theory underlying the solution was expounded by Lagrange in 1767, and rests on the theory of continued fractions. It must be briefly noted how remarkable the achievements of Indian scholars were, given the time period in which equations of the Pell's type were studied. The Indian method involves an element of trail-process but contains no mention of continued fractions. Further to solving equations of the Pell's type to obtain solutions for the unknowns, Brahmagupta extended his method of solution to find square roots. This contribution is of huge interest as it is essentially the same method rediscovered and used by Newton and Raphson around 1690, which is known as the Newton-Raphson iterative method. Contained within this brief discussion is a small computer code for the Maple mathematics package, which uses the Brahmagupta type solution of Pell's equation to derive extremely accurate square roots.

The Pell's type of equation was known in India as Varga Prakriti, or "equation of the multiplied square", where prakriti means coefficient and refers to the coefficient N (where N is a positive integer). As previously mentioned, Bhaskara developed a Chakravala or cyclic method of solution.

Regrettably, due to constraints of space, I will have to forego discussion of the general solutions derived by Brahmagupta and Bhaskara, and will include only an example to illustrate Bhaskara's improved 'cyclic' method. The following example is of great historical interest. It is found in the Bijaganita of Bhaskara and is also of the form of a problem Fermat set as a problem to fellow mathematician Frenicle in 1657. The smallest solution for x and y runs into 4 and 5 digits respectively. The chakravala method is remarkable, as it requires just a few 'easy' steps, while Lagrange's solution required complex use continued fractions.

Example 8.6.1: Solution of 67x2 + 1 = y2.
67x2 + 1 = y2.

Firstly the auxiliary equation 67 × 12 - 3 = 82 is taken.
Then using Bhaskara's lemma, where Na2 + k = b2, where a, b, k are the integers (1, -3 and 8) in the auxiliary equation above, (k being positive or negative) then:
N((am + b)/k)2 + ((m2 - N)/k) = ((bm + Na)/k)2

Thus:
67((1 × m + 8)/-3)2 + ((m2 - 67)/-3) = ((8m + 67 × 1)/-3)2     (1)

Then, by the method of Kuttaka the solution of (m + 8)/-3 = an integer, is m = -3t + 1.
Putting t = -2, we get m = 7, which makes [m2 - 67] least.
On substituting this value, the equation (1) reduces to:
67 × 52 + 6 = 412
Again, by the lemma:
67((5n + 41)/6)2 + ((n2 -67)/6) = ((41n + 67 × 5)/6)2      (2)

Then the solution of (5n + 41)/6 = a whole number, is n = 6t + 5. [n2 - 67] will be least for the value t = 0, that is, when n = 5. The equation (1) then becomes:
67 × 112 - 7 = 902

Now we form:
67((11p + 90)/-7)2 + ((p2 - 67)/-7) = ((90p + 67 × 11/-7)2      (3)

The solution of (11p + 90)/-7 = an integral number, is p = -7t + 2. Taking t = -1, we have
p = 9; and this value makes [p2 - 67] least. Substituting that into (3) we get:
67 × 272 - 2 = 2212

By the Principle of Composition of Equals, we get from the above equation:
67(2.27.221)2 + 4 = (2212 + 67 × 272)2
Or 67(11934)2 + 4 = (97684)2

Dividing out by 4 we have:
67(5967)2 + 1 = (48842)2

Hence x = 5967, y = 48842 is a solution of the equation 67x2 + 1 = y2. (See C Srinivasiengar Ps 110-133 for further details on Indian solutions to Pell's equation.)

I will conclude my brief discussion of Pell's equation by illustrating Brahmagupta's method for calculating square roots with the following example. The method was used by Brahmagupta to find the square root of the integer N, when Nx2 + 1 = y2, and solutions for x and y are known.

Example 8.6.2: Finding the square root of N, from Nx2 + 1 = y2

If N=5, then y2 = 1 + 5x2. It can be observed that 5 = (y2 - 1)/x2 and that (y2 - 1)/x2 ª y2/x2.
This is the key to finding the square root of 5, as √5 = y/x. With ease we can identify y = 9 and x = 4 as solutions to this equation, and we see √5 ª 9/4 = 2.25, (5 = 2.236067978...).
Clearly the larger y and x are, the better the approximation is. This can shown using the following Maple programme:


> n:=5:
> f:=(x,y)‚Üí(2*x*y,y*y+n*x*x):
> m:=0:
> x:=4
> y=:9
> while m ≤ 5 do
> m:=m+1;
> print(x,y,evalf(y/x,20), evalf(y/x-sqrt(n),50));
> a:=f(x,y);
> x:=a[1];
> y:=a[2];
> end do:


The output gives the following:
4, 9 (solutions of x and y)
2.25000000000000000000 (y/x to 20 decimal places)
0.0139320225002103035908263312687237645593816403885 (error between y/x and √5)
By the 5th step the following result is given:
25840354427429161536, 57780789062419261441 (5th pair of solutions for x and y)
2.2360679774997896964 (y/x to 20 d.p.s)

0.3348791201 × 10-39 (error)

This result is extremely accurate, and the method must be considered brilliant given it was derived by Brahmagupta in 628 AD.

Previous Page
(The Classical period: V. Bhaskaracharya II)
Next Page
(The Classical period: VII. The end of the Classic period)