Prev Next Index-> contents reference index search external Up-> CppAD Appendix Theory ForwardTheory exp_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 exp_forward Headings-> Derivatives Taylor Coefficients Recursion

$\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}} }$
Exponential Function Forward Mode Theory

Derivatives
If $F(x)$ is $\R{exp} (x)$ or $\R{expm1} (x)$ the corresponding derivative satisfies the equation $$1 * F^{(1)} (x) - 1 * F (x) = d^{(0)} = \left\{ \begin{array}{ll} 0 & \R{if} \; F(x) = \R{exp}(x) \\ 1 & \R{if} \; F(x) = \R{expm1}(x) \end{array} \right.$$ where the equation above defines $d^{(0)}$. In the standard math function differential equation , $A(x) = 1$, $B(x) = 1$, and $D(x) = d^{(0)}$. We use $a$, $b$, $d$, and $z$ to denote the Taylor coefficients for $A [ X (t) ]$, $B [ X (t) ]$, $D [ X (t) ]$, and $F [ X(t) ]$ respectively.

Taylor Coefficients Recursion
For orders $j = 0 , 1, \ldots$, $$\begin{array}{rcl} z^{(0)} & = & F ( x^{(0)} ) \\ e^{(0)} & = & d^{(0)} + z^{(0)} \\ e^{(j+1)} & = & d^{(j+1)} + \sum_{k=0}^{j+1} a^{(j+1-k)} * z^{(k)} \\ & = & z^{(j+1)} \\ z^{(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 z^{(k)} b^{(j+1-k)} \right) \\ & = & x^{(j+1)} d^{(0)} + \frac{1}{j+1} \sum_{k=1}^{j+1} k x^{(k)} z^{(j+1-k)} \end{array}$$
Input File: omh/appendix/theory/exp_forward.omh