From 899fff9e79e99bd85b0de7d404daacbf59673c2d Mon Sep 17 00:00:00 2001 From: Adam Haber Date: Fri, 14 Feb 2020 21:28:22 +0200 Subject: [PATCH 1/7] Add basic arithmetic functions --- scalars.Rmd | 279 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 279 insertions(+) diff --git a/scalars.Rmd b/scalars.Rmd index 0ef3bbd..1932b04 100644 --- a/scalars.Rmd +++ b/scalars.Rmd @@ -56,4 +56,283 @@ $$ \bar{a} {+=} \bar{c} \qquad \bar{b} {+=} -\bar{c} +$$ + +## Multiplication + +$$ +c = a\cdot b +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = b +\qquad +\frac{\partial}{\partial b} c = a +$$ + + +### Tangent {-} + +$$ +\dot{c} = \dot{a}\cdot b + \dot{b}\cdot a +$$ + +### Adjoints {-} + +$$ +\bar{a}\ {+=} \ \bar{c}\cdot b +\qquad +\bar{b}\ {+=} \ \bar{c}\cdot a +$$ + +## Division + +$$ +c = \frac{a}{b} +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \frac{1}{b} +\qquad +\frac{\partial}{\partial b} c = -\frac{a}{b^2} +$$ + + +### Tangent {-} + +$$ +\dot{c} = \frac{\dot{a}}{b}-\frac{a\cdot\dot{b}}{b^2} +$$ + +### Adjoints {-} + +$$ +\bar{a}\ {+=} \ \frac{\bar{c}}{b} +\qquad +\bar{b}\ {+=} \ -\frac{\bar{c}\cdot a}{b^2} +$$ + +## Exponent + +$$ +c = e^a +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = e^a +$$ + +### Tangent {-} + +$$ +\dot{c} = \dot{a}\cdot e^a +$$ + +### Adjoints {-} + +$$ +\bar{a}\ {+=} \ \bar{c}\cdot e^a +$$ + +## Logarithm (base e) + +$$ +c = \log(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \frac{1}{a} +$$ + +### Tangent {-} + +$$ +\dot{c}=\frac{\dot{a}}{a} +$$ + +### Adjoints {-} + +$$ +\bar{a}\ {+=} \ \frac{\bar{c}}{a} +$$ + +## Power + +$$ +c=a^b +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = b\cdot a^{b-1} +\qquad +\frac{\partial}{\partial b} c = \log(a)\cdot a^b +$$ + +### Tangent {-} + +$$ +\dot{c}=\dot{a}\cdot b\cdot a^{b-1}+\dot{b}\log(a)\cdot a^b=\left(\dot{a}\frac{b}{a}+\dot{b}\log(a)\right)\cdot a^b +$$ + +### Adjoints {-} + +$$ +\bar{a} \ {+=} \ \bar{c}\cdot b\cdot a^{b-1} +\qquad +\bar{b} \ {+=} \ \bar{c}\cdot\log(a)\cdot a^b +$$ + +## Square + +$$ +c=a^2 +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = 2a +$$ + +### Tangent {-} + +$$ +\dot{c}=\dot{a}\cdot 2a +$$ + +### Adjoints {-} + +$$ +\bar{a} \ {+=} \ \bar{c} \cdot 2a +$$ + +## Inverse + +$$ +c=\frac{1}{a} +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = -\frac{1}{a^2} +$$ + +### Tangent {-} + +$$ +\dot{c}=-\frac{\dot{a}}{a^2} +$$ + +### Adjoints {-} + +$$ +\bar{a} \ {+=} \ -\frac{\bar{c}}{a^2} +$$ + +## Square root + +$$ +c=\sqrt{a} +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = -\frac{1}{2\sqrt{a}} +$$ + +### Tangent {-} + +$$ +\dot{c} = -\frac{\dot{a}}{2\sqrt{a}} +$$ + +### Adjoints {-} + +$$ +\bar{a} \ {+=} \ -\frac{\bar{c}}{2\sqrt{a}} +$$ + + +## Cos + +$$ +c = \cos(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a}c=-\sin(a) +$$ + +### Tangent {-} + +$$ +\dot{c}=-\dot{a}\cdot \sin(a) +$$ + +### Adjoints {-} + +$$ +\bar{a} \ {+=} \ -\bar{c}\cdot\sin(a) +$$ + +## Sin + +$$ +c = \sin(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a}c=\cos(a) +$$ + +### Tangent {-} + +$$ +\dot{c}=\dot{a}\cdot \cos(a) +$$ + +### Adjoints {-} + +$$ +\bar{a} \ {+=} \ \bar{c}\cdot \cos(a) +$$ + +## Tan + +$$ +c = \tan(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a}c=\frac{1}{\cos^2(a)} +$$ + +### Tangent {-} + +$$ +\dot{c}=\frac{\dot{a}}{\cos^2(a)} +$$ + +### Adjoints {-} + +$$ +\bar{a} \ {+=} \ \frac{\bar{c}}{\cos^2(a)} $$ \ No newline at end of file From a1a4e6f74bf359a63b73786cfc6578c9b2a1dd25 Mon Sep 17 00:00:00 2001 From: Adam Haber Date: Sat, 15 Feb 2020 13:01:34 +0200 Subject: [PATCH 2/7] Latex styling changes --- scalars.Rmd | 94 ++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/scalars.Rmd b/scalars.Rmd index 1932b04..d2b3398 100644 --- a/scalars.Rmd +++ b/scalars.Rmd @@ -9,7 +9,7 @@ $$ ### Derivatives {-} $$ -\frac{\partial}{\partial a} c = 1 +\frac{\partial}{\partial a} c = 1 \qquad \frac{\partial}{\partial b} c = 1 $$ @@ -23,9 +23,9 @@ $$ ### Adjoints {-} $$ -\bar{a} \ {+=} \ \bar{c} + \overline{a} \ {+=} \ \overline{c} \qquad -\bar{b} \ {+=} \ \bar{c} + \overline{b} \ {+=} \ \overline{c} $$ @@ -53,15 +53,15 @@ $$ ### Adjoints {-} $$ -\bar{a} {+=} \bar{c} + \overline{a} {+=} \overline{c} \qquad -\bar{b} {+=} -\bar{c} + \overline{b} {+=} - \overline{c} $$ ## Multiplication $$ -c = a\cdot b +c = a \cdot b $$ ### Derivatives {-} @@ -76,15 +76,15 @@ $$ ### Tangent {-} $$ -\dot{c} = \dot{a}\cdot b + \dot{b}\cdot a +\dot{c} = \dot{a} \cdot b + \dot{b} \cdot a $$ ### Adjoints {-} $$ -\bar{a}\ {+=} \ \bar{c}\cdot b + \overline{a} \ {+=} \ \overline{c} \cdot b \qquad -\bar{b}\ {+=} \ \bar{c}\cdot a + \overline{b} \ {+=} \ \overline{c} \cdot a $$ ## Division @@ -98,46 +98,46 @@ $$ $$ \frac{\partial}{\partial a} c = \frac{1}{b} \qquad -\frac{\partial}{\partial b} c = -\frac{a}{b^2} +\frac{\partial}{\partial b} c = - \frac{a}{b^2} $$ ### Tangent {-} $$ -\dot{c} = \frac{\dot{a}}{b}-\frac{a\cdot\dot{b}}{b^2} +\dot{c} = \frac{\dot{a}}{b} - \frac{a \cdot \dot{b}}{b^2} $$ ### Adjoints {-} $$ -\bar{a}\ {+=} \ \frac{\bar{c}}{b} +\overline{a} \ {+=} \ \frac{\overline{c}}{b} \qquad -\bar{b}\ {+=} \ -\frac{\bar{c}\cdot a}{b^2} +\overline{b} \ {+=} \ - \frac{\overline{c} \cdot a}{b^2} $$ -## Exponent +## Exponential $$ -c = e^a +c = \exp(a) $$ ### Derivatives {-} $$ -\frac{\partial}{\partial a} c = e^a +\frac{\partial}{\partial a} c = \exp(a) $$ ### Tangent {-} $$ -\dot{c} = \dot{a}\cdot e^a +\dot{c} = \dot{a} \cdot \exp(a) $$ ### Adjoints {-} $$ -\bar{a}\ {+=} \ \bar{c}\cdot e^a +\overline{a} \ {+=} \ \overline{c} \cdot \exp(a) $$ ## Logarithm (base e) @@ -155,113 +155,113 @@ $$ ### Tangent {-} $$ -\dot{c}=\frac{\dot{a}}{a} +\dot{c} = \frac{\dot{a}}{a} $$ ### Adjoints {-} $$ -\bar{a}\ {+=} \ \frac{\bar{c}}{a} +\overline{a} \ {+=} \ \frac{\overline{c}}{a} $$ ## Power $$ -c=a^b +c = a^b $$ ### Derivatives {-} $$ -\frac{\partial}{\partial a} c = b\cdot a^{b-1} +\frac{\partial}{\partial a} c = b \cdot a^{b-1} \qquad -\frac{\partial}{\partial b} c = \log(a)\cdot a^b +\frac{\partial}{\partial b} c = \log(a) \cdot a^b $$ ### Tangent {-} $$ -\dot{c}=\dot{a}\cdot b\cdot a^{b-1}+\dot{b}\log(a)\cdot a^b=\left(\dot{a}\frac{b}{a}+\dot{b}\log(a)\right)\cdot a^b +\dot{c} = \dot{a} \cdot b \cdot a^{b-1} + \dot{b} \log(a) \cdot a^b = \left( \dot{a} \frac{b}{a} + \dot{b} \log(a) \right) \cdot a^b $$ ### Adjoints {-} $$ -\bar{a} \ {+=} \ \bar{c}\cdot b\cdot a^{b-1} +\overline{a} \ {+=} \ \overline{c} \cdot b \cdot a^{b-1} \qquad -\bar{b} \ {+=} \ \bar{c}\cdot\log(a)\cdot a^b +\overline{b} \ {+=} \ \overline{c} \cdot \log(a) \cdot a^b $$ ## Square $$ -c=a^2 +c = a^2 $$ ### Derivatives {-} $$ -\frac{\partial}{\partial a} c = 2a +\frac{\partial}{\partial a} c = 2a $$ ### Tangent {-} $$ -\dot{c}=\dot{a}\cdot 2a +\dot{c} = \dot{a} \cdot 2a $$ ### Adjoints {-} $$ -\bar{a} \ {+=} \ \bar{c} \cdot 2a +\overline{a} \ {+=} \ \overline{c} \cdot 2a $$ ## Inverse $$ -c=\frac{1}{a} +c = \frac{1}{a} $$ ### Derivatives {-} $$ -\frac{\partial}{\partial a} c = -\frac{1}{a^2} +\frac{\partial}{\partial a} c = - \frac{1}{a^2} $$ ### Tangent {-} $$ -\dot{c}=-\frac{\dot{a}}{a^2} +\dot{c} = - \frac{\dot{a}}{a^2} $$ ### Adjoints {-} $$ -\bar{a} \ {+=} \ -\frac{\bar{c}}{a^2} + \overline{a} \ {+=} \ - \frac{\overline{c}}{a^2} $$ ## Square root $$ -c=\sqrt{a} +c = \sqrt{a} $$ ### Derivatives {-} $$ -\frac{\partial}{\partial a} c = -\frac{1}{2\sqrt{a}} +\frac{\partial}{\partial a} c = -\frac{1}{2 \sqrt{a}} $$ ### Tangent {-} $$ -\dot{c} = -\frac{\dot{a}}{2\sqrt{a}} +\dot{c} = -\frac{\dot{a}}{2 \sqrt{a}} $$ ### Adjoints {-} $$ -\bar{a} \ {+=} \ -\frac{\bar{c}}{2\sqrt{a}} + \overline{a} \ {+=} \ -\frac{\overline{c}}{2 \sqrt{a}} $$ @@ -274,19 +274,19 @@ $$ ### Derivatives {-} $$ -\frac{\partial}{\partial a}c=-\sin(a) +\frac{\partial}{\partial a} c = - \sin(a) $$ ### Tangent {-} $$ -\dot{c}=-\dot{a}\cdot \sin(a) +\dot{c} = - \dot{a} \cdot \sin(a) $$ ### Adjoints {-} $$ -\bar{a} \ {+=} \ -\bar{c}\cdot\sin(a) + \overline{a} \ {+=} \ - \overline{c} \cdot\sin(a) $$ ## Sin @@ -298,19 +298,19 @@ $$ ### Derivatives {-} $$ -\frac{\partial}{\partial a}c=\cos(a) +\frac{\partial}{\partial a} c = \cos(a) $$ ### Tangent {-} $$ -\dot{c}=\dot{a}\cdot \cos(a) +\dot{c} = \dot{a} \cdot \cos(a) $$ ### Adjoints {-} $$ -\bar{a} \ {+=} \ \bar{c}\cdot \cos(a) +\overline{a} \ {+=} \ \overline{c} \cdot \cos(a) $$ ## Tan @@ -322,17 +322,17 @@ $$ ### Derivatives {-} $$ -\frac{\partial}{\partial a}c=\frac{1}{\cos^2(a)} +\frac{\partial}{\partial a} c = \frac{1}{\cos^2(a)} $$ ### Tangent {-} $$ -\dot{c}=\frac{\dot{a}}{\cos^2(a)} +\dot{c} = \frac{\dot{a}}{\cos^2(a)} $$ ### Adjoints {-} $$ -\bar{a} \ {+=} \ \frac{\bar{c}}{\cos^2(a)} +\overline{a} \ {+=} \ \frac{\overline{c}}{\cos^2(a)} $$ \ No newline at end of file From f17fbfeff9239c428d3af467f5f42adb5927035f Mon Sep 17 00:00:00 2001 From: Adam Haber Date: Sat, 15 Feb 2020 13:18:11 +0200 Subject: [PATCH 3/7] Changed authors --- index.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.Rmd b/index.Rmd index 7a1da52..aa4bca9 100644 --- a/index.Rmd +++ b/index.Rmd @@ -1,7 +1,7 @@ --- knit: 'bookdown::render_book("index.Rmd", "tufte_html_book")' title: 'Automatic Differentiation Handbook' -author: 'Bob Carpenter, editor' +author: 'Bob Carpenter, Adam Haber' date: '2020' bibliography: all.bib # biblio-style: "acm" From 1c4215c52e952fdfa2961a95242744e8aa9a5f95 Mon Sep 17 00:00:00 2001 From: Adam Haber Date: Sat, 15 Feb 2020 13:27:59 +0200 Subject: [PATCH 4/7] Added cosh, sinh and tanh --- scalars.Rmd | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 2 deletions(-) diff --git a/scalars.Rmd b/scalars.Rmd index d2b3398..5b4df35 100644 --- a/scalars.Rmd +++ b/scalars.Rmd @@ -286,7 +286,7 @@ $$ ### Adjoints {-} $$ - \overline{a} \ {+=} \ - \overline{c} \cdot\sin(a) + \overline{a} \ {+=} \ - \overline{c} \cdot \sin(a) $$ ## Sin @@ -335,4 +335,76 @@ $$ $$ \overline{a} \ {+=} \ \frac{\overline{c}}{\cos^2(a)} -$$ \ No newline at end of file +$$ + +## Cosh + +$$ +c = \cosh(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \sinh(a) +$$ + +### Tangent {-} + +$$ +\dot{c} = \dot{a} \cdot \sinh(a) +$$ + +### Adjoints {-} + +$$ + \overline{a} \ {+=} \ \overline{c} \cdot \sinh(a) +$$ + +## Sinh + +$$ +c = \sinh(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \cosh(a) +$$ + +### Tangent {-} + +$$ +\dot{c} = \dot{a} \cdot \cosh(a) +$$ + +### Adjoints {-} + +$$ +\overline{a} \ {+=} \ \overline{c} \cdot \cosh(a) +$$ + +## Tanh + +$$ +c = \tanh(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \frac{1}{\cosh^2(a)} +$$ + +### Tangent {-} + +$$ +\dot{c} = \frac{\dot{a}}{\cosh^2(a)} +$$ + +### Adjoints {-} + +$$ +\overline{a} \ {+=} \ \frac{\overline{c}}{\cosh^2(a)} +$$ From f7638a7839032695b3eaf5114da256a0f7d1c4dc Mon Sep 17 00:00:00 2001 From: Adam Haber Date: Sat, 15 Feb 2020 13:38:50 +0200 Subject: [PATCH 5/7] Added acos, asin and atan --- scalars.Rmd | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/scalars.Rmd b/scalars.Rmd index 5b4df35..c592c64 100644 --- a/scalars.Rmd +++ b/scalars.Rmd @@ -337,6 +337,79 @@ $$ \overline{a} \ {+=} \ \frac{\overline{c}}{\cos^2(a)} $$ +## Arccos + +$$ +c = \arccos(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = - \frac{1}{\sqrt{1-a^2}} +$$ + +### Tangent {-} + +$$ +\dot{c} = - \frac{\dot{a}}{\sqrt{1-a^2}} +$$ + +### Adjoints {-} + +$$ + \overline{a} \ {+=} \ - \frac{\overline{c}}{\sqrt{1-a^2}} +$$ + +## Arcsin + +$$ +c = \arcsin(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \frac{1}{\sqrt{1-a^2}} +$$ + +### Tangent {-} + +$$ +\dot{c} = \frac{\dot{a}}{\sqrt{1-a^2}} +$$ + +### Adjoints {-} + +$$ + \overline{a} \ {+=} \ \frac{\overline{c}}{\sqrt{1-a^2}} +$$ + +## Arctan + +$$ +c = \arctan(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \frac{1}{\sqrt{1+a^2}} +$$ + +### Tangent {-} + +$$ +\dot{c} = \frac{\dot{a}}{\sqrt{1+a^2}} +$$ + +### Adjoints {-} + +$$ + \overline{a} \ {+=} \ \frac{\overline{c}}{\sqrt{1+a^2}} +$$ + + ## Cosh $$ From 64a1f2170e3e86c6a225933a3b8d3f53ead6e3dd Mon Sep 17 00:00:00 2001 From: Adam Haber Date: Sun, 16 Feb 2020 15:46:34 +0200 Subject: [PATCH 6/7] Added acosh, asinh and atanh; fixed bug with atan --- scalars.Rmd | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 3 deletions(-) diff --git a/scalars.Rmd b/scalars.Rmd index c592c64..5dbfde8 100644 --- a/scalars.Rmd +++ b/scalars.Rmd @@ -394,19 +394,19 @@ $$ ### Derivatives {-} $$ -\frac{\partial}{\partial a} c = \frac{1}{\sqrt{1+a^2}} +\frac{\partial}{\partial a} c = \frac{1}{1+a^2} $$ ### Tangent {-} $$ -\dot{c} = \frac{\dot{a}}{\sqrt{1+a^2}} +\dot{c} = \frac{\dot{a}}{1+a^2} $$ ### Adjoints {-} $$ - \overline{a} \ {+=} \ \frac{\overline{c}}{\sqrt{1+a^2}} + \overline{a} \ {+=} \ \frac{\overline{c}}{1+a^2} $$ @@ -481,3 +481,76 @@ $$ $$ \overline{a} \ {+=} \ \frac{\overline{c}}{\cosh^2(a)} $$ + +## Arccosh + +$$ +c = \text{arccosh}(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \frac{1}{\sqrt{a^2-1}} +$$ + +### Tangent {-} + +$$ +\dot{c} = \frac{\dot{a}}{\sqrt{a^2-1}} +$$ + +### Adjoints {-} + +$$ + \overline{a} \ {+=} \ \frac{\overline{c}}{\sqrt{a^2-1}} +$$ + +## Arcsinh + +$$ +c = \text{arcsinh}(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \frac{1}{\sqrt{1+a^2}} +$$ + +### Tangent {-} + +$$ +\dot{c} = \frac{\dot{a}}{\sqrt{1+a^2}} +$$ + +### Adjoints {-} + +$$ + \overline{a} \ {+=} \ \frac{\overline{c}}{\sqrt{1+a^2}} +$$ + +## Arctanh + +$$ +c = \text{arctanh}(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \frac{1}{1-a^2} +$$ + +### Tangent {-} + +$$ +\dot{c} = \frac{\dot{a}}{1-a^2} +$$ + +### Adjoints {-} + +$$ + \overline{a} \ {+=} \ \frac{\overline{c}}{1-a^2} +$$ + From f2fdee7ae2c46d55b4a48984b002b4ab7740cbe8 Mon Sep 17 00:00:00 2001 From: Adam Haber Date: Mon, 17 Feb 2020 21:11:16 +0200 Subject: [PATCH 7/7] Added log and exp in different bases --- scalars.Rmd | 98 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 86 insertions(+), 12 deletions(-) diff --git a/scalars.Rmd b/scalars.Rmd index 5dbfde8..090f68e 100644 --- a/scalars.Rmd +++ b/scalars.Rmd @@ -105,7 +105,7 @@ $$ ### Tangent {-} $$ -\dot{c} = \frac{\dot{a}}{b} - \frac{a \cdot \dot{b}}{b^2} +\dot{c} = \frac{\dot{a}}{b} - \frac{\dot{b} \cdot a}{b^2} $$ ### Adjoints {-} @@ -140,6 +140,31 @@ $$ \overline{a} \ {+=} \ \overline{c} \cdot \exp(a) $$ +## Exponential (base 2) + +$$ +c = 2^a +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \log(a) \cdot 2^a +$$ + +### Tangent {-} + +$$ +\dot{c} = \dot{a} \cdot \log(a) \cdot 2^a +$$ + +### Adjoints {-} + +$$ +\overline{a} \ {+=} \ \overline{c} \cdot \log(a) \cdot 2^a +$$ + + ## Logarithm (base e) $$ @@ -164,6 +189,54 @@ $$ \overline{a} \ {+=} \ \frac{\overline{c}}{a} $$ +## Logarithm (base 2) + +$$ +c = \log_2(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \frac{1}{a \cdot \log(2)} +$$ + +### Tangent {-} + +$$ +\dot{c} = \frac{\dot{a}}{a \cdot \log(2)} +$$ + +### Adjoints {-} + +$$ +\overline{a} \ {+=} \ \frac{\overline{c}}{a \cdot \log(2)} +$$ + +## Logarithm (base 10) + +$$ +c = \log_{10}(a) +$$ + +### Derivatives {-} + +$$ +\frac{\partial}{\partial a} c = \frac{1}{a \cdot \log(10)} +$$ + +### Tangent {-} + +$$ +\dot{c} = \frac{\dot{a}}{a \cdot \log(10)} +$$ + +### Adjoints {-} + +$$ +\overline{a} \ {+=} \ \frac{\overline{c}}{a \cdot \log(10)} +$$ + ## Power $$ @@ -181,7 +254,7 @@ $$ ### Tangent {-} $$ -\dot{c} = \dot{a} \cdot b \cdot a^{b-1} + \dot{b} \log(a) \cdot a^b = \left( \dot{a} \frac{b}{a} + \dot{b} \log(a) \right) \cdot a^b +\dot{c} = \dot{a} \cdot b \cdot a^{b-1} + \dot{b} \cdot \log(a) \cdot a^b = \left( \dot{a} \cdot \frac{b}{a} + \dot{b} \cdot \log(a) \right) \cdot a^b $$ ### Adjoints {-} @@ -216,52 +289,53 @@ $$ \overline{a} \ {+=} \ \overline{c} \cdot 2a $$ -## Inverse +## Square root $$ -c = \frac{1}{a} +c = \sqrt{a} $$ ### Derivatives {-} $$ -\frac{\partial}{\partial a} c = - \frac{1}{a^2} +\frac{\partial}{\partial a} c = -\frac{1}{2 \sqrt{a}} $$ ### Tangent {-} $$ -\dot{c} = - \frac{\dot{a}}{a^2} +\dot{c} = -\frac{\dot{a}}{2 \sqrt{a}} $$ ### Adjoints {-} $$ - \overline{a} \ {+=} \ - \frac{\overline{c}}{a^2} + \overline{a} \ {+=} \ -\frac{\overline{c}}{2 \sqrt{a}} $$ -## Square root + +## Inverse $$ -c = \sqrt{a} +c = \frac{1}{a} $$ ### Derivatives {-} $$ -\frac{\partial}{\partial a} c = -\frac{1}{2 \sqrt{a}} +\frac{\partial}{\partial a} c = - \frac{1}{a^2} $$ ### Tangent {-} $$ -\dot{c} = -\frac{\dot{a}}{2 \sqrt{a}} +\dot{c} = - \frac{\dot{a}}{a^2} $$ ### Adjoints {-} $$ - \overline{a} \ {+=} \ -\frac{\overline{c}}{2 \sqrt{a}} + \overline{a} \ {+=} \ - \frac{\overline{c}}{a^2} $$