source: trunk/omh/theory/asin_forward.omh @ 3680

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

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: 071875a4beba3363e5fa9752426aec4762cd1caa
end hash code: 0bef506513a519e1073c6279d5c4cba9e5c3b180

commit 0bef506513a519e1073c6279d5c4cba9e5c3b180
Author: Brad Bell <bradbell@…>
Date: Thu May 7 12:14:32 2015 -0700

Add the acosh function (as an atomic operation when defined by compiler).

commit b3264fa17b2f65b65800423a0e243c9c3ccfe06a
Author: Brad Bell <bradbell@…>
Date: Wed May 6 20:25:38 2015 -0700

CMakeLists.txt: Change so test only check for compliation.

commit dcbac4d4f20cc383f2bd9edb02036659df40b791
Author: Brad Bell <bradbell@…>
Date: Wed May 6 15:06:28 2015 -0700

asinh.cpp: check higher orders, relax accuracy on test.

commit 5f8881993fedd18cccc3c74831133a8f8a9d17b0
Author: Brad Bell <bradbell@…>
Date: Wed May 6 14:36:18 2015 -0700

Change Acos to acos.
acos.cpp: remove trailing white space.

commit e828fa1f7c4c3848c727f14b1b7a8030071ee705
Author: Brad Bell <bradbell@…>
Date: Wed May 6 12:07:35 2015 -0700

Change Acos to acos.
acos.cpp: remove redundant index commands, remove trailing with space.

commit 3d16e5b9fe1bdafa4ad01d1d466bb72b792650fa
Author: Brad Bell <bradbell@…>
Date: Wed May 6 11:30:49 2015 -0700

op_code.hpp: Minor edits to AcosOp? commnets.

commit 58beaaad149b4ac29fae44589d7f8900bf8f4c40
Author: Brad Bell <bradbell@…>
Date: Wed May 6 10:51:43 2015 -0700

for_jac_sweep.hpp: Add missing AsinhOp? case.

commit 623c134870c522ae5e80bcf0f89d230902594c80
Author: Brad Bell <bradbell@…>
Date: Wed May 6 10:27:39 2015 -0700

Fix comment about AsinhOp? operator.

commit 226b14f6f4810f5abf1ca247aae541963efaf4d6
Author: Brad Bell <bradbell@…>
Date: Wed May 6 10:14:08 2015 -0700

Add derivative of F to make order zero case clearer.
acos_reverse.omh: Fix some sign errors.
asin_reverse.omh: Fix typo.
acos_forward.omh: Simplify by distributing minus sign.

commit 4682f4ee73e33b600b180086576e986f636a24dc
Author: Brad Bell <bradbell@…>
Date: Wed May 6 08:15:50 2015 -0700

acos_forward.omh: fix sign that depends on acos versus acosh.

commit 906ae10adf019ddda7f57dd165aab08fc55289c4
Author: Brad Bell <bradbell@…>
Date: Wed May 6 07:09:47 2015 -0700

  1. Fix inclusion of some temporary files in package (e.g., git_commit.sh).
  2. Simplify and improve using git ls-files and ls bin/check_*.
  3. Remove trailing white space.

commit 5096f4706a547bd76caa3766aa2c62802ef7f0bf
Author: Brad Bell <bradbell@…>
Date: Wed May 6 06:41:20 2015 -0700

Combine base type documentation for erf, asinh
(will add more functions to this list list).

commit b3535db5ad95bee90672abcaa686032d23bce2fc
Author: Brad Bell <bradbell@…>
Date: Tue May 5 18:01:11 2015 -0700

  1. Change Arc Cosine/Sine? to Inverse Cosine/Sine?.
  2. Change arcsin-> asin and arccos->acos.
  3. Remove index commands that are duplicates of words in titles.


acos_reverse.omh: Add acosh case to this page.

  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1$Id: asin_forward.omh 3680 2015-05-07 19:17:37Z 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_forward$$
