When using solve
to compute the roots of a quadratic equation, SymPy returns expressions which could be simplified but I can't get it to simplify them. A minimal example looks like so:
from sympy import *
sqrt(-24-70*I)
Here, SymPy just returns sqrt(-24-70*I)
while Mathematica or Maple will answer with the equivalent of 5-7*I
.
I'm aware that there are two square roots, but this behavior entails that SymPy will, for example, return pretty complicated solutions from
z = symbols("z")
solve(z ** 2 + (1 + I) * z + (6 + 18 * I), z)
while, again, Maple and Mathematica will both happily give me the two Gaussian integers that solve this equation.
Is there an option or something that I'm missing?