Ask Your Question

Revision history [back]

I agree that Sage's symbolic ring sometimes get messed with principal roots and simplifications in the complex plane, my favorite example being:

sage: a = (-1)^(1/3)
sage: a.n()
0.500000000000000 + 0.866025403784439*I
sage: (a^2).n()
1.00000000000000

But in your case, i do not see any problem, because the order of the operations is well defined. Indeed, for the first equality (-2)** (6/2) is equal to (-2)**3 which is equal to -8. For the second equality, (-2)**6 is equal to 64, hence sqrt((-2)**6) is equal to sqrt(64)=8, since the square root is unambiguously well defined on the non-negative reals.

When you claim that sqrt[ (-2)**6 ] = (-2) * (-2) * (-2), you somehow consider that sqrt(a^2b) is always equal to a^b, which is wrong in generality. Indeed such formula might be true in the world ot non-negative reals, but it becomes false for general complex numbers when sqrt stands for the principal branch of the square root (it is ok if you consider the square root as a 2-valued map however).

I agree that Sage's symbolic ring sometimes get messed with principal roots and simplifications in the complex plane, my favorite example being:

sage: a = (-1)^(1/3)
sage: a.n()
0.500000000000000 + 0.866025403784439*I
sage: (a^2).n()
1.00000000000000

But in your case, i do not see any problem, because the order of the operations is well defined. defined and square roots only deal with non-negative real numbers. Indeed, for the first equality (-2)** (6/2) is equal to (-2)**3 which is equal to -8. For the second equality, (-2)**6 is equal to 64, hence sqrt((-2)**6) is equal to sqrt(64)=8, since the square root is unambiguously well defined on the non-negative reals.

When you claim that sqrt[ (-2)**6 ] = (-2) * (-2) * (-2), you somehow consider that sqrt(a^2b) is always equal to a^b, which is wrong in generality. Indeed such formula might be true in the world ot non-negative reals, but it becomes false for general complex numbers when sqrt stands for the principal branch of the square root (it is ok if you consider the square root as a 2-valued map however).

For your second question, could you please tell us what is the definition of (-1/2)^(5/2) and if you can provide one, how canonical it is ?