# Ganita Kaumudi and the Continued Fraction

### Pradip Kumar Majumdar

#### Central Library, Research Block, Calcutta University, Calcutta.

#### (Received 12 December 1976 ; after revision 13 May 1977)

Indian scholar Narayana (1350 A. D.) perhaps used the result Nq_{n}q_{n-1} - Bp_{n}p_{n-1} = (-1)^{n}b_{n+1} and $\frac{p_c}{q_c}=\frac{p_n^2 + Nq_n^2}{2p_nq_n}$ of the continued fraction to find out the integral solution of the equation Nx^{2}+ K^{2} = y^{2}. The paper presents the original Sanskrit verses (in Roman Character) with English translation from Narayana's Ganita Kaumudi.

### 1. Introduction

Indian scholar Narayana (1350 A. D.) composed two books, viz. (i) Bijaganitam and (ii) Ganita Kaumudi. He perhaps used the knowledge of simple recurring continued fraction in the solution of the indeterminate equation of type Nx^{2} + K^{2} = y^{2}. We shall show here how the following mathematical results of the continued fraction besides others are involved in the method of the type Nx^{2} + K^{2} = y^{2}.

Result I. If c be the number of elements in the cycle belonging to N then

$\frac{p_c}{q_c}=\frac{p_n^2 + Nq_n^2}{2p_nq_n}$ ... (1)

Result II. Aq_{n}q_{n-1} - Bp_{n}p_{n-1} = (-i)^{n}b_{n+1}. ... (2)

Where p_{n}/q_{n} is the nth convergent of the continued fraction

$a_1 + \frac{1}{a_2} + \frac{1}{a_3} + ...$

Result I. (Ganita Kaumudi, Varga prakrti Vss. $2-4\frac{1}{2}$)

**
hrasvajyesthaksepan
kramasastesamadho nyaset tanstu
anyanyesam nyasa
stasya bhaved bhavana-nama || 2 ||
vajrabhyasau hrasva
jyesthakayoh samyutirbhaved hrasvam
laghughatah prakrtihato
jyesthavadhenanvito jyestham || 3 ||
ksiptorghatah ksepah
syad vajrabhyasayorviseso va
hrasvam lavdhorghatah
prakrtighno jyesthyosca vadhah || 4 ||
tadvivaram jyesthapadam
ksepah ksiptyoh prajayate ghatah $4\frac{1}{2}$
**

#### English translation:

"Set down successively (* kramasah*) the lesser (

*) root, greater (*

**hrasava***) root and interpolator (*

**jyestha***) and below them set down in order the same or another (set of similar quantities). [From them by the principle of composition can be obtained numerous roots]. The principle of composition (*

**ksepa***) will be explained here. (2)*

**bhavana**
"(Find) the two cross products (* vajrabhyaso*) of the two lesser and two greater roots ; their sum is a lesser root. Add the product of the two lesser roots multiplied by

*to the product of the two greater roots. The sum will be a greater root. (3).*

**prakrti**
In that (equation) the interpolator will be the product of the two previous interpolators. Again the difference of the two cross products is a lesser root. Subtract the product of the two lesser roots multiplied by * prakrti* from the product of the greater roots; (The difference) will be a greater root. Here also the interpolator is the product of the two (previous) interpolator $\left( 4, 4\frac{1}{2} \right)$."

According to the above rule, if x = α, y = β be the solution of the equation Nx^{2} + k = y^{2} and x = α', y = β' be the solution of the equation Nx^{2} + k' = y^{2}, then x = αβ' ± α'β, y = ββ' ± Nαα' is the solution of the equation Nx^{2} + kk' = y^{2}. This is known as principle of composition.

We have the following relation

N(αβ' ± α'β)^{2} + kk' = (ββ'N ± αα')^{2} ... (3)

where αβ' ± α'β = lesser root and ββ' ± Nαα' = greater root.

When α = α', β = β' and k = k' then (3) reduces to

N(2αβ)^{2} + k^{2} = (β^{2} + Nα^{2})^{2}, (when upper sign is considered).

x = 2αβ and y = β^{2} + Nα^{2}.

Now y/x = β^{2} + Nα^{2}/2αβ = p^{2}_{n} + Nq^{2}_{2}/2p_{n}q_{n} where p_{n} = β and q_{n} = α and p_{n}/q_{n} has its usual meaning. This is same as result I.

