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

Gabor Grothendieck ggrothendieck at gmail.com
Thu Nov 29 23:24:49 CET 2007


Yes, try this:


> library(Ryacas)
Loading required package: XML
> x <- Sym("x")
> y <- Sym("y")
> z <- Sym("z")
> Solve((x^2+y^2+3*z^3)/(5*z^2*x^3)==0, x)
[1] "Starting Yacas!"
expression(list(x == root(-(4 * (y^2 + 3 * z^3)), 2)/2, x ==
    -root(-(4 * (y^2 + 3 * z^3)), 2)/2))



On Nov 29, 2007 5:06 PM, Søren Højsgaard <Soren.Hojsgaard at agrsci.dk> wrote:
> The Ryacas package might be able to do it...
> Søren
>
> ________________________________
>
> Fra: r-help-bounces at r-project.org på vegne af francogrex
> Sendt: to 29-11-2007 22:00
> Til: r-help at r-project.org
> Emne: [R] How can R be used to solve algebra equations?
>
>
>
>
>
> 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
> --
> View this message in context: http://www.nabble.com/How-can-R-be-used-to-solve-algebra-equations--tf4899794.html#a14034422
> 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.
>
> ______________________________________________
> 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.
>



More information about the R-help mailing list