How did Hermite calculate $e^{\pi\sqrt{163}}$ in 1859?

Solution 1:

The French paper of Hermite (1859) 'Sur la théorie des equations modulaires' is available freely at Google books, it begins at page 29.

You'll find there the value of $e^{\pi\sqrt{43}}$ with all the correct digits but concerning $e^{\pi\sqrt{163}}$ there is only the indication that the fractional part should begin with twelve consecutive $9$. He clearly used modular properties to deduce this as explained by Matt. Wikipedia's page concerning Heegner numbers could help too.

At first glance Hermite doesn't seem to provide his computations' secrets concerning $e^{\pi\sqrt{43}}$, polynomials of order $48$ of page 67 (he speaks of "quite long but not at all impractical calculation" about them) and so on... Clearly he didn't fear tedious computations!

So let's see what we can do with logarithms or exponential tables. The 'state of the art' for these (1859) days may perhaps be found in this paper of 1881 from Alexander Ellis : Gray published Tables for twelve-place logarithms in 1845 and Thoman a "Tables de logarithmes à 27 décimales" in 1867. Twelve digits seem enough for the nine digits of the integer part of $e^{\pi\sqrt{43}}$ and Hermite probably deduced the fractional part by inversion and multiplication of this result.

Let's suppose arbitrary that he used exponential tables (he could as well have used logarithm tables or $log_{10}$ tables or something more subtle 'AGM like' who knows...)

I'll start with $\pi \sqrt{43} \approx 20.6008006943$ ($\sqrt{43}$ is obtained quickly by iterations of $n'=n^2+43 d^2$,$d'=2nd$) and try to get $e^{\pi \sqrt{43}}\approx 884736744.000$

I used the 'relatively recent' Abramowitz and Stegun tables that I'll 'round' at 12 digits for my 'H-emulation'.

$e^{20}$ is tabulated page 138 as ( 8)4.85165 19540 98 and this value of $485165195.410$ will be our reference. We will have to multiply this by $e^{0.6008006943}$ (nearly $1.82357834477$). Let's try to get this one :

  • by interpolation between $e^{0.600}\approx 1.82211880039$ and $e^{0.601}\approx 1.82394183055$ from the tables we get : $1.82357849025$ with the final result $884736814.567$ clearly insufficient...
    To get something more exact we need more tabulated values or expand $\displaystyle e^{0.601-0.6008006943}$ in Taylor series getting $e^{0.601}e^{-0.0002}e^{0.0000007}e^{-0.000000005}=1.82357834605$ with the final result $884736744.607$ not to far from our target (the idea is that the Taylor series for $e^{-0.0002}$, $e^{0.0000007}$... are fast)

  • or by multiplication by $e^{0.6}$, $e^{0.0001}$ (8 times), $e^{0.0000001}$ (6 times), $e^{0.00000001}$ (9 times), $e^{0.000000001}$ (4 times) at this point the final result is $884736743.722$ and we are nearly there...

Let's note that the second method allows to get high precision just by 'pre-evaluation' of some terms. In fact $\displaystyle e^{10^k}$ (for $k=1,0,-1,-2\cdots -18$) evaluated with high precision should have worked for $e^{\pi\sqrt{163}}$ !
EDIT2: evaluating directly $e^{0.0000006}$, $e^{0.00000009}$, $e^{0.0000000043}$ to 18 digits would probably be more efficient and the result could be evaluated this way : $\displaystyle a e^{\epsilon}= a + (a)\frac{\epsilon}{1} + \left(\frac{a\epsilon}{1}\right)\frac{\epsilon}2+\cdots$ (each time the previous term is mutiplied/divided by $\frac{\epsilon}n$ and added to the result)
some excellent mental calculators of these days could have contributed too!

Of course Hermite's method could have be much more subtle. Vladimir Arnold pointed out that many techniques like elliptic functions were better known in the nineteenth century than now. I think that the same could be said about quite some methods to solve Diophantine equations before the time of computers as you may confirm! :-)


OTHER METHODS : Let's try to apply the general method proposed by Apostol (in tzs' answer) or rather the idea of another Caltech professor for computing 'exponentials in your head' : Richard Feynman (see J.M.'s extract 'Lucky Numbers' from Feynman's very funny book "Surely You're Joking, Mr. Feynman!").

Let's look at one of his favorite examples : he was asked to compute $e^3$ 'in his head' and was able to answer quickly $20.085$. He needed only the values of $\ln 2$ and $\ln 10$ in this case. Let's detail this (to 6 digits here) : $\ln 10\approx 2.302585$ and $\ln 2\approx 0.693147$ but their sum is $\approx 2.995732= 3-\epsilon$ with $\epsilon\approx 0.004268$ so that : $$e^3=e^{\ln 10 +\ln 2 +\epsilon}\approx 10\cdot 2 \left(1+\epsilon(1+\frac{\epsilon}2)\right)\approx 20+0.08536+ 0.000182 \approx 20.085542$$ If asked for $e^4$ he would simply multiply this by $2.7182818$ to get : $e^4\approx 54.59816$ (the relation used is $4 \approx 1 +\ln 2 +\ln 10$).

