Joshi, Yogesh
2004-Sep-17 13:19 UTC
[R] help with numerical solution for two simultaneous nonlinearequations in 2 variables
Thank you - optim has solved my problem. Best regards, Yogesh -----Original Message----- Hi, Suppose you have p equations in p unknowns: F1(x1,x2,...,xp) =0 . . . Fp(x1,x2,...,xp) = 0 You can solve the equivalent minimization problem: G(x1,x2,...,xp) = F1^2 + ... + Fp^2 = 0 So, you can use "optim" with G as your objective function. Hope this is helpful, Ravi. -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Joshi, Yogesh Sent: Thursday, September 16, 2004 10:54 PM To: r-help at stat.math.ethz.ch Subject: [R] help with numerical solution for two simultaneous nonlinearequations in 2 variables Hi, I am relatively new to R and am trying to solve two simultaneous nonlinear equations in two variables numerically, and was wondering if anyone knew if any of the packages could do that. An alternative is writing my own code using Newton-Raphson; I did that but was not able to get good convergence. Any ideas please? Thanks Yogesh [[alternative HTML version deleted]] ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html