Liu Hui's π algorithm: Difference between revisions

Content deleted Content added
Link suggestions feature: 3 links added.
 
(33 intermediate revisions by 24 users not shown)
Line 1:
{{Short description|Calculation of π by 3rd century mathematician Liu Hui}}
{{DISPLAYTITLE:Liu Hui's {{pi}} algorithm}}
{{pi box}}
[[Image:Cutcircle2.svg|thumb|right|Liu Hui's method of calculating the area of a circle]]
'''Liu Hui's {{pi}} algorithm''' was invented by [[Liu Hui]] (fl. 3rd century), a mathematician of the state of [[Cao Wei Kingdom]]. Before his time, the ratio of the circumference of a circle to its diameter was often taken experimentally as three in China, while [[Zhang Heng]] (78&ndash;139) rendered it as 3.1724 (from the proportion of the celestial circle to the diameter of the earth, {{math|92/29}}) or as <math>\pi \approx \sqrt{10} \approx 3.162</math>. Liu Hui was not satisfied with this value. He commented that it was too large and overshot the mark. Another mathematician [[WanWang Fan]] (219&ndash;257) provided {{math|1=π ≈ 142/45 ≈ 3.156}}.<ref>Schepler, Herman C. (1950), “The Chronology of Pi”, Mathematics Magazine 23 (3): 165–170, {{issn|0025-570X}}.</ref> All these empirical {{pi}} values were accurate to two digits (i.e. one decimal place). Liu Hui was the first Chinese mathematician to provide a rigorous algorithm for calculation of {{pi}} to any accuracy. Liu Hui's own calculation with a 96-gon provided an accuracy of five digits: ie {{math|π ≈ 3.1416}}.
 
Liu Hui remarked in his commentary to ''[[The Nine Chapters on the Mathematical Art]]'',<ref>Needham, Volume 3, 66.</ref> that the ratio of the circumference of an inscribed hexagon to the diameter of the circle was three, hence {{pi}} must be greater than three. He went on to provide a detailed step-by-step description of an iterative algorithm to calculate {{pi}} to any required accuracy based on bisecting polygons; he calculated {{pi}} to between 3.141024 and 3.142708 with a 96-gon; he suggested that 3.14 was a good enough approximation, and expressed {{pi}} as 157/50; he admitted that this number was a bit small. Later he invented an ingeniousa [[#Quick method|quick method]] to improve on it, and obtained {{math|π ≈ 3.1416}} with only a 96-gon, witha level anof accuracy comparable to that from a 1536-gon. His most important contribution in this area was his simple iterative {{pi}} algorithm.
 
==Area of a circle==
Line 13 ⟶ 14:
:"''Multiply one side of a hexagon by the radius (of its circumcircle), then multiply this by three, to yield the area of a dodecagon; if we cut a hexagon into a dodecagon, multiply its side by its radius, then again multiply by six, we get the area of a 24-gon; the finer we cut, the smaller the loss with respect to the area of circle, thus with further cut after cut, the area of the resulting polygon will coincide and become one with the circle; there will be no loss''".
 
This is essentially equivalent to:
Apparently Liu Hui had already mastered the concept of the limit<ref>First noted by Japanese mathematician [[Yoshio Mikami]]</ref>
: <math>\lim_{N \to \infty}\text{area of }N\text{-gon} = \text{area of circle}. \, </math>
 
Line 22 ⟶ 23:
In the diagram {{math|''d''}} = excess radius. Multiplying {{math|''d''}} by one side results in oblong {{math|ABCD}} which exceeds the boundary of the circle. If a side of the polygon is small (i.e. there is a very large number of sides), then the excess radius will be small, hence excess area will be small.
 
As in the diagram, when {{math|''N'' → ∞}}, {{math|''d'' → 0}}, and {{math|ABCD → 0}}.
 
"''Multiply the side of a polygon by its radius, and the area doubles; hence multiply half the circumference by the radius to yield the area of circle''".
 
When {{math|''N'' → ∞}}, half the circumference of the {{math|''N''}}-gon approaches a semicircle, thus half a circumference of a circle multiplied by its radius equals the area of the circle. Liu Hui did not explain in detail this deduction. However, it is self-evident by using Liu Hui's "in-out complement principle" which he provided elsewhere in ''The Nine Chapters on the Mathematical Art'': Cut up a geometric shape into parts, rearrange the parts to form another shape, the area of the two shapes will be identical.
 
Thus rearranging the six green triangles, three blue triangles and three red triangles into a rectangle with width = 3{{math|''L''}}, and height {{math|''R''}} shows that the area of the dodecagon = 3{{math|''RL''}}.
Line 61 ⟶ 62:
Bisect {{math|AB}} with line {{math|OPC}}, {{math|AC}} becomes one side of [[dodecagon]] (12-gon), let its length be {{math|m}}. Let the length of {{math|PC}} be {{math|j}} and the length of {{math|OP}} be {{math|G}}.
 
{{math|AOPAPO}}, {{math|APC}} are two right angle triangles. Liu Hui used the [[Pythagorean theorem|Gou Gu theorem]] repetitively:
 
: <math>{} G^2 = r^2 - \left(\tfrac{M}{2}\right)^2</math>
Line 71 ⟶ 72:
: <math>{} m = \sqrt{\left(\tfrac{M}{2}\right)^2 + \left(r - \sqrt{r^2- \tfrac{M^2}{4}}\right)^2}</math>
 
From here, there is now a technique to determine {{math|m}} from {{math|M}}, which gives the side length for a polygon with twice the number of edges. Starting with a [[hexagon]], Liu Hui could determine the side length of a dodecagon using this formula. Then continue repetitively to determine the side length of aan 24-gon[[icositetragon]] given the side length of a dodecagon. He could do this recursively as many times as necessary. Knowing how to determine the area of these polygons, Liu Hui could then approximate {{pi}}.
 
With <math>r = 10</math> units, he obtained
 
: area of 48[[tetracontaoctagon|96-gon]] <math>{}A_{96} = 313 {584 \over 625} </math>
: area of 96192-gon <math>{}A_{192} = 314 {64 \over 625} </math>
: Difference of 96-gon and 48-gon:
 
Line 91 ⟶ 92:
:<math>{} 3.141024 < \pi < 3.142704.</math>
 
He never took {{pi}} as the average of the lower limit 3.141024 and upper limit 3.142704. Instead he suggested that 3.14 was a good enough approximation for {{pi}}, and expressed it as a fraction <math>\tfrac{157}{50}</math>; he pointed out this number is slightly less than the realactual thingvalue of {{pi}}.
 
Liu Hui carried out his calculation with [[rod calculus]], and expressed his results with fractions. However, the iterative nature of Liu Hui's {{pi}} algorithm is quite clear:
Line 139 ⟶ 140:
Liu Hui was quite happy with this result because he had acquired the same result with the calculation for a 1536-gon, obtaining the area of a 3072-gon. This explains four questions:
 
# Why he stopped short at {{math|''A''}}<sub>192</sub> in his presentation of his algorithm. Because he discovered a quick method of improving the accuracy of {{pi}}, achieving same result of 1536-gon with only 96-gon. After all calculation of square roots was not a simple task with [[rod calculus]]. With the quick method, he only needed to perform one more [[subtraction]], one more division (by 3) and one more addition, instead of four more square root extractions.
# Why he preferred to calculate {{pi}} through calculation of areas instead of circumferences of successive polygons, because the quick method required information about the difference in '''areas''' of successive polygons.
# Who was the true author of the paragraph containing calculation of <math>\pi = {3927 \over 1250}.</math>
# That famous paragraph began with "A [[Han dynasty]] bronze container in the military warehouse of [[Jin Dynasty (265–420)|Jin dynasty]]....". Many scholars, among them [[Yoshio Mikami]] and [[Joseph Needham]], believed that the "Han dynasty bronze container" paragraph was the work of Liu Hui and not Zu Chongzhi as other believed, because of the strong correlation of the two methods through area calculation, and because there was not a single word mentioning Zu's 3.1415926 < {{pi}} < 3.1415927 result obtained through 12288-gon.
 
==Later developments==
Line 168 ⟶ 169:
 
==Significance of Liu Hui's algorithm==
Liu Hui's {{pi}} algorithm was one of his most important contributions to ancient [[Chinese mathematics]]. It was based on calculation of {{math|N}}-gon area, in contrast to the Archimedean algorithm based on polygon circumference. With this method Zu Chongzhi obtained the eight-digit result: 3.1415926 < {{pi}} < 3.1415927, which held the world record for the most accurate value of {{pi}} for 1200 yearscenturies, even by 1600 in Europe, the Dutch mathematician [[Adriaan Anthonisz]] and his son obtained {{pi}} value of 3.1415929, accurate only to 7 digits.<ref>Robert Temple, The Genius of China, a refined value of pi, p144-145, {{isbn|1-85375-292-4}}</ref> until [[Madhava of Sangamagrama]] calculated 11 digits in the 14th century or [[Jamshid al-Kashi]] calculated 16 digits in 1424; the best approximations for {{pi}} known in Europe were only accurate to 7 digits until [[Ludolph van Ceulen]] calculated 20 digits in 1596.
 
== See also ==
* [[Method of exhaustion]] (5th century BC)
* [[Zhao Youqin's π algorithm]] (13-14th century)
* [https://proofwiki.org/wiki/Newton%27s_Formula_for_Pi Proof of Newton's Formula for Pi] (17th century)
 
==Notes==
{{Original research|section|date=March 2009}}
:{{note|1|1}} Correct value: 0.2502009052
:{{note|2|2}} Correct values:
Line 197 ⟶ 198:
{{DEFAULTSORT:Liu Hui's Pi Algorithm}}
[[Category:Pi algorithms]]
[[Category:Chinese mathematicsmathematical discoveries]]
[[Category:Cao Wei]]