exp_forward

View page source

Exponential Function Forward Mode Theory

Derivatives

If \(F(x)\) is \(\R{exp} (x)\) or \(\R{expm1} (x)\) the corresponding derivative satisfies the equation

\[\begin{split}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.\end{split}\]

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{eqnarray} 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{eqnarray}