From 21794905c6e1a1b55737bb496e21b020e722d4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Fri, 18 May 2018 17:17:51 +0200 Subject: [PATCH] Improve formatting --- extra_autodiff.ipynb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/extra_autodiff.ipynb b/extra_autodiff.ipynb index cdcc42c..dbd3088 100644 --- a/extra_autodiff.ipynb +++ b/extra_autodiff.ipynb @@ -533,23 +533,23 @@ "source": [ "Dual numbers have their own arithmetic rules, which are generally quite natural. For example:\n", "\n", - "Addition:\n", + "**Addition**\n", "\n", "$(a_1 + b_1\\epsilon) + (a_2 + b_2\\epsilon) = (a_1 + a_2) + (b_1 + b_2)\\epsilon$\n", "\n", - "Subtraction:\n", + "**Subtraction**\n", "\n", "$(a_1 + b_1\\epsilon) - (a_2 + b_2\\epsilon) = (a_1 - a_2) + (b_1 - b_2)\\epsilon$\n", "\n", - "Multiplication:\n", + "**Multiplication**\n", "\n", - "$(a_1 + b_1\\epsilon) * (a_2 + b_2\\epsilon) = (a_1 a_2) + (a_1 b_2 + a_2 b_1)\\epsilon + b_1 b_2\\epsilon^2 = (a_1 a_2) + (a_1b_2 + a_2b_1)\\epsilon$\n", + "$(a_1 + b_1\\epsilon) \\times (a_2 + b_2\\epsilon) = (a_1 a_2) + (a_1 b_2 + a_2 b_1)\\epsilon + b_1 b_2\\epsilon^2 = (a_1 a_2) + (a_1b_2 + a_2b_1)\\epsilon$\n", "\n", - "Division:\n", + "**Division**\n", "\n", "$\\dfrac{a_1 + b_1\\epsilon}{a_2 + b_2\\epsilon} = \\dfrac{a_1 + b_1\\epsilon}{a_2 + b_2\\epsilon} \\cdot \\dfrac{a_2 - b_2\\epsilon}{a_2 - b_2\\epsilon} = \\dfrac{a_1 a_2 + (b_1 a_2 - a_1 b_2)\\epsilon - b_1 b_2\\epsilon^2}{{a_2}^2 + (a_2 b_2 - a_2 b_2)\\epsilon - {b_2}^2\\epsilon} = \\dfrac{a_1}{a_2} + \\dfrac{a_1 b_2 - b_1 a_2}{{a_2}^2}\\epsilon$\n", "\n", - "Power:\n", + "**Power**\n", "\n", "$(a + b\\epsilon)^n = a^n + (n a^{n-1}b)\\epsilon$\n", "\n", @@ -560,7 +560,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Let's create a class to represent dual numbers, and implement a few operations (addition and multiplication). You try adding some more if you want." + "Let's create a class to represent dual numbers, and implement a few operations (addition and multiplication). You can try adding some more if you want." ] }, { @@ -618,7 +618,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "$(3 + 4ε)\\times(5 + 7ε) = 3 \\times 5 + 3 \\times 7ε + 4ε \\times 5 + 4ε \\times 7ε = 15 + 21ε + 20ε + 28ε^2 = 15 + 41ε + 28 \\times 0 = 15 + 41ε$" + "$(3 + 4ε)\\times(5 + 7ε)$ = $3 \\times 5 + 3 \\times 7ε + 4ε \\times 5 + 4ε \\times 7ε$ = $15 + 21ε + 20ε + 28ε^2$ = $15 + 41ε + 28 \\times 0$ = $15 + 41ε$" ] }, {