# Ceyuan haijing

Ceyuan haijing (simplified Chinese: 测圆海镜; traditional Chinese: 測圓海鏡; pinyin: cè yuán hǎi jìng; lit. 'sea mirror of circle measurements') is a treatise on solving geometry problems with the algebra of Tian yuan shu written by the mathematician Li Zhi in 1248 in the time of the Mongol Empire. It is a collection of 692 formula and 170 problems, all derived from the same master diagram of a round town inscribed in a right triangle and a square. They often involve two people who walk on straight lines until they can see each other, meet or reach a tree or pagoda in a certain spot. It is an algebraic geometry book, the purpose of book is to study intricated geometrical relations by algebra.
Majority of the geometry problems are solved by polynomial equations, which are represented using a method called tian yuan shu, "coefficient array method" or literally "method of the celestial unknown". Li Zhi is the earliest extant source of this method, though it was known before him in some form. It is a positional system of rod numerals to represent polynomial equations.
Ceyuan haijing was first introduced to the west by the British Protestant Christian missionary to China, Alexander Wylie in his book Notes on Chinese Literature, 1902. He wrote:
   The first page has a diagram of a circle contained in a triangle, which is dissected into 15 figures; the definition and ratios of the several parts are then given, and there are followed by 170 problems, in which the principle of the new science are seen to advantage. There is an exposition and scholia throughout by the author.
This treatise consists of 12 volumes.

## Volume 1
### Diagram of a Round Town

The monography begins with a master diagram called the Diagram of Round Town(圆城图式). It shows a circle inscribed in a right angle triangle and four horizontal lines, four vertical lines.
* TLQ, the large right angle triangle, with horizontal line LQ, vertical line TQ and hypotenuse TL
C: Center of circle:
* NCS: A vertical line through C, intersect the circle and line LQ at N(南north side of city wall), intersects south side of circle at S(南).
* NCSR, Extension of line NCS to intersect hypotenuse TL at R(日)
* WCE: a horizontal line passing center C, intersects circle and line TQ at W(西, west side of city wall) and circle at E (东, east side of city wall).
* WCEB:extension of line WCE to intersect hypotenuse at B(川)
* KSYV: a horizontal tangent at S, intersects line TQ at K(坤), hypotenuse TL at Y(月).
* HEMV: vertical tangent of circle at point E, intersects line LQ at H, hypotenuse at M(山, mountain)
* HSYY, KSYV, HNQ, QSK form a square, with inscribed circle C.
* Line YS, vertical line from Y intersects line LQ at S(泉, spring)
* Line BJ, vertical line from point B, intersects line LQ at J(夕, night)
* RD, a horizontal line from R, intersects line TQ at D(旦, day)
The North, South, East and West direction in Li Zhi's diagram are opposite to our present convention.

### Triangles and their sides

