Math 125, Fall 2005 N. Kerzman COMPLEX NUMBERS. ROOTS AND LOGARITHMS. A ROAD MAP INVOLVING MATLAB. We assume some familiarity with the most elementary properties of complex numbers. Reference. Analysis. 1. Saff and Snider, Fundamentals of Complex A good undergraduate textbook. THE BASICS . z=x+iy is a complex number, e.g., z=1+i. In MatLab you enter z just like that: >> z=1+i z = 1.0000 + 1.0000i >> z=1+2i z = 1.0000 + 2.0000i The geometric picture is as follows: The modulus of z is z x 2 y 2 , e.g., 1 i 2 . In MatLab notation, abs(z) returns z , and angle(z) returns the polar angle of z in radians. E.g., abs(1+2i) ans = 2.2361 >> angle(1+2i) 1 ans = 1.1071 >> angle (1+i) ans = 0.7854 Now look at the triangle (0,0), (x,0), (x,y) and recall the definitions of sin and cos from trigonometry. You get x z cos and y z sin . Hence z z (cos i sin ) (1.1) Euler’s Formula e i cos i sin (1.2) together with (1.1), gives the “polar form” of z z z ei (1.3) You could also write (1.3) in the form (1.3)’ or even z z ei ( 2 ) (1.3)” z z ei ( 2k ) k 0, 1, 2, 3,... because and 2k have the same sine and cosine. Where does Euler’s Formula come from? It is motivated by the familiar power series expansion of e t where instead of t you write i . Collecting terms and recalling the Taylor series of cos and sin , you get (1.2). By power series or by trigonometric identities, you see that the following familiar properties of exponentials still hold: (1.4) e i (1 2 ) e i1 e i2 (1.5) e a ib e a e ib 2 Notice that for any polar angle , (1.6) e i 1 To see why, use Euler’s Formula Examples of this very useful and sin 2 cos 2 1 “polar form”. 1 i 2 e i / 4 1 1 i / 4 e 1 i 2 (1 i ) 3 ( 2 ) 3 e i ( / 4 ) 3 z 5 z e i 5 , and 5 if z is expressed as in (1.3), then, e.g., in general, for any integer N z N z e iN N (1.7) Make sure you verify and understand the formulas above, They are elementary but revealing and deserve some focused attention. (1.7) shows that WHEN YOU RAISE z TO THE N-TH POWER, THE MODULUS GETS RAISED TO THE N-POWER BUT THE POLAR ANGLE GETS MULTIPLIED BY N. 2. N-TH ROOTS OF Z. 2.1 N-th roots of 1 Who wants N 1 ? Obviously N 1 =1. Yes, but we want to find all possible such roots for reasons we’ll see in a moment. Let w be one of the sought roots. In polar form, w w ei and 1 1e i 0 . Taking power N, by (1.7), necessarily, w 1 . w 1. w N w e iN 1N e iN . N Hence, An obvious is 0 . We get the root Let’s call it w0 . i Another possibility is 2 i 2 2 which N N gives a new root w1 e N . Checking: ( w1) N e N 1 and it works. We used (1.7). By the same token, we also get another i 2 2 i 2 2N candidate w2 e N . Checking: ( w2) N e N e i 4 1 . It checks, too. We can continue. For any k 0,1,2,3,... a root of 1 appears and is denoted by wk e i 2 k N . 3 Example for N=6. w0 e w1 e i 2 0 6 2 i 1 6 w2 e w3 e w4 e w5 e 2 i 2 6 2 i 3 6 2 i 4 6 2 i 5 6 = 1 = 0.5000 + 0.8660i = -0.5000 + 0.8660i = -1.0000 + 0.0000i = -0.5000 - 0.8660i = 0.5000 - 0.8660i There is no need to continue. We would get a new cyle: w6=w0, w7=w1, w8=w2, etc. If you want to understand why, focus your attention on the exponents you get: w0 e w1 e i 2 0 6 2 i 1 6 w2 e 2 i 2 6 = = = w6 e 2 ( 0 6 ) 6 i w7 e w8 e 2 i (1 6 ) 6 2 i ( 26 ) 6 = 1 =0.5000 + 0.8660i =-0.5000 + 0.8660i etc. NOTICE: OF w1 : YOU CAN EXPRESS ALL SIX ROOTS IN TERMS OF POWERS w0 ( w1) 0 , w1 ( w1)1 , w2 ( w1) 2 , w3 ( w1) 3 , w4 ( w1) 4 , w5 ( w1)5 Are there additional 6 1 ? NO Reason: If w 6 1 then w is a solution of the polynomial w 6 1 0 . This polynomial has degree 6. Algebra says equation that if the polynomial’s degree is N, you cannot have more than N solutions. 4 A nice picture. The six sixth roots roots of 1 we got: w0, w1,…,w5 are the vertices of a regular polygon (hexagon) of center 0, inscribed in the circle of radius 1. A totally analogous situation holds for the N Nth roots of 1. Everything said is valid, and for the same reasons, once you replace 6 by N. The roots are w0,w1,w2,…,w(N-1); w1 is very useful: Each root is obtained by taking the corresponding power of w1. 2.2 Nth roots of an arbitrary z=x+iy When z=0, the only possible root is w=0. We consider z 0 . Express z in polar form z z ei . One particular Nth root of z, let’s call it R, comes to mind right away: i Checking: R RN z eN (2.1) N ( z ) e N Example: for z=1+i N i N N z ei z z 2 and In MatLab notation, >> z=1+i; >> mod=abs(z); >> theta=angle(z); >> R=(mod^(1/6))*exp(i*theta/6); >> R R = 1.0504 + 0.1383i >> %checking: >> R^6 R^6 ans = 1.0000 + 1.0000i 5 4 . IT IS NOW VERY EASY TO FIND THE OTHER 6TH ROOTS OF z=1+i USING THE 6th ROOTS OF 1 DISCUSSED IN SECTION (2.1) You just make the products R*w0, R*w1, R*w2, R*w3,R*w4, R*w5. Each is a 6th root of z=1+i. Reason: for, e.g., R*w3: (R*w3)^6=(R^6)*(w3^6)=z*1=z. That’s it! Notice: a) R*w0=R is the first root we got. It is also the one MatLab returns when you enter z^(1/6) b) all six roots listed are different because the factor R is not zero. c) the list is complete. There are no other 6th roots of z=1+i. The reason is very nice and simple. Can you see it? Summing up: To find the Nth roots of a given z=x+iy, find first R via formula (2.1). This step involves knowing z, of course. Next mutiply R by each Nth root of 1 (these roots of 1 have nothing to do with z). The N products you get R*w0, R*w1, R*w2, …,R*w(N-1) are what you want. MatLab returns R*w0 when you enter z^(1/N) The picture you get for the Nth roots of z: the roots are the vertices of a regular polygon inscribed in the circle of center 0 and radius N z . The polygon is rotated with respect to the one for the Nth roots of 1 by an angle angle ( z ) / N 3. THE LOGARITHMS OF z=x+iy The logarithms under discussion are to base e=2.71… w=log(z) means: w is a complex number such that e w z w u iv e u e iv . A natural candidate to be log(z) If w= u+iv, then e e appears (provided that z 0 ). Namely, for z z ei L= log( z ) i (3.1) Checking: eL e e z ei z log( z ) i 6 z=0 is excluded because you cannot define log(0). L is the logarithm that MatLab returns when you enter log(z) Example log(1+2i) ans = 0.8047 + 1.1071i Let’s compare with the discussion above and see that MatLab gave us precisely our L. >> z=1+2i z = 1.0000 + 2.0000i >> u=log(abs(z)) u = 0.8047 >> v=angle(z) v = 1.1071 >> L=u+i*v L = 0.8047 + 1.1071i >> %checking >> exp(L) ans = 1.0000 + 2.0000i z=x+iy HAS MANY (INFINITELY MANY) LOGARITHMS 7 L+2*pi*k*i is also a logarithm of z for any k 0, 1, 2, 3,... . Let’s call it Lk and check: exp(Lk)=exp(L)*exp(2*pi*k*i)=z. exp(2*pi*k*i)=1. We used that exp(L)=z and All this is analog to what we did with roots, even a bit easier. L plays a role similar to that of R in formula (2.1). The Lk are the analogs of w0,w1,w2, etc. Differences are a)the Lk are infinitely many, all different; for each k there is one Lk, Since there are infinitely many k, there are infinitely many Lk. b) the Lk are not the vertices of a regular polygon. They all lie on the same vertical line, a line parallel to the vertical coordinate axis at a distance log(abs(z)) from it. Summing up. Any z=x+iy other than z=0 has infinitely many logarithms, namely: Lk= log(abs(z))+angle(z)*i + 2*pi*k*i, one for each k 0, 1, 2, 3,... MatLab returns L=log(abs(z))+i*angle(z) log(z). z=0 has no log(z) because there is no w such that exp(w)=0. when you enter There are no other logarithms of z. I.e., no w other than the listed ones satisfies exp(w)=z. This is not too difficult to see. The mathematically inclined may like to try to figure this one out by themselves. 8