Skip to content
Prev 163540 / 398506 Next

How to solve following equation?

Multiplying this expression with (1+x)^3 leads to a polynomial equation.
I would certainly recommend the 'PolynomF' package here:

----
    # install.packages("PolynomF")
    library("PolynomF")

    options(digits=16)

    x <- polynom()

    a <- b <- c <- d <- 1
    p <- a*(1+x)^3 - b*(1+x)^2 - c*(1+x) - d
    p
    # -2 + 2*x^2 + x^3

    solve(p)

    # [1] -1.419643377607080-0.6062907292072i
    #     -1.419643377607080+0.6062907292072i
    # [3]  0.839286755214161+0.0000000000000i
----

The solution x0 = 0.839286755214161 is correct up to the last digit, as can be
verified by using a computer algebra system. This also shows that Ryacas is
quite exact in this task.

Hans Werner

Gabor Grothendieck <ggrothendieck <at> gmail.com> writes:
http://www.nabble.com/How-to-solve-following-equation--tp20785063p20785063.html