# A Rationale of Bhaskara and his Method for Solving ax ± c = by

### Central Library, Calcutta University, Calcutta

#### (Received 10 January 1977 ; after revision 17 March 1977)

Indian Scholar Bhaskara I (522 A. D.) perhaps used the method of continued fraction to find out the integral solution of the indeterminate equation of the type by = ax — c. The paper presents the original Sanskrit verses (in Roman Character) from Bhaskara I's Maha Bhaskaryia, its English translation with modern interpretation.

### Introduction

Bhaskara I (522 A. D.) gave a rule in his Mahabhaskariya for obtaining the general solution of the linear indeterminate equation of the type by = ax — c. This form seems to have chosen by Bhaskara I deliberately so as to supplement the form of Aryabhata I. Smith1 following Kaye said that Aryabhata 1 attempted at a general solution of the linear indeterminate equation by the method of continued fraction. In this paper we shall deduce the formula pnqn-1 - qnpn-1 = (-1)n of the continued fraction from the Bhaskara I's method of solution of indeterminate equation of the first degree and then we may draw the conclusion that the formula pnqn-1 - qnpn-1 = (-1)n of the continued fraction was implicitly involved in the Bhaskara I's method of solution of the indeterminate equation of first degree.

### A Few Lines about the Continued Fraction

$a/b = a_1 + \frac{1}{a_2 + } \frac{1}{a_3 + } \cdots$

Let
p1/q1, p2/q2;... , pn/qn ... be the successive convergents of a/b then
$p_1/q_1 = a_1$                   ... (i)
$p_2/q_2 = \frac{a_1a_2 + 1}{a_2}$               ... (ii)
$p_3/q_3 = \frac{a_1(a_1a_2 + 1) + a_3}{a_2a_3 + 1}$           ... (iii)

$p_4/q_4 = \frac{a_1[a_2(a_3a_4 + 1) + a_4] + a_3a_4 + 1}{a_2(a_3a_4 + 1) + a_4}$     ... (iv)

$p_5/q_5 = \frac{a_1a_2a_3a_4a_5 + a_3a_4a_5 + a_1a_4a_5 + a_1a_2a_5 + a_1a_2a_3 + a_1a_2a_3 + a_5 + a_3 + a_1}{a_2a_2a_4a_5 + a_2a_5 + a_2a_5 + a_4a_5 + 1}$   ... (v)
and the following result will be easily obtained
pnqn-1 - qnpn-1 = (-1)n

Bhaskara I (522 A. D) gave the following rule in his Maha Bhaskariya
kena hato' yamapaniya jathasya sesam
bhagam dadati parisudhamiti pracintyam II 42 II
aptam matim tam binidhaya ballam
llabdhena yuktam paratasca tadvat II 43 II
harena bhajyo bidhino paristho
tadva bhavedyasya samihitam yat II 44 II

Datta and Singh translate these Slokas as follows:
"Set down the dividend above and the divisor below. Write down successively the quotients of their mutual division, one below the other, in the form of a chain. Now find by what number the last remainder should be multiplied, such that the product being subtracted by the (given) residue (of the revolution) will be exactly divisible (by the divisor corresponding to that remainder). Put down that optional number below the chain and then the (new) quotient underneath. Then multiply the optional number by that quantity which stands just above it and add to the product the (new) quotient (below). Proceed afterwards also in the same way. Divide the upper number (i.e. multiplier) obtained by this process by the divisor and the lower one by the dividend; the remainders will respectively be the desired ahargana and the revolutions."
After translation Datta and Singh further said
"The equation contemplated in this rule is
$\frac{ax - c}{b} = \textrm { a positive integer.}$

This form of the equation seems to have been chosen by Bhaskara I deliberately so as to supplement the form Aryabhata I in which the interpolator is always made positive by necessary transposition. Further b is taken to be greater than a, as is evident from the following rule. So the first quotient of mutual divisions of a and b is always zero. This has not been taken into consideration. Also the number of quotients in the chain is taken to be even."

### Rationale of the Rule

The equation is of the type ax — c = by               ... (1)
where a = dividend, b = divisor, x = multiplier, y = quotient, remembering that a < b.
Now according to sloka we have.

Here
$a = a_1b + a \\ b = a_2a + r_1 \\ a = a_3r_1 + r_2 \\ r_1 = a_4r_2 + r_3 \\ r_2 = a_5r_3 + r_4.$             ... (2)
Consider the even number of (partial) quotients, say four Remember that Datta and Singh said "... . So the first quotient of mutual division of a by b is always zero. This has not been taken into consideration." Therefore a5 is the even (partial) quotient.
Let t1 = optional number.
$\textrm{Now } \frac{r_4t_1 - c}{r_3} = k_1,$
$t_1 = \frac{k_1r_3 + c}{r_4}.$
Consider the table

