Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Factorization examples working with 15.0 and 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwifb committed Feb 23, 2021
1 parent 6132c9a commit db1fcfd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/sage/interfaces/giac.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
401
sage: giac.fsolve('x^2=cos(x)+4', 'x','0..5')
[1.9140206190...
sage: giac.factor('x^5 - y^5')
(x-y)*(x^2+(-sqrt(5)+1)/2*x*y+y^2)*(x^2+(sqrt(5)+1)/2*x*y+y^2)
sage: giac.factor('x^4 - y^4')
(x-y)*(x+y)*(x^2+y^2)
sage: R.<x,y>=QQ[];f=(x+y)^5;f2=giac(f);(f-f2).normal()
0
sage: x,y=giac('x,y'); giac.int(y/(cos(2*x)+cos(x)),x) # random
Expand Down Expand Up @@ -74,14 +74,14 @@
::
factor( (x^5-1));
factor( (x^4-1));
We can write that in sage as
::
sage: giac('factor(x^5-1)')
(x-1)*(x^2+(-sqrt(5)+1)/2*x+1)*(x^2+(sqrt(5)+1)/2*x+1)
sage: giac('factor(x^4-1)')
(x-1)*(x+1)*(x^2+1)
Notice, there is no need to use a semicolon.
Expand All @@ -92,8 +92,8 @@
::
sage: giac('(x^5-1)').factor()
(x-1)*(x^2+(-sqrt(5)+1)/2*x+1)*(x^2+(sqrt(5)+1)/2*x+1)
sage: giac('(x^4-1)').factor()
(x-1)*(x+1)*(x^2+1)
where ``expression.command()`` means the same thing as
``command(expression)`` in Giac. We will use this
Expand Down

0 comments on commit db1fcfd

Please sign in to comment.