Also working for the same shogunate at this time was Teirei Kamiya, a mathematician who had been a pupil of Sadasuke Fujita. Aida would have liked to become a pupil of Fujita, for he was one of the leading mathematicians in Japan. Aida saw his friendship with Kamiya as means to be accepted by Fujita and asked Kamiya to arrange for him to be introduced to Fujita. Indeed Kamiya organised the necessary introductions but Aida was not accepted by Fujita.
It appears that relations between Fujita and Aida may have been poor even before Kamiya arranged the introduction, although if that were the case it is unclear quite why Aida worked so hard to obtain the introduction. It was the custom of the time for mathematicians to donate tablets inscribed with mathematical problems to religious temples. These tablets represented offerings of scholarship to the gods. Aida had donated some tablets which contained errors and these had been spotted by Fujita. Perhaps Aida was unaware of these errors at the time he sought to become Fujita's pupil.
Fujita had published a mathematical work Seiyo sampo in 1781 and in part his high reputation rested on this highly regarded text. Aida now decided to write a work based on the Seiyo sampo yet one which would criticise this work. It is not surprising that relations between Aida and Fujita would deteriorate further when Aida published Kaisei sampo, his critical revision of the Seiyo sampo. The private feud extended to include other mathematicians when Kamiya, who had lost face by arranging the failed introductions, attacked Aida's Kaisei sampo.
The argument eventually turned into a public feud between the Seki school of mathematics and the Sijyo school. Ajima was a friend of Fujita, their friendship arising from the fact that both were pupils of the same teacher Nushizumi Yamaji. Naturally Ajima joined the argument on the side of Fujita and since Yamaji was a recognised master of the leading Seki school of mathematics, the argument soon involved the whole school.
The shogun Tokugawa Ieharu died in 1786 and Tokugawa Ienari became his successor in the following year. Aida lost his post with the arrival of the new shogun and he decided that he would concentrate all his efforts on mathematics :-
... he would live on his savings and devote himself to the perfection of his studies. He also took pupils, including many from the northeastern provinces; these returned to teach in their native regions, where Aida is still revered as a master of mathematics.Aida compiled Sampo tensi shinan which appeared in 1788. It is a book of geometry problems, developing formulae for ellipses, spheres, circles etc. Aida explained the use of algebraic expressions and the construction of equations. He also worked on number theory and simplified continued fraction methods due to Seki.
The remarkable productivity of Aida is commented on in  where his contribution is summed up as follows:-
Aida was hard-working and strong-willed and produced as many as fifty to sixty works a year. Nearly 2000 works survived him, including many on non-mathematical subjects. He was a distinguished teacher of traditional mathematics and a successful populariser of that discipline.
Article by: J J O'Connor and E F Robertson