From 5a2dbc0c1a3dacee4ff767d707331acb97a0c88d Mon Sep 17 00:00:00 2001 From: Fabian Gittins Date: Sun, 6 Apr 2025 18:59:54 +0200 Subject: [PATCH] Add documentation for Muller's method --- docs/src/native/bracketingnonlinearsolve.md | 1 + docs/src/solvers/bracketing_solvers.md | 5 +++-- lib/BracketingNonlinearSolve/src/muller.jl | 18 ++++++++++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/docs/src/native/bracketingnonlinearsolve.md b/docs/src/native/bracketingnonlinearsolve.md index 2201378e1..2221bb9a7 100644 --- a/docs/src/native/bracketingnonlinearsolve.md +++ b/docs/src/native/bracketingnonlinearsolve.md @@ -18,4 +18,5 @@ Bisection Falsi Ridder Brent +Muller ``` diff --git a/docs/src/solvers/bracketing_solvers.md b/docs/src/solvers/bracketing_solvers.md index e51f7805a..a84a48b66 100644 --- a/docs/src/solvers/bracketing_solvers.md +++ b/docs/src/solvers/bracketing_solvers.md @@ -26,13 +26,14 @@ This gives a robust and fast method, which therefore enjoys considerable popular ## Full List of Methods -### SimpleNonlinearSolve.jl +### BracketingNonlinearSolve.jl These methods are automatically included as part of NonlinearSolve.jl. Though, one can use -SimpleNonlinearSolve.jl directly to decrease the dependencies and improve load time. +BracketingNonlinearSolve.jl directly to decrease the dependencies and improve load time. - [`ITP`](@ref): A non-allocating ITP (Interpolate, Truncate & Project) method - [`Falsi`](@ref): A non-allocating regula falsi method - [`Bisection`](@ref): A common bisection method - [`Ridder`](@ref): A non-allocating Ridder method - [`Brent`](@ref): A non-allocating Brent method + - [`Muller`](@ref): A non-allocating Muller's method diff --git a/lib/BracketingNonlinearSolve/src/muller.jl b/lib/BracketingNonlinearSolve/src/muller.jl index fbd87c34d..7b89236a0 100644 --- a/lib/BracketingNonlinearSolve/src/muller.jl +++ b/lib/BracketingNonlinearSolve/src/muller.jl @@ -1,10 +1,20 @@ """ Muller(; middle = nothing) -Muller's method for determining a root of a univariate, scalar function. The -algorithm, described in Sec. 9.5.2 of -[Press et al. (2007)](https://numerical.recipes/book.html), requires three -initial guesses `(left, middle, right)` for the root. +Muller's method for determining a root of a univariate, scalar function. + +The algorithm, described in Sec. 9.5.2 of +[Press et al. (2007)](https://numerical.recipes/book.html), is a generalization +of the secant method, using quadratic interpolation of three points to find the +next estimate for the root. Due to the quadratic interpolation, the method is +well suited for obtaining complex roots. + +This method requires three initial guesses `(left, middle, right)` for the +solution. The guesses `(left, right) = tspan` are provided by the +`IntervalNonlinearProblem`, while the `middle` guess may be specified as an +optional keyword argument. In notable contrast to the other +`BracketingNonlinearSolve.jl` solvers, the `Muller` algorithm does not need +`(left, right)` to bracket the root. ### Keyword Arguments