Maupertuis was the president of the Berlin Academy when it was founded in 1744 with Euler as director of mathematics. He deputised for Maupertuis in his absence and the two became great friends. Euler undertook an unbelievable amount of work for the Academy [1]:-

... he supervised the observatory and the botanical gardens; selected the personnel; oversaw various financial matters; and, in particular, managed the publication of various calendars and geographical maps, the sale of which was a source of income for the Academy. The king also charged Euler with practical problems, such as the project in 1749 of correcting the level of the Finow Canal ... At that time he also supervised the work on pumps and pipes of the hydraulic system at Sans Souci, the royal summer residence.

This was not the limit of his duties by any means. He served on the committee of the Academy dealing with the library and of scientific publications. He served as an advisor to the government on state lotteries, insurance, annuities and pensions and artillery. On top of this his scientific output during this period was phenomenal.

During the twenty-five years spent in Berlin, Euler wrote around 380 articles. He wrote books on the calculus of variations; on the calculation of planetary orbits; on artillery and ballistics (extending the book by Robins); on analysis; on shipbuilding and navigation; on the motion of the moon; lectures on the differential calculus; and a popular scientific publication Letters to a Princess of Germany (3 vols., 1768-72).

In 1759 Maupertuis died and Euler assumed the leadership of the Berlin Academy, although not the title of President. The king was in overall charge and Euler was not now on good terms with Frederick despite the early good favour. Euler, who had argued with d'Alembert on scientific matters, was disturbed when Frederick offered d'Alembert the presidency of the Academy in 1763. However d'Alembert refused to move to Berlin but Frederick's continued interference with the running of the Academy made Euler decide that the time had come to leave.

In 1766 Euler returned to St Petersburg and Frederick was greatly angered at his departure. Soon after his return to Russia, Euler became almost entirely blind after an illness. In 1771 his home was destroyed by fire and he was able to save only himself and his mathematical manuscripts. A cataract operation shortly after the fire, still in 1771, restored his sight for a few days but Euler seems to have failed to take the necessary care of himself and he became totally blind. Because of his remarkable memory was able to continue with his work on optics, algebra, and lunar motion. Amazingly after his return to St Petersburg (when Euler was 59) he produced almost half his total works despite the total blindness.

Euler of course did not achieve this remarkable level of output without help. He was helped by his sons, Johann Albrecht Euler who was appointed to the chair of physics at the Academy in St Petersburg in 1766 (becoming its secretary in 1769) and Christoph Euler who had a military career. Euler was also helped by two other members of the Academy, W L Krafft and A J Lexell, and the young mathematician N Fuss who was invited to the Academy from Switzerland in 1772. Fuss, who was Euler's grandson-in-law, became his assistant in 1776. Yushkevich writes in:-

.. the scientists assisting Euler were not mere secretaries; he discussed the general scheme of the works with them, and they developed his ideas, calculating tables, and sometimes compiled examples.

For example Euler credits Albrecht, Krafft and Lexell for their help with his 775 page work on the motion of the moon, published in 1772. Fuss helped Euler prepare over 250 articles for publication over a period on about seven years in which he acted as Euler's assistant, including an important work on insurance which was published in 1776.

Yushkevich describes the day of Euler's death in:-

On 18 September 1783 Euler spent the first half of the day as usual. He gave a mathematics lesson to one of his grandchildren, did some calculations with chalk on two boards on the motion of balloons; then discussed with Lexell and Fuss the recently discovered planet Uranus. About five o'clock in the afternoon he suffered a brain haemorrhage and uttered only "I am dying" before he lost consciousness. He died about eleven o'clock in the evening.

After his death in 1783 the St Petersburg Academy continued to publish Euler's unpublished work for nearly 50 more years.

Euler's work in mathematics is so vast that an article of this nature cannot but give a very superficial account of it. He was the most prolific writer of mathematics of all time. He made large bounds forward in the study of modern analytic geometry and trigonometry where he was the first to consider sin, cos etc. as functions rather than as chords as Ptolemy had done.

