Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

error in factor

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/2sqrt(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/2sqrt(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

error in factor

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

%display latex

latex

j_00 = 1/2(a^2 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 eta)*(a^2 + zeta)/((a^2 - b^2)*(a^2 - c^2))))

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

show(j_00)

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

j_00.canonicalize_radical().factor())

print(j_00_simplified)

print(j_00_simplified)

As a result, I get: 1/2sqrt(a^2 get:

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

c))

The result is false! It should be: 1/2sqrt(a^2 be:

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

c^2))

The term "-a+c" -a+c is wrong, it should be "c-a". 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