There are a total of fifteen right angle triangles formed by the intersection between triangle TLQ, the four horizontal lines, and four vertical lines.
The names of these right angle triangles and their sides are summarized in the following table
| Number | Name | Vertices | Hypotenuse0c | Vertical0b | Horizontal0a |
| 1 | 通 TONG | 天地乾 $\triangle TLQ$ | 通弦（TL天地） | 通股（TQ天乾） | 通勾（LQ地乾） |
| 2 | 边 BIAN | 天西川 $\triangle TWB$ | 边弦（TB天川） | 边股（TW天西） | 边勾（WB西川） |
| 3 | 底 DI | 日地北 $\triangle RDN$ | 底弦（RL日地） | 底股（RN日北） | 底勾（LB地北） |
| 4 | 黄广 HUANGGUANG | 天山金 $\triangle TMJ$ | 黄广弦（TM天山） | 黄广股（TJ天金） | 黄广勾（MJ山金） |
| 5 | 黄长 HUANGCHANG | 月地泉 $\triangle YLS$ | 黄长弦（YL月地） | 黄长股（YS月泉） | 黄长勾（LS地泉） |
| 6 | 上高 SHANGGAO | 天日旦 $\triangle TRD$ | 上高弦（TR天日） | 上高股（TD天旦） | 上高勾（RD日旦） |
| 7 | 下高 XIAGAO | 日山朱 $\triangle RMZ$ | 下高弦（RM日山） | 下高股（RZ日朱） | 下高勾（MZ山朱） |
| 8 | 上平 SHANGPING | 月川青 $\triangle YSG$ | 上平弦（YS月川） | 上平股（YG月青） | 上平勾（SG川青） |
| 9 | 下平 XIAPING | 川地夕 $\triangle BLJ$ | 下平弦（BL川地） | 下平股（BJ川夕） | 下平勾（LJ地夕） |
| 10 | 大差 DACHA | 天月坤 $\triangle TYK$ | 大差弦（TY天月） | 大差股（TK天坤） | 大差勾（YK月坤） |
| 11 | 小差 XIAOCHA | 山地艮 $\triangle MLH$ | 小差弦（ML山地） | 小差股（MH山艮） | 小差勾（LH地艮） |
| 12 | 皇极 HUANGJI | 日川心 $\triangle RSC$ | 皇极弦（RS日川） | 皇极股（RC日心） | 皇极勾（SC川心） |
| 13 | 太虚 TAIXU | 月山泛 $\triangle YMF$ | 太虚弦（YM月山） | 太虚股（YF月泛） | 太虚勾（MF山泛） |
| 14 | 明 MING | 日月南 $\triangle RYS$ | 明弦（RY日月） | 明股（RS日南） | 明勾（YS月南） |
| 15 | 叀 ZHUAN | 山川东 $\triangle MSE$ | 叀弦（MS山川） | 叀股（ME山东） | 叀勾（SE川东） |
In problems from Vol 2 to Vol 12, the names of these triangles are used in very terse terms. For instance
    "明差","MING difference" refers to the "difference between the vertical side and horizontal side of MING triangle.
    "叀差","ZHUANG difference" refers to the "difference between the vertical side and horizontal side of ZHUANG triangle."
    "明差叀差并" means "the sum of MING difference and ZHUAN difference"$(b_{14}-a_{14})+(b_{15}-a_{15})$

### Length of Line Segments

This section (今问正数) lists the length of line segments, the sum and difference and their combinations in the diagram of round town, given that the radius r of inscribe circle is $r=120$ paces $a_{1}=320$,$b_{1}=640$.
The 13 segments of ith triangle (i=1 to 15) are:
* Hypoteneuse $c_{i}$
* Horizontal $a_{i}$
* Vertical $b_{i}$
* :勾股和 :sum of horizontal and vertical $a_{i}+b_{i}$
* :勾股校: difference of vertical and horizontal $b_{i}-a_{i}$
* :勾弦和: sum of horizontal and hypotenuse $a_{i}+c_{i}$
* :勾弦校: difference of hypotenuse and horizontal $c_{i}-a_{i}$
* :股弦和: sum of hypotenuse and vertical $b_{i}+c_{i}$
* :股弦校: difference of hypotenuse and vertical $c_{i}-b_{i}$
* :弦校和: sum of the difference and the hypotenuse $c_{i}+(b_{i}-a_{i})$
* :弦校校: difference of the hypotenuse and the difference $c_{i}-(b_{i}-a_{i})$
* :弦和和: sum the hypotenuse and the sum of vertical and horizontal $a_{i}+b_{i}+c_{i}$
* :弦和校: difference of the sum of horizontal and vertical with the hypotenuse $a_{i}+b_{i}$
Among the fifteen right angle triangles, there are two sets of identical triangles:
    $\triangle TRD$=$\triangle RMZ$,
    $\triangle YSG$=$\triangle BLJ$
that is
    $a_{6}=a_{7}$;
    $b_{6}=b_{7}$;
    $c_{6}=c_{7}$;
    $a_{8}=a_{9}$;
    $b_{8}=b_{9}$;
    $c_{8}=c_{9}$;

#### Segment numbers

There are 15 x 13 =195 terms, their values are shown in Table 1:

### Definitions and formula
#### Miscellaneous formula

