source: trunk/omh/theory/asin_reverse.omh @ 3675

Last change on this file since 3675 was 3675, checked in by bradbell, 5 years ago

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: d54457d7204aae2cedec24a81bc6a97b1ec67d89
end hash code: bf9459823c22b7b496d632ebde31ca166a1cc81b

commit bf9459823c22b7b496d632ebde31ca166a1cc81b
Author: Brad Bell <bradbell@…>
Date: Tue May 5 06:53:28 2015 -0700

New doxygen requires GENERATE_HTML (default has changed from YES to NO).


doxyfile.sh: set GENERATE_HTML to YES.
cskip_op.hpp: fix error in doxygen command, remove trailing white space.

commit 158a03f245d13ec00b5474a428645f6712c9ea9f
Author: Brad Bell <bradbell@…>
Date: Tue May 5 06:09:24 2015 -0700

Remove trailing white space.

commit d501584454b6d99e639fafcaeead55f0158965f6
Author: Brad Bell <bradbell@…>
Date: Tue May 5 06:04:14 2015 -0700

  1. Add the inverse hyperbolic sine function asinh.
  2. Change the asin test name from Asin to asin.


base_require.hpp: remove spelling commands that are no longer used.
remove include: remove include commands that are no longer needed.
asin.cpp: use machine epsilon to gauge accuracy of this test result.

  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1$Id: asin_reverse.omh 3675 2015-05-05 14:26:18Z bradbell $
