I noticed the following strange scenario. When I defined a variable to be real, Mathematica does not only recognize that it is real after taking an inverse. How can I resolve this so that it will recognize 1/x is still real?
In[29]:= $Assumptions = {x ∈ Reals}
Out[29]= {x ∈ Reals}
In[30]:= Im[x]
Out[30]= Im[x]
In[31]:= Refine[Im[x]]
Out[31]= 0
In[32]:= Refine[Re[x]]
Out[32]= x
In[33]:= Refine[Im[1/x]]
Out[33]= Im[1/x]
In[34]:= Refine[Re[1/x]]
Out[34]= Re[1/x]
ComplexExpand
without any assumptions. For example:$Assumptions = True; ReIm[ 1 / x ] // ComplexExpand
$\endgroup${}
button above the edit window. The edit window help button?
is useful for learning how to format your questions and answers. You may also find this meta Q&A helpful $\endgroup$