There are two slightly different versions of how Li first came upon mathematics. One suggests that when he was eight years old he found a copy of the Nine Chapters on the Mathematical Art in the library of a private school. He studied it on his own and mastered it without difficulty. The second version suggests that when Li was ten years old he studied the Nine Chapters on the Mathematical Art under his family tutor. It does seem certain then that he in love with mathematics through a study of the Nine Chapters.
In 1825, when he was fourteen years old, Li studied the first six books of Euclid's Elements which had been translated into Chinese in 1607 by Xu Guangqi and Matteo Ricci. He continued his studies of the classics and of mathematics and several years later travelled to Hangzhou to sit examinations. Although he failed the examinations the trip to Hangzhou was extremely valuable, for there he purchased two further mathematics texts. One was the Ce yuan hai jing Ⓣ, originally written by Li Zhi in 1248, which was of fundamental importance in the development of Chinese algebra. The other was Gougu geyuan ji Ⓣ which was a trigonometry text written by Dai Zhen, who is famous as an editor of the Nine Chapters on the Mathematical Art, and had been appointed as an editor for compiling an encyclopaedia of knowledge by the Emperor Qianlong in 1773.
The "tian yuan" or "coefficient array method" or "method of the celestial unknown" of setting up equations, which Li learnt from Li Zhi's famous text, had a huge influence on him and he began to push these algebraic techniques forward solving a whole variety of new problems. Although he had been largely self educated in mathematics, Li now made contact with others having the same interests. He wanted to make a career for himself in mathematics but at this time in China the subject was not considered of sufficient importance that one could make a living as a professional mathematician. The best way for a scholar to earn his living, yet have sufficient time to push forward his research, was to be employed as a private tutor. This is the route Li was forced to take and he was fortunate to be employed in 1845 by a family who had a deep love of education. He now moved in circles which included others with similar interests in mathematics to his own and exchanging ideas proved fruitful as he pushed forward his research.
We have not yet referred in this article to the political situation in China during Li's life. This is because up until about 1850 it had relatively little impact on him. It had been a time of wars in China, however, for in 1841 British warships had arrived in Hong Kong and a war broke out. The reasons were complex and relate to the huge profits that the British were getting through the opium trade, while the Chinese government was trying to stop Chinese use of the drug. The British claimed that they were supporting the Chinese people against their leaders (always a good policy!). Certainly the Chinese government had not been popular and after this its prestige declined further. The Taiping Rebellion began in 1850 when a religious group based on Christianity began to gain huge support. Well organised militarily, they made gains defeating the Imperial army in April 1852. Li looked to avoid getting caught up in the Taiping Rebellion and, in 1852, he went to Shanghai which looked safe.
From a scientific prospective the move to Shanghai was very significant for Li since there he met with Protestant missionaries from the London Missionary Society, and in particular he met Alexander Wylie. He would remain there for eight years working with these missionaries translating Western science works into classical Chinese. With Alexander Wylie, Li translated Elements of Analytical Geometry and of the Differential and Integral Calculus which had been written by Elias Loomis and published in New York in 1851. Their Chinese translation was published in 1859 and became the first book to introduce Newton's calculus into China. The following quotation is from the Preface to the treatise:-
Although this is the first time that the principles of algebraic geometry have been placed before the Chinese, in their own idiom, yet there is little doubt that this branch of the science will commend itself to native mathematicians, in consideration of its obvious utility ... A spirit of enquiry is abroad among the Chinese, and there is a class of students, by no means small in number, who receive with avidity instruction on scientific matters from the West.Li also worked with the protestant missionary Joseph Edkins on a translation of W Whewell's An elementary treatise on mechanics. It was not published until several years after the translation was made, finally being published under the title Zhongxue Ⓣ in 1867. It was the first introduction of Newtonian mechanics into China. Another major translation which Li undertook with Alexander Wylie was the translation of the final nine books of Euclid's Elements. These were translated from Isaac Barrow's edition.
Other mathematics books translated by Li include De Morgan's Elements of algebra but Li did not just translate mathematics book, however, for with Alexander Williamson and Joseph Edkins he translated John Lindley's Botany. The translation appeared in 1858. He also translated John Herschel's Outlines of astronomy.
For eight years Li worked with the missionaries of the London Missionary Society in Shanghai. During this period the Taiping Rebellion had at first had great success with the capture of Nanking in 1853. However, internal conflicts between those who led the rebellion weaken it but in 1860 they tried to re-establish their progress and take Shanghai but the attempt failed. Li left Shanghai, probably before the attack on the city, and moved to join the staff of Xu Youren who was Governor of Jiangsu province. Xu may have been a governor but he was also an excellent mathematician with an interest in infinite series. Li worked for him for three years and then he was approached by Zeng Guofan and his younger brother Zeng Guoquan who asked him to work for them. The Zeng brothers were both scholars and army generals, and in the latter capacity they had gained a strong reputation for the suppressing the Taiping Rebellion. They financially supported the publication of Li's complete mathematical works which were published in Nanking in 1867.
Li was recommended to the newly established T'ung-wen-kuan (College of combined learning) in 1864. The T'ung-wen-kuan had opened in Peking in the previous year as an initiative of the Chinese government who aimed to train Chinese students in foreign languages so they might gain Western knowledge more easily. However Li did not take up the appointment until 1866 for he did not wish to be part of a translating school. However the government realised the importance of mathematics in the development of the country and in 1868 the T'ung wen-kuan was upgraded to a college and a department of mathematics and astronomy was added. After this, in July 1869, Li was happy to accept the position of Professor of Mathematics. There, Li worked with William A P Martin (1827-1916), who served as president of the college from the time of its upgrading in 1869 until 1882, teaching mathematics and preparing translations of scientific works. The College offered students the choice between two courses. There was an eight year degree course which contained the study of foreign languages and Western sciences. There was also a shorter five year degree course which combined traditional Chinese mathematics with a study of European sciences. For example the first of the five years was spent on a study of the Nine Chapters on the Mathematical Art. By their fourth year students were studying the differential and integral calculus.
Although Li Shanlan is important as a translator of Western science texts, it is not in this capacity that he is most famous. Rather his fame rests on his mathematical contributions. These were remarkable in that although he became familiar with Western mathematics he actually based his research on ancient Chinese mathematics. He produced his own versions of logarithms, infinite series, and combinatorics but he did not follow the style of western mathematics but made his research naturally develop out of the foundations of Chinese mathematics. One has to praise him very highly for this approach for his neither threw away the heritage of Chinese mathematics nor did he live in the past by ignoring the progress which had been made in the West.
Let us give an example to illustrate the points we have just made. Li wrote Duoji bilei Ⓣ (published in 1867 as part of his collected works) where, in Chapter 4, he gave fascinating formulae relating binomial coefficients, Stirling numbers, Eulerian numbers and many others. He writes in the Preface to Chapter 4:-
The summation of series constitutes a branch of Chinese mathematics called Short Width [Chapter 4 of the Nine Chapters on the Mathematical Art. The works of the great astronomer Guo Shoujing concerning the inequalities of the solar and lunar motion, Wang Lai's iterated sums, Dong Fangli's cyclotomical computations, and lastly the summation of series which appear in the algebra and the differential calculus of the Westerners constitute the major part of this chapter. The usefulness of the mathematical techniques contained is indeed multifarious. None the less, mathematical books seldom deal directly with these. Zhu Shijie from the Yuan dynasty is the only one who has made use of the prescriptions relating to summation of series. ... But his intention was only to expound the algebra and for that reason he presents the summation of series neither precisely nor methodically.Both ,  and  discuss some of the wonderful summation formulae that Li discovered. For example in  Li's method of writing the sum of the pth powers of the first n natural numbers as sums of binomial coefficients is given. His use of a generalised version of Pascal's triangle is also explained.
Li worked out his own form of integration to compute volumes. The following quotation from Fang yuan chanyou Ⓣ (published in 1867 as part of his collected works) shows how he thought:-
A book one chi thick is made up of sheets of paper, whereas taffeta one zhang long is made up of threads of silk.Li also wrote on prime numbers.
Article by: J J O'Connor and E F Robertson