* $(c_{1}-a_{1})*(c_{1}*b_{1})$= $1 \over 2$*$(d_{1})^{2}$
* $a_{10}*b_{11}$= $1 \over 2$$(d_{1})^{2}$
* $a_{13}*b_{1}$= $1 \over 2$$(d_{1})^{2}$
* $a_{1}*b_{13}$= $1 \over 2$$(d_{1})^{2}$
* $b_{2}*b_{15}$= $$$(r_{1})^{2}$
* $a_{14}*a_{3}$= $(r_{1})^{2}$
* $a_{5}*b_{4}$= $(d_{1})^{2}$
* $a_{8}*b_{6}$= $a_{9}*b_{7}$$=(r_{1})^{2}$
* $(b_{14}*c_{14})*(a_{15}+c_{15})$= $(r_{1})^{2}$
* $c_{6}*c_{8}$= $c_{7}*c_{9})$=$a_{13}*b_{13}$

#### The Five Sums and The Five Differences

* $a_{2}+b_{2}+c_{2}=b_{1}+c_{1}$
* $a_{3}+b_{3}+c_{3}=a_{1}+c_{1}$
* $a_{4}+b_{4}+c_{4}=2b_{1}$
* $a_{5}+b_{5}+c_{5}=2a_{1}$
* $a_{6}+b_{6}+c_{6}=b_{1}$
* $a_{7}+b_{7}+c_{7}=b_{1}$
* $a_{8}+b_{8}+c_{8}=a_{1}$
* $a_{9}+b_{9}+c_{9}=a_{1}$
* $a_{10}+b_{10}+c_{10}=b_{1}+c_{1}-a_{1}$
* $a_{11}+b_{11}+c_{11}=c_{1}-b_{1}+a_{1}$
* $a_{12}+b_{12}+c_{12}=c_{1}$
* $a_{13}+b_{13}+c_{13}=a_{1}+b_{1}-c_{1}$
* $a_{14}+b_{14}+c_{14}=c_{1}-a_{1}$
* $a_{15}+b_{15}+c_{15}=c_{1}-c_{1}$
* $(b_{7}-a_{7})+(b_{8}-a_{8})+(b_{14}-a_{14})+(b_{15}-a_{15})=2*(b_{12}-a_{12})$
* $a_{8}+(b_{7}-a_{7})+(b_{8}-a_{8})=b_{7}$
Li Zhi derived a total of 692 formula in Ceyuan haijing. Eight of the formula are incorrect, the rest are all correct
From vol 2 to vol 12, there are 170 problems, each problem utilizing a selected few from these formula to form 2nd order to 6th order polynomial equations. As a matter of fact, there are 21 problems yielding third order polynomial equation, 13 problem yielding 4th order polynomial equation and one problem yielding 6th order polynomial

## Volume 2

This volume begins with a general hypothesis
* Suppose there is a round town, with unknown diameter. This town has four gates, there are two WE direction roads and two NS direction roads outside the gates forming a square surrounding the round town. The NW corner of the square is point Q, the NE corner is point H, the SE corner is point V, the SW corner is K. All the various survey problems are described in this volume and the following volumes.
All subsequent 170 problems are about given several segments, or their sum or difference, to find the radius or diameter of the round town. All problems follow more or less the same format; it begins with a Question, followed by description of algorithm, occasionally followed by step by step description of the procedure.

### Nine types of inscribed circle

The first ten problems were solved without the use of Tian yuan shu. These problems are related to various types of inscribed circle.

### Question 1

    Two men A and B start from corner Q. A walks eastward 320 paces and stands still. B walks southward 600 paces and see B. What is the diameter of the circular city ?
    Answer: the diameter of the round town is 240 paces.
    This is inscribed circle problem associated with $\triangle TLQ$
    Algorithm:$d={2a_{1}\times b_{1} \over a_{1}+b_{1}+c_{1}}$
    $={2*320*600 \over 320+600+{\sqrt {}320^{2}+600^{2})}=240$

### Question 2

    Two men A and B start from West gate. B walks eastward 256 paces, A walks south 480 paces and sees B. What is the diameter of the town ?
    Answer 240 paces
    This is inscribed circle problem associated with $\triangle TWB$
    From Table 1, 256 = $a_{2}$; 480 =$b_{2}$
    Algorithm:
    ${2a_{2}\times b_{2} \over a_{2}+b_{2}+c_{2}}=d$
    $={2*256*480 \over 256+600+{\sqrt {}256^{+}600^{2})}=240$

### Question 3

    inscribed circle problem associated with $\triangle RDN$
