Ask Your Question
0

Stange behavior in my scmd file.

asked 2014-08-08 20:04:42 +0100

I cannot figure this out! The diff command is working fine, by why are the following two commands not working as expected?

 sage: diff(sin(x^2),x)
2*x*cos(x^2)
sage: factor(8+27*x^3)
x^3
sage: latex(factor(8+27*x^3))
x^{3}
edit retag flag offensive close merge delete

Comments

Hello, which version of sage are you using ? Did you type something before these lines ?

FrédéricC gravatar imageFrédéricC ( 2014-08-08 21:17:14 +0100 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2014-08-09 02:10:07 +0100

slelievre gravatar image

It seems you are computing in polynomials over the finite field with two elements.

In a fresh Sage session, factor(8+27*x^3) outputs (9*x^2 - 6*x + 4)*(3*x + 2).

But if you compute in polynomials over GF(2), you would just get x^3.

sage: R = PolynomialRing(GF(2),'x')
sage: x = R.gen()
sage: factor(8+27*x^3)
x^3
edit flag offensive delete link more

Comments

Okay, I just inserted a reset() command before this call and it's now working. THANKS!

ron.bannon gravatar imageron.bannon ( 2014-08-09 04:13:07 +0100 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-08-08 20:04:42 +0100

Seen: 262 times

Last updated: Aug 09 '14