midterm: small correction

This commit is contained in:
Claudio Maggioni 2021-05-14 15:33:26 +02:00
parent 3a8c08701e
commit abb4acaa1c
2 changed files with 13 additions and 3 deletions

View file

@ -366,11 +366,21 @@ respectively in the files `trust_region.m`, `dogleg.m`, and `cauchy.m`.
### Taylor expansion ### Taylor expansion
We first compute the gradient and the hessian of the energy function:
$$\nabla f\left(\begin{bmatrix}x_1\\x_2\end{bmatrix}\right) = \begin{bmatrix}
\frac{d f(x)}{d x_1} \\ \frac{d f(x)}{d x_2} \end{bmatrix} =
\begin{bmatrix}48x_1^3 - 16x_1x_2 + 2x_1 - 2\\2x_2 - 8x_1^2\end{bmatrix}$$
$$ \nabla^2 f\left(\begin{bmatrix}x_1\\x_2\end{bmatrix}\right) = \begin{bmatrix}
\frac{d^2 f(x)}{d x_1^2} & \frac{d^2 f(x)}{dx_2 x_1} \\ \frac{d^2 f(x)}{dx_1
x_2} & \frac{d^2 f(x)}{d x_2^2}\end{bmatrix} = \begin{bmatrix}144x_1^2 -16x_2 +
2 - 16 & -16 \\ -16 & 2 \end{bmatrix}$$
The Taylor expansion up the second order of the function is the following: The Taylor expansion up the second order of the function is the following:
$$f(x_0, w) = f(x_0) + \langle\begin{bmatrix}48x^3 - 16xy + 2x - 2\\2y - 8x^2 $$f(x_0, w) = f(x_0) + \langle \nabla f(x_0), w\rangle + \frac12 \langle
\end{bmatrix}, w\rangle + \frac12 \langle\begin{bmatrix}144x^2 -16y + 2 - 16 & \nabla^2 f(x_0) w, w\rangle$$
-16 \\ -16 & 2 \end{bmatrix}w, w\rangle$$
### Minimization ### Minimization