Having obtained one solution, an infinite number of other solutions can be found by the repeated application of the principle of composition. Narayana (1350)^{2} says "By the principle of composition of equal as well as unequal sets of roots, (will be obtained) an infinite number of roots".

This result was already known to Brahmagupta, Bhaskara II and Kamalakara.

Result II. (Varga prakrti Vss 8—11)
*
*

hrasvavrhata praksepan

bhajyapraksepabhajakan krtva

kalpyo guno yatha ta

dvargat samsodhayet prakrtim || 8 ||

prakrtergunavarge va

visodhite jayate tu yacchesam

tata ksepahrtam ksepo

gunavargavisodhite vyastam || 9 ||

labdhih kanisthamulam

tannijagunakahatam viyuktam ca

purvalpapadaparapraksi

ptyorghatena jayate jyestham || 10 ||

praksepasodhanesva

pyekadvicatursvabhinnamule stah

dvicatuh ksepadabhyam

rupaksepaya bhavana karya || 11 ||

#### English translation:

"Making the lesser root (* hrasva mula*), greater root (

*) and interpolator (of a square nature =*

**vrhata***) the dividend, addend and divisor (respectively of a pulverser), the (indeterminate) multiplier of it should be determined in the way described before. The*

**varga prakrti***being subtracted from the square of that or the square of the multiplier being subtracted from the*

**prakrti***, the remainder divided by the (original) interpolator is the interpolator (of a new square nature =*

**prakrti***) ; and it will be reversed (*

**varga prakrti***) in sign in case of subtraction of the square of the multiplier. The quotient (corresponding to that value of the multiplier) is the lesser root (of a new square) ; and that multiplied by the multiplier and diminished by the product of the previous lesser root and (new) interpolator will be its greater root. By doing so repeatedly will be obtained two integral roots corresponding to the interpolator ±1, ±2 or ±4. In order to derive integral roots for the additive unity from those answering to the interpolator ±2 or ±4, the principle of composition (should be adopted)".*

**vyastam**
After obtaining Na^{2} + k = b^{2} and N.1^{2} + (m^{2} - N) = m^{2} for a suitable k and m by the previous method, Principle of composition is applied between (a, b, k) and (1, m, m^{2} — N) which gives rise to Na^{2}_{1} + k_{1} = b^{2}_{1} and which when repeatedly applied by the principle of composition, the solution is obtained.

where

$a_1 = \frac{ax + b}{k},$

$b_1 = \frac{bn + Na}{k},$

$k_1 = \frac{n^2-N}{k}.$

Changing the suffixes, we can write

$a_{i+1} = \frac{a_in + b_i}{k_i},$ ... (i)

$b_{i+1} = \frac{b_in + Na_i}{k_i},$ ... (ii)

$k_{i+1} = \frac{n^2-N}{k_i}.$ ... (iii)

Now take a_{i} = q_{i}, b_{i} = p_{i} then for every i, we have

$\frac{b_{i+1}}{a_{i+1}} = \frac{b_in + Na_i}{a_in + b_i}$

or, $\frac{p_{i+1}}{q_{i+1}} = \frac{p_in + Nq_i}{q_in + p_i}$

or, np_{i}q_{i+1} + Nq_{i}q_{i+1} = nq_{i}p_{i+1} + p_{i}p_{i+1}

or, Nq_{i}q_{i+1} - p_{i}p_{i+1} = n(q_{i}p_{i+1} - q_{i+1}p_{i})

or, Nq_{i}q_{i+1} - p_{i}p_{i+1} = n(-1)^{i+1} ... (iv)

But when we consider √N as a simple continued fraction, then √N = √A/B. Therefore (iv) is transformed.

To Aq_{i}q_{i+1} — Bp_{i}p_{i+1} = (-1)^{i}b_{i+2}

where n = b_{i+2}.

This shows that results of Bhaskara II has been discussed systematically in details by Narayana by the knowledge of continued fraction.

### Acknowledgements

The author expresses his gratitude to Prof. M. C. Chaki and Dr. A. K. Bag for their kind help and guidance for presentation of this paper, and offers thanks to the referee for his kind suggestions.