Skip to content

Commit 0547728

Browse files
authored
Update/rename maclaurin.ipynb to reflect the correct spelling of Maclaurin
1 parent 912e200 commit 0547728

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Using a Maclauren Series to Estimate $e$\n",
7+
"# Using a Maclaurin Series to Estimate $e$\n",
88
"\n",
9-
"A [Maclauren series](https://mathworld.wolfram.com/MaclaurinSeries.html) is an infinite series of terms that can be used to approximate more complex functions quickly.\n",
9+
"A [Maclaurin series](https://mathworld.wolfram.com/MaclaurinSeries.html) is an infinite series of terms that can be used to approximate more complex functions quickly.\n",
1010
"\n",
1111
"You're going to approximate $e^x$ by using the first few terms of the series. The series equation for $e^x$ is this:\n",
1212
"\n",
@@ -39,7 +39,7 @@
3939
"outputs": [],
4040
"source": [
4141
"def e_x(x, terms=10):\n",
42-
" \"\"\"Approximates $e^x$ using 'terms' terms of the Maclauren series\"\"\"\n",
42+
" \"\"\"Approximates $e^x$ using a given number of terms of the Maclaurin series\"\"\"\n",
4343
" n = np.arange(terms)\n",
4444
" return np.sum((x ** n) / fac(n))"
4545
]
@@ -74,7 +74,7 @@
7474
"name": "stdout",
7575
"output_type": "stream",
7676
"text": [
77-
"N (terms)\tMaclauren\tError\n",
77+
"N (terms)\tMaclaurin\tError\n",
7878
"1\t\t1.000\t\t19.086\n",
7979
"2\t\t4.000\t\t16.086\n",
8080
"3\t\t8.500\t\t11.586\n",
@@ -92,11 +92,11 @@
9292
}
9393
],
9494
"source": [
95-
"print(\"N (terms)\\tMaclauren\\tError\")\n",
95+
"print(\"N (terms)\\tMaclaurin\\tError\")\n",
9696
"\n",
9797
"for n in range(1, 14):\n",
98-
" maclauren = e_x(3, terms=n)\n",
99-
" print(f\"{n}\\t\\t{maclauren:.03f}\\t\\t{e**3 - maclauren:.03f}\")"
98+
" maclaurin = e_x(3, terms=n)\n",
99+
" print(f\"{n}\\t\\t{maclaurin:.03f}\\t\\t{e**3 - maclaurin:.03f}\")"
100100
]
101101
},
102102
{

0 commit comments

Comments
 (0)