${2a_{3}\times b_{3} \over a_{3}+b_{3}+c_{3}}=d$

### Question 4：inscribed circle problem associated with $\triangle RSC$

${2a_{12}\times b_{12} \over c_{12}}=d$

### Question 5：inscribed circle problem associated with $\triangle TWB$

${2a\times b \over a+b}=d$

### Question 6

${2a_{10}\times b_{10} \over b_{10}-a_{10}+c_{10}}=d$

### Question 7

${2a_{11}\times b_{11} \over b_{11}-a_{11}+c_{11}}=d$

   ### Question 8

${2a_{13}\times b_{13} \over b_{13}+a_{13}-c_{13}}=d$

### Question 9

${2a_{14}\times b_{14} \over c_{14}-a_{14}}=d$

### Question 10

${2a_{15}\times b_{15} \over c_{15}-b_{15}}=d$

### Tian yuan shu

    From problem 14 onwards, Li Zhi introduced "Tian yuan one" as unknown variable, and set up two expressions according to Section Definition and formula, then equate these two tian yuan shu expressions. He then solved the problem and obtained the answer.
    Question 14:"Suppose a man walking out from West gate and heading south for 480 paces and encountered a tree. He then walked out from the North gate heading east for 200 paces and saw the same tree. What is the radius of the round own?"
    Algorithm: Set up the radius as Tian yuan one, place the counting rods representing southward 480 paces on the floor, subtract the tian yuan radius to obtain
：$480-x$
                                  元
Then subtract tian yuan from eastward paces 200 to obtain:
$200-x$
                            元
    multiply these two expressions to get：$x^{2}-680x+96000$
                            元
                            元
that is$x^{2}-680x+96000=2x^{2}$
thus：$-x^{2}-680x+96000=0$
                            元
Solve the equation and obtain $r=120$

## Volume 3

    17 problems associated with segment $b_{2}$i.e TW in $\triangle TWB$
The $a_{10}$ pairs with $b_{11}$,$a_{11}$ pairs with $b_{10}$ and $a_{15}$ pairs with $b_{14}$ in problems with same number of volume 4. In other words, for example, change $a_{11}$ of problem 2 in vol 3 into $b_{10}$ turns it into problem 2 of Vol 4.
| Problem # | GIVEN | x | Equation |
| 1 | $b_{2}$，$c_{4}$ | | direct calculation without tian yuan |
| 2 | $b_{2}$，$a_{11}$ | d | $x^{2}+a_{11}x-2b_{2}a_{11}=0$ |
| 3 | $b_{2}$，$b_{11}$ | r | $x^{2}+b_{2}x-b_{2}b_{11}=0$ |
| 4 | $b_{2}$，$a_{15}$ | d | $x^{3}+a_{15}x^{2}-4a_{15}b_{2}^{2}=0$ |
| 5 | $b_{2}$，$a_{14}$ | d | $x^{3}-(b_{2}-2a_{14})x^{2}+a_{14}^{2}*x+a_{14}^{2}*b_{2}=0$ |
| 6 | $b_{2}$，$a_{10}$ | r | $x^{2}+(b_{2}-(b_{2}-c_{10}))x+b_{2}(b_{2}-c_{10})=0$ |
| 7 | $b_{2}$，$c_{2}$ | r | $((1/2)*c_{2}-(1/2)*b_{2}+b_{2})*x^{2}-(1/2)*(c_{2}-b_{2})b_{2}^{2}=0$ |
| 8 | $b_{2}$， $c_{1}$ | r | $2x^{2}+((c_{1}+b_{2})+(c_{1}-b_{2}))x-((c_{1}+b_{2})(c_{1}-b_{2})-(c_{1}-b_{2})^{2}))=0$ |
| 9 | $b_{2}$，$c_{6}$ | r | $2x^{2}-2(b_{2}-2(b_{2}-c_{5}))b_{2}=0$ |
| 10 | $b_{2}$，$b_{14}$ | r | $x^{2}-2b_{2}x+((b_{2}-b_{14})^{2}-b_{14}^{2}=0$ |
| 11 | $b_{2}$，$a_{10}$ | r | $(2b_{2}-a_{10})x-b_{2}a_{10}=0$ |
| 12 | $b_{2}$，$c_{15}$ | $b_{15}$ | $x^{2}+(b_{2}+c_{15})x-b_{2}c_{15}=0$ |
| 13 | $b_{2}$，$c_{14}$ | $a_{14}$ | $x^{4}-2(b_{2}-c_{14})x^{3}+(b_{2}-c_{14})^{2}x^{2}+2b_{2}c_{14}^{2}x-(2(b_{2}-c_{14})-b_{2}))b_{2}c_{14}^{2}=0$ |
| 14 | $b_{2}$，$c_{6}$ | | $r={\sqrt {}(2c_{6}-b_{2})b_{2})$ |
| 15 | $b_{2}$，$c_{8}$ | r | $-x^{3}-c_{8}x^{2}-b_{2}^{2}x+c_{8}b_{2}^{2}=0$ |
| 16 | $b_{2}$，$b_{14}+c_{14}$ | | calculate with formula for inscribed circle |
| 17 | $b_{2}$，$a_{15}+c_{15}$ | | Calculate with formula forinscribed circle |