16$spell
17        asinh
18        asin
19        Taylor
20$$
21
22$section Inverse Sine and Hyperbolic Sine Forward Mode Theory$$
23$mindex asin, asinh$$
24
25$head Derivatives$$
26$latex \[
27\begin{array}{rcl}
28\R{asin}^{(1)} (x)  & = & 1 / \sqrt{ 1 - x * x }
29\\
30\R{asinh}^{(1)} (x) & = & 1 / \sqrt{ 1 + x * x }
31\end{array}
32\] $$
33If $latex F(x)$$ is $latex \R{asin} (x) $$ or $latex \R{asinh} (x)$$
34the corresponding derivative satisfies the equation
35$latex \[
36        \sqrt{ 1 \mp x * x } * F^{(1)} (x) - 0 * F (u)  = 1
37\] $$
38and in the
39$cref/standard math function differential equation
40        /ForwardTheory
41        /Standard Math Functions
42        /Differential Equation
43/$$,
44$latex A(x) = 0$$,
45$latex B(x) = \sqrt{1 \mp x * x }$$,
46and $latex D(x) = 1$$.
47We use $latex a$$, $latex b$$, $latex d$$ and $latex z$$ to denote the
48Taylor coefficients for
49$latex A [ X (t) ] $$,
50$latex B [ X (t) ]$$,
51$latex D [ X (t) ] $$,
52and $latex F [ X(t) ] $$ respectively.
53$pre
54
55$$
56We define $latex Q(x) = 1 \mp x * x$$
57and let $latex q$$ be the corresponding Taylor coefficients for
58$latex Q[ X(t) ]$$.
59It follows that
60$latex \[
61q^{(j)} = \left\{ \begin{array}{ll}
62        1 \mp x^{(0)} * x^{(0)}            & {\rm if} \; j = 0 \\
63        \mp \sum_{k=0}^j x^{(k)} x^{(j-k)} & {\rm otherwise}
64\end{array} \right.
65\] $$
66It follows that
67$latex B[ X(t) ] = \sqrt{ Q[ X(t) ] }$$ and
68from the equations for the
69$cref/square root/SqrtForward/$$
70that for $latex j = 0 , 1, \ldots$$,
71$latex \[
72\begin{array}{rcl}
73b^{(0)}   & = & \sqrt{ q^{(0)} }
74\\
75b^{(j+1)} & = &
76        \frac{1}{j+1} \frac{1}{ b^{(0)} }
77        \left(
78                \frac{j+1}{2} q^{(j+1) }
79                - \sum_{k=1}^j k b^{(k)} b^{(j+1-k)}
80        \right)
81\end{array}
82\] $$
83It now follows from the general
84$xref/
85        ForwardTheory/
86        Standard Math Functions/
87        Taylor Coefficients Recursion Formula/
88        Taylor coefficients recursion formula/
89        1
90/$$
91that for $latex j = 0 , 1, \ldots$$,
92$latex \[
93\begin{array}{rcl}
94z^{(0)} & = & F ( x^{(0)} )
95\\
96e^{(j)}
97& = & d^{(j)} + \sum_{k=0}^{j} a^{(j-k)} * z^{(k)}
98\\
99& = & \left\{ \begin{array}{ll}
100        1 & {\rm if} \; j = 0 \\
101        0 & {\rm otherwise}
102\end{array} \right.
103\\
104z^{(j+1)} & = & \frac{1}{j+1} \frac{1}{ b^{(0)} }
105\left(
106        \sum_{k=0}^j e^{(k)} (j+1-k) x^{(j+1-k)}
107        - \sum_{k=1}^j b^{(k)} (j+1-k) z^{(j+1-k)}
108\right)
109\\
110z^{(j+1)} & = & \frac{1}{j+1} \frac{1}{ b^{(0)} }
111\left(
112        (j+1) x^{(j+1)}
113        - \sum_{k=1}^j k z^{(k)}  b^{(j+1-k)}
114\right)
115\end{array}
116\] $$
117
118
119$end
Note: See TracBrowser for help on using the repository browser.