Skip to content

Commit

Permalink
DOC: Optimize: Fix for side bar rendering on top of Hessian (#18189)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshvardhan2707 committed Mar 24, 2023
1 parent 83dbd97 commit d799631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/source/tutorial/optimize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ For example, the Hessian when :math:`N=5` is

.. math::
\mathbf{H}=\begin{bmatrix} 1200x_{0}^{2}-400x_{1}+2 & -400x_{0} & 0 & 0 & 0\\ -400x_{0} & 202+1200x_{1}^{2}-400x_{2} & -400x_{1} & 0 & 0\\ 0 & -400x_{1} & 202+1200x_{2}^{2}-400x_{3} & -400x_{2} & 0\\ 0 & & -400x_{2} & 202+1200x_{3}^{2}-400x_{4} & -400x_{3}\\ 0 & 0 & 0 & -400x_{3} & 200\end{bmatrix}.
\mathbf{H}=\begin{bmatrix} 1200x_{0}^{2}+2\mkern-2em\\&1200x_{1}^{2}+202\mkern-2em\\&&1200x_{1}^{2}+202\mkern-2em\\&&&1200x_{3}^{2}+202\mkern-1em\\&&&&200\end{bmatrix}-400\begin{bmatrix} x_1 & x_0 \\ x_0 & x_2 & x_1 \\ & x_1 & x_3 & x_2\\ & & x_2 & x_4 & x_3 \\ & & & x_3 & 0\end{bmatrix}.
The code which computes this Hessian along with the code to minimize
the function using Newton-CG method is shown in the following example:
Expand Down

0 comments on commit d799631

Please sign in to comment.