If you suspect multiple roots, you can try `multiStart' in "BB", which runs
`BBsolve' from multiple starting values (which you have to specify).

If you want to convert it to an optimization problem, you can form the sum
of squared residuals of the equations and then use `BBoptim'.  However, I
would not advise that approach when you have a "square" system (i.e. the
number of equations is the same as the number of unknowns). The optimization
approach is useful (and necessary) for over-determined systems.

Best,
Ravi.

-----Original Message-----
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Werner W.
Sent: Friday, August 07, 2009 2:43 AM
To: r-help@r-project.org
Subject: Re: [R] solving system of equations involving non-linearities


Many thanks, BBsolve works like a charm. 

First I thought I should use the squares of the equations because BBsolve
would use some minimization objective function anyway but it actually only
works if I don't use the squared equations. I'll check the documentation if
I find something about the objective.

Thanks for the help,
  Werner



Ravi Varadhan wrote:
> 
> You have two options:
> 
> 1.  The `BBsolve' function in the "BB" package to solve this system of 3
> equations.
> 2.  Try `nleqslv' function in the "nleqslv" package.
> 
> These would work even if the residual is not zero.
> 
> Hope this helps,
> Ravi.
> 

-- 
View this message in context:
http://www.nabble.com/solving-system-of-equations-involving-non-linearities-
tp24845136p24859703.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to