## Volume 4

    17 problems, given $a_{3}$and a second segment, find diameter of circular city.
| Q | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| second line segment | $c_{5}$ | $b_{10}$ | $a_{10}$ | $b_{14}$ | $b_{15}$ | $c_{11}$ | $c_{13}$ | $c_{1}$ | $c_{9}$ | $a_{15}$ | $b_{11}$ | $c_{14}$ | $c_{15}$ | $c_{9}$ | $c_{7}$ | $a_{15}+c_{15}$ | $b_{14}+c_{14}$ |

## Volume 5

18 problems, given$b_{1}$。
| Q | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| second line segment | $b_{14}$ | $a_{14}$ | $a_{15}$ | $b_{15}$ | $b_{11}$ | $a_{11}$ | $c_{10}$ | $c_{4}$ | $c_{2}$ | $c_{1}$ | $c_{6}$ | $c_{9}-a_{11}$ | $c_{15}$ | $c_{14}$ | $c_{9}$ | $c_{12}$ | $a_{15}+b_{14}$ | $c_{13}$ |

## Volume 6

18 problems.
    Q1-11，13-19 given$a_{1}$，and a second line segment, find diameter d.
    Q12：given $a_{1}+c_{3}$and another line segment, find diameter d.
| Q | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| Given | $a_{1}$ | $a_{1}$ | $a_{1}$ | $a_{1}$ | $a_{1}$ | $a_{1}$ | $a_{1}$ | $a_{1}$ | $a_{1}$ | $a_{1}$ | $a_{1}$ | $a_{1}+c_{3}$ | $a_{1}$ | $a_{1}$ | $a_{1}$ | $a_{1}$ | $a_{1}$ | $a_{1}$ |
| Second line segment | $a_{15}$ | $b_{15}$ | $b_{14}$ | $a_{14}$ | $a_{10}$ | $b_{10}$ | $c_{11}$ | $c_{5}$ | $c_{3}$ | $c_{1}$ | $c_{9}$ | $b_{10}-c_{6}$ | $c_{14}$ | $c_{15}$ | $c_{6}$ | $c_{12}$ | $a_{15}+b_{14}$ | $a_{13}$ |

## Volume 7

18 problems, given two line segments find the diameter of round town
| Q | Given |
| 1 | $a_{14}$，$b_{15}$ |
| 2 | $a_{15}$，$b_{14}$ |
| 3 | $a_{14}$，$a_{15}$ |
| 4 | $b_{14}$，$b_{15}$ |
| 5 | $a_{14}$，$c_{8}$ |
| 6 | $b_{15}$，$c_{7}$ |
| 7 | $b_{15}$，$c_{13}$ |
| 8 | $a_{14}$，$c_{13}$ |
| 9 | $d-a_{14}$，$d-b_{15}$ |
| 10 | $d-b_{14}$，$d-a_{15}$ |
| 11 | $c_{12}$，$a_{15}+b_{14}$ |
| 12 | $a_{15}+b_{14}$，$c_{13}$ |
| 13 | $b_{15}+c_{13}$，$c_{13}-b_{15}$ |
| 14 | $a_{14}+b_{15}+c_{13}$，$a_{14}+b_{15}+c_{13}-a_{14}$， |
| 15 | $c_{14}$，$d-b_{15}$ |
| 16 | $c_{5}$，$d-a_{14}$ |
| 17 | $a_{1}-a_{14}$，$b_{1}-b_{15}$ |
| 18 | $a_{1}+a_{14}$，$b_{1}-b_{15}$ |

