[R] How can R be used to solve algebra equations?

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Thu Nov 29 23:37:05 CET 2007



francogrex said the following on 11/29/2007 1:00 PM:
> suppose I have this equation:
> (x^2+y^2+3z^3)/(5*z^2*x^3)=0
> 
> and I want to find x in relation to the other variables which actually is:
> 
> x=sqrt(-3*z^3-y^2) or x=-sqrt(-3*z^3-y^2)
> 
> Can R give me this expression solution? I know there is uniroot, but here I
> want the "expression" not the value, because I do  not have values for y and
> z.
> 
> Thanks

Try:

library(Ryacas)
yacas("Solve((x^2+y^2+3*z^3)/(5*z^2*x^3)==0, x)")

expression(list(x == root(-(4 * (y^2 + 3 * z^3)), 2)/2, x ==
     -root(-(4 * (y^2 + 3 * z^3)), 2)/2))
	
HTH,

--sundar



More information about the R-help mailing list