JuliaNLSolvers / NLsolve.jl

Julia solvers for systems of nonlinear equations and mixed complementarity problems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Finding all solutions

TorkelE opened this issue · comments

Is there a good way to find all solutions to a system.

E.g. this simple 1d case:

function ff!(F,x)
    F[1] = x[1]^2  - 9
end
@time nlsolve(ff!, [x0.])

has solutions x=3 and x=-3. If x0 is set to 1 the former is found, if x0=-1 the later is found. Is there some good way of finding both these solutions without simply trying several different initial conditions and see what turns up?

(For this system it is quite easy, but given a much larger system with many dimensions it might be harder)

Depends on what you mean by large. There’s intervalrootfinding.jl that’ll do that for you, but you need to define large for anyone to give you any guidance.

Large would be about 10-15 variables.

Try IntervalRootFinding.jl, it might work!

Thanks, another question: Say that I want to find a solution, but with certain restrictions (that all variable values are non-negative). Is there a good way to do this?

Hadn't noticed your last question. We don't allow for restrictions like that.