Compressed Series for e

Harlan J. Brothers

Brothers Technology, LLC

harlan@brotherstechnology.com


(This code is referenced in the paper entitled "Improving the convergence of Newton's series approximation for e," appearing in The College Mathematics Journal, Vol. 35, No. 1, 2004; pages 34 - 39.)


The following code takes an arbitrary number of terms and shows their compressed series along with the approximate numerical error relative to e.  Here TC represents the number of terms combined (from Newton's series) into a single term of the new series, while t sets the number of these new terms to be evaluated.


Referring page: www.brotherstechnology.com/math/cmj-supp.html

(Updated 2013-06-15)



Series for e:


Clear[k]; TC = 2; t = 20;

numerat[1] = 1; numerat[TC_] := numerat[TC - 1]*(n + TC - 1) + 1;

denominat = (n + TC - 1)!;

summand = Together[Expand[numerat[TC]/denominat]];

expressn = summand /. n -> (TC*k);

 Print["\!\(\*

StyleBox[\"e\",\nFontFamily->\"Times New Roman Italic\",\n\

FontSize->13,\nFontWeight->\"Plain\"]\) = \!\(\*UnderoverscriptBox[\(\

\[Sum]\), \(k = 0\), \(\[Infinity]\)]\)", TraditionalForm@expressn]

k = t; acc = Floor[N[-Log[10, expressn]]] + 15;

Print["Error for ", t, " terms \[TildeTilde] ", 

 E - N[Sum[expressn, {k, 0, t - 1}], acc]]



Series for e^x:


Clear[k, x]; TC = 2; t = 20;

numerat[1] = x^n; 

numerat[TC_] := numerat[TC - 1]*(n + TC - 1) + x^(n + TC - 1);

denominat = (n + TC - 1)!;

summand = Together[Expand[numerat[TC]/denominat]];

pwexpressn = summand /. n -> (TC*k); 

Print["\!\(\*SuperscriptBox[

StyleBox[\"e\",\nFontFamily->\"Times New Roman Italic\",\n\

FontSize->13,\nFontWeight->\"Plain\"], 

StyleBox[

RowBox[{\" \", \"x\"}],\nFontFamily->\"Times New Roman Italic\",\n\

FontSize->10,\nFontWeight->\"Plain\"]]\) = \

\!\(\*UnderoverscriptBox[\(\[Sum]\), \(k = 0\), \(\[Infinity]\)]\)", 

 TraditionalForm@pwexpressn]

k = t; acc = Floor[N[-Log[10, pwexpressn]]] + 15; x = 1/2;

Print["Error for ", t, " terms \[TildeTilde] ", 

 E - N[Sum[pwexpressn, {k, 0, t - 1}]^(1/x), acc]]