[R] R emulation of FindRoot in Mathematica

Berend Hasselman bhh @end|ng |rom x@4@||@n|
Thu Jan 19 16:25:58 CET 2023


If you need to solve a nonlinear system of equations you could have a look at the 
CRAN Task View: Numerical Mathematics:   https://cran.r-project.org/view=NumericalMathematics

Specifically look in the subsection "Root Finding and Fixed Points".


Berend Hasselman

> On 19 Jan 2023, at 10:41, Troels Ring <tring using gvdnet.dk> wrote:
> 
> Hi friends - I hope this is not a misplaced question. From the literature (Kushmerick AJP 1997;272:C1739-C1747) I have a series of Mathematica equations which are solved together to yield over different pH values the concentrations of metabolites in skeletal muscle using the Mathematica function FindRoot((E1,E2...),(V2,V2..)] where E is a list of equations and V list of variables.  Most of the equations are individual binding reactions of the form 10^6.494*atp*h == hatp and next 10^9.944*hatp*h ==hhatp describing binding of singe protons or Mg or K to ATP or creatin for example, but we also have constraints giving total concentrations of say ATP i.e. ATP + ATPH, ATPH2..ATP.Mg
> 
> I have, without success, tried to find ways to do this in R - I have 36 equations on 36 variables and 8 equations on total concentrations. As far as I can see from the definition of FindRoot in Wolfram, Newton search or secant search is employed.
> 
> I'm on Windows R 4.2.2
> 
> Best wishes
> Troels Ring, MD
> Aalborg, Denmark
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.



More information about the R-help mailing list