## Volume 8

17 problems, given three to eight segments or their sum or difference, find diameter of round city.
| Q | Given |
| 1 | $a_{14}+b_{14}$，$a_{15}+b_{15}$，$c_{12}$ |
| 2 | $a_{14}+b_{14}$，$a_{15}+b_{15}$，$c_{13}$ |
| 3 | $(c_{12}-a_{12})+(c_{12}-b_{12})$，$d_{14}+d_{15}$ |
| 4 | $c_{15}$，$c_{14}$ |
| 5 | $b_{14}+c_{14}$，$c_{15}+b_{15}$ |
| 6 | $a_{15}+c_{15}$，$a_{14}+c_{14}$ |
| 7 | $a_{1}+c_{1}$，$a_{15}+c_{15}$$$ |
| 8 | $a_{1}+c_{1}$，$a_{14}+c_{14}$$$ |
| 9 | $b_{1}+c_{1}$，$b_{15}+c_{15}$$$ |
| 10 | $b_{1}+c_{1}$，$b_{14}+c_{14}$，$$ |
| 11 | $b_{14}+c_{14}$，$a_{15}+c_{15}$，$b_{14}+a_{15}-c_{13}$ |
| 12 | $(b_{8}-a_{8})+(b_{2}-a_{2})$，$b_{14}+a_{15}-c_{13}$$$ |
| 13 | $b_{7}-a_{8}$，$(b_{14}-a_{14})+(b_{15}-a_{15})$，$c_{12}-d$ |
| 14 | $(b_{7}-a_{7})+(b_{8}-a_{8})$，$(b_{14}-a_{14})+(b_{15}-a_{15})$$$ |
| 15 | $a_{14}+b_{14}$，$a_{15}+b_{15}$$$ |
| 16 | $a_{14}+a_{15}$，$b_{14}+b_{15}$$$ |

### Problem 14

    Given the sum of GAO difference and MING difference is 161 paces and the sum of MING difference and ZHUAN difference is 77 paces. What is the diameter of the round city?
    Answer: 120 paces.
Algorithm:
Given
    $(b_{7}-a_{7})+(b_{8}-a_{8})=161$
    $(b_{14}-a_{14})+(b_{15}-a_{15})=77$
