 Lagrange invented the method of solving differential equations known as variation of parameters, applied differential calculus to the theory of probabilities and worked on solutions for algebraic equations.He proved that every natural number is a sum of four squares.His treatise "Theorie des fonctions analytiques" laid some of the foundations of group theory, anticipating Galois.