He returned to Göttingen and started with his thesis which was inspired by Heine and supervised by the astronomer Ernst Schering. His 1881 doctoral thesis bears the title Die Kugelfunctionen und Laméschen Functionen als Determinanten Ⓣ. After his doctorate he worked as an instructor at an agricultural winter school in Wehlau (eastern Prussia). This led to his qualification as teacher for secondary schools in Prussia.
Heun then moved to England and taught for two and a half years (1883-1885) at the Public School in Uppingham. In 1885/86 he complemented his studies in London. His Munich habilitation thesis from July 1886 is entitled Über lineare Differentialgleichungen zweiter Ordnung, deren Lösungen durch den Kettenbruchalgorithmus verknüpft sind Ⓣ. From 1886 to 1889 he lectured at the University of Munich on topics like: the theory of rational functions and their integrals, the theory of linear differential equations, introduction to the theory of linear substitutions and the general theory of differential equations. The seminal work from his time at Munich is Zur Theorie der Riemann'schen Functionen zweiter Ordnung mit Vier Verzweigungspunkten Ⓣ .
Due to lack of financial support he left Munich and worked again as a teacher in Berlin from 1890 to 1902. At this time he became known in Germany, mainly due to his 1899 address at the Munich meeting of the DMV (Deutsche-Mathematiker-Vereinigung) whose complete version was published as Die kinetischen Probleme der wissenschaftlichen Technik Ⓣ .
In 1900 Heun was honoured with the title professor, and in 1902 he was nominated as first candidate for the vacant chair in technical mechanics at Technische Hochschule Karlsruhe. He had been recommended by Felix Klein. Heun accepted this offer and stayed in Karlsruhe until his death in 1929.
In 1883 Heun had married a widow Henriette Jatho (née Bock) with two children Alfred and Paul Jatho; together they had a son Howard (1884-1902) and a daughter Charlotte (1891-1948).
In 1912 he was honoured with the title 'Geheimer Hofrat'. Technische Hochschule Berlin-Charlottenburg awarded him an honorary doctorate in 1921.
His assistants in Karlsruhe were Georg Hamel (from 1902 to 1905), Max Winkelmann (from 1905 to 1911) and Fritz Noether (from 1911 to 1918). Kurt von Sanden was his student from 1905 to 1909, and he became Heun's successor in 1923.
Heun did not recover from a stroke he suffered in 1921 and retired in 1922.
The Heun equation is a second order linear differential equation of the Fuchsian type with four singular points. It generalizes the hypergeometric differential equation which has three singular points, and is used today in mathematical physics, e.g. in the context of integrable systems.
Article by: Wolfdieter Lang Institut für Theoretische Physik, Universität Karlsruhe, Germany, based on references  and .