Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Formula Manipulation > Algebraic Transformations >

ComplexExpand

ComplexExpand[expr]
expands expr assuming that all variables are real.
ComplexExpand[expr, {x1, x2, ...}]
expands expr assuming that variables matching any of the xi are complex.
  • The variables given in the second argument of ComplexExpand can be patterns.
  • ComplexExpand automatically threads over lists in expr, as well as equations, inequalities and logic functions.
Assume both x and y are real:
Take x to be complex:
Assume both x and y are real:
In[1]:=
Click for copyable input
Out[1]=
 
Take x to be complex:
In[1]:=
Click for copyable input
Out[1]=
Polynomials:
Trigonometric and hyperbolic functions:
Inverse trigonometric and inverse hyperbolic functions:
Exponential and logarithmic functions:
Composition of functions:
This gives an answer in terms of Re[z] and Im[z]:
With TargetFunctions->{Abs, Arg}, the answer is given in terms of Abs[z] and Arg[z]:
Use Conjugate as the target function:
This computes Re[Sin[x+I y]] assuming that x and y are real:
The same computation can be done using TrigExpand and Refine:
New in 2 | Last modified in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team