Bhaskara - S Approximation For The Sine
Bhaskara - S Approximation For The Sine
Volume 11 Article 4
Number 3 Number 3
12-2014
Recommended Citation
Stroethoff, Karel (2014) "Bhaskara’s approximation for the Sine," The Mathematics Enthusiast: Vol. 11 :
No. 3 , Article 4.
DOI: https://doi.org/10.54870/1551-3440.1313
Available at: https://scholarworks.umt.edu/tme/vol11/iss3/4
This Article is brought to you for free and open access by ScholarWorks at University of Montana. It has been
accepted for inclusion in The Mathematics Enthusiast by an authorized editor of ScholarWorks at University of
Montana. For more information, please contact [email protected].
TME, vol. 11, no. 3, p. 485
Karel Stroethoff
University of Montana
The 7th century Indian mathematician Bhaskara (c.600 – c.680) obtained a remarkable approximation for the sine
function. Many subsequent ancient authors have given versions of this rule, but none provided a proof or described
how the result was obtained. Grover [1] provides a possible explanation, but I think the rule can be explained more
clearly. Rather than give the rule first, we will derive it, and then discuss its accuracy, and explore some alternative
approximations. Our derivation is simply an exercise in modeling.
Approximating the Sine: A Possible Derivation of Bhaskara’s Approximation. Our goal is to approximate
the sine function on the interval [0◦ , 180◦] (I have seen the rule formulated for radians, in conjunction with certain
approximations of π; we will see that none of this is necessary when we simply work with degrees. I will be careful to
use degrees in the notation, so that we can translate some of the formulas for use with radians without ambiguity).
Graph of the function y = sin(θ◦ ) over the interval [0, 180]:
1 y = sin(θ◦ )
1/2
θ
0 30 60 90 120 150 180
We will use that the above graph is symmetric with respect to θ = 90. It is not hard to find a polynomial with
the same symmetry which takes values 0 for θ = 0 and θ = 180: p(θ) = θ(180 − θ). The value of p at θ = 90 is
p(90) = 90(180 − 90) = 8100, so the polynomial p/8100 has the same symmetry about θ = 90, and the same values
as sin(θ◦ ) at the points θ = 0, 90, 180. This is all as in Grover [1], who states that Bhaskara referred to the quantity
θ(180 − θ) as ‘prathama’ (Grover does not provide the meaning of this word; it is Sanskrit for “first”), from which
we can infer that this is also in Bhaskara’s work. The quadratic polynomial p(θ)/8100 = θ(180 − θ)/8100 can be
viewed as a crude (first) approximation of sin(θ◦ ) on the interval [0, 180]. The following graph shows how the two
functions compare:
The Mathematics Enthusiast, ISSN 1551-3440, vol. 11, no. 3, pp. 485–492
c The Author(s) & Dept. of Mathematical Sciences – The University of Montana
2014
Stroethoff, p. 486
1 y = sin(θ◦ )
θ(180 − θ)
y=
8100
1/2
θ
0 30 60 90 120 150 180
a p(θ)
f (θ) = , 0 6 θ 6 180.
1 + b p(θ)
Clearly f has the same symmetry as p about θ = 90, and f (0) = f (180) = 0. To get value 1 at θ = 90 it is required
a
that 1+b = 1, that is, a = 1 + b, so
(1 + b)p(θ)
f (θ) = , 0 6 θ 6 180.
1 + b p(θ)
To get value 1/2 at θ = 30 it is required that
1 (1 + b)p(30) (1 + b) 49
= f (30) = = ,
2 1 + b p(30) 1 + b 94
4 θ(180 − θ)
4
p(θ)
5 5 8100 4θ(180 − θ)
f (θ) = = = .
1 − 51 p(θ) θ(180 − θ) 40500 − θ(180 − θ)
1 − 15
8100
This gives Bhaskara’s approximation formula for the sine function.
4θ(180 − θ)
Bhaskara’s Approximation Formula: sin(θ◦ ) ≈ , for 0 6 θ 6 180.
40500 − θ(180 − θ)
Alternative Derivation. There is an even simpler argument to obtain Bhaskara’s formula. I have no doubt now
that Bhaskara must have reasoned as follows.
The polynomial p(θ) = θ(180 − θ)/8100 is symmetric with respect to 90, and agrees with the values of the sine for
4500
0, 90, and 180 degrees, but not for 30 degrees (and 150 degrees). In fact we have p(30) = 8100 = 59 . Now, it is easy
10 1
to construct a polynomial q symmetric about θ = 90 which takes value 9 = 1 + 9 at 30 (the reason for this value
will become clear momentarily) and value 1 at 90: the polynomial
(θ − 90)2 (θ − 90)2
q(θ) = 1 + 2
=1+
9(30 − 90) 32400
TME, vol. 11, no. 3, p. 487
p(90)
will do the job. Since p(90) = 1 and q(90) = 1, we have q(90) = 1. Note that
5
p(30) 9 1
= 10 = .
q(30) 9
2
Also p(0)
q(0) = 0. So the following function is symmetric about 90 and has the same values as the sine at 0, 30, and 90
degrees (as well as 150 and 180 degrees by symmetry):
θ(180 − θ)
8100 4θ(180 − θ) 4θ(180 − θ)
r(θ) = 2 = 32400 + (θ − 90)2 = 40500 − θ(180 − θ) ,
(θ − 90)
1+
32400
which is Bhaskara’s rational function! The simplicity of this argument makes it likely that the formula was derived
along these lines.
Accuracy of Bhaskara’s Approximation. To see how good of an approximation this is we plot the above rational
function in the same window as the sine function:
1 y = sin(θ◦ )
4θ(180 − θ)
y=
40500 − θ(180 − θ)
1/2
θ
0 30 60 90 120 150 180
Since the two graphs are not distinguishable, we plot the difference on a larger scale:
0.0013436967
y
4θ(180 − θ)
y = sin(θ◦ ) −
40500 − θ(180 − θ)
θ
0
30 60 90 120 150 180
−0.001631765
The error is bounded by 0.00165 over the entire interval (in the above graph the minimum of about −0.001631765 oc-
curs near θ = 11.543848 and θ = 168.4561524, and the maximum of about 0.0013436967 occurs near θ = 51.34589377
and θ = 128.6541062) so this is a very good approximation.
Stroethoff, p. 488
An Approximation Formula for the Cosine. It is fairly easy to see that we get the same result if we approximate
2
y = cos(θ◦ ) on the interval [−90, 90], starting with the quadratic polynomial q(θ) = 8100−θ
8100 . Of course this can
also be seen using the identity cos(θ◦ ) = sin(θ◦ + 90◦ ). Either way, Bhaskara’s approximation for the sine has the
following analog for the cosine:
4(90 + θ) (180 − (90 + θ))
cos(θ◦ ) ≈
40500 − (90 + θ) (180 − (90 + θ))
4(90 + θ)(90 − θ)
=
40500 − (90 + θ)(90 − θ)
32400 − 4θ2
= .
32400 + θ2
We can rewrite the above rational function as
32400 − 4θ2 32400 + θ2 − 5θ2 5θ2 1
2
= 2
=1−
32400 + θ 32400 + θ 32400 1 + θ2 /32400
2
θ 1
=1−5 2
180 1 + (θ/180)
2 X∞ 2n
θ n θ
=1−5 (−1)
180 n=0 180
2 4 6
θ θ θ
=1−5 +5 −5 + ··· .
180 180 180
180 x
Now, if − π2 6 x 6 π2 , then cos x = cos(θ◦ ), where θ = , so the above analog of Bhaskara’s sine approximation
π
for the cosine gives the approximation
x 2 x 4 x 6
cos x ≈ 1 − 5 +5 −5 + ···
π π π
5 5 5
= 1 − 2 x2 + 4 x4 − 6 x6 + · · · .
π π π
2
So Bhaskara’s approximation does√ not agree with even a second order approximation unless π = 10. This agrees
with the approximation of π by 10 in use at Bhaskara’s time; although this was not the best approximation known
at the time, this approximation was popular in India, perhaps because it fits so nicely with the above approximation
rules for sines and cosines.
Approximating the Sine using Polynomials. The above method is not the only way to improve the first order
approximation of θ(180 − θ)/8100. If we put p = θ(180 − θ) as above, then we could also fit y = sin(θ◦ ) to the
function ap + bp2 , a second order polynomial in p (thus a 4th order polymial in θ). We need the following values
for p:
θ p y
0 0 0
30 4500 1/2
90 8100 1
Now substitute p = θ(180 − θ) into the above expression to get the function1
To see how good of an approximation this is we plot the above polynomial in the same window as the sine function:
y
y = sin(θ◦ )
1
27900 θ(180 − θ) + θ2 (180 − θ)2
y=
291600000
1/2
θ
0 30 60 90 120 150 180
Since the two graphs are not distinguishable, we plot the difference on a larger scale:
y
0.0010902926
θ
0
30 60 90 120 150 180
−0.0007600704
The error is bounded by 0.0011 over the entire interval (in the above graph the minimum of about −0.0007600704
occurs near θ = 50.64638193 and θ = 129.3536181, and the maximum of about 0.0010902926 occurs near θ =
11.063325 and θ = 168.936675) so the approximation
1 That the same result is obtained by substituting θ = 90 and θ = 30 into the function a θ(180 − θ) + b θ 2 (180 − θ)2 to obtain the
system of equations
8100 a + 81002 b = 1,
4500 a + 45002 b = 1/2,
Graph of the difference of the above 4th order Taylor polynomial and the cosine:
y 1 πθ 2 1 πθ 4
y =1− 2 180 + 24 180 − cos(θ◦ )
.02
.01
θ
−90 −60 −30 0 30 60 90
y
49 θ 2 18 θ 4
.002 y =1− 10 180 + 5 180 − cos(θ◦ )
.001
θ
−90 −60 −30 0 30 60 90
−.001
−.002
The absolute value of the maximum error over the entire interval is almost 20 times as large for the Taylor approxi-
mation.
TME, vol. 11, no. 3, p. 491
In spite of the fact that the approximations to π associated with these sine and cosine approximations are lousy at
best, it is amazing that the convergence of the functions over the appropriate intervals is so good. Obviously we can
get a better approximation by interpolating more values. Noting that Bhaskara’s rational approximation and the
above polynomial approximation have errors generally in opposite direction (see the graphs of the errors), a better
approximation is obtained by taking the average of the two approximations. I will leave it as an exercise for the inter-
ested reader to plot the resulting error, which has absolute value less than 0.0003 (the difference between the sine and
the approximating function2 has maximum less than 0.0002926893092 and minimum more than −0.000272872444).
Approximating the Sine using More Special Values. We can√also obtain better approximation formulas by
interpolating more values of the sine. For example, using sin(60◦ ) = 3/2, we need the following values for p:
θ p y
0 0 0
30 4500 √1/2
60 7200 3/2
90 8100 1
1 y = sin(θ◦ )
y = h(θ)
1/2
θ
0 30 60 90 120 150 180
Since the two graphs are not distinguishable, we plot the difference on a larger scale:
y
0.00001 y = sin(θ◦ ) − h(θ)
θ
0
30 60 90 120 150 180
−0.00001
−0.00002
−0.00003
−0.00004
Reference
[1] S. Grover, History of Development of Mathematics in India, Atma Ram & Sons, Delhi and Lucknow, 1994.