Solving for Roots in R- 3 variables -
I am trying to solve an equation with three variables in R. The equation is: I have not checked it at all, but it seems that this Resolve then: This is a bit of clunky, maybe no bad Cancel ... 59991348 * x ^ 2 - 13958305552 * X + 992000000 + (6000000000 - Q * P) / (x * (.03 + 6000000000 - Q)). Is there a way to symbolically solve it (X = etc), or find the roots, in R? I've downloaded deSolve, but I'm sure which command would help, thanks for any help.
riaakas Package:
FF < - "Solution (59991348 * x ^ 2 - 13958305552 * x + 992000000 + (6000000000 - Q * P) / (x * (03 + 6000000000 - Q)), x)"
Library ("Ryakas") ans0 < - yacas (ff) ans1 & lt; - gsub ("({{}}, $)", "", strutsplit (ans0 $ YacasForm, "x ==") [[1]] ans1 & lt; - ans1 [2: 4] grepl ("Complex" , Ans1) ## Wrong TRUE Sqrt & lt; - Function (x) sqrt (Complex (real = x)) Complex & lt; - Function (R, I) Complex (actual = R, Image = I) Zapi & lieutenant; - function (x) if (im (zapsmall (x)) == 0 as.numeric (x) other x numans & lt; - function (y, p = 1, q = 1) {zapI (eval (parse ( Text = y), list (p = p, q = q))} numAns (ans1 [1]) ## 232.6009 numAns (ans1 [2]) ## -1.014755e-09Nenne (ans1 [3]) # # 0.07109052
Comments
Post a Comment