![]() |
Prev | Next |
x(t)
near
t = 0
by the first order expansion
\[
x(t) = x^{(0)} + x^{(1)} * t
\]
it follows that
x^{(0)}
is the zero,
and
x^{(1)}
the first,
order derivative of
x(t)
at
t = 0
.
\[
f(x) = 1 + x + x^2 / 2
\]
The corresponding derivative function is
\[
\partial_x f (x) = 1 + x
\]
An algorithmic differentiation package
does not operate on the mathematical form of the function,
or its derivative,
but rather on the
operation sequence
for the for the algorithm that is used to evaluate the function.
x = .5
.
The corresponding operation sequence and
zero order forward mode values
(see zero order sweep
)
are inputs and are used by a first order forward sweep.
t
,
at
t = 0
, for each variable in the sequence.
\[
v_j (t) = v_j^{(0)} + v_j^{(1)} t
\]
We use
x^{(0)} = 1
so that differentiation
with respect to
t
,
at
t = 0
, is the same partial differentiation
with respect to
x
at
x = x^{(0)}
.
Index |
| Operation |
| Zero Order |
| Derivative |
| First Order |
1 |
|
v_1 = x
| 0.5 |
v_1^{(1)} = x^{(1)}
|
v_1^{(1)} = 1
| |||
2 |
|
v_2 = 1 + v_1
| 1.5 |
v_2^{(1)} = v_1^{(1)}
|
v_2^{(1)} = 1
| |||
3 |
|
v_3 = v_1 * v_1
| 0.25 |
v_3^{(1)} = 2 * v_1^{(0)} * v_1^{(1)}
|
v_3^{(1)} = 1
| |||
4 |
|
v_4 = v_3 / 2
| 0.125 |
v_4^{(1)} = v_3^{(1)} / 2
|
v_4^{(1)} = 0.5
| |||
5 |
|
v_5 = v_2 + v_4
| 1.625 |
v_5^{(1)} = v_2^{(1)} + v_4^{(1)}
|
v_5^{(1)} = 1.5
|
\[
\begin{array}{rcl}
1.5
& = &
v_5^{(1)} =
\left[ \D{v_5}{t} \right]_{t=0} =
\left[ \D{}{t} f ( x^{(0)} + x^{(1)} t ) \right]_{t=0}
\\
& = &
f^{(1)} ( x^{(0)} ) * x^{(1)} =
f^{(1)} ( x^{(0)} )
\end{array}
\]
(We have used the fact that
x^{(1)} = 1
.)
x = .1
,
what are the results of a zero and first order forward sweep for
the operation sequence above;
i.e., what are the corresponding values for
v_1^{(0)}, v_2^{(0)}, \cdots , v_5^{(0)}
and
v_1^{(1)}, v_2^{(1)}, \cdots , v_5^{(1)}
?