He made decisive and formative contributions to geometry, calculus and number theory. He integrated Leibniz's differential calculus and Newton's method of fluxions into mathematical analysis. He introduced beta and gamma functions, and integrating factors for differential equations. He studied continuum mechanics, lunar theory with Clairaut, the three body problem, elasticity, acoustics, the wave theory of light, hydraulics, and music. He laid the foundation of analytical mechanics, especially in his Theory of the Motions of Rigid Bodies (1765).

We owe to Euler the notation f(x) for a function (1734), e for the base of natural logs (1727), i for the square root of -1 (1777), for pi, for summation (1755), the notation for finite differences y and 2y and many others.

Let us examine in a little more detail some of Euler's work. Firstly his work in number theory seems to have been stimulated by Goldbach but probably originally came from the interest that the Bernoullis had in that topic. Goldbach asked Euler, in 1729, if he knew of Fermat's conjecture that the numbers 2n + 1 were always prime if n is a power of 2. Euler verified this for n = 1, 2, 4, 8 and 16 and, by 1732 at the latest, showed that the next case 232 + 1 = 4294967297 is divisible by 641 and so is not prime. Euler also studied other unproved results of Fermat and in so doing introduced the Euler phi function (n), the number of integers k with 1 k n and k coprime to n. He proved another of Fermat's assertions, namely that if a and b are coprime then a2 + b2 has no divisor of the form 4n - 1, in 1749.

Perhaps the result that brought Euler the most fame in his young days was his solution of what had become known as the Basel problem. This was to find a closed form for the sum of the infinite series (2) = (1/n2), a problem which had defeated many of the top mathematicians including Jacob Bernoulli, Johann Bernoulli and Daniel Bernoulli. The problem had also been studied unsuccessfully by Leibniz, Stirling, de Moivre and others. Euler showed in 1735 that (2) = 2/6 but he went on to prove much more, namely that (4) = 4/90, (6) = 6/945, (8) = 8/9450, (10) = 10/93555 and (12) = 69112/638512875. In 1737 he proved the connection of the zeta function with the series of prime numbers giving the famous relation

(s) = (1/ns) = (1 - p-s)-1

Here the sum is over all natural numbers n while the product is over all prime numbers.

By 1739 Euler had found the rational coefficients C in (2n) = C2n in terms of the Bernoulli numbers.

Other work done by Euler on infinite series included the introduction of his famous Euler's constant, in 1735, which he showed to be the limit of

1/1 + 1/2 + 1/3 + ... + 1/n - logen

as n tends to infinity. He calculated the constant to 16 decimal places. Euler also studied Fourier series and in 1744 he was the first to express an algebraic function by such a series when he gave the result

/2 - x/2 = sin x + (sin 2x)/2 + (sin 3x)/3 + ...

in a letter to Goldbach. Like most of Euler's work there was a fair time delay before the results were published; this result was not published until 1755.

Euler wrote to James Stirling on 8 June 1736 telling him about his results on summing reciprocals of powers, the harmonic series and Euler's constant and other results on series. In particular he wrote [60]:-

Concerning the summation of very slowly converging series, in the past year I have lectured to our Academy on a special method of which I have given the sums of very many series sufficiently accurately and with very little effort.

He then goes on to describe what is now called the Euler- Maclaurin summation formula. Two years later Stirling replied telling Euler that Maclaurin:-

... will be publishing a book on fluxions. ... he has two theorems for summing series by means of derivatives of the terms, one of which is the self-same result that you sent me.

Euler replied:-

... I have very little desire for anything to be detracted from the fame of the celebrated Mr Maclaurin since he probably came upon the same theorem for summing series before me, and consequently deserves to be named as its first discoverer. For I found that theorem about four years ago, at which time I also described its proof and application in greater detail to our Academy.

Some of Euler's number theory results have been mentioned above. Further important results in number theory by Euler included his proof of Fermat's Last Theorem for the case of n = 3. Perhaps more significant th