Você está na página 1de 18

Working with Complex Numbers in Mathematica

Copyright Brian G. Higgins (2009)

Introduction
Students are normally introduced to complex numbers in their high school algebra course when they
study the solution of quadratic equation. There they are introduced to the notation = -1 . Most
undergraduate students in engineering do not take a course in complex variable theory, but they continue to be exposed to complex numbers or more generally complex variables during their studies on
Laplace Transforms, ODEs, Fourier Analysis
These notes are an in depth review on complex numbers, and how complex numbers are represented
and manipulated in Mathematica. Although the notes do not cover complex functions per se, they do
discuss the exponential function and the logarithmic function. The idea of principal values, and multiple
values of a complex function are also illustrated.
In Mathematica the function I represents
sented by or . These forms for
iifl,

-1 ; In StandardForm and TraditionalForm

-1 is repre-

-1 can be typed by using the escape key and typing


or jjfl

Thus a complex number is expressed as


z1 = a + b

(1)

where a and b are real numbers, and = -1 . The component a is called the real part of the complex
number z1 , and b is called the imaginary part of z1 . These quantities are denoted by Re Hz1 L, and
Im Hz1 L. If Re Hz1 L = 0, then z1 is a pure imaginary number. The following is a representation of a
complex number in Mathematica:
z1 = 2.34 + 3 I
2.34+ 3

One of the fundamental building blocks (Atoms) in Mathematica is the head Complex. The arguments of
Complex, however, are always numbers. Here is the FullForm expression for a complex number z1 :
z1 FullForm
Complex@2.34`, 3D

Mathematica and Complex Numbers


There are several functions in Mathematica that can be used to manipulate complex numbers To find
the real or imaginary part we use the functions Re and Im
8Re@z1D, Im@z1D<
82.34, 3<

If z1 = a + b, then the complex conjugate of z1 is defined as

ComplexArithmetic.nb

z1 = a - b

(2)

In Mathematica the function Conjugate determines the complex conjugate of a complex number
Conjugate@z1D
2.34- 3

We can also use the complex conjugate to define the real and imaginary parts of a complex number
Re HzL =

1
2

Hz + zL,

Im HzL =

1
2

Hz - zL

(3)

For example
:

Hz1 + Conjugate@z1DL,

2
82.34, 3 + 0. <

1
2

Hz1 - Conjugate@z1DL>

The second part of the computation shows that when Mathematica does complex algebra with approximate numbers, the result is not always what you would expect. We can use the function Chop to
remove residual components of the complex number when it is less than 10-10 .
:

Hz1 + Conjugate@z1DL,

2
82.34, 3<

1
2

Hz1 - Conjugate@z1DL> Chop

The absolute value of a complex number z1 = a + b is defined as


z1

a+ b

a2 + b2

In Mathematica the function Abs determines the absolute value of a complex number
Abs@z1D
3.80468

Note that our definition for the absolute value holds also if b=0, that is if z is a real number
Abs@Re@z1DD
2.34

When a complex number is written in polar form (see below for more details), we can determine the
argument of a complex number using Arg
Arg@z1D
0.90837

Axioms of Complex Numbers


Complex numbers obey the following laws of algebra:
HiL

z1 + z2 = z2 + z1

HCommutative law of additionL

HiiL

z1 + Hz2 + z3 L = Hz1 + z2 L + z3

HAssociative law of additionL

(4)

ComplexArithmetic.nb

HiiiL z1 z2 = z2 z1

HCommutative law of multiplicationL

HivL z1 Hz2 z3 L = Hz1 z2 L z3

HAssociative law of multiplicationL

HivL z1 Hz2 + z3 L = z1 z2 + z1 z3

HDistributive law L

HvL z1 + 0 = z1 , H0 is the identity wrt additionL


HviL z1 * 1 = z1 H1 is the identity wrt multiplicationL
HviiL z + z1 = 0 Hz is the inverse of z1 wrt addition L
HviiiL z1 z = 1 Hz is the inverse of z1 wrt multiplication L
Let us demonstrate a few of these laws using Mathematica Consider the following complex numbers
z1 = 1 + 4;
z2 = 3 + 2;
z3 = - 2 - 4;

Here is an example of property (i)


z1 + z2 z2 + z1
True

Here is an example of property (iii)


z1 z2 z2 z1
True

Here is an example of property (iv)


z1 Hz2 + z3L z1 z2 + z1 z3
True

One can readily test the other properties using Mathematica.

Graphical Representation of Complex Numbers


A complex number z1 = a + b can be viewed as a ordered pair in the Im-Re plane. We can also
represent the complex number as a vector in the Im-Re plane, with its initial point at the origin H0, 0L
and its terminal point at the location Ha, bL.
In the following section we will need to load the following packages
Let us now view the following "vectors" in the complex plane
z1 = 1 + 4;
z2 = 3 + 2;
w1 = z1 + z2;

We can use the graphic primitive Arrow to display these vectors:

ComplexArithmetic.nb

Hvec1 = Graphics@8Red, Arrow@880, 0<, 8Re@z1D, Im@z1D<<D<DL ;


Hvec2 = Graphics@8Magenta, Arrow@88Re@z1D, Im@z1D<, 8Re@w1D, Im@w1D<<D<DL;
Hvec3 = Graphics@8Blue, Arrow@880, 0<, 8Re@w1D, Im@w1D<<D<DL ; Show@vec1, vec2,
vec3, PlotRange 880, 6<, 80, 7<<, Ticks 8Range@0, 5, 1D, Range@0, 7, 1D<,
AspectRatio 1, Axes True, AxesLabel 8"x", "y"<, ImageSize 200D
y
7
6
5
4
3
2
1
x

Polar Form of Complex Numbers


We can also display a complex number z1 = a + b in polar form using the following transformation
x = r cos HqL, y = r sin HqL

(5)

The following plot illustrates the transformation of the complex number w1 = 4 + 6 to polar form
w1 = 4 + 6;
Hvec3 = Graphics@8Blue, Arrow@880, 0<, 8Re@w1D, Im@w1D<<D<DL
Hxcomp = Graphics@8Red, Line@880, 0<, 8Abs@w1D Cos@Arg@w1DD, 0<<D<DL ;
Hycomp = Graphics@8Red, Line@
88Abs@w1D Cos@Arg@w1DD, 0<, 8Abs@w1D Cos@Arg@w1DD, Abs@w1D Sin@Arg@w1DD<<D<DL ;
Hangle = Graphics@Circle@80, 0<, 1.5`, 80, Arg@w1D<DDL ;
Show@vec3, xcomp, ycomp, angle, PlotRange 880, 6<, 80, 7<<,
Ticks 8Range@0, 5, 1D, Range@0, 7, 1D<, AspectRatio 1,
Axes True, AxesLabel 8"x", "y"<, ImageSize 8200, 200<,
Epilog 8Text@"r CosHqL", 83, 0.5`<D, Text@"r SinHqL", 85.2`, 3<D,
Text@"r", 81.5`, 3<D, Text@"q", 80.8`, 0.5`<D<D
y
7
6
5
4
r

r SinHqL

2
1
q
0

where

r CosHqL
x
1

ComplexArithmetic.nb

r=

z1 , q = arg Hz1 L = tan-1

a2 + b2 =

(6)

The variable q is called the amplitude or argument of z1 . In Mathematica the function Arg computes
the argument of z1 and its value lies between -p and p . This is the principal range of z1 , and q is then
the principal value of z1 . Here is another example calculation , using the Mathematica functions Arg,
Abs:
z1 = 2.34 + 3 ;
8Abs@z1D, Arg@z1D, ArcTan@Im@z1D Re@z1DD<
83.80468, 0.90837, 0.90837<

From the plot we can also compute q using sin-1 I br Mor cos-1 I ar M
8Arg@z1D, ArcSin@Im@z1D Abs@z1DD, ArcCos@Re@z1D Abs@z1DD<
80.90837, 0.90837, 0.90837<

These formulas are useful if a = 0 or b = 0.

Euler's Formula and De Moivre's theorem


Suppose we assume an infinite series expansion for x
x = 1 + x +

x2
2!

x3
3!

(7)

holds for x = q, then we have


x = 1 + q -

q2
2!

q3
3!

q4
4!

(8)

Regrouping terms in terms of real and imaginary parts gives


x = 1 -

q2
2!

q4
4!

q6
4!

+ + q-

q3
3!

q5
5

q7
7!

(9)

Thus
x q = Cos HqL + Sin HqL

(10)

Thus if z = x + y be a complex number, then using Euler's formula


z = x+ y = x y = x 8Cos HyL + Sin HyL<

(11)

Also if we write a complex number in polar form, it follows from Euler's formula that
z1 = x + y = r 8Cos HqL + Sin HqL< = r q

(12)

If the complex numbers z1 = a1 + b1 , and z2 = a2 + b2 are expressed in polar form then using
Euler's formula we can write
z1 z2 = r1 r2 8Cos Hq1 + q2 L + Sin Hq1 + q2 L<
(13)

= r1 r2 Hq1 +q2 L
Similarly,

ComplexArithmetic.nb

z1
z2

r1

8Cos Hq1 - q2 L + Sin Hq1 - q2 L<

r2

(14)

r1
r2

Hq1 -q2 L

Equations (13) and (14) can be used to find the nth power of a complex number. Suppose we take
n = 3 , then we can use Euler's formula to write
z31 = r1 q r21 2 q = r31 8Cos H3 qL + Sin H3 qL<

(15)

And if n = -2 we can write (14) as


1

8Cos H-2 q1 L + Sin H-2 q1 L<

(16)

-2
z-2
1 = r1 8Cos H-2 q1 L + Sin H-2 q1 L<

(17)

z21

r21

or
So in general we have for any integer n
zn = rn 8Cos Hn qL + Sin Hn qL<

(18)

Thus if z = Cos HqL + Sin HqL, we have


8Cos H qL + Sin H qL<n = 8Cos Hn qL + Sin Hn qL<
This is called De Moivre's theorem.

Manipulations using De Moivre's Theorem


From the previous section we can show that
zn = rn n q
To show this result let us suppose we have the following complex numbers
z1 = r1 HCos@q1 D + Sin@q1 DL
z2 = r2 HCos@q2 D + Sin@q2 DL
Then the product of these two numbers is
z1 z2 = r1 r2 HCos@q1 D + Sin@q1 DL HCos@q2 D + Sin@q2 DL
Expanding the RHS gives
z1 z2 = r1 r2 HCos@q1 D Cos@q2 D - Sin@q1 D Sin@q2 D + Sin@q1 D Cos@q2 D
+ Sin@q2 D Cos@q1 D<
Regrouping terms we get
z1 z2 = r1 r2 8HCos@q1 D Cos@q2 D - Sin@q1 D Sin@q2 D<
+ 8 Sin@q1 D Cos@q2 D + Sin@q2 D Cos@q1 D<
Then using the trig identities we get
z1 z2 = r1 r2 HCos@q1 + q2 D + Sin@q1 + q2 DL
Now if z1 = z2 , the above reduces to
z2 = r2 HCos@2 qD + Sin@2 qDL
In general we can write

(19)

ComplexArithmetic.nb

zn = rn HCos@n qD + Sin@n qDL


Note we can prove the same result more readily using Euler's formula
q = Cos@qD + Sin@qD
Hence
z 1 = r 1 q1 ,

z2 = r2 q2

so that
z1 z2 = r1 r2 Hq1 +q2 M
and if z1 = z2 , we get
z2 = r2 2 q
or in general
zn = rn n q

Roots of Complex numbers


Background: Simple example
Suppose we have a complex number z. Then a number w is called the nth root of a complex number if
wn = z
and we write the result as
w = z1n
Now using De Moivre's theorem we can write
z1n = @r HCos@qD + Sin@qDLD1n
Consider a simple example
zn = 1
Let us represent the RHS of this equation as a complex number in polar form
1 = Cos@qD + Sin@qD, where q = 0
Because Cos and Sin have periodicity 2p, we can also write Eq. (40) as
1 = Cos@q + 2 p kD + Sin@q + 2 p kD, where q = 0, k = 0, 1, 2,
1 = Cos@2 p kD + Sin@2 p kD, k = 0, 1, 2,
Thus
zn = Cos@2 p kD + Sin@2 p kD, k = 0, 1, 2,
Now we use De Moivre's theorem ( see Eq. (30)) to write
z = HCos@2 p kD + Sin@2 p kDL1n
= CosB
Let us take n=3. Then

2pk
n

F + SinB

2pk
n

F , k = 0, 1, 2,

ComplexArithmetic.nb

z = CosB

2pk
3

F + SinB

2pk
3

F , k = 0, 1, 2,

For various values of k 5 we get


k = 0:

z = Cos@0D + Sin@0D = 1

k = 1:

z = CosB

k = 2:

z = CosB

k = 3:

z = CosB

k = 4:

z = z = CosB

k = 5:

z = z = CosB

2p

F + SinB

4p

F + SinB

3
6p

F + SinB

8p
3

2p
3

4p
3
6p
3

F + SinB

10 p
3

F=-

F=-

1
2
1
2

2
3

F=1

8p

F + SinB

F=-

10 p
3

1
2

F=-

1
2

3
2

It is apparent that after k=2, the roots are repeated, and the same repeatablity of roots occurs if we take
negative values. Thus the unique values are given by k = 0, 1, 2, 3, , n - 1.
Consequently, the n roots of zn = 1 are
z = CosB

2pk
n

F + SinB

2pk
n

F , k = 0, 1, 2, , n - 1

General Analysis
A number w is called the nth root of a complex number if wn = z. We can use the results from the
previous section to determine a formula for finding w. Let us the polar form to write
wn = rn 8Cos Hn fL + Sin Hn fL< = r 8Cos HqL + Sin HqL< = z

(20)

We can use this expression to deduce


r = r1n , Cos Hn fL = Cos HqL, Sin Hn fL = Sin HqL

(21)

The trig expressions are equal if


n f = q+2 k p ,

for k an integer

(22)

Solving for f gives


f=

q+2 k p
n

(23)

, k = 0, 1, 2, , n - 1

Note the values of f are repeated for k n as Sin and Cos are 2p periodic. Thus the nth root of a
complex number z = r q (z > 0)is
z1n = r1n :Cos

q+2 k p
n

+ Sin

q+2 k p
n

>, k = 0, 1, 2, , n - 1

(24)

ComplexArithmetic.nb

Consider the following example. Suppose we have the equation z8 = 1, then the roots are
z = Cos

2kp

2kp

+ Sin

, k = 0, 1, 2, , 7

W can use Mathematica to compute these roots :


roots = TableBCosB

2kp

F + SinB

2kp

F, 8k, 0, 7<F N
8
8
81., 0.707107+ 0.707107 , 0.+ 1. , - 0.707107 + 0.707107 ,
- 1., - 0.707107 - 0.707107 , 0.- 1. , 0.707107- 0.707107 <

We can rearrange these roots as ordered pairs in the complex plane using the following rules
orderedPairs = roots . x_Real 8x, 0< . Complex@x_, y_D 8x, y<
881., 0<, 80.707107, 0.707107<, 80., 1.<, 8- 0.707107, 0.707107<,
8- 1., 0<, 8- 0.707107, - 0.707107<, 80., - 1.<, 80.707107, - 0.707107<<

Here is a plot of the roots displayed as ordered pairs in the complex plane
ListPlot@orderedPairs, PlotStyle 8Blue, PointSize@LargeD<,
AspectRatio 1, AxesLabel 8"x", "y"<D
y
1.0

0.5

-1.0

-0.5

0.5

1.0

-0.5

-1.0

Example Calculation
In this example we will find the roots of
z3 = 8
First we write the RHS of Eq. (47) as a complex number in polar form
8 8 HCos@0 + 2 p kD + Sin@0 + 2 p kDL, k = 1, 2,
so that

(25)

10

ComplexArithmetic.nb

z3 = 8 Cos@0 + 2 p kD + Sin@0 + 2 p kD, k = 1, 2,


Then we use De Moivre's theorem to write
z = 813 HCos@0 + 2 p kD + Sin@0 + 2 p kDL13 , k = 1, 2,
= 2 CosB

2pk
3

F + SinB

2pk
3

F , k = 0, 1, 2

Thus the roots are


k = 0 : z = 2 HCos@0D + Sin@0DL = 2

k = 1 : z = 2 CosB

k = 2 : z = 2 CosB

2p

F + SinB

3
4p

F + SinB

2p
3
4p
3

F =2 -

F =2 -

1
2
1
2

3
2
3
2

In summary the roots are


z1 = 2, z2 = -1 +

3 , z3 = -1 -

Note that the complex roots appear as a complex conjuagte pair! Let see what Mathematica produces
z . SolveAz3 8E
92, - 1 -

3 , -1 +

3=

As an aside note, we can also write the complex roots as


z2 = 2 H-1L23 , z3 = -2 H-1L13
This follows because
H-1L23 = HCos@pD + Sin@pDL23
= CosB

2 p + 2 pk
3

F + SinB

2 p + 2 pk
3

F, k = 0, 1, 2

Let us take the Principal Value k=0:


H-1L23 = CosB

=-

1
2

2p
3

F + SinB

2p
3

3
2

Thus
z2 = 2 H-1L23 = -1 +

Consider next the quantity


H-1L13 = HCos@pD + Sin@pDL13
= CosB

p + 2 pk
3

F + SinB

p + 2 pk
3

F, k = 0, 1, 2

ComplexArithmetic.nb

11

Again we take the principal value to get


p
p
H-1L13 = CosB F + SinB F
3
3
=

1
2

3
2

Thus
z3 = -2 H-1L13 = -1 -

In summary we can write the roots of z3 = 8 as


z1 = 2, z2 = -1 +

3 , z3 = -1 -

or
z1 = 2, z2 = 2 H-1L23 , z3 = -2 H-1L13

Periodicity of the Exponential Function


Recall that
2 p = Cos H2 pL + Sin H2 pL = 1

(26)

Thus for a complex number z we can write the complex exponential function as
z = z+2 p = z 2 p = z

(27)

The above assertion is confirmed with Mathematica .


z1 = 2.34 + 3 ;
z1 == z1+2 p N
True

Thus it follows that the exponential function f HzL = z is periodic, with period 2p
f HzL = f Hz + 2 p L

(28)

Hence for any point z = x + y in the infinite horizontal strip -p < y < p of width 2 p, the function
f HzL = f Hz + n p L, where n = 0, 1, 2, etc. The strip -p < y < p is called the fundamental
region for the exponential function. Within this region the exponential function is single valued.

Logarithmic Function
Let z = w be the exponential of a complex number w. Then the inverse of the exponential function is
defined as the logarithm of a complex variable z , i.e.,
w = Log HzL, where z = w

(29)

Note that Log(z) is not defined at z = 0, as w > 0 for all values of w. In polar form Log(z) can be
expressed as
Log HzL = Log Ir q M = Log HrL + Hq + 2 n pL, n = 0, 1, 2, ,

(30)

We have used the fact that Hq+2 n pL = q , for n = 0, 1, 2, , where r = | z |, and q = arg (z).
The above results show that the logarithm of a complex number is multivalued. Let us consider the
following example. Let

12

ComplexArithmetic.nb

z = x + y = -2 = r 8Cos HqL + Sin HqL<

(31)

By inspection we find r = 2, and q = p. ( Note we can compute q using q = Cos-1 H-2 2L). Here are
some of the multiple values of Log(-2)
Table@Log@2D + Hp + 2 n pL, 8n, 0, 3<D N
80.693147+ 3.14159 , 0.693147+ 9.42478 , 0.693147+ 15.708 , 0.693147+ 21.9911 <

Consider next the example Log[2]. Then r = 2, and q = Cos-1 H2 2L = 0 and from (31) the multiple
values of Log[2] are
Table@Log@2D + H0 + 2 n pL, 8n, 0, 3<D N
80.693147, 0.693147+ 6.28319 , 0.693147+ 12.5664 , 0.693147+ 18.8496 <

It is customary to choose n = 0 as the principal value for the logarithm of a complex number. In this way
if z is real we get the same value as the logarithm of a real number. Thus the principal value of Log[z] is
Log HzL = Log H z L + Arg HzL = Log HrL + q

(32)

Mathematica automatically computes the principal value of Log HzL as seen below
z1 = 2.34 + 3 ;
8Log@z1D, Log@2.D, Log@- 2.D<
81.33623+ 0.90837 , 0.693147, 0.693147+ 3.14159 <

Note the last result follows from Eq. (31): -2 = r {Cos (q) + Sin (q)} fl r = 2 and q = p; hence
Log@-2D = Log@2D + p

Multiple-valued Functions and Branch Lines


In the previous section we showed that the logarithm of a complex number is multiple valued. We can
extend these ideas to functions. Suppose we write f HzL = Log HzL where z is a complex variable that
can take on all possible values in the complex plane, except 0; then we can think of f HzL a collection
of functions (infinite in extent) that have multiple values. Each function within our collection is called a
branch of f(z).
In the complex plane the negative real axis defines the branch cut for the logarithmic function. Along
this axis Arg(z) is discontinuous. We can demonstrate this by considering 2 points Hz1 , z2 L that
approach the negative real axis, one from the upper half-plane Im Hz1 L > 0 and the other from below
Im Hz2 L < 0; for convenience take z1 = -2 + 0.001 and z2 = -2 - 0.001. then
z1 = - 2 + 0.001 ; z2 = - 2 - 0.001 ;
8Log@z1D, Log@z2D<
80.693147+ 3.14109 , 0.693147- 3.14109 <

Thus Arg Hz1 L approaches q1 = p from above and Arg Hz2 Lapproaches q2 = -p from below.
z3 = 2 + 0.0001 ; z4 = 2 - 0.0001 ;
8Log@z3D, Log@z4D<
80.693147+ 0.00005 , 0.693147- 0.00005 <

Here is a plot that demonstrates the limiting process for Arg(z) as z1 , z2 approach the negative real
axis.

ComplexArithmetic.nb

13

Plot@Evaluate@8Arg@- 2 + yD, Arg@- 2 - yD< . y zD, 8z, 0, 1<,


PlotStyle 8RGBColor@0, 0, 1D, RGBColor@1, 0, 0D<, AxesLabel 8"y", "q1 ,q2 "<D
q1 ,q2
3

1
y
0.2

0.4

0.6

0.8

1.0

-1

-2

-3

Here is a similar plot that demonstrates the limiting process for Arg(z) as z1 , z2 approach the positive
real axis.
Plot@Evaluate@8Arg@2 + yD, Arg@2 - yD< . y zD, 8z, 0, 1<,
PlotStyle 8RGBColor@0, 0, 1D, RGBColor@1, 0, 0D<, AxesLabel 8"y", "q1 ,q2 "<D
q1 ,q2
0.4

0.2

y
0.2

0.4

0.6

0.8

1.0

-0.2

-0.4

Complex Powers of a Complex Number


For real numbers a we have the identity
xa = a Log HxL

(33)

We can extend this idea to complex numbers a when z=x+y


za = a Log HzL , where z 0

(34)

Now since Log(x) has multiple values, then so does za


For the purpose of this discussion we will consider the following function
w = z2 = 2 Log HzL = 2 8 Log HrL+ Hq+2 n pL<
(35)
2

=r

Hq+2 n pL

Since z is a single value, we must have n = 0. Thus if a is a integer (35) is given by the principal
value of Log(z).
2

14

ComplexArithmetic.nb

Since z2 is a single value, we must have n = 0. Thus if a is a integer (35) is given by the principal
value of Log(z).
In our next example we take a=1/2, and z = 24 + 36. In this case Arg HzL = q = tan-1 H36 24L.
Thus (35) becomes
w = z12 = H24 + 36L12 = r12

q +2 n p
2

(36)

The 2 roots are then


w1 = r12

I M
2

, w2 = r12

q+2 p
2

(37)

, with n = 1

In the following we use Mathematica's Solve function to determine the 2 roots


z = 24 + 36;
w . SolveAw2 z, wE N
8- 5.79942 - 3.10376 , 5.79942+ 3.10376 <

Of course the roots of w2 = z can also be determined using the polar form of a complex number. In
polar form we can write
w = r12 :Cos

q + 2 kp
2

+ Sin

q+2 k p
2

>, k = 0, 1

(38)

Thus the coordinates of the root corresponding to k=0 are


w1 = r12 :Cos

q
2

+ Sin

q
2

>, k = 0

where q = Tan-1 I 36
M = 56.3099 so that q1 =
24

q
2

(39)

= 28.15, and r = 12

13 so that r12 = 6.577.

In a similar manner we can determine the second root for k=2


w2 = r12 :Cos
where q2 =

q +2 p
.
2

q+2 p
2

+ Sin

q+2 p
2

>, k = 1

(40)

A plot displaying these quantities is given below

The Mathematica code below computes these roots


z = 24 + 36;
9Abs@zD12 Arg@zD2 , Abs@zD12 HArg@zD+2 pL2 = N
85.79942+ 3.10376 , - 5.79942 - 3.10376 <

Let us now investigate the multivalued properties of the function w2 = z. In the following plot we show a
plot of the complex number z = x + y = 24 + 26 in the z-plane

ComplexArithmetic.nb

z = 24 + 36;
vec3 =
Graphics@8Blue, Arrow@880, 0<, 8Abs@zD Cos@Arg@zDD, Abs@zD Sin@Arg@zDD<<D<D;
path = Graphics@8Red, Circle@80, 0<, Abs@zD, 80, 2 p<D<D;
angle1 = Graphics@Circle@80, 0<, 20, 80, Arg@zD<DD;
plt2 = Show@vec3, path, angle1,
AspectRatio 1, Axes True, AxesLabel 8"x", "y"<, ImageSize 8200, 200<,
PlotLabel -> "z plane\n", Epilog 8Text@"P", 825, 40<D, Text@"q", 810, 6<D<D
z plane
y
40

20
q
-40

-20

20

40

-20

-40

If we think of z as a function, then for fixed r, the function z maps the point P onto the red circle, for
different values of arg(z). In the next plot we show the two roots of w2 = z in the w-plane, where
wi = ui + vi . We can think of w = z12 as a mapping that takes any point in the z-plane and maps it
into the w-plane. We will show that this mapping is not one-to-one.

15

16

ComplexArithmetic.nb

Hz = 24 + 36;L vec3 = GraphicsB:Blue, ArrowB


:80, 0<, :

Abs@zD CosB

:Blue, ArrowB:80, 0<, :

Arg@zD
2

F,

Abs@zD CosB

Abs@zD SinB
Arg@zD
2

+ pF,

Arg@zD
2

F>>F>F ; vec4 = GraphicsB

Abs@zD SinB

Jpath = GraphicsB:Red, Dashing@80.03`, 0.03`<D, CircleB80, 0<,

Arg@zD
2

+ pF>>F>F ;

Abs@zD , 80, 2 p<F>FN ;

HbranchLine = Graphics@8Red, Thickness@0.02`D, Arrow@880, 0<, 87.5`, 0<<D<DL


Arg@zD
angle1 = GraphicsBCircleB80, 0<, 4.5`, :0,
>FF ;
2
Arg@zD
angle2 = GraphicsBCircleB80, 0<, 5, :0,
+ p>FF ;
2
Hplt1 = Show@vec3, vec4, path, angle1, branchLine, Axes True, AspectRatio 1,
AxesLabel 8"u", "v"<, PlotLabel "w plane\n", ImageSize 8200, 200<,
PlotRange 88- 8, 8<, 8- 8, 8<<, Epilog 8Text@"P'= w1 ", 86, 3.5`<D,
Text@"P'=w2 ", 8- 6.`, - 3.5`<D, Text@"q1 L", 83, 0.8`<D<DL
w plane
v

5
P= w1
q1 L

-5

P=w2
-5

The above plots show that the point P in the z-plane is mapped into the point w1 in the w-plane, where
w1 given by
r q2 =

w1 = z12 =

r q1 ,

with q1 = 28.15

(41)

If we allow the point P in the z-plane to make a complete circuit (counterclockwise) about the origin,
then q' = q + 2 p and the point P in the z-plane is now mapped into the point w2 in the w-plane,
where w2 is given by
w2 =

q+2p
2

r q2 . with q2 = 208.15

(42)

If we allow the point P in the z-plane to make two complete circuits (counterclockwise) about the origin,
then q'' = q + 4 p and the point P in the z-plane is now mapped back into point w1 in the w-plane since
w3 =

q+4p
2

r q1 +2p =

r q1 = w1 , with q1 = 28.15

(43)

where we have used the fact that 2 p = 1. If the point P makes 3 complete circuits about the origin,
the point P is mapped back into w2 in the w-plane. Thus we say w = z12 is a two-valued function of z,
or w is a collection of two single-valued functions of z, called branches. If we restrict q to be in the range
0 q < 2 p, then w = z12 is single-valued, and we call this the principal branch of the function w. The
principal range of q is 0 q < 2 p .
In the plot above we show the branch cut as the positive real axis. The point z = 0, defines the branch
point.

ComplexArithmetic.nb

17

In the plot above we show the branch cut as the positive real axis. The point z = 0, defines the branch
point.

Example: Principal Values


In Mathematica one must take care to ensure that when we attempt to determine roots involving polynomial equations, we do not implicitly assume that a variable is real. Consider the following equation
Iz2 - 5M

23

(44)

= 16

Let us attempt to determine the solution to Eq. (44) by hand. If we let w = z2 - 5, then w = 1632 . Thus
w = 64, Solving for z we get:
Case(i) If w = 64, then z2 - 5 = 64, which implies that
z=

69

Case(ii) If w = -64, then z2 - 5 = -64,which implies that


z =

59
2

We get the same result if we apply Solve when we write our equation Iz2 - 5M == 163
Remove@zD;
2

sol = SolveBIz2 - 5M == 163 F


99z -

59 =, 9z

59 =, 9z -

69 =, 9z

69 ==

The numerical values of the above solution are


sol N
88z 0.- 7.68115 <, 8z 0.+ 7.68115 <, 8z - 8.30662<, 8z 8.30662<<

Now let us take these solutions and see if they satisfy the equation
2

SimplifyBIz2 - 5M - 163 . solF


80, 0, 0, 0<

Now suppose we attempt to solve Eq. (44) by expressing the equation in the form
Iz2 - 5M

