Prev Next sin_cos_reverse Headings

@(@\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@
Trigonometric and Hyperbolic Sine and Cosine Reverse Theory
We use the reverse theory standard math function definition for the functions @(@ H @)@ and @(@ G @)@. In addition, we use the following definitions for @(@ s @)@ and @(@ c @)@ and the integer @(@ \ell @)@
Coefficients @(@ s @)@ @(@ c @)@ @(@ \ell @)@
Trigonometric Case @(@ \sin [ X(t) ] @)@ @(@ \cos [ X(t) ] @)@ 1
Hyperbolic Case @(@ \sinh [ X(t) ] @)@ @(@ \cosh [ X(t) ] @)@ -1
We use the value @[@ z^{(j)} = ( s^{(j)} , c^{(j)} ) @]@ in the definition for @(@ G @)@ and @(@ H @)@. The forward mode formulas for the sine and cosine functions are @[@ \begin{array}{rcl} s^{(j)} & = & \frac{1 + \ell}{2} \sin ( x^{(0)} ) + \frac{1 - \ell}{2} \sinh ( x^{(0)} ) \\ c^{(j)} & = & \frac{1 + \ell}{2} \cos ( x^{(0)} ) + \frac{1 - \ell}{2} \cosh ( x^{(0)} ) \end{array} @]@ for the case @(@ j = 0 @)@, and for @(@ j > 0 @)@, @[@ \begin{array}{rcl} s^{(j)} & = & \frac{1}{j} \sum_{k=1}^{j} k x^{(k)} c^{(j-k)} \\ c^{(j)} & = & \ell \frac{1}{j} \sum_{k=1}^{j} k x^{(k)} s^{(j-k)} \end{array} @]@ If @(@ j = 0 @)@, we have the relation @[@ \begin{array}{rcl} \D{H}{ x^{(j)} } & = & \D{G}{ x^{(j)} } + \D{G}{ s^{(j)} } c^{(0)} + \ell \D{G}{ c^{(j)} } s^{(0)} \end{array} @]@ If @(@ j > 0 @)@, then for @(@ k = 1, \ldots , j-1 @)@ @[@ \begin{array}{rcl} \D{H}{ x^{(k)} } & = & \D{G}{ x^{(k)} } + \D{G}{ s^{(j)} } \frac{1}{j} k c^{(j-k)} + \ell \D{G}{ c^{(j)} } \frac{1}{j} k s^{(j-k)} \\ \D{H}{ s^{(j-k)} } & = & \D{G}{ s^{(j-k)} } + \ell \D{G}{ c^{(j)} } k x^{(k)} \\ \D{H}{ c^{(j-k)} } & = & \D{G}{ c^{(j-k)} } + \D{G}{ s^{(j)} } k x^{(k)} \end{array} @]@
Input File: omh/appendix/theory/sin_cos_reverse.omh