1
$\begingroup$

We know that Babbage's Difference Engine could calculate the sum of polynomials. This was important to him because of his work on logarithms. This relies on the sum of finite differences.

We know that we can manually calculate a logarithm using a power series.

So a logarithm can be calculated as: enter image description here

I'm trying to draw up the table of polynomial results for $\log_{e}3$ that I'd expect the Difference Engine to output.

We know that the Difference Engine tabulated polynomials using a Finite Differences Method.

My question is: What are the steps you would use to calculate $\log_{e}3$ using a Finite Differences Method?

$\endgroup$
  • $\begingroup$ A minor point, but I think Polynomials are finite. However, a Series could be either infinite as in the case of log or finite. $\endgroup$ – NoChance Sep 23 '19 at 11:39
  • $\begingroup$ It is easy to assume that one would assume n terms of the series to be accurate enough and end with a Polynomial where one could use interpolation/extrapolation with, but this is a general guess. Maybe this helps: ed-thelen.org/bab/bab-intro.html $\endgroup$ – NoChance Sep 23 '19 at 12:00
  • $\begingroup$ Thanks @NoChance that’s helpful. $\endgroup$ – hawkeye Sep 23 '19 at 12:35
0
$\begingroup$

Logarithms and the history from Babbage's time are truly fascinating.

So we start with the Binomial Expansion noting this is only useful between 0 and 1:

$$ \ln x = (x-1) - \frac{1}{2}(x-1)^2 + ....$$

We'll do this for a sixth order polynomial:

$$ \ln x = (x-1) - \frac{1}{2}(x-1)^2 + \frac{1}{3}(x-1)^3 + \frac{1}{4}(x-1)^4 + \frac{1}{5}(x-1)^5 + \frac{1}{6}(x-1)^6 $$

As an excel function - this looks like this:

=(C161-1)-(1/2)*POWER((C161-1),2)+(1/3)*POWER((C161-1),3)-(1/4)*POWER((C161-1),4)+(1/5)*POWER((C161-1),5)-(1/6)*POWER((C161-1),6)

To understand sum of the differences we look at the following example: \begin{array}{|c|c|c|c|} \hline x& p(x) = 2x^2 − 3x + 2 & diff1(x) = ( p(x + 1) − p(x) ) & diff2(x) = ( diff1(x + 1) − diff1(x) ) \\ \hline 0 & 2& -1&4\\ \hline 1 & 1 & 3 &4\\ \hline 2 & 4 & 7&4\\ \hline 3 & 11 & 11 &\\ \hline 4 & 22 & &\\ \hline \end{array}

ie you keep adding the number in the right column to the next column over, and each row you carry the sum over to the right. (You can see a detailed video here).

Now we build a table for this polynomial of sum of the differences between 0 and 1:

\begin{array}{|c|c|c|c|c|c|c|} \hline index & binomial calculation & 1st diff & 2nd diff & 3rd diff & 4th diff & 5th diff & 6th diff \\ \hline 1&0.00000&&&&&&\\ \hline 0.9&-0.10536&-0.10536&&&&&\\ \hline 0.8&-0.22314&-0.11778&-0.01242&&&&\\ \hline 0.7&-0.35663&-0.13349&-0.01571&-0.00329&&&\\ \hline 0.6&-0.51046&-0.15383&-0.02034&-0.00463&-0.00134&&\\ \hline 0.5&-0.69115&-0.18068&-0.02685&-0.00651&-0.00188&-0.00054&\\ \hline 0.4&-0.90773&-0.21658&-0.03590&-0.00905&-0.00254&-0.00066&-0.00012\\ \hline 0.3&-1.17258&-0.26485&-0.04827&-0.01237&-0.00332&-0.00078&-0.00012\\ \hline 0.2&-1.50229&-0.32971&-0.06486&-0.01659&-0.00422&-0.00090&-0.00012\\ \hline 0.1&-1.91870&-0.41640&-0.08669&-0.02183&-0.00524&-0.00102&-0.00012\\ \hline \end{array}

Now we shuffle top of columns to top row

\begin{array}{|c|c|c|c|c|c|c|} \hline index & binomial calculation & 1st diff & 2nd diff & 3rd diff & 4th diff & 5th diff & 6th diff \\ \hline 1&0.00000&-0.10536&-0.01242&-0.00329&-0.00134&-0.00054&-0.00012\\ \hline \end{array}

Then we fill in first row with precomputed values, then fill down by adding the number above and above right

\begin{array}{|c|c|c|c|c|c|c|} \hline index & binomial calculation & 1st diff & 2nd diff & 3rd diff & 4th diff & 5th diff & 6th diff \\ \hline 1&0.00000&-0.10536&-0.01242&-0.00329&-0.00134&-0.00054&-0.00012\\ \hline 0.9&-0.10536&-0.11778&-0.01571&-0.00463&-0.00188&-0.00066&-0.00012\\ \hline 0.8&-0.22314&-0.13349&-0.02034&-0.00651&-0.00254&-0.00078&-0.00012\\ \hline 0.7&-0.35663&-0.15383&-0.02685&-0.00905&-0.00332&-0.00090&-0.00012\\ \hline 0.6&-0.51046&-0.18068&-0.03590&-0.01237&-0.00422&-0.00102&-0.00012\\ \hline 0.5&-0.69115&-0.21658&-0.04827&-0.01659&-0.00524&-0.00114&-0.00012\\ \hline 0.4&-0.90773&-0.26485&-0.06486&-0.02183&-0.00638&-0.00126&-0.00012\\ \hline 0.3&-1.17258&-0.32971&-0.08669&-0.02821&-0.00764&-0.00138&-0.00012\\ \hline 0.2&-1.50229&-0.41640&-0.11490&-0.03585&-0.00902&-0.00150&-0.00012\\ \hline 0.1&-1.91870&-0.53130&-0.15075&-0.04487&-0.01052&-0.00162&-0.00012\\ \hline \end{array}

Now we have a value for ln 0.3 = -1.1725805

Now to convert ln 0.3 to ln 3 we add ln 10 which is approx 2.302

And we get ln 3 = 1.1294195 which is close to a computed value of ln 3 = 1.098612289

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.