Hello, I have search on R website but do not find any solution. I would like to know if R has some functionalities to produce analytical results of equation. or more generally if it contains some functions to simplify equation. For example: I would like to obtain x1 from: x1+x2=8 (x1=8-x2) x1^2+x2=8 (x1=sqrt(8-x2)) Is is possible in R ? if not, do you know a (free) software that could do the job ? Thanks in advance ! Stephane DRAY
What would be the purpose of a function/software to rewrite x1 in terms of x2 ? Perhaps you could explain further how it might be of some use. There is uniroot(), polyroot(), optimize(), nlm(), solve() and many others that you want to look into. On Fri, 2004-07-09 at 17:07, Stephane Dray wrote:> Hello, > I have search on R website but do not find any solution. > I would like to know if R has some functionalities to produce analytical results > of equation. or more generally if it contains some functions to simplify equation. > > For example: > I would like to obtain x1 from: > x1+x2=8 (x1=8-x2) > > x1^2+x2=8 (x1=sqrt(8-x2)) > > > > Is is possible in R ? if not, do you know a (free) software that could do the job ? > > Thanks in advance ! > > Stephane DRAY > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >
Stephane Dray wrote:> For example: > I would like to obtain x1 from: > x1+x2=8 (x1=8-x2) > > x1^2+x2=8 (x1=sqrt(8-x2)) > > > Is is possible in R ? if not, do you know a (free) software that could do the job ?You want a computer algebra system. Try 'maxima', free, and from here: http://maxima.sourceforge.net/ Of course its possible to do in R, you'd just have to rewrite most of maxima.... Barry
Stephane Dray <dray <at> biomserv.univ-lyon1.fr> writes: : : Hello, : I have search on R website but do not find any solution. : I would like to know if R has some functionalities to produce analytical results : of equation. or more generally if it contains some functions to simplify equation. : : For example: : I would like to obtain x1 from: : x1+x2=8 (x1=8-x2) : : x1^2+x2=8 (x1=sqrt(8-x2)) : : Is is possible in R ? if not, do you know a (free) software that could do the job ? I don't think R has this capability built in but you could try a computer algebra system. Yacas (http://yacas.sourceforge.net) as well as a number of others are free. Here is your calculation in yacas: C:\yacas>yacas True; This is Yacas version '1.0.54'. Yacas is Free Software--Free as in Freedom--so you can redistribute Yacas or modify it under certain conditions. Yacas comes with ABSOLUTELY NO WARRANTY. See the GNU General Public License (GPL) for the full conditions. See http://yacas.sf.net for more information and documentation on Yacas. Numeric mode: "Internal" To exit Yacas, enter Exit(); or quit or Ctrl-c. Type ?? for help. Or type ?function for help on a function. Type 'restart' to restart Yacas. To see example commands, keep typing Example(); In> Solve(x1+x2==8,x1); Out> 8-x2; In> Solve(x1^2+x2==8,x1); Out> (8-x2)^(1/2);