A generalization of Feynman's trick to compute $e^a$ would consist in searching linear relations between $a$, $1$, $\ln 2$ and $\ln 10$ (we may accept other constants especially logarithms since $e^c$ should be easy to evaluate). This is easier to do now with algorithms like PSLQ or LLL, in Hermite's days I think you could only use continued fractions or guess...

For $\pi \sqrt{43}$ we may get excellent approximations like $2^{18} 15^3$, $5^{64/5}$.
For $\pi \sqrt{163}$ approximations are $2^{30}\cdot 5^{12}$, $2^{10}\cdot 3^7\cdot 5^{11}\cdot 7^4$, $2^7\cdot 3^{20}\cdot 5\cdot 7^6$, $e^{40} 4\cdot 3^8\cdot 5/7^6$ (I suppose that we have a table of logarithms and of exponentials of integers given with high precision).


But to be honest I think that none of these tricks were used by Hermite himself for these evaluations because he knew, as you may find in the previous links, 'Heegner numbers' for example, that the nearest integer was given by $960^3+744=884736744$ for $e^{\pi \sqrt{43}}$ and by $640320^3+744=262537412640768744$ for $e^{\pi \sqrt{163}}$ so that he needed no evaluation of exponential at all !!

Solution 2:

This is a bibliographical complement to Raymond wonderful answer. Since it contains no mathematics, I used the community wiki mode.

Hermite wrote a series of five articles under the title Sur la théorie des équations modulaires:

Hermite, C. Sur la théorie des équations modulaires. Comptes Rendus Acad. Sci. Paris 48, 1079-1084 and 1095-1102, 1859.

Hermite, C. Sur la théorie des équations modulaires. Comptes Rendus Acad. Sci. Paris 49, 16-24, 110-118, and 141-144, 1859.

The five articles can be freely and legally retrieved in pdf format by following the appropriate links given on this French National Library page.

These articles have been reprinted in Volume 2 of Hermite's Oeuvres Complètes, which can also be freely and legally retrieved in pdf format from this University of Michigan page.

The retrieval being somewhat tedious in both cases, I've put the various pdf files here.

The files corresponding to the five articles (from the French National Library) are named hermite_1.pdf to hermite_5.pdf here.

University of Michigan divided Volume 2 of Hermite's Oeuvres Complètes into twenty page files. The relevant article is scattered through three such files, named hermite_a.pdf, hermite_b.pdf, and hermite_c.pdf here. The article goes from p. 38 to p. 82.

The page, containing the first digits of $\exp(\pi\sqrt{43})$, Raymond points to at the beginning of his answer is page 8 of this pdf file (p. 1101 of the scanned text), or page 15 of this pdf file (p. 60 of the scanned text).

There is a fact I find very surprising about this famous page: In the Comptes Rendus version, Hermite thanks C.-J. Serret for having done the computation:

... on trouve (*) $$e^{\pi\sqrt{43}}=884736743.9997775\dots$$

(*) Je dois ce calcul à l'obligeance de M. C.-J. Serret.

Again, I find strange that this acknowledgment has been suppressed from the reprinted version.

EDIT. Life is sometimes funny:

Tito asked "How did Hermite calculate $e^{\pi\sqrt{163}}$?"

Raymond answered "Hermite calculated $e^{\pi\sqrt{43}}$, not $e^{\pi\sqrt{163}}$".

Then it turns out that Hermite did not calculate $e^{\pi\sqrt{43}}$, but C.-J. Serret did.

Note that C.-J. Serret (not to be confused with Joseph-Alfred Serret) was not a mathematician, but an astronomer. This suggests (I think) that, probably, methods similar to the ones described by Raymond were used.

Solution 3:

Often you can find some expression for a number that lends itself well to pencil and paper computation. For instance, suppose you were trying to compute $\sqrt{3}$. You can use this expression:

$$\sqrt{3}=\frac{1732}{1000}\left(1-\frac{176}{3000000}\right)^{-1/2}$$

If you use the binomial series for $(1-x)^{-1/2}$ you can compute that efficiently. $176/3000000$ is small enough that the series converges rapidly. This particular example is a problem from Apostol's Calculus, volume I, and it asks for 15 places, which if I recall correctly requires out to the $x^5$ term of the binomial series.

Doing this kind of calculation used to be part of a decent mathematical education, before calculators were common, and any working mathematician then would be quite agile at this (or would have an assistant whose job was to do calculations for the mathematician). Now we have pocket calculators, and computers that will quickly do these things for us to hundreds of decimal places, and so becoming adept at pencil and paper calculation is simply not a skill we are required to develop.