：Add these two items, and divide by 2; according to #Definitions and formula, this equals to HUANGJI difference:
    $(b_{7}-a_{7})+(b_{8}-a_{8})+(b_{14}-a_{14})+(b_{15}-a_{15}) \over 2$ $=(b_{12}-a_{12})$
    $b_{12}-a_{12}=$$161+77 \over 2$$=119$
    Let Tian yuan one as the horizontal of SHANGPING (SG):
    $x=a_{8}$
    $x+161$ =$x+(b_{7}-a_{7})+(b_{8}-a_{8})=a_{8}+(b_{7}-a_{7})+(b_{8}-a_{8})$
             $=b_{7}$ (#Definition and formula)
    Since $a_{8}+b_{7}=c_{12}$ (Definition and formula)
    $c_{12}=x+b_{7}=2*x+(b_{7}-a_{7})+(b_{8}-a_{8})=2*x+161$
    $c_{12}^{2}=(x+b_{7})^{2}=(2*x+161)^{2}=4*x^{2}+644*x+25921$
    $c_{12}^{2}-(b_{12}-a_{12})^{2}$
    $=4*x^{2}+644*x+25921-$$((b_{7}-a_{7})+(b_{8}-a_{8})+(b_{14}-a_{14})+(b_{15}-a_{15}))^{2} \over 4$
    $=4*x^{2}+644*x+11760=d$(diameter of round town),
    $d^{2}=(4*x^{2}+644*x+11760)^{2}=16*x^{4}+5152*x^{3}+508816*x^{2}+15146880*x+138297600$
    Now, multiply the length of RZ by $4*x$
    $4*x*b_{7}=4*x*(x+(b_{7}-a_{7})+(b_{8}-a_{8}))=4*x*(x+161)=4*x^{2}+644*x$
    multiply it with the square of RS:
    $d^{2}=4*x*b_{7}*c_{12}^{2}=$$(4*x^{2}+644*x)*(4*x^{2}+644*x+25921)=$$16*x^{4}+5152*x^{3}+518420*x^{2}+16693124$
    equate the expressions for the two $d^{2}$
    thus
    $16*x^{4}+5152*x^{3}+518420*x^{2}+16693124=$$16*x^{4}+5152*x^{3}+508816*x^{2}+15146880*x+138297600$
    We obtain:
$9604*x^{2}+1546244*x-138297600=0$
    solve it and we obtain $x=a_{8}=64$;
This matches the horizontal of SHANGPING 8th triangle in #Segment numbers.

## Volume 9
### Part I

| Problems | given |
| 1 | $a_{12}+b_{12}+c_{12}$，$b_{12}-a_{12}$ |
| 2 | $c_{1}$，$b_{1}-a_{1}$ |
| 3 | $c_{1}$，$a_{10}+b_{11}$ |
| 4 | $c_{1}$，$a_{2}+b_{3}$ |

### Part II

| Problems | given |
| 1 | $a_{1}+b_{1}$，$a_{2}$，$b_{3}$ |
| 2 | $a_{1}+b_{1}$，$c_{13}+b_{13}-a_{13}$，$c_{13}-b_{13}+a_{13}$ |
| 3 | $a_{1}+b_{1}$，$a_{11}+b_{11}$，$a_{10}+b_{10}$ |
| 4 | $a_{1}+b_{1}$，$c_{10}-a_{10}$，$c_{11}-b_{11}$ |
| 5 | $a_{1}+b_{1}$，$c_{6}+c_{8}$，$c_{6}-c_{8}$ |
| 6 | $a_{1}+b_{1}$，$c_{10}$，$c_{11}$ |
| 7 | $a_{1}+b_{1}$，$c_{4}$，$c_{5}$ |
| 8 | $a_{1}+b_{1}$，$c_{2}$，$c_{3}$ |

## Volume 10

8 problems
| Problem | Given |
| 1 | $a_{1}+b_{1}+c_{1}$，$c_{1}-b_{1}$ |
| 2 | $a_{1}+b_{1}+c_{1}$，$c_{1}-a_{1}$ |
| 3 | $a_{1}+b_{1}+c_{1}$，$b_{1}-a_{1}$ |
| 4 | $a_{1}+b_{1}+c_{1}$，$(c_{1}-b_{1})+(c_{1}-a_{1})$ |
| 5 | $a_{1}+b_{1}+c_{1}$，$(c_{1}-b_{1})+(b_{1}-a_{1})+(c_{1}-a_{1})$ |
| 6 | $a_{1}+b_{1}+c_{1}$，$d_{14}+d_{15}$ |
| 7 | $a_{1}+b_{1}+c_{1}$，$c_{12}$ |
| 8 | $a_{1}+b_{1}+c_{1}$，$c_{13}$ |

## Volume 11

：Miscellaneous 18 problems：
| Q | GIVEN |
| 1 | $c_{2}$，$c_{3}$$$ |
| 2 | $c_{5}$，$c_{4}$$$ |
| 3 | $b_{11}$，$c_{4}$$$ |
| 4 | $a_{10}$，$c_{3}$$$ |
| 5 | $a_{10}$，$b_{11}$$$ |
| 6 | $b_{7}$，$a_{8}$$$ |
| 7 | $b_{1}-b_{11}$，$a_{1}-a_{10}$ |
| 8 | $b_{10}-a_{10}$，$b_{11}-a{11}$$$ |
| 9 | $c_{13}$，$a_{10}-b_{11}$$$ |
| 10 | $a_{12}+b_{12}$，$a_{13}+b_{13}$$$ |
| 11 | $c_{1}$，$b_{1} \over a_{1}$$$ |
| 12 | $d_{10}-d_{11}$，$d_{12}-d_{13}$$$ |
| 13 | $c_{12}-[c_{10}-(b_{10}-a_{10})]$，$c_{11}+(b_{11}-a_{11})-c_{13}$，$b_{12}-a_{12}$ |
| 14 | $c_{8}-(c_{1}-b_{1})$，$(c_{1}-a_{1})-c_{7}$$$ |
| 15 | $a_{1}+c_{1}$，$(c_{1}-a_{1})+(c_{1}-b_{1})$$$ |
| 16 | $a_{12}+b_{12}+c_{12}$，$(a_{13}+b_{13})-c_{13}$$$ |
| 17 | From the book Dongyuan jiurong |
| 18 | From Dongyuan jiurong |

## Volume 12

14 problems on fractions
| Problem | given |
| 1 | $b_{1}+c_{1}$，$a_{1}$= $8 \over 15$$b_{1}$ |
| 2 | $a_{1}+c_{1}$，$a_{1}$= $8 \over 15$$b_{1}$ |
| 3 | $a_{1}=(1-5/9)*3d$，$b_{1}-a_{1}$$$ |
| 4 | $a_{3}=(5/6)*d$，$b_{2}-a_{3}$ |
| 5 | $(15/16)b_{1}=d$，$a_{1}+b_{1}$$$ |
| 6 | $a_{12}=(8/15)*b_{12}$，$c_{12}-b_{12}$，$c_{12}-a_{12}$ |
| 7 | $c_{1}$，$d=(1/2)b_{2}$，$a_{3}=(5/6)d$ |
| 8 | $b_{2}+a_{3}+c_{2}$，$b_{2}=(12/17)c_{1}$，$a_{3}=(5/17)c_{1}$ |
| 9 | $a_{3}+(5/6)b_{2}$，$b_{2}+(3/5)a_{3}$$$ |
| 10 | $a_{11}+(1/3)b_{10}$，$b_{10}-(3/4)a_{11}$$$ |
| 11 | $b_{1}-d=(3/5)b_{1}$，$a_{1}-d=(1/4)a_{1}$，$(b_{1}-d)-(a_{1}-d)$ |
| 12 | $b_{1}-d=(3/5)b_{1}$，$a_{1}-d=(1/4)a_{1}$，$(1/5)b_{1}-(1/4)a_{1}$ |
| 13 | $b_{14}=(1-(15/24)b_{10})$，$a_{15}=(1-(4/5))a_{11}$，$b_{14}-a_{15}$,$b_{10}-a_{11}$ |
| 14 | $a_{1}+b_{1}+c_{1}$，$(b_{1}/a_{1})=8(1/3)$，$(a_{1}/b_{15})=10(2/3)$，$a_{14}-a_{13}$，$b_{13}-b_{15}$ |

## Research

In 1913, French mathematician L. van Hoe wrote an article about Ceyuan haijing. In 1982, K. Chemla Ph.D. thesis Etude du Livre Reflects des Mesuers du Cercle sur la mer de Li Ye. 1983, University of Singapore Mathematics Professor Lam Lay Yong: Chinese Polynomial Equations in the Thirteenth Century。

## Footnotes

* ↑ Alexander Wylie, Notes on Chinese Literature, Shanghai, p116, reprinted by Kessinger Publishing
* ↑ Compiled from Kong Guoping p 62-66
* ↑ Bai Shangshu p24-25.
* ↑ Wu Wenjun Chapter II p80
* ↑ Bai Shangshu, p3, Preface
* ↑ Wu Wenjun, p87
* ↑ Bai Shangshou, p153-154
* ↑ Li Yan p75-88
* ↑ Martzloff, p147
* 1 2 3 Li Yan p88-101
* ↑ Kong Guoping p169-184
* ↑ Kong Guoping p192-208
* ↑ Bai Shangshu, p562-566
* ↑ Footnote:In Vol 8 problem 14, Li Zhi stop short at x=64. However the answer is evident, as from No 8 formular in #Miscellaneous formula: $a_{9}*b_{7}=r^{2}$, and from #Length of Line Segments$a_{8}=a_{9}$, thus $a_{8}*b_{7}=r^{2}$, radius of round town can be readily obtain. As a matter of fact, problem 6 of vol 11 is just such a question of given $a_{8}$and$b_{7}$, to find the radius of the round town.
* ↑ Kong Guoping p220-224
* ↑ Kong Guoping p234-248
* ↑ P255-263