evalc
symbolic evaluator over the complex field
Calling Sequence
Parameters
Description
Examples
evalc(expr)
expr
-
any expression
This evalc(expr) calling sequence is used to manipulate complex-valued expressions, such as sin⁡a+I⁢b, by attempting to split such expressions into their real and imaginary parts. Whenever possible, the output from evalc is put into the canonical form expr1+I⁢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+I*b)) = b. 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.
evalc⁡sqrt⁡1+I
2+2⁢22+I⁢−2+2⁢22
evalc⁡sin⁡3+5⁢I
sin⁡3⁢cosh⁡5+I⁢cos⁡3⁢sinh⁡5
evalc⁡21+I
2⁢cos⁡ln⁡2+2⁢I⁢sin⁡ln⁡2
evalc⁡conjugate⁡exp⁡I
cos⁡1−I⁢sin⁡1
evalc⁡f⁡exp⁡a+b⁢I
f⁡ⅇa⁢cos⁡b+I⁢ⅇa⁢sin⁡b
evalc⁡polar⁡r,θ
r⁢cos⁡θ+I⁢r⁢sin⁡θ
evalc⁡a+I⁢b2,ln⁡a+I⁢b
−b2+2⁢I⁢a⁢b+a2,ln⁡a2+b22+I⁢arctan⁡b,a
evalc⁡abs⁡x+I⁢y=cos⁡u⁡x+I⁢v⁡y
x2+y2=cos⁡u⁡x⁢cosh⁡v⁡y−I⁢sin⁡u⁡x⁢sinh⁡v⁡y
evalc⁡sqrt⁡1−u2
u2−1⁢1−signum⁡u2−12+I⁢u2−1⁢1+signum⁡u2−12
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.
assume⁡v::real,v2<1
evalc⁡sqrt⁡1−v2
−v~2+1
series⁡exp⁡Ei⁡1,4⁢I⁢x,x,3
1+Ei1⁡4⁢I⁢x+12⁢Ei1⁡4⁢I2⁢x2+O⁡x3
evalc⁡
1+−Ci⁡4+I⁢Si⁡4−π2⁢x+Ci⁡422−Si⁡422+Si⁡4⁢π2−π28+I⁢−Ci⁡4⁢Si⁡4+Ci⁡4⁢π2⁢x2+O⁡x3
See Also
assume
evalc/functions
evalf
polar
Re
Download Help Document