Overview - Maple Help

evalc

symbolic evaluator over the complex field

 Calling Sequence evalc(expr)

Parameters

 expr - any expression

Description

 • This evalc(expr) calling sequence is used to manipulate complex-valued expressions, such as $\mathrm{sin}\left(a+Ib\right)$, by attempting to split such expressions into their real and imaginary parts.  Whenever possible, the output from evalc is put into the canonical form $\mathrm{expr1}+I\mathrm{expr2}$.
 • The fundamental assumption that evalc makes is that unknown variables represent real-valued quantities.  Thus, for example, evalc(Re(a+I*b)) = a and evalc(Im(a+b)) = 0. Furthermore, evalc also assumes that an unknown function of a real variable is real valued.
 • The assume command can be used to override these default assumptions. For example, assume(u::complex) tells evalc that u is not necessarily real.  Note also that some usages of the assume command implicitly imply real and others do not.  For example assume(u<1) implies u is real but assume(v^2<1) and assume(abs(v)<1) do not imply that v is real.
 • The evalc command maps onto sets, lists, equations and relations. The evalc command applied to a complex series will be a series with each coefficient in the above canonical form.
 • When evalc encounters a function whose decomposition into real and imaginary parts is unknown to it (such as f(1+I) where f is not defined), it attempts to put the arguments in the above canonical form.
 • The standard functions Re, Im, abs, and conjugate are recognized by evalc, and when such functions are invoked from within a call to evalc they apply the assumptions outlined above.  For example, evalc(abs(a+I*b)) = sqrt(a^2+b^2).
 • A complex-valued expression may be represented to evalc as polar(r,theta) where r is the modulus and theta is the argument of the expression.
 • For a complete list of the functions initially known to evalc, see evalc/functions.

Examples

 > $\mathrm{evalc}\left(\mathrm{sqrt}\left(1+I\right)\right)$
 $\frac{\sqrt{{2}{+}{2}{}\sqrt{{2}}}}{{2}}{+}\frac{{I}{}\sqrt{{-}{2}{+}{2}{}\sqrt{{2}}}}{{2}}$ (1)
 > $\mathrm{evalc}\left(\mathrm{sin}\left(3+5I\right)\right)$
 ${\mathrm{sin}}{}\left({3}\right){}{\mathrm{cosh}}{}\left({5}\right){+}{I}{}{\mathrm{cos}}{}\left({3}\right){}{\mathrm{sinh}}{}\left({5}\right)$ (2)
 > $\mathrm{evalc}\left({2}^{1+I}\right)$
 ${2}{}{\mathrm{cos}}{}\left({\mathrm{ln}}{}\left({2}\right)\right){+}{2}{}{I}{}{\mathrm{sin}}{}\left({\mathrm{ln}}{}\left({2}\right)\right)$ (3)
 > $\mathrm{evalc}\left(\mathrm{conjugate}\left(\mathrm{exp}\left(I\right)\right)\right)$
 ${\mathrm{cos}}{}\left({1}\right){-}{I}{}{\mathrm{sin}}{}\left({1}\right)$ (4)
 > $\mathrm{evalc}\left(f\left(\mathrm{exp}\left(a+bI\right)\right)\right)$
 ${f}{}\left({{ⅇ}}^{{a}}{}{\mathrm{cos}}{}\left({b}\right){+}{I}{}{{ⅇ}}^{{a}}{}{\mathrm{sin}}{}\left({b}\right)\right)$ (5)
 > $\mathrm{evalc}\left(\mathrm{polar}\left(r,\mathrm{\theta }\right)\right)$
 ${r}{}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right){+}{I}{}{r}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)$ (6)
 > $\mathrm{evalc}\left(\left[{\left(a+Ib\right)}^{2},\mathrm{ln}\left(a+Ib\right)\right]\right)$
 $\left[{-}{{b}}^{{2}}{+}{2}{}{I}{}{a}{}{b}{+}{{a}}^{{2}}{,}\frac{{\mathrm{ln}}{}\left({{a}}^{{2}}{+}{{b}}^{{2}}\right)}{{2}}{+}{I}{}{\mathrm{arctan}}{}\left({b}{,}{a}\right)\right]$ (7)
 > $\mathrm{evalc}\left(\mathrm{abs}\left(x+Iy\right)=\mathrm{cos}\left(u\left(x\right)+Iv\left(y\right)\right)\right)$
 $\sqrt{{{x}}^{{2}}{+}{{y}}^{{2}}}{=}{\mathrm{cos}}{}\left({u}{}\left({x}\right)\right){}{\mathrm{cosh}}{}\left({v}{}\left({y}\right)\right){-}{I}{}{\mathrm{sin}}{}\left({u}{}\left({x}\right)\right){}{\mathrm{sinh}}{}\left({v}{}\left({y}\right)\right)$ (8)
 > $\mathrm{evalc}\left(\mathrm{sqrt}\left(1-{u}^{2}\right)\right)$
 $\frac{\sqrt{\left|{{u}}^{{2}}{-}{1}\right|}{}\left({1}{-}{\mathrm{signum}}{}\left({{u}}^{{2}}{-}{1}\right)\right)}{{2}}{+}\frac{{I}{}\sqrt{\left|{{u}}^{{2}}{-}{1}\right|}{}\left({1}{+}{\mathrm{signum}}{}\left({{u}}^{{2}}{-}{1}\right)\right)}{{2}}$ (9)

Set an assumption on $v$.  An alternative way to set this assumption is with assume(-1<v,v<1), which implicitly assumes $v$ is real.

 > $\mathrm{assume}\left(v::\mathrm{real},{v}^{2}<1\right)$
 > $\mathrm{evalc}\left(\mathrm{sqrt}\left(1-{v}^{2}\right)\right)$
 $\sqrt{{-}{{\mathrm{v~}}}^{{2}}{+}{1}}$ (10)
 > $\mathrm{series}\left(\mathrm{exp}\left(\mathrm{Ei}\left(1,4I\right)x\right),x,3\right)$
 ${1}{+}{{\mathrm{Ei}}}_{{1}}{}\left({4}{}{I}\right){}{x}{+}\frac{{1}}{{2}}{}{{{\mathrm{Ei}}}_{{1}}{}\left({4}{}{I}\right)}^{{2}}{}{{x}}^{{2}}{+}{O}{}\left({{x}}^{{3}}\right)$ (11)
 > $\mathrm{evalc}\left(\right)$
 ${1}{+}\left({-}{\mathrm{Ci}}{}\left({4}\right){+}{I}{}\left({\mathrm{Si}}{}\left({4}\right){-}\frac{{\mathrm{\pi }}}{{2}}\right)\right){}{x}{+}\left(\frac{{{\mathrm{Ci}}{}\left({4}\right)}^{{2}}}{{2}}{-}\frac{{{\mathrm{Si}}{}\left({4}\right)}^{{2}}}{{2}}{+}\frac{{\mathrm{Si}}{}\left({4}\right){}{\mathrm{\pi }}}{{2}}{-}\frac{{{\mathrm{\pi }}}^{{2}}}{{8}}{+}{I}{}\left({-}{\mathrm{Ci}}{}\left({4}\right){}{\mathrm{Si}}{}\left({4}\right){+}\frac{{\mathrm{Ci}}{}\left({4}\right){}{\mathrm{\pi }}}{{2}}\right)\right){}{{x}}^{{2}}{+}{O}{}\left({{x}}^{{3}}\right)$ (12)