pow_reverse

View page source

Power Function Reverse Mode Theory

We use the reverse theory standard math function definition for the functions \(H\) and \(G\). The zero order forward mode formula for the power function is

\[z^{(0)} = F ( x^{(0)} )\]
\begin{eqnarray} \D{H}{ x^{(0)} } & = & \D{G}{ x^{(0)} } + \D{G}{ z^{(0)} } \D{ z^{(0)} }{ x^{(0)} } \\ \D{ z^{(0)} }{ x^{(0)} } & = & y [ x^{(0)} ]^{y - 1} = y z^{(0)} / x{(0)} \end{eqnarray}

All the equations below apply to the case where \(j > 0\). For this case, the equation for \(z^{(j)}\) is

\[z^{(j)} = \left. \left( y z^{(0)} x^{(j)} + \frac{1}{j} \sum_{k=1}^{j-1} k ( y x^{(k)} z^{(j-k)} - z^{(k)} x^{(j-k)} ) \right) \right/ x^{(0)}\]

x^j

\begin{eqnarray} \D{H}{ x^{(j)} } & = & \D{G}{ x^{(j)} } + \D{G}{ z^{(j)} } \D{ z^{(j)} }{ x^{(j)} } \\ \D{ z^{(j)} }{ x^{(j)} } & = & y z^{(0)} / x^{(0)} \end{eqnarray}

x^k

For \(k = 1 , \ldots , j-1\)

\begin{eqnarray} \D{H}{ x^{(k)} } & = & \D{G}{ x^{(k)} } + \D{G}{ z^{(j)} } \D{ z^{(j)} }{ x^{(k)} } \\ \D{ z^{(j)} }{ x^{(k)} } & = & \frac{1}{j} ( k y - (j-k) ) z^{(j-k)} / x^{(0)} \end{eqnarray}

z^k

For \(k = 1 , \ldots , j-1\)

\begin{eqnarray} \D{H}{ z^{(k)} } & = & \D{G}{ z^{(k)} } + \D{G}{ z^{(j)} } \D{ z^{(j)} }{ z^{(k)} } \\ \D{ z^{(j)} }{ z^{(k)} } & = & \frac{1}{j} ( (j-k) y - k ) x^{(j-k)} / x^{(0)} \end{eqnarray}

x^0

\begin{eqnarray} \D{H}{ x^{(0)} } & = & \D{G}{ x^{(0)} } + \D{G}{ z^{(j)} } \D{ z^{(j)} }{ x^{(0)} } \\ \D{ z^{(j)} }{ x^{(0)} } & = & - z^{(j)} / x^{(0)} \end{eqnarray}

z^0

\begin{eqnarray} \D{H}{ z^{(0)} } & = & \D{G}{ z^{(0)} } + \D{G}{ z^{(j)} } \D{ z^{(j)} }{ z^{(0)} } \\ \D{ z^{(j)} }{ z^{(0)} } & = & y x^{(j)} / x^{(0)} \end{eqnarray}