Dini grew up at a time when political, and military, events in Italy were intensifying as the country came nearer to unification. There were not only the internal politics of unification but the was problems with Austria and France, both countries having their own agendas. In 1859, when Dini was thirteen years old, there was a war with Austria in which the French at first joined the Italians against the Austrians. However, by 17 March 1861, the Kingdom of Italy was formally created. Rome and Venice were not part of Italy at this stage, however, and there continued high levels of political activity as the govenment structure was discussed.
In 1865 Dini entered a competition for a scholarship to provide the necessary funds to allow a student to further their studies abroad. He won the scholarship and went to Paris where he studied with Bertrand and Hermite. This was a period of high mathematical activity for Dini and seven publications came out of the research he undertook during his time in Paris.
Dini returned to Pisa in 1866, and was appointed to a post in the University of Pisa. There he taught advanced topics in algebra and also the theory of geodesy. Political events in Italy continued, with the Treaty of Vienna bringing Venice into the Italian Kingdom in 1866. Rome was attacked by Italian troops the following year but France defended the city with its troops against the attack. There was widespread unrest in Italy due to dissatisfaction with the government and it was far from clear that the newly unified country would not split apart again. In 1870, however, Italian troops captured Rome.
Dini progressed quickly in his career at the University of Pisa, being appointed to Betti's chair of analysis and higher geometry in 1871. This was not due to Betti's retiral, but rather because Betti's interests had moved more towards mathematical physics. Dini was not someone who was going to concentrate solely on mathematics and a university career, the political events of the time having a profound effect on someone of Dini's character who was :-
... an upright, honest, kind man ... devoted to the well-being of his native city and his country ...Despite the workload required in his university career, Dini entered politics in 1871 (although he was only 25 years old at the time) when he was elected to the Pisa City Council. With a period of consolidation for the newly unified Italy, local government became very significant and Dini was keen to do all he could in this important area. His political and academic careers progressed side by side over the following years. In 1877 he was appointed to a second chair in the University of Pisa, from then on holding the chair of infinitesimal analysis in addition to his earlier professorial appointment. Having served many times on the Pisa Council, Dini was elected to the national Italian parliament in 1880 as a representative from Pisa.
Not only was Dini highly involved in teaching mathematics and in local and national politics, but in 1888 he reached the highest office in university administration when he became rector of the University of Pisa. He held this post until 1890, then two years later he was elected a senator in the Italian Parliament. He became director of the Scuola Normale Superiore, the teacher's college at which he was himself educated, in 1908 and held this position until his death.
Dini's most important work in mathematics was on the theory of functions of a real variable. The paper  gives a good survey of the problems which Dini worked on in the 1860s and 1870s, and the most important of the results which he obtained. Bottazzini, the author of , puts Dini's work in context showing that it was carried out at a time when those studying real analysis were seeking to determine precisely when the theorems which had earlier been stated and proved in an imprecise way were valid. To achieve this aim mathematicians tried to see how far results could be generalised and they needed to find pathological counterexamples to show the limits to which generalisation was possible. Dini was one of the greatest masters of generalisation and constructing counterexamples.
Dini looked at infinite series and generalised results such as a theorem of Kummer and one of Riemann, the ideas for which had first emerged in work of Dirichlet. He discovered a condition, now known as the Dini condition, ensuring the convergence of a Fourier series in terms of the convergence of a definite integral. As well as trigonometric series, Dini studied results on potential theory.
He studied surfaces and developed ideas related to those of Liouville and Beltrami. He studied :-
... surfaces of which the product or the ratio of two principal radii of curvature remains constant (helicoid surfaces to which Dini's name has been given); [and] ruled surfaces for which one of the principal radii of curvature is a function of the other ...He solved a problem posed by Beltrami of representing one surface on a second surface in such a way that geodesic lines in the first correspond to geodesic lines in the second.
Dini published a number of major texts throughout his career. He published Foundations of the theory of functions of a real variable in 1878; a treatise on Fourier series in 1880; and a two volume work Lessons on infinitesimal analysis with the first volume appearing in 1907 and the second in 1915. In this last work he devoted a chapter to integral equations in which he presented many of his own innovative ideas.
Dini's most famous student was Bianchi.
Article by: J J O'Connor and E F Robertson