Skip to content

Commit d333862

Browse files
committed
Update example
1 parent 7e6eba9 commit d333862

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/src/examples/halley.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ Say we have a system of $n$ equations with $n$ unknowns $f(x)=0$, and $f\in \mat
66

77
Given a initial guess $x_0$, Newton's method finds a solution by iterating like
88

9-
$$x_{i+1}=x_i-J(x_i)^{-1}f(x_i)$$
9+
```math
10+
x_{i+1}=x_i-J(x_i)^{-1}f(x_i)
11+
```
1012

1113
and this method converges quadratically.
1214

1315
We can make it converge faster using higher-order derivative information. For example, Halley's method iterates like
1416

15-
$$x_{i+1}=x_i-(a_i\odot a_i)\oslash(a_i-b_i/2)$$
17+
```math
18+
x_{i+1}=x_i-(a_i\odot a_i)\oslash(a_i-b_i/2)
19+
```
1620

1721
where the vector multiplication and division $\odot,\oslash$ are defined element-wise, and term $a_i$ and $b_i$ are defined by $J(x_i)a_i = f(x_i)$ and $J(x_i)b_i = H(x_i)a_ia_i$.
1822

0 commit comments

Comments
 (0)