Arithmetic Operators in the Natural Units Environment - Maple Programming Help

Home : Support : Online Help : Science and Engineering : Units : Environments : Natural : Units/Natural/arithop

Arithmetic Operators in the Natural Units Environment

Description

 • In the Natural Units environment, the arithmetic operators (+, -, *, /, and ^) are modified so that they perform the necessary operations on expressions with units.
 • Given units $x$ and $y$, the properties of the five arithmetic operators are:

$\left(ax\right)+\left(bx\right)\to \left(a+b\right)[x]$

$\left(ax\right)+\left(by\right)\to \left(a\mathrm{za}+b\mathrm{zb}\right)[z]$

$-\left(ax\right)\to \left(-a\right)[x]$

$\left(ax\right)\left(bx\right)\to \left(ab\right)\mathrm{z0}[z]$

$\frac{1}{ax}\to \frac{1}{a}[\frac{1}{x}]$

${\left(ax\right)}^{r}\to {a}^{r}[{x}^{r}]$

${a}^{b}\to {a}^{b}$

 where $r$ is a rational number; $z$ is an appropriate unit from the given system; and $\mathrm{za}$, $\mathrm{zb}$, and $\mathrm{z0}$ are appropriate multipliers.

Examples

Note: In Maple 2015 and later versions, units are not surrounded by double brackets.

 > $\mathrm{with}\left(\mathrm{Units}[\mathrm{Natural}]\right):$
 > $3m+7\mathrm{ft}$
 $\frac{{6417}}{{1250}}{}⟦{m}⟧$ (1)
 > $\frac{3\mathrm{cm}\cdot 7g}{{s}^{2}}$
 $\frac{{21}}{{100000}}{}⟦{N}⟧$ (2)
 > $-32m$
 ${-}{32}{}⟦{m}⟧$ (3)
 > $\frac{1}{32S}$
 $\frac{{1}}{{32}}{}⟦{\mathrm{\Omega }}⟧$ (4)
 > ${\left(3m\right)}^{2}$
 ${9}{}⟦{{m}}^{{2}}⟧$ (5)
 > ${4}^{x}$
 ${{4}}^{{x}}$ (6)