
Re - real part of an expression

Calling sequence:
Re(expr)

Parameter:

expr   --  expression

Overloading:

All

Summary:

Re returns the real part of any expression. For this the method "Re" from
the domain of expr is used. If this domain does not contain such a method
then this function returns the expression Re(expr).

Exceptions are expressions of the type DOM_INT, DOM_RAT, DOM_FLOAT, DOM_COMPLEX
and DOM_EXPR which are directly processed by the function Re.

For expressions of the type DOM_EXPR the determination of the real part of an
expression can be defined under the function attribute "Re" in the form of
a procedure or function. If the operator of expr has such an attribute then
the procedure or function under the entry of the attribute "Re" is called with
the operands of the argument expr and the result is returned.

If such a function attribute is not defined and the operator of expr is one
of the function environments _plus, _mult or _power, then this is directly
processed by the function Re and the result is returned. In other cases the
expression Re(expr) is returned.

Use the function rectform  if you have unknowns which represent real or
complex quantifiers (see examples below).

>>  Re( -5*sin(1+2*I) );

      -5 sin(1) cosh(2)

>>  Re( u+v*I );

      - Im(v) + Re(u)

>>  rectform( tan(x+I*y),{x,y} );

          sin(2 x)            I sinh(2 y)
      -------------------- + --------------------
      cos(2 x) + cosh(2 y)   cos(2 x) + cosh(2 y)

>>  Re( % );

            sin(2 x)
      --------------------
      cos(2 x) + cosh(2 y)

See also:  conjugate , funcattr , Im, rectform

