Skip to content

Commit

Permalink
fix: Improve formula presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
junyixu authored Mar 25, 2024
1 parent 42b1554 commit 4caae57
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions docs/src/dev/how_it_works.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,28 @@ two calls to ``f`` to evaluate the gradient:
x_3 \\
x_4
\end{bmatrix}
\vec{x}_{\epsilon} = \begin{bmatrix}
```
1st call:
```math
\to \vec{x}_{\epsilon} = \begin{bmatrix}
x_1 + \epsilon_1 \\
x_2 + \epsilon_2 \\
x_3 \\
x_4
\end{bmatrix}
\to
f(\vec{x}_{\epsilon}) = f(\vec{x}) + \frac{\delta f(\vec{x})}{\delta x_1} \epsilon_1 + \frac{\delta f(\vec{x})}{\delta x_2} \epsilon_2
\vec{x}_{\epsilon} = \begin{bmatrix}
f(\vec{x}_{\epsilon}) = f(\vec{x}) + \frac{\delta f(\vec{x})}{\delta x_1} \epsilon_1 + \frac{\delta f(\vec{x})}{\delta x_2} \epsilon_2,
```
2nd call:
```math
\to \vec{x}_{\epsilon} = \begin{bmatrix}
x_1 \\
x_2 \\
x_3 + \epsilon_1 \\
x_4 + \epsilon_2
\end{bmatrix}
\to
f(\vec{x}_{\epsilon}) = f(\vec{x}) + \frac{\delta f(\vec{x})}{\delta x_3} \epsilon_1 + \frac{\delta f(\vec{x})}{\delta x_4} \epsilon_2
f(\vec{x}_{\epsilon}) = f(\vec{x}) + \frac{\delta f(\vec{x})}{\delta x_3} \epsilon_1 + \frac{\delta f(\vec{x})}{\delta x_4} \epsilon_2.
```

This seeding process is similar for Jacobians, so we won't rehash it here.

0 comments on commit 4caae57

Please sign in to comment.