Monday, January 4, 2010

Complex numbers and roots

Complex numbers appeared initially as a way to solve equations that don't have real solutions. However, what are we getting from this? We can write that i is the solution to x^2=-1, but what exactly is this result? It is an imaginary number, so it is not something that can represent for example area. The obvious result from this line of thinking is - are complex numbers really needed? What problems do they solve?

Somewhat surprisingly complex numbers solve a lot of different problems or at least make them easier. In this post I want to introduce one particular problem that is solved by using complex numbers. The problem is to define a^b for all values of b and for all values of a except zero. We can partially solve this problem without complex numbers. For example, we can agree that the functions log and exp are defined as usual and then:

a^b=exp(b*Log(a))

This will work for all values of b but only as long as a>0. This is as far as we can get without using complex numbers. It is important to note, that any solution of this problem must agree with the partial solution that we have here. In other words, in order to solve this problem we must basically extend the functions exp and log in such a way that log will be defined for negative values and exp will be defined for all values of log.

As a start, lets try to define exp(z) and log(z):

exp(z)=exp(x+iy)=exp(x)exp(iy)
exp(iy)=cos(y)+isin(y)

We now need to check what we got from this definition. Firstly, if y=0 then exp(z)=exp(x) as we wanted. Secondly:

exp(z+w)=exp(x+iy+a+ib)=exp(x+a)exp(iy+ib)
exp(x+a)exp(iy+ib)=exp(x)exp(a)[cos(y+b)+isin(y+b)]
cos(y+b)+isin(y+b)=cos(y)cos(b)-sin(y)sin(b)+isin(y)cos(b)+icos(y)sin(b)
cos(y+b)+isin(y+b)=[cos(y)+isin(y)][cos(b)+isin(b)]
exp(z+w)=exp(x)exp(a)exp(iy)exp(ib)
exp(z+w)=exp(x)exp(iy)exp(a)exp(ib)
exp(z+w)=exp(x+iy)exp(a+ib)=exp(z)exp(w)

The last last thing we want to check is the derivative. This is done in a similar way, and is left as an exercise.
As you can see it is rather easy to extend exp to the complex numbers. Extending log is more difficult. Lets start with what we want the function to do. We want that for any complex number z:

exp(log(z))=z

So, we want to say that if exp(w)=z then log(z)=w.
Unfortunately, we cannot use this as a definition for log. The problem is that there are many different complex numbers that satisfy this equation. According to the definition of exp:

exp(w+2(pi)i)=exp(w)exp(2(pi)i)=exp(w)[cos(2pi)+isin(2pi)]=exp(w)=z

This is obviously a problem. To solve this problem we must remove part of the complex numbers. There are many different ways to do this removal. In this post I decided to remove the numbers {z|z=ik, k=0 or k>0}.
Now that we do not have these numbers we can define log. We know that any complex number z can be written as z=r*exp(it), where t represents the angle between the line that connects zero and z. Obviously exp(it)=exp(it+2(pi)i). However, since we have some numbers removed we cannot go in a circle around zero. Therefore, for numbers that have a negative real or complex part we will take t to be 2pi minus the angle. This solves our little problem because we now have exactly one value of t assigned to every z. And now we can define log exactly as we tried to do before. Since the negative numbers were not removed we have log defined for negative numbers as well. For example: log(-1)=i*pi.

Now that we have this we can indeed define that for all real a,b such that a is not zero:

a^b=exp(b*Log(a))

This is true for complex numbers as well, but this a different topic.

No comments: