sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.48k stars 488 forks source link

Convert rootof function from giac #23015

Open c22b6800-ec0b-4cbf-94c4-0a74aecc2093 opened 7 years ago

c22b6800-ec0b-4cbf-94c4-0a74aecc2093 commented 7 years ago

Provide a corresponding Sage function for Giac's rootof. From the inline help of XCAS:

rootof(LstPoly(P),LstPoly(Q)): Polynomial in terms of a root of an irreducible polynomial on Q. Returns P(a) with a the greatest root of Q.

For example,

sage: giac.simplify((exp(2*i*pi/3)+exp(2*i*pi/15))^3)
((-768*i)*(-1)^(2/15)*sqrt(3)-768*(-1)^(2/15)+768*i*(-1)^(4/15)*sqrt(3)-768*(-1)^(4/15)+rootof([[16-16*i,-16+16*i,-400+528*i,144+240*i],[1,0,-30,-40,5]]))/512

This seems different from #22024.

Depends on #22024

CC: @rwst @frederichan-IMJPRG @slel

Component: symbolics

Issue created by migration from https://trac.sagemath.org/ticket/23015

rwst commented 7 years ago

Description changed:

--- 
+++ 
@@ -10,4 +10,4 @@
 ((-768*i)*(-1)^(2/15)*sqrt(3)-768*(-1)^(2/15)+768*i*(-1)^(4/15)*sqrt(3)-768*(-1)^(4/15)+rootof([[16-16*i,-16+16*i,-400+528*i,144+240*i],[1,0,-30,-40,5]]))/512

-This depends on #22024. +This seems different from #22024.

slel commented 6 years ago

Description changed:

--- 
+++ 
@@ -1,7 +1,6 @@
-Provide a correspondent Sage function for Giac's `rootof`. From the inline help of XCAS: 
+Provide a corresponding Sage function for Giac's `rootof`. From the inline help of XCAS:

-> rootof(LstPoly(P),LstPoly(Q)): Polynomial in terms of a root of an irreducible polynomial on Q. Returns P(a) with a the greatest root of Q. 
-
+> `rootof(LstPoly(P),LstPoly(Q))`: Polynomial in terms of a root of an irreducible polynomial on `Q`. Returns `P(a)` with `a` the greatest root of `Q`.

 For example,
nasser1 commented 4 years ago
comment:3

fyi, This still shows up in 8.9

var('x')
integrate(x^6/(2*x^5+3)^3,x, algorithm="giac")
NotImplementedError: Unable to parse Giac output: rootof(
mkoeppe commented 3 years ago
comment:6

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.