Here       $s_1 = a_5t_1 + k_1 \\ \qquad = a_5 \left(\frac{k_1r_3 + c}{r_4}\right) + k_1\left[t_1 = \frac{k_1r_3 + c}{r_4}\right] \\ \qquad = \frac{k_1(a_5r_3 + r_4) + a_5c}{r_4} \\ \qquad = \frac{k_1r_2 + a_5c}{r_4} \qquad [r_2 = a_5 r_3 + r_4]$
$s_2 = a_4s_1 + t_1 \\ \qquad = a_4 \left(\frac{k_1r_2 + a_5c}{r_4}\right) + \frac{k_1r_3 + c}{r_4} \\ \qquad = \frac{k_1(a_4r_2 + r_3) + c(a_4a_5 + 1)}{r_4} \\ \qquad \frac{k_1r_1 + c(a_4a_5 + 1)}{r_4} \qquad [r_1 = a_4 r_2 + r_3]$
$s_3 = a_3s_2 + s_1 \\ \qquad = a_3 \left(\frac{k_1r_1 + c(a_4a_5 + 1)}{r_4}\right) + \frac{k_1r_2 + a_5c}{r_4} \\ \qquad = \frac{k_1(a_3r_1 + r_2) + c(a_3a_4a_5 + a_3 + a_5)}{r_4} \\ \qquad \frac{k_1a + c(a_3a_4a_5 + a_3 + a_5)}{r_4} \qquad [a = a_3 r_1 + r_2]$
$L = a_2s_3 + s_2 \\ \qquad = a_2 \left(\frac{k_1a + c(a_3a_4a_5 + a_3 + a_5)}{r_4}\right) + \frac{k_1r_1 + c(a_4a_5 + 1)}{r_4} \\ \qquad = \frac{k_1(a_2a + r_1) + c(a_2a_3a_4a_5 + a_2a_3 + a_2a_5 + a_4a_5 + 1)}{r_4} \\ \qquad = \frac{k_1b + c(a_2a_3a_4a_5 + a_2a_3 + a_2a_5 + a_4a_5 + 1)}{r_4} \qquad [b = a_2 a + r_1] \\ \qquad =\frac{k_1b + cq_5}{r_4} \textrm{ by (v) }$
$U = a_1L + s_3 \\ \qquad = \frac{a_1[k_1b + c(a_2a_3a_4a_5 + a_2a_3 + a_2a_5 + a_4a_5 + 1)]}{r_4} + \frac{k_1a + c(a_3a_4a_5 + a_3 + a_5)}{r_4} \\ \qquad = \frac{k_1(a_1b + a) + c[a_1a_2a_3a_4a_5 + a_1a_2a_3 + a_1a_2a_5 + a_1a_4a_5 + a_3a_4a_5 + a_1 + a_3 + a_5]}{r_4} \\ \frac{k_1a + cp_5}{r_4} \qquad [a = a_1 b + a \textrm{ and by (v)}].$

Here
$\frac{p_6}{q_6} = \frac{a}{b} \textrm{ and } \frac{L}{U} = \frac{k_1b + cq_5}{k_1a + cp_5}$

Now
$p_6L - q_6U = p_6(k_1b + cq_5) - q_6(k_1a + cp_5) \\ \qquad \qquad \qquad = a(k_1b + cq_5) - b(k_1a + cp_5) \\ \qquad \qquad \qquad = k_1b + acq_5 - k_1ab - bcp_5 \\ \qquad \qquad \qquad = c(aq_5 - bp_5) \\ \qquad \qquad \qquad = c(p_6q_5 - q_6p_5) \\ \qquad \qquad \qquad = c(-1)^6 \\ \qquad \qquad \qquad = c$

We have taken L = x, U = y
$p_6L - q_6U = c \\ p_6x - q_6y = c \\ \textrm{or, } ax - by = c \\ \textrm{or, } ax - c = by$
which is the original form ax — c = by.
Thus we see that the formula pnqn-1 - qnpn-1 = (-1)n of the continued fraction is implicitly involved in the Bhaskara I's method of solution of the indeterminate equation of the first degree.

### Example

Now let us take an example from the Ganita Sara Samgraha B of Mahavira. Mahavira says
drstvamrarasin pathiko jathaika
trimsatsamuham kurute trihinam
sese hrte saptativistrimisrai
rnarairvisudham kathayaikasamkham

Rangacharya translates this as follows: —
"A traveller sees heaps of mangoes (equal in numerical value) and makes 31 heaps less by 3 (fruits); and when the remainder (of these 31 heaps) is equally divided among 73 men, there is no remainder (of these 31 heaps) is equally divided among 73 men, there is no remainder. Give out the numerical value of one (of these heaps)."

This gives us at once the following equation

73x = 31x - 3.

Take the even number of partial quotients say 2. (Here a3 = 2nd partial quotient as Datta and Singh said".... So the the first quotient of mutual division of a and b is always. This has not been taken into consideration).
Now according to Bhaskara I's rule we have
$\frac{9.t - 3}{11} \textrm{ where t is the optional number }$
take t = 4, then k1 = 3.
Consider the Valli (table)

Ans x = 26.

### Acknowledgements

The author expresses his gratitude to Prof. M. C. Chaki and Dr. A. K. Bag for their kind suggestions and guidance for presentation of this paper. Thanks are due to the referee for his comments towards the improvement of the paper.

Contact email: