Arithmetic - Maple Help

ComplexBox

 Arithmetic
 arithmetic for ComplexBox objects
 +
 compute a sum involving ComplexBox objects
 *
 compute a product involving ComplexBox objects
 ^
 compute a power involving ComplexBox objects
 -
 compute the negative of ComplexBox object
 /
 compute the reciprocal of ComplexBox object
 conjugate
 compute the conjugate of ComplexBox object
 root
 compute a root of ComplexBox object

 Calling Sequence -b 1/b b1 + b2 b1 * b2 b1 ^ b2 b1 ^ z conjugate( b ) root( b, n )

Parameters

 b - ComplexBox object b1 - ComplexBox object b2 - ComplexBox object z - extended complex numeric value n - non-negative integer

Description

 • The arithmetic operators $\mathrm{+}$, $\mathrm{*}$, $\mathrm{^}$, $\mathrm{-}$ and $\mathrm{/}$ are available as methods for ComplexBox objects.

 Operation Description -b unary negation 1/b unary inversion b1 + b2 addition b1 * b2 multiplication b1 ^ b2 exponentiation b1 ^ z exponentiation conjugate( b ) conjugation root( b, n ) $n$-th root

 • Addition (+) and multiplication (*) are $n$-ary operators that support more than two operands. The operators of negation (-) and inversion (/) are unary. The non-associative exponentiation operator (^) is binary.
 • The conjugate of a ComplexBox object b can be computed by using the conjugate( b ) command.
 • To compute roots of a ComplexBox object b, use the root( b, n ) command.

Examples

 > $-\mathrm{ComplexBox}\left(2.3+5.7I\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[-2.3 +/- 2.32831e-10]}}{+}{\text{[-5.7 +/- 4.65661e-10]}}{\cdot }{I}{⟩}$ (1)
 > $\mathrm{ComplexBox}\left(2.3+5.7I\right)+\mathrm{ComplexBox}\left(1.1-0.321I\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[3.4 +/- 5.82077e-10]}}{+}{\text{[5.379 +/- 4.94765e-10]}}{\cdot }{I}{⟩}$ (2)
 > $\mathrm{ComplexBox}\left(2.3+5.7I\right)-\mathrm{ComplexBox}\left(1.1-0.321I\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[1.2 +/- 3.49246e-10]}}{+}{\text{[6.021 +/- 4.94765e-10]}}{\cdot }{I}{⟩}$ (3)
 > $\mathrm{ComplexBox}\left(2.3+5.7I\right)\mathrm{ComplexBox}\left(1.1-0.321I\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[4.3597 +/- 1.3049e-09]}}{+}{\text{[5.5317 +/- 1.78313e-09]}}{\cdot }{I}{⟩}$ (4)
 > $\frac{\mathrm{ComplexBox}\left(2.3+5.7I\right)}{\mathrm{ComplexBox}\left(1.1-0.321I\right)}$
 ${⟨}{\text{ComplexBox:}}{\text{[0.533342 +/- 1.40432e-09]}}{+}{\text{[5.33746 +/- 2.33351e-09]}}{\cdot }{I}{⟩}$ (5)
 > ${\mathrm{ComplexBox}\left(2.3+5.7I\right)}^{\mathrm{ComplexBox}\left(1.1-0.321I\right)}$
 ${⟨}{\text{ComplexBox:}}{\text{[8.0897 +/- 1.24388e-08]}}{+}{\text{[7.13964 +/- 1.16935e-08]}}{\cdot }{I}{⟩}$ (6)
 > $\mathrm{conjugate}\left(\mathrm{ComplexBox}\left(2.3+5.7I\right)\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[2.3 +/- 2.32831e-10]}}{+}{\text{[-5.7 +/- 4.65661e-10]}}{\cdot }{I}{⟩}$ (7)
 > $p≔2x$
 ${p}{≔}{2}{}{x}$ (8)
 > $\mathrm{eval}\left(p,x=\mathrm{ComplexBox}\left(2.3+5.7I\right)\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[4.6 +/- 4.65661e-10]}}{+}{\text{[11.4 +/- 9.31323e-10]}}{\cdot }{I}{⟩}$ (9)
 > $p≔2{x}^{2}$
 ${p}{≔}{2}{}{{x}}^{{2}}$ (10)
 > $\mathrm{eval}\left(p,x=\mathrm{ComplexBox}\left(2.3+5.7I\right)\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[-54.4 +/- 1.64844e-08]}}{+}{\text{[52.44 +/- 1.33179e-08]}}{\cdot }{I}{⟩}$ (11)
 > $p≔2{x}^{2}-x$
 ${p}{≔}{2}{}{{x}}^{{2}}{-}{x}$ (12)
 > $\mathrm{eval}\left(p,x=\mathrm{ComplexBox}\left(2.3+5.7I\right)\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[-56.7 +/- 2.04425e-08]}}{+}{\text{[46.74 +/- 1.75089e-08]}}{\cdot }{I}{⟩}$ (13)
 > $p≔2{x}^{2}-3x$
 ${p}{≔}{2}{}{{x}}^{{2}}{-}{3}{}{x}$ (14)
 > $\mathrm{eval}\left(p,x=\mathrm{ComplexBox}\left(2.3+5.7I\right)\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[-61.3 +/- 2.13739e-08]}}{+}{\text{[35.34 +/- 2.03028e-08]}}{\cdot }{I}{⟩}$ (15)
 > $p≔\mathrm{randpoly}\left(x\right):$
 > $\mathrm{eval}\left(p,x=\mathrm{ComplexBox}\left(2.3+5.7I\right)\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[-42241.5 +/- 9.30244e-05]}}{+}{\text{[-7262.81 +/- 6.90875e-05]}}{\cdot }{I}{⟩}$ (16)
 > $q≔\mathrm{randpoly}\left(\left[x,y\right],'\mathrm{degree}'=30,'\mathrm{dense}'\right):$
 > $\mathrm{eval}\left(\frac{{p}^{3}}{q},\left[x=\mathrm{ComplexBox}\left(1.1-0.321I\right),y=\mathrm{ComplexBox}\left(2.3+5.7I\right)\right]\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[7.65384e-20 +/- 6.73062e-27]}}{+}{\text{[1.23419e-20 +/- 6.81317e-27]}}{\cdot }{I}{⟩}$ (17)
 > $\mathrm{root}\left(\mathrm{ComplexBox}\left(2.3+5.7I\right),2\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[2.05506 +/- 1.09856e-10]}}{+}{\text{[1.38682 +/- 3.03849e-10]}}{\cdot }{I}{⟩}$ (18)
 > $\mathrm{root}\left(\mathrm{ComplexBox}\left(2.3+5.7I\right),3\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[1.69021 +/- 4.06526e-10]}}{+}{\text{[0.706168 +/- 2.22582e-10]}}{\cdot }{I}{⟩}$ (19)
 > $\mathrm{root}\left(\mathrm{ComplexBox}\left(2.3+5.7I\right),10\right)$
 ${⟨}{\text{ComplexBox:}}{\text{[1.19068 +/- 3.15463e-10]}}{+}{\text{[0.142034 +/- 4.78971e-11]}}{\cdot }{I}{⟩}$ (20)

Compatibility

 • The ComplexBox[Arithmetic], ComplexBox:-+, ComplexBox:-*, ComplexBox:-^, ComplexBox:--, ComplexBox:-/, ComplexBox:-conjugate and ComplexBox:-root commands were introduced in Maple 2022.