23

= 16

(45)

Let us apply the solution we found previously to this form of the equation. We see that not all solutions
satisfy Eq. (45)
SimplifyBIz2 - 5M

23

- 16 . solF

916 I- 1 + H- 1L23 M, 16 I- 1 + H- 1L23 M, 0, 0=

The above calculation shows that the solutions z = 59 do not satisfy the equation in its original
form, as it requires H-1L23 == 1, which cannot be true. These are called parasitic solutions of Eq.
(45). We can always force Mathematica to find parasitic solutions by using the option VerifySolutions>False in Solve:

18

ComplexArithmetic.nb

sol = SolveBIz2 - 5M
99z -

69 =, 9z

23

16, z, VerifySolutions FalseF

69 ==

On the other hand, if we set the option VerifySolutionsTrue (default value) we get the appropriate
solutions
sol = SolveBIz2 - 5M
99z -

69 =, 9z

23

16, zF

69 ==

We can readily see what the problem is. If z > 5, then z2 - 5 > 0, so that we have w23 = 16.We
can solve this equation to find two real roots. However, if z > 5, then z2 - 5 < 0 and when this
negative quantity is raised to a fractional power, we get a complex number, which is inconsistent with
the RHS of Eqn.(46). Suppose z = - 59 (this is one of the parasitic roots) so that z2 - 5 = -64.
Then the LHS of Eqn.(46) evaluates to
LHS = JIz2 - 5M . z -

59 N

23

- 8. + 13.8564

Thus Iz2 - 5M

23

is a complex number and therefore can never equal the RHS of Eqn(46), even though

the modulus of this quantity is equal to the RHS .


Abs@LHSD N
16.

References
These notes were compiled from a number of sources. The following were most helpful

1. Murray R. Spiegel, Complex Variables, McGraw-Hill,1964


2. David I. Steinberg, Computational Matrix Algebra, McGraw-Hill, New York, 1974
3. Dennis G. Zill and Michael R. Cullen, Advanced Engineering Mathematics, PWS-KENT,
Boston, MA, 1992
4. John W. Dettman, Applied Complex Variables, Dover Publications, 1965

Você também pode gostar