In Indian mathematics, Brahmagupta discovered that a form of what is now known as Brahmagupta's identity. Using this, he was able to "compose" triples and that were solutions of , to generate the new triples and Not only did this give a way to generate infinitely many solutions to starting with one solution, but also, by dividing such a composition by , integer or "nearly integer" solutions could often be obtained. For instance, for , Brahmagupta composed the triple (10, 1, 8) (since ) with itself to get the new triple (192, 20, 64). Dividing throughout by 64 ("8" for and ) gave the triple (24, 5/2, 1), which when composed with itself gave the desired integer solution (1151, 120, 1). Brahmagupta solved many Pell's equations with this method, proving that it gives solutions starting from an integer solution of for k = ±1, ±2, or ±4..
In Indian mathematics Brahmagupta discovered that a form of what is now known as Brahmagupta's identity Using this he was able to "compose" triples and that were solutions of  to generate the new triples and Not only did this give a way to generate infinitely many solutions to starting with one solution but also by dividing such a composition by  integer or "nearly integer" solutions could often be obtained For instance for  Brahmagupta composed the triple (10 1 8) (since ) with itself to get the new triple (192 20 64) Dividing throughout by 64 ("8" for and ) gave the triple (24 5/2 1) which when composed with itself gave the desired integer solution (1151 120 1) Brahmagupta solved many Pell's equations with this method proving that it gives solutions starting from an integer solution of for k = ±1 ±2 or ±4