WLJS LogoWLJS Notebook

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.

Examples

Expand assuming real variables:

ComplexExpand[Re[a + b I]]
(* a *)

Expand with complex variable:

ComplexExpand[Abs[z]^2, {z}]
(* Re[z]^2 + Im[z]^2 *)

Please visit the official Wolfram Language Reference for more details.

On this page