Skip to content

Instantly share code, notes, and snippets.

@tomstuart
Last active October 7, 2016 11:37
Show Gist options
  • Select an option

  • Save tomstuart/02643c48c9030d52b30b70461828f39e to your computer and use it in GitHub Desktop.

Select an option

Save tomstuart/02643c48c9030d52b30b70461828f39e to your computer and use it in GitHub Desktop.

Revisions

  1. tomstuart revised this gist Oct 7, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion a-bit-more-algebra.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    By working with polynomials we can justify these definitions purely algebraically without doing any differentiation, which I hand-waved away as “a bit more algebra” in the post.
    By working with polynomials we can justify these definitions purely algebraically without doing any differentiation, which I hand-waved away as “a bit more algebra” [in the post](https://codon.com/automatic-differentiation-in-ruby#other-functions).

    For example, from the [angle sum identity](https://en.wikipedia.org/wiki/List_of_trigonometric_identities#Angle_sum_and_difference_identities)

  2. tomstuart revised this gist Oct 7, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions a-bit-more-algebra.md
    Original file line number Diff line number Diff line change
    @@ -15,8 +15,8 @@ and then from the [Taylor series](https://en.wikipedia.org/wiki/Taylor_series#Li
    we can see that

    > sin bε = bε - ((bε)³ / 3!) + ((bε)⁵ / 5!) - … = bε and
    > cos bε = 1 - ((bε)² / 2!) + ((bε)⁴ / 4!) - … = 1
    > sin bε = bε - ((bε)³ / 3!) + ((bε)⁵ / 5!) - … = bε - 0 + 0 - … = bε and
    > cos bε = 1 - ((bε)² / 2!) + ((bε)⁴ / 4!) - … = 1 - 0 + 0 - … = 1
    just because ε² = 0, and so

  3. tomstuart created this gist Oct 7, 2016.
    25 changes: 25 additions & 0 deletions a-bit-more-algebra.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    By working with polynomials we can justify these definitions purely algebraically without doing any differentiation, which I hand-waved away as “a bit more algebra” in the post.

    For example, from the [angle sum identity](https://en.wikipedia.org/wiki/List_of_trigonometric_identities#Angle_sum_and_difference_identities)

    > sin(ɑ + β) = sin ɑ cos β + cos ɑ sin β
    we know that

    > sin(a + bε) = sin a cos bε + cos a sin bε
    and then from the [Taylor series](https://en.wikipedia.org/wiki/Taylor_series#List_of_Maclaurin_series_of_some_common_functions)

    > sin x = x - (x³ / 3!) + (x⁵ / 5!) - … and
    > cos x = 1 - (x² / 2!) + (x⁴ / 4!) - …
    we can see that

    > sin bε = bε - ((bε)³ / 3!) + ((bε)⁵ / 5!) - … = bε and
    > cos bε = 1 - ((bε)² / 2!) + ((bε)⁴ / 4!) - … = 1
    just because ε² = 0, and so

    > sin(a + bε) = sin a + bε cos a
    which is what we wanted. I think this is appealing because it depends only on knowing that ε² = 0, in the same way that addition & multiplication of dual numbers does, rather than any analytic or geometric intuition about infinitesimals.