Ask Your Question

# Sage give only three of five roots of simple equation

The equation below

 f=-32/59049*r^6 + 32/2187*r^5 - 32/243*r^4 + 352/729*r^3 - 56/81*r^2 +
8/27*r

solve(f,r)

[r=−3*sqrt(3)/2+9,r=3*sqrt(3)/2+9,r=0]

edit retag close merge delete

## 1 Answer

Sort by » oldest newest most voted

WorksForMe(TM) :

sage: var("t")
t
sage: f=-32/59049*t^6 + 32/2187*t^5 - 32/243*t^4 + 352/729*t^3 - 56/81*t^2 + 8/27*t
sage: S=solve(f,t)
sage: len(S)
6
sage: S
[t == -1/2*(27/4*I*sqrt(29) + 135/4)^(1/3)*(I*sqrt(3) + 1) - 27/4*(-I*sqrt(3) + 1)/(27/4*I*sqrt(29) + 135/4)^(1/3) + 6, t == -1/2*(27/4*I*sqrt(29) + 135/4)^(1/3)*(-I*sqrt(3) + 1) - 27/4*(I*sqrt(3) + 1)/(27/4*I*sqrt(29) + 135/4)^(1/3) + 6, t == (27/4*I*sqrt(29) + 135/4)^(1/3) + 27/2/(27/4*I*sqrt(29) + 135/4)^(1/3) + 6, t == -3/2*sqrt(3) + 9/2, t == 3/2*sqrt(3) + 9/2, t == 0]


A lil' check :

sage: [f.subs(t==s.rhs()).expand().simplify_full() for s in S]
[0, 0, 0, 0, 0, 0]


Which Sage version do you use ?

more

## Comments

Thanks a lot. My sage version is 8.0 . But it is quiet strange because I tried once more, using the same lines but now it works. The other roots that "did not appear" in the first time came desguised as complex but are indeed real, as the plot of the function shows, and also a simple command float gives. I really don''t know why

( 2018-06-19 01:23:54 +0100 )edit

Maybe you tried to work in the ring of polynomials in s with rational coefficients ? And forgot about it ?

That kind of oversight is extremely easy to commit. This is a good reason to use something allowing you to "forget and start over", such as a Jupyter notebook or emacs' sage-mode...

( 2018-06-19 07:23:01 +0100 )edit

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

Asked: 2018-06-18 17:02:55 +0100

Seen: 99 times

Last updated: Jun 19 '18