Prev Next Index-> contents reference index search external Up-> CppAD Appendix Theory ForwardTheory sin_cos_forward Appendix-> Faq directory Theory glossary Bib wish_list whats_new deprecated compare_c numeric_ad addon License Theory-> ForwardTheory ReverseTheory reverse_identity ForwardTheory-> exp_forward log_forward sqrt_forward sin_cos_forward atan_forward asin_forward acos_forward tan_forward erf_forward sin_cos_forward Headings-> Differential Equation

$\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 Forward Theory

Differential Equation
The standard math function differential equation is $$B(u) * F^{(1)} (u) - A(u) * F (u) = D(u)$$ In this sections we consider forward mode for the following choices:
   $F(u)$ $\sin(u)$ $\cos(u)$ $\sinh(u)$ $\cosh(u)$ $A(u)$ $0$ $0$ $0$ $0$ $B(u)$ $1$ $1$ $1$ $1$ $D(u)$ $\cos(u)$ $- \sin(u)$ $\cosh(u)$ $\sinh(u)$
We use $a$, $b$, $d$ and $f$ for the Taylor coefficients of $A [ X (t) ]$, $B [ X (t) ]$, $D [ X (t) ]$, and $F [ X(t) ]$ respectively. It now follows from the general Taylor coefficients recursion formula that for $j = 0 , 1, \ldots$, $$\begin{array}{rcl} f^{(0)} & = & D ( x^{(0)} ) \\ e^{(j)} & = & d^{(j)} + \sum_{k=0}^{j} a^{(j-k)} * f^{(k)} \\ & = & d^{(j)} \\ f^{(j+1)} & = & \frac{1}{j+1} \frac{1}{ b^{(0)} } \left( \sum_{k=1}^{j+1} k x^{(k)} e^{(j+1-k)} - \sum_{k=1}^j k f^{(k)} b^{(j+1-k)} \right) \\ & = & \frac{1}{j+1} \sum_{k=1}^{j+1} k x^{(k)} d^{(j+1-k)} \end{array}$$ The formula above generates the order $j+1$ coefficient of $F[ X(t) ]$ from the lower order coefficients for $X(t)$ and $D[ X(t) ]$.
Input File: omh/appendix/theory/sin_cos_forward.omh