1 | initial version |
SInce there are sqrt
's in your expression, you may try canonicalize_radical()
:
sage: f
(a, b, r) |--> (a^2 + b^2 - sqrt(a^2 + b^2 - r^2)*sqrt(a^2 + b^2)*sqrt((a^2 + b^2 - r^2)/(a^2 + b^2)))/(a - I*b)
sage: f.canonicalize_radical()
(a, b, r) |--> r^2/(a - I*b)