[R] R solve equation

Giovanni Petris GPetris at uark.edu
Mon Feb 9 17:46:53 CET 2009


As suggested by somebody else, uniroot() can be used to solve
equations in one unknown variable. However, you will never get the
"exact x" in R, only an approximate root... 

Best,
Giovanni

> Date: Sat, 07 Feb 2009 02:20:10 -0800 (PST)
> From: oryie <43248523 at qq.com>
> Sender: r-help-bounces at r-project.org
> Precedence: list
> 
> 
> Hello!
> 
> I want to use R to calculate the variable x which is in some eqation, give
> an example:
> 
> 3*x-log(x)+1=0, 
> 
> how to solve equation to get the exact x in R?
> 
> Thank you very much!
> -- 
> View this message in context: http://www.nabble.com/R-solve-equation-tp21886831p21886831.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.
> 
> 

-- 

Giovanni Petris  <GPetris at uark.edu>
Associate Professor
Department of Mathematical Sciences
University of Arkansas - Fayetteville, AR 72701
Ph: (479) 575-6324, 575-8630 (fax)
http://definetti.uark.edu/~gpetris/




More information about the R-help mailing list