RealDomain - Maple Help

Overview of the RealDomain Package

Description

 • By default, Maple performs computations under the assumption that the underlying number system is the complex field. The RealDomain package provides an environment in which computations are performed under the assumption that the basic underlying number system is the field of real numbers.
 • Each command in the RealDomain package can be accessed by using either the long form or the short form of the command name in the command calling sequence.
 Because the underlying implementation of the RealDomain package is a module, it is also possible to use the form RealDomain:-command to access a command from the package. For more information,  see Module Members.
 To create a RealDomain environment, use the use RealDomain in ... end syntax.
 • All the exports of this package shadow the global Maple procedures of the same name. For example, RealDomain[sqrt] shadows the global sqrt procedure. The package exports all differ uniformly from the global procedures they shadow.
 1 The arguments to a procedure P are preprocessed by replacing any calls to procedures exported by RealDomain with calls to the shadowed global procedure.
 2 The procedure call is evaluated with the assumption that all unassigned symbols in the input are real. In addition, the environment variable _EnvSolveOverReals is set to true and a special numeric event handler is installed for the real_to_complex event.
 3 Results returned by procedures are postprocessed by discarding values containing any detectable non-real answers or replacing them with undefined where appropriate.
 • Within the environment of a use statement, or after issuing the command with(RealDomain);, the global (default) procedures shadowed by the procedures exported by the RealDomain package can still be accessed using the $:-$ prefix. For example, access the default sin procedure using :-sin.
 • The RealDomain package is not compatible with the use of the assume facility.
 • Only expressions involving commands and operators exported by this package are expected to be free of complex values. For example, integration (which goes beyond precalculus mathematics) is not expected to yield only real-values answers.

List of RealDomain Package Commands

 • A limited number of Maple procedures are shadowed in this package. The scope of the package is intended to cover basic precalculus mathematics along with a number of routines that may be used in symbolic manipulations of expressions and formulae encountered at that level. The following is a list of available commands in this package.

Examples

 > $\mathrm{simplify}\left(\mathrm{sqrt}\left({x}^{2}\right)\right)$
 ${\mathrm{csgn}}{}\left({x}\right){}{x}$ (1)
 > $\mathbf{use}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{RealDomain}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{in}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{simplify}\left(\sqrt{{x}^{2}}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{end use}$
 $\left|{x}\right|$ (2)
 > ${\left(-8\right)}^{\frac{1}{3}}$
 ${\left({-8}\right)}^{{1}}{{3}}}$ (3)
 > $\mathbf{use}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{RealDomain}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{in}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\left(-8\right)}^{\frac{1}{3}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{end use}$
 ${-2}$ (4)
 > $\mathrm{with}\left(\mathrm{RealDomain}\right)$
 $\left[{\mathrm{\Im }}{,}{\mathrm{\Re }}{,}{\mathrm{^}}{,}{\mathrm{arccos}}{,}{\mathrm{arccosh}}{,}{\mathrm{arccot}}{,}{\mathrm{arccoth}}{,}{\mathrm{arccsc}}{,}{\mathrm{arccsch}}{,}{\mathrm{arcsec}}{,}{\mathrm{arcsech}}{,}{\mathrm{arcsin}}{,}{\mathrm{arcsinh}}{,}{\mathrm{arctan}}{,}{\mathrm{arctanh}}{,}{\mathrm{cos}}{,}{\mathrm{cosh}}{,}{\mathrm{cot}}{,}{\mathrm{coth}}{,}{\mathrm{csc}}{,}{\mathrm{csch}}{,}{\mathrm{eval}}{,}{\mathrm{exp}}{,}{\mathrm{expand}}{,}{\mathrm{limit}}{,}{\mathrm{ln}}{,}{\mathrm{log}}{,}{\mathrm{sec}}{,}{\mathrm{sech}}{,}{\mathrm{signum}}{,}{\mathrm{simplify}}{,}{\mathrm{sin}}{,}{\mathrm{sinh}}{,}{\mathrm{solve}}{,}{\mathrm{sqrt}}{,}{\mathrm{surd}}{,}{\mathrm{tan}}{,}{\mathrm{tanh}}\right]$ (5)
 > $:-\mathrm{eval}\left(\mathrm{arcsin}\left(\mathrm{cosh}\left(x\right)\right),x=\frac{\mathrm{\pi }}{2}\right)$
 $\frac{{\mathrm{\pi }}}{{2}}{-}\frac{{I}{}{\mathrm{\pi }}}{{2}}$ (6)
 > $\mathrm{eval}\left(:-\mathrm{arcsin}\left(:-\mathrm{cosh}\left(x\right)\right),x=\frac{\mathrm{\pi }}{2}\right)$
 ${\mathrm{undefined}}$ (7)
 > ${\left(-1\right)}^{\frac{1}{3}}$
 ${-1}$ (8)
 > ${\left(-8\right)}^{\frac{1}{3}}$
 ${-2}$ (9)
 > $\mathrm{ln}\left(-1\right)$
 ${\mathrm{undefined}}$ (10)
 > $\mathrm{ln}\left(-2.3\right)$
 ${Float}{}\left({\mathrm{undefined}}\right)$ (11)