ludo
ludo

Reputation: 45

How to set the initials when using NLsolve, Julia

Please, I want to use NLsolve of Julia for solving systems of nonlinear equations. The package requires to set the initials for the unknowns of your system. With my system of equations (sorry, I can not include it here since I need at least 10 reputations to be allowed to), when I keep the initials [0.1; 1.2] as in the example from the documentation, I obtain the "paper-pencil" solution. But if I set the initials at [1.1;2.2] for example, I receive the following error:

DomainError: Exponentiation yielding a complex result requires a complex argument. Replace x^y with (x+0im)^y, Complex(x)^y, or similar.

Please, how should I come up with suitable values for initials for a given system of equations?

Upvotes: 0

Views: 512

Answers (1)

Chris Rackauckas
Chris Rackauckas

Reputation: 19152

A rootfinder is always dependent on the initial condition. That's just how those algorithms work. The closer your guess is to the true maximum the better off you are. Trust region methods are more robust than Newton methods, but you'll never get away from the fact that these are local methods.

Upvotes: 3

Related Questions