2// BEGIN SHORT COPYRIGHT
3/* --------------------------------------------------------------------------
4CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
5
6CppAD is distributed under multiple licenses. This distribution is under
7the terms of the
8                    Eclipse Public License Version 1.0.
9
10A copy of this license is included in the COPYING file of this distribution.
11Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
12-------------------------------------------------------------------------- */
13// END SHORT COPYRIGHT
14
15$begin asin_reverse$$
16$spell
17        asin
18        Taylor
19        Arcsine
20$$
21
22$index asin, reverse theory$$
23$index theory, asin reverse$$
24$index reverse, asin theory$$
25
26$section Arc Sine and Hyperbolic Sine Reverse Mode Theory$$
27
28
29We use the reverse theory
30$xref%
31        ReverseTheory%
32        Standard Math Functions%
33        standard math function
34%$$
35definition for the functions $latex H$$ and $latex G$$.
36In addition, we use the forward mode notation in
37$cref asin_forward$$ for
38$latex \[
39\begin{array}{rcl}
40        Q(t) & = & 1 \mp X(t) * X(t) \\
41        B(t) & = & \sqrt{ Q(t) }
42\end{array}
43\] $$
44We use $latex q$$ and $latex b$$
45for the $th p$$ order Taylor coefficient
46row vectors corresponding to these functions
47and replace $latex z^{(j)}$$ by
48$latex \[
49        ( z^{(j)} , b^{(j)} )
50\] $$
51in the definition for $latex G$$ and $latex H$$.
52The zero order forward mode formulas for the
53$cref/asin/asin_forward/$$
54function are
55$latex \[
56\begin{array}{rcl}
57        q^{(0)}  & = & 1 \mp x^{(0)} x^{(0)} \\
58        b^{(0)}  & = & \sqrt{ q^{(0)} }    \\
59        z^{(0)}  & = & F( x^{(0)} )
60\end{array}
61\] $$
62where $latex F(x) = \R{arcsin} (x)$$ for $latex -$$
63and $latex F(x) = \R{arcsinh} (x) $$ for $latex +$$.
64For the orders $latex j$$ greater than zero we have
65$latex \[
66\begin{array}{rcl}
67q^{(j)} & = &
68        \mp \sum_{k=0}^j x^{(k)} x^{(j-k)}
69\\
70b^{(j)} & = &
71        \frac{1}{j} \frac{1}{ b^{(0)} }
72        \left(
73                \frac{j}{2} q^{(j)}
74                - \sum_{k=1}^{j-1} k b^{(k)} b^{(j-k)}
75        \right)
76\\
77z^{(j)} & = & \frac{1}{j} \frac{1}{ b^{(0)} }
78\left(
79        j x^{(j)}
80        - \sum_{k=1}^{j-1} k z^{(k)}  b^{(j-k)}
81\right)
82\end{array}
83\] $$
84
85If $latex j = 0$$, we have the relation
86
87$latex \[
88\begin{array}{rcl}
89\D{H}{ x^{(j)} } & = &
90\D{G}{ x^{(0)} }
91+ \D{G}{ z^{(j)} } \D{ z^{(j)} }{ x^{(0)} }
92+ \D{G}{ b^{(j)} } \D{ b^{(j)} }{ q^{(0)} } \D{ q^{(0)} }{ x^{(0)} }
93\\
94& = &
95\D{G}{ x^{(j)} }
96+ \D{G}{ z^{(j)} } \frac{1}{ b^{(0)} }
97\mp \D{G}{ b^{(j)} } \frac{ x^{(0)} }{ b^{(0)} }
98\end{array}
99\] $$
100
101If $latex j > 0$$, then for $latex k = 1, \ldots , j-1$$
102
103$latex \[
104\begin{array}{rcl}
105\D{H}{ b^{(0)} } & = &
106\D{G}{ b^{(0)} }
107+ \D{G}{ z^{(j)} } \D{ z^{(j)} }{ b^{(0)} }
108+ \D{G}{ b^{(j)} } \D{ b^{(j)} }{ b^{(0)} }
109\\
110& = &
111\D{G}{ b^{(0)} }
112- \D{G}{ z^{(j)} } \frac{ z^{(j)} }{ b^{(0)} }
113- \D{G}{ b^{(j)} } \frac{ b^{(j)} }{ b^{(0)} }
114\\
115\D{H}{ x^{(0)} } & = &
116\D{G}{ x^{(0)} }
117+
118\D{G}{ b^{(j)} } \D{ b^{(j)} }{ q^{(j)} } \D{ q^{(j)} }{ x^{(0)} }
119\\
120& = &
121\D{G}{ x^{(0)} }
122\mp \D{G}{ b^{(j)} } \frac{ x^{(j)} }{ b^{(0)} }
123\\
124\D{H}{ x^{(j)} } & = &
125\D{G}{ x^{(j)} }
126+ \D{G}{ z^{(j)} } \D{ z^{(j)} }{ x^{(j)} }
127+ \D{G}{ b^{(j)} } \D{ b^{(j)} }{ q^{(j)} } \D{ q^{(j)} }{ x^{(j)} }
128\\
129& = &
130\D{G}{ x^{(j)} }
131+ \D{G}{ z^{(j)} } \frac{1}{ b^{(0)} }
132\mp \D{G}{ b^{(j)} } \frac{ x^{(0)} }{ b^{(0)} }
133\\
134\D{H}{ b^{(j - k)} } & = &
135\D{G}{ b^{(j - k)} }
136+ \D{G}{ z^{(j)} } \D{ z^{(j)} }{ b^{(j - k)} }
137+ \D{G}{ b^{(j)} } \D{ b^{(j)} }{ b^{(j - k)} }
138\\
139& = &
140\D{G}{ b^{(j - k)} }
141- \D{G}{ z^{(j)} } \frac{k z^{(k)} }{j b^{(0)} }
142- \D{G}{ b^{(j)} } \frac{ b^{(k)} }{ b^{(0)} }
143\\
144\D{H}{ x^{(k)} } & = &
145\D{G}{ x^{(k)} }
146+ \D{G}{ z^{(j)} } \D{ z^{(j)} }{ x^{(k)} }
147+ \D{G}{ b^{(j)} } \D{ b^{(j)} }{ q^{(j)} } \D{ q^{(j)} }{ x^{(k)} }
148\\
149& = &
150\D{G}{ x^{(k)} }
151\mp \D{G}{ b^{(j)} } \frac{ x^{(j-k)} }{ b^{(0)} }
152\\
153\D{H}{ z^{(k)} } & = &
154\D{G}{ z^{(k)} }
155+ \D{G}{ z^{(j)} } \D{ z^{(j)} }{ z^{(k)} }
156+ \D{G}{ b^{(j)} } \D{ b^{(j)} }{ z^{(k)} }
157\\
158& = &
159\D{G}{ z^{(k)} }
160- \D{G}{ z^{(j)} } \frac{k b^{(j-k)} }{ j b^{(0)} }
161\end{array}
162\] $$
163
164$end
Note: See TracBrowser for help on using the repository browser.