For some reason Mathematica does not properly simplify this expression:
In[7]:= FullSimplify[ArcTan[-Re[x + z], y], (x | y | z) \[Element] Reals]
Out[7]= ArcTan[-Re[x + z], y]
Obviously, if x
and z
are real, then so is x+z
, so Re[x + z]
should be replaced by x + z
.
Strangely enough, dropping any small part of the input fixes the problem, here are some examples.
No minus sign:
In[8]:= FullSimplify[ ArcTan[Re[x + z], y], (x | y | z) \[Element] Reals]
Out[8]= ArcTan[x + z, y]
No z
:
In[9]:= FullSimplify[ArcTan[-Re[x], y], (x | y | z) \[Element] Reals]
Out[9]= ArcTan[-x, y]
No y
:
In[10]:= FullSimplify[ArcTan[-Re[x + z]], (x | y | z) \[Element] Reals]
Out[10]= -ArcTan[x + z]
Of course I can just drop the Re
function manually, but this is just a small fragment of the actual expression I'm trying to simplify, and I would like to avoid going though the whole expression looking for this specific pattern.
Anyone knows how to fix this? Is this a bug or what? (I'm using version 8.0.4.0)
FullSimplify[{-Re[x + z], 0}, (x|z) \[Element] Reals]
. $\endgroup$ – celtschk Apr 11 '12 at 14:27Simplify[Re[x + z], Assumptions -> {x \[Element] Reals, y \[Element] Reals, z \[Element] Reals}]
does give x+z so it has to do with ArcTan $\endgroup$ – b.gates.you.know.what Apr 11 '12 at 14:27ComplexExpand
doesn't drop it either. $\endgroup$ – Szabolcs Apr 11 '12 at 14:37ArcTan
is redundant $\endgroup$ – Joe Apr 11 '12 at 14:44