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

Examples

open allclose all

Basic Examples  (4)

Expand symbolic expressions into real and imaginary parts:

Assume that both and are real:

Take to be complex:

Extract the real and imaginary parts of an expression:

Scope  (7)

Polynomials:

Trigonometric and hyperbolic functions:

Inverse trigonometric and inverse hyperbolic functions:

Exponential and logarithmic functions:

Composition of functions:

Specify that a variable is taken to be complex:

Specify target functions:

Options  (1)

TargetFunctions  (1)

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:

Applications  (2)

This expands the expression, assuming that and are both real:

In this case, is assumed to be real, but is assumed to be complex, and is broken into explicit real and imaginary parts:

With several complex variables, you quickly get quite complicated results:

Verify common complex identities:

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:

Wolfram Research (1991), ComplexExpand, Wolfram Language function, https://reference.wolfram.com/language/ref/ComplexExpand.html (updated 2007).

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_2024_complexexpand, author="Wolfram Research", title="{ComplexExpand}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/ComplexExpand.html}", note=[Accessed: 06-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_complexexpand, organization={Wolfram Research}, title={ComplexExpand}, year={2007}, url={https://reference.wolfram.com/language/ref/ComplexExpand.html}, note=[Accessed: 06-November-2024 ]}