Ask Your Question
0

error in factor

asked 2024-11-25 09:22:07 +0100

pfeifhns gravatar image

updated 2024-11-25 09:29:21 +0100

Emmanuel Charpentier gravatar image

Hi, I have a problem with the factor() function: Consider the following code:

%display latex

j_00 = 1/2*(a^2 + eta)*(a^2 + zeta)/((a^2 - b^2)*(a^2 - c^2)*sqrt((a^2 + eta)*(a^2 + xi)*(a^2 + zeta)/((a^2 - b^2)*(a^2 - c^2))))

show(j_00)

j_00_simplified = j_00.canonicalize_radical().factor())

print(j_00_simplified)

As a result, I get:

1/2*sqrt(a^2 + eta)*sqrt(a^2 + zeta)/(sqrt(a^2 + xi)*sqrt(a + b)*sqrt(a + c)*sqrt(-a + b)*sqrt(-a + c))

The result is false! It should be:

1/2*sqrt(a^2 + eta)*sqrt(a^2 + zeta)/(sqrt(a^2 + xi)*sqrt(b^2-a^2)*sqrt(a^2 - c^2))

The term -a+c is wrong, it should be c-a. I think this is an error, or is there anything I don't see? If it is an error, what can I do that factor() returns the expected result?

Thank's in adcance,

Hans

edit retag flag offensive close merge delete

Comments

Edited for legibility.

When you need to insert a block of code, indent it by four spaces (or select it an hit Ctrl-K) (or use the 101010 button). Inline code can be surrounded by backticks (`).

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2024-11-25 09:31:36 +0100 )edit

[ Edited as an answer. Sorry for the noise... ].

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2024-11-25 10:17:51 +0100 )edit

What's the difference between -a+c and c-a? Maybe I'm misunderstanding.

John Palmieri gravatar imageJohn Palmieri ( 2024-11-26 01:45:18 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2024-11-25 10:27:39 +0100

Emmanuel Charpentier gravatar image

updated 2024-11-25 14:03:52 +0100

Tentative answer : on Sage 10.5.rc0, I get :

sage: j_00_simplified
1/2*sqrt(a^2 + eta)*sqrt(a^2 + zeta)/(sqrt(a^2 + xi)*sqrt(a + b)*sqrt(a + c)*sqrt(-a + b)*sqrt(-a + c))

and, BTW,

sage: (j_00.canonicalize_radical().factor()/j_00).canonicalize_radical()
1

What is your version of Sage ? On what platform ?

EDIT : Your expression is symmetric in b anc c, therefore so your simplified expression should be ; the "correct" expression you propose is not...

edit flag offensive delete link more

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: 2024-11-25 09:22:07 +0100

Seen: 144 times

Last updated: Nov 25