minor corrections

This commit is contained in:
2023-12-27 16:57:19 +01:00
parent 40e27cf29b
commit 320c43e923
3 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -8,11 +8,12 @@ module EulerNewton
function en_step(H, x, t, step_size)
# Predictor step
vars = variables(H(t))
vars = variables(H(1))
# Jacobian of H evaluated at (x,t)
JH = [jh(vars=>x) for jh in differentiate(H(t), vars)]
# ∂H/∂t is the same as γG-F=H(1)-H(0) for our choice of homotopy
Δx = JH \ -[gg(vars=>x) for gg in H(1)-H(0)]
# ∂H/∂t = γG-F = H(1)-H(0) for our homotopy; it doesn't depend on t
δH_δt = [dh(vars=>x) for dh in H(1)-H(0)]
Δx = JH \ -δH_δt
xh = x + Δx * step_size
# Corrector step
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -66,7 +66,7 @@ end
# F = [x*y - 1, x^2 + y^2 - 4]
# T = [x*y - 1, x^2 + y^2 - 2]
R = random_system(5, 5)
R = random_system(3, 5)
println("System: ", R)
(G, roots)=start_system(R)
println("Number of roots: ", length(roots))