def _eval_expand_complex(self, deep=True, **hints): if deep: abs = C.abs(self.args[0].expand(deep, **hints)) arg = C.arg(self.args[0].expand(deep, **hints)) else: abs = C.abs(self.args[0]) arg = C.arg(self.args[0]) if hints['log']: # Expand the log hints['complex'] = False return log(abs).expand(deep, **hints) + S.ImaginaryUnit * arg else: return log(abs) + S.ImaginaryUnit * arg
def _eval_expand_complex(self, *args): abs = C.abs(self.args[0]) arg = C.arg(self.args[0]) return log(abs) + S.ImaginaryUnit * arg