From b30a707c41cc55ace74e4662e50ca6d1c892dacd Mon Sep 17 00:00:00 2001
From: Olivier Cots <61-ocots@users.noreply.022e47118ec0>
Date: Wed, 20 Nov 2024 13:16:49 +0000
Subject: [PATCH] Update newton.jl

---
 src/newton.jl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/newton.jl b/src/newton.jl
index b111aa9..d96d91b 100644
--- a/src/newton.jl
+++ b/src/newton.jl
@@ -36,7 +36,7 @@ Approximation d'une solution du problème min f(x), x ∈ Rⁿ, en utilisant l'a
    gradf(x)=[-400*x[1]*(x[2]-x[1]^2)-2*(1-x[1]) ; 200*(x[2]-x[1]^2)]
    hessf(x)=[-400*(x[2]-3*x[1]^2)+2  -400*x[1];-400*x[1]  200]
    x0 = [1; 0]
-   x_sol, f_sol, flag, nb_iters, xs = newton(f, gradf, hessf, x0)
+   x_sol, f_sol, flag, nb_iters, xs = newton(f, gradf, hessf, x0, max_iter=10)
 
 """
 function newton(f::Function, gradf::Function, hessf::Function, x0::Union{Real,Vector{<:Real}}; 
-- 
GitLab