Thanks! I've already learned more.
What I first did was this:
sage: PP
-0.625000000000000*t^4 + 23.5500000000000*t^3 - 264.051000000000*t^2 +
1026.90000000000*t - 853.800000000000
sage: L=solve(PP==0,t)
sage: L[1]
t ==
-1/1250*sqrt((390625*(4/1953125*I*sqrt(37468876945450884598)*sqrt(5) -
3986170531587/244140625)^(2/3) +
28629375*(4/1953125*I*sqrt(37468876945450884598)*sqrt(5) -
3986170531587/244140625)^(1/3) +
397327289)/(4/1953125*I*sqrt(37468876945450884598)*sqrt(5) -
3986170531587/244140625)^(1/3)) +
1/2*sqrt(-(4/1953125*I*sqrt(37468876945450884598)*sqrt(5) -
3986170531587/244140625)^(1/3) -
397327289/390625/(4/1953125*I*sqrt(37468876945450884598)*sqrt(5) -
3986170531587/244140625)^(1/3) -
2316636/5/sqrt((390625*(4/1953125*I*sqrt(37468876945450884598)*sqrt(5) -
3986170531587/244140625)^(2/3) +
28629375*(4/1953125*I*sqrt(37468876945450884598)*sqrt(5) -
3986170531587/244140625)^(1/3) +
397327289)/(4/1953125*I*sqrt(37468876945450884598)*sqrt(5) -
3986170531587/244140625)^(1/3)) + 91614/625) + 471/50
sage: L[1].n()
(errors)
TypeError: cannot evaluate symbolic expression numerically
I then tried to use the gp version of "solve":
sage: gp.solve(t=10,30,PP)
File "<ipython-input-20-236b1d016f63>", line 1
gp.solve(t=Integer(10),Integer(30),PP)
^
SyntaxError: positional argument follows keyword argument
So Sage doesn't like the gp syntax.
I now know that I could have done this by creating a polynomial ring
over R and asking for roots, or with PP.find_root(0,30), which only
finds one of the roots (there are four in that interval).
Fernando
On 9/15/2020 1:53 PM, kcrisman wrote:
I still don't know my way around the Sage documentation... Sorry
for the elementary question.
Yeah, we are sorry that it never has gotten more organized (though it
is actually quite thorough!). You may want to try the French (now in
English) Sage book, or Greg Bard's AMS (but free online) Sage book.
I just tried to use the *solve* command to find the roots of a
polynomial of degree 4 with real coefficients. The result is a
list of solutions expressed in (complicated) symbolic form. When I
attempted to find the numerical value of the solutions, I got an
error:
TypeError: cannot evaluate symbolic expression numerically
There should be, and if you give us the precise commands you used, we
should be able to either log it as a bug report or something else.
For many equations we get something back like x^5-x+1==0 which we
know there isn't a formula for, but if it is using the quartic formula
or something similar it should, in principle, be able to be
approximated. We'd have to see your exact output to determine why
that isn't happening.
--
You received this message because you are subscribed to the Google
Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sage-support+unsubscr...@googlegroups.com
<mailto:sage-support+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/292f795f-80af-488f-835c-344fa08782d8n%40googlegroups.com
<https://groups.google.com/d/msgid/sage-support/292f795f-80af-488f-835c-344fa08782d8n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
=============================================================
Fernando Q. Gouvea http://www.colby.edu/~fqgouvea
Carter Professor of Mathematics
Dept. of Mathematics and Statistics
Colby College
5836 Mayflower Hill
Waterville, ME 04901
The first prerequisite for leading any satisfactory kind of personal
life in a technological society is the ability to resist distraction.
-- W. H. Auden
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/37a8453a-89ce-3bca-1023-40a8722b9e6b%40colby.edu.