| 1 | initial version |
I have realized that my problem here was of mathematical nature rather than computational. I was assuming that
$-\frac{a}{b} =\frac{a}{-b}$ $\implies$ $\sqrt{-\frac{a}{b}}=\sqrt{\frac{a}{-b}}$ $\implies$ $\frac{\sqrt{-a}}{\sqrt{b}}=\frac{\sqrt{a}}{\sqrt{-b}}$
However, if we consider only the positive branches of the square roots, the last equality does not hold.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.