ComplexExpand
ComplexExpand[e]
returns a complex expansion of e
.
Attributes[ComplexExpand] := {Protected}
Simple examples
In[1]:= ComplexExpand[a]
Out[1]= a
In[2]:= ComplexExpand[1]
Out[2]= 1
In[3]:= ComplexExpand[a*(b + c)]
Out[3]= a*b + a*c
In[4]:= ComplexExpand[-1^(1)/(3)]
Out[4]= (1)/(2) + (I*Sqrt[3])/(2)
In[5]:= ComplexExpand[-1^(4)/(3)]
Out[5]= (1)/(2)*-1 + ((I*Sqrt[3]))/(2)*-1
In[6]:= ComplexExpand[2^(4)/(3)]
Out[6]= 2*2^(1)/(3)
In[7]:= ComplexExpand[-1^(1)/(3)*(1 + I*Sqrt[3])]
Out[7]= -1 + I*Sqrt[3]
In[8]:= ComplexExpand[d*E^((a + I*b)*c)]
Out[8]= d*E^(a*c)*Cos[b*c] + d*I*E^(a*c)*Sin[b*c]
In[9]:= ComplexExpand[(1*E^(I*(Pi)/(4)))/(2)]
Out[9]= ((1)/(2) + (I)/(2))/(Sqrt[2])