What I want is for a calculus student to be able to say factor(x^2+x
+1) or factor(x^2-x-1) and get something useful. It would be nice
to be able to specify R or C as the relevant field. Using solve
instead of factor gives exactly what I would expect, namely the
result of applying the quadratic
You can factor it in any field that contains a square root of two. For
example, we can construct a suitable number field over QQ:
sage: z = QQ['z'].0
sage: K = NumberField(z^2 - 2,'sqrt2'); K
Number Field in sqrt2 with defining polynomial z^2 - 2
In this number field, you can (somewhat
Oops posted too quickly. The alternative is to use the symbolic ring, though
strictly speaking that doesn't let you factor only find roots:
sage: var('x')
x
sage: (x^2-2).solve(x)
[x == -sqrt(2), x == sqrt(2)]
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe