 He discovered the Li Shanlan identity (Li Shanlan's summation formulae) in 1867.Later he worked in the think tank of Zeng Guofan.In 1868, he began to teach in Tongwen Guan where he collaborated closely with linguist John Fryer.