Re: [R] analytic solution for equation

From: Gabor Grothendieck <>
Date: Sat 10 Jul 2004 - 03:54:06 EST

Stephane Dray <dray <at>> 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
: of equation. or more generally if it contains some functions to simplify
: 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 ( as well as a number of others are free. Here is your calculation in yacas:

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 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); mailing list PLEASE do read the posting guide! Received on Sat Jul 10 04:02:00 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:54:47 EST