Skip to content

Commit

Permalink
master: correct Syntax in forward_two.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradbell committed Jan 7, 2024
1 parent 7700f7f commit 2ce5186
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions appendix/whats_new/24.xrst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ new_24s and Additions to CppAD During 2024
mm-dd
*****

01-07
=====
The forward_two :ref:`forward_two@Syntax` was corrected.
To be specific,
``Forward`` (1, *x2* ) was changed to ``Forward`` (2, *x2* ) .
In addition, some other minor improvements were made to the
forward_two documentation page.

01-03
=====

Expand Down
8 changes: 4 additions & 4 deletions include/cppad/core/forward/forward_two.xrst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Second Order Forward Mode: Derivative Values

Syntax
******
*y2* = *f* . ``Forward`` (1, *x2* )
*y2* = *f* . ``Forward`` (2, *x2* )

Purpose
*******
Expand All @@ -18,9 +18,8 @@ We use :math:`F : \B{R}^n \rightarrow \B{R}^m` to denote the
The result of the syntax above is that for
*i* = 0 , ... , *m* ``-1`` ,

``y2`` [ ``i`` ]

:math:`= F_i^{(1)} (x0) * x2 + \frac{1}{2} x1^T * F_i^{(2)} (x0) * x1`
y2 [i] =
:math:`F_i^{(1)} (x0) * x2 + \frac{1}{2} x1^T * F_i^{(2)} (x0) * x1`

where
:math:`F^{(1)} (x0)` is the Jacobian of :math:`F`, and
Expand Down Expand Up @@ -117,6 +116,7 @@ and :math:`o( t^q ) * t^{-q} \rightarrow 0` as :math:`t \rightarrow 0`.
For this special case, :math:`q = 2`,
:math:`x^{(0)}` = *x0* ,
:math:`x^{(1)}` = *x1* ,
:math:`x^{(2)}` = *x2* ,
:math:`X(t) = x^{(0)} + x^{(1)} t + x^{(2)} t^2`, and

.. math::
Expand Down

0 comments on commit 2ce5186

Please sign in to comment.