 Im - Maple Help

Re

return the Real part of a complex-valued expression

Im

return the Imaginary part of a complex-valued expression Calling Sequence

 Re(x) $\mathrm{\Re }\left(x\right)$ Im(x) $\mathrm{\Im }\left(x\right)$ Parameters

 x - expression Description

 • The Re(x) calling sequence attempts to return the real part of x.
 If x is a real extended numeric, then x is returned. If x is a complex extended numeric, then the real part of x is returned.
 • The Im(x) function attempts to return the imaginary part of x.
 If x is a real extended numeric, then 0 is returned. If x is a complex extended numeric, then the imaginary part of x is returned.
 You can enter the commands Re and Im using their 1-D or 2-D calling sequences. For example, Re(3+4*I) is equivalent to $\mathrm{\Re }\left(3+4I\right)$.
 • If x includes a function f, then Re(x) and Im(x) attempt to execute the procedures Re/f and Im/f to determine the real and imaginary parts of the corresponding part of x.
 By this method, the functionality of these commands can be extended. For example, Re(sin(3+4*I)*ln(3+4*I)) executes the procedures Re/sin, Im/sin, Re/ln, and Im/ln.
 • To specify that unknown variables should be assumed to represent real values, use the assume or the evalc command. • The Re and Im commands are thread-safe as of Maple 15. Examples

 > $\mathrm{ℜ}\left(x\right)$
 ${\mathrm{\Re }}{}\left({x}\right)$ (1)
 > $\mathrm{ℑ}\left(xy\right)$
 ${\mathrm{\Im }}{}\left({x}{}{y}\right)$ (2)
 > $\mathrm{assume}\left(z,\mathrm{real}\right)$
 > $\mathrm{ℜ}\left(xy+z\right)$
 ${\mathrm{z~}}{+}{\mathrm{\Re }}{}\left({x}{}{y}\right)$ (3)
 > $\mathrm{ℜ}\left(xz\right)$
 ${\mathrm{z~}}{}{\mathrm{\Re }}{}\left({x}\right)$ (4)
 > $\mathrm{ℜ}\left(\mathrm{Pi}+Iⅇ\right)$
 ${\mathrm{\pi }}$ (5)
 > $\mathrm{ℜ}\left(\mathrm{cosh}\left(3+4I\right)\right)$
 ${\mathrm{cosh}}{}\left({3}\right){}{\mathrm{cos}}{}\left({4}\right)$ (6)
 > $\mathrm{ℑ}\left(\mathrm{cosh}\left(3+4I\right)\right)$
 ${\mathrm{sinh}}{}\left({3}\right){}{\mathrm{sin}}{}\left({4}\right)$ (7)
 > $\mathrm{ℑ}\left({ⅇ}^{I}\right)$
 ${\mathrm{sin}}{}\left({1}\right)$ (8)
 > $\mathrm{ln}\left(-1\right)$
 ${I}{}{\mathrm{\pi }}$ (9)
 > $\mathrm{ℑ}\left(\mathrm{ln}\left(-1\right)\right)$
 ${\mathrm{\pi }}$ (10)
 > $\mathrm{ℑ}\left(\mathrm{polar}\left(3,\frac{\mathrm{Pi}}{7}\right)\right)$
 ${3}{}{\mathrm{sin}}{}\left(\frac{{\mathrm{\pi }}}{{7}}\right)$ (11)
 > $\mathrm{ℜ}\left(\mathrm{polar}\left({ⅇ}^{x+4I}\right)\right)$
 ${{ⅇ}}^{{\mathrm{\Re }}{}\left({x}\right)}{}{\mathrm{cos}}{}\left({\mathrm{arg}}{}\left({{ⅇ}}^{{x}{+}{4}{}{I}}\right)\right)$ (12)
 > $\mathrm{evalc}\left(\right)$
 ${{ⅇ}}^{{x}}{}{\mathrm{cos}}{}\left({4}\right)$ (13)