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.


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.
Details and Options

- The variables given in the second argument of ComplexExpand can be patterns.
- The option TargetFunctions can be given as a list of functions from the set {Re,Im,Abs,Arg,Conjugate,Sign}. ComplexExpand will try to give results in terms of functions specified.
- ComplexExpand automatically threads over lists in expr, as well as equations, inequalities and logic functions.
Examples
open all close allBasic Examples (4)
Scope (7)
Options (1)
Applications (2)
Properties & Relations (1)
This computes Re[Sin[x+I y]] assuming that x and y are real:
The same computation can be done using TrigExpand and Refine:
See Also
GaussianIntegers TrigToExp ExpToTrig TrigExpand FunctionExpand PowerExpand Abs ReIm
Function Repository: ComplexToPolar
History
Introduced in 1991 (2.0) | Updated in 2007 (6.0)
Text
Wolfram Research (1991), ComplexExpand, Wolfram Language function, https://reference.wolfram.com/language/ref/ComplexExpand.html (updated 2007).
CMS
Wolfram Language. 1991. "ComplexExpand." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/ComplexExpand.html.
APA
Wolfram Language. (1991). ComplexExpand. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ComplexExpand.html
BibTeX
@misc{reference.wolfram_2025_complexexpand, author="Wolfram Research", title="{ComplexExpand}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/ComplexExpand.html}", note=[Accessed: 13-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_complexexpand, organization={Wolfram Research}, title={ComplexExpand}, year={2007}, url={https://reference.wolfram.com/language/ref/ComplexExpand.html}, note=[Accessed: 13-August-2025]}