1  Why does eix equal cosx+isinx?


There's a famous joke where "the boss" asks an engineer, a mathematician and an accountant "What is 2+2?". The accountant answers "What do you want it to be?" and (presumably) gets the job.
In one sense, asking "What is eix" is a bit like the boss' question. The correct answer is "Well, what do you want it to be?". We know what et is when t is real. But when we extend the definition of the exponential function to allow a complex t, well, we can choose what we like. Almost. Really, though, it's mathematicians who do the choosing, and mathematicians like things that are
  • Logically consistent. No contradictions, like what happens when you try to define 0 divided by 0.
  • As close to existing definitions as possible. That way, existing mathematical laws can be used in the new context.
  • Somehow, mathematically "beautiful", whatever that means.
So, when defining eix, a mathematician will try to make the exponential function for complex numbers as similar as possible (in meaning and properties) to the exponential function for real numbers. What, then, do we know about ex?
Quite a lot, actually. Here's a selection of its properties.
  • It's the inverse function of the natural logarithm. Therefore,

    ex

    1 
    dt

    t
    =x
    for any real x. This is, in fact, how ex is traditionally defined for real numbers. The other properties can be proved from this one.
  • It has a particularly simple derivative. If y=ex, then y=ex. In general, if y=emx, then y=memx.
  • It satisfies exponent laws, such as ex+y=exey, (ex)y=exy and e-x=1/ex.
  • The Taylor series for ex is 1 + x + x2/2 + x3/6 + ... + xn/n! + ....
  • The Laplace Transform of eax is 1/(s-a).
I'm sure you could think of more. Let's look at each of these, and see what they tell us about eix.

2  Definition by Integral

When I want to work out

x

1 
du

u
for a real number x, it's fairly clear what this means. After all, there's really only one way to move from 1 to x along the real number line. Well, we could vary our speed a bit. If u was a function u(t) of t, with u(t0)=1 and u(t1)=x, we could write the above integral as

t1

t0 
u(t)dt

u(t)
.
Basically, we're changing the variable of the integration from u to t. It's drilled into us in first year calculus that this gives the same answer, and sure enough, it does.
So if we had a complex value of x, we could define a complex valued function u(t), with u(0)=1, u(1)=x, and work out the complex integral

1

0 
u(t)dt

u(t)
,
and claim this as the value of

x

1 
du

u
.
Maybe, just maybe, the answer would be the same for any choice of u. Let's try one example, at least, to try to work out

i

1 
du

u
.
The function u(t) I'll use will be u(t)=cos(pt/2)+isin(pt/2). If you check, you'll find that u(0)=1 and u(1)=i. If you differentiate it, you get u(t) = (p/2)(-sin(pt/2)+icos(pt/2)). Then, u(t)/u(t) is a bit messy, until you notice a lot of the messy stuff cancels out. This is because i×u(t) equals icos(pt/2)-sin(pt/2), so that u(t) = (ip/2)u(t)!
So the integral we want is just

1

0 
i

p
/2 dt,
which is an easy ip/2.
In fact, if you take u(t) = cos(xt)+isin(xt), for any x, you get

1

0 
u(t)dt

u(t)
=ix.
Does this mean that ln(cos(x)+isin(x))=ix? Or that that eix = cosx + isinx? Or does the integral depend on the choice of u(t)?
Without going into further details about complex integrals here, let me say that
  • The answer for lnx almost doesn't depend on the choice of u(t). It only depends on whether the path of u(t) passes the origin on the right or the left - or twists around it a few times. For example, choosing u(t) = (1-t) + it still gives lni = ip/2, although the integral is a lot messier to solve. You get

    1

    0 
    (-1+i)dt

    (1-t)+it
    =
    1

    0 
    (-1+i)((1-t)-it)dt

    (1-t)2+t2

    =
    1

    0 
    ((-1+i)+2t)dt

    2t2-2t+1

    = 1

    2

    1

    0 
    ((-1+i)+2t)dt

    t2-t+1/2
    ,
    which is a messy, but doable, problem. Try it, and you'll get ip/2. Unless you make a mistake, of course, which (if you are anything like me) is highly likely.
  • Even if you zip around the origin a few times, the different values you can get for lnx are all related to each other - if a and b are two different values of lnx calculated from two different paths, then a-b is an integer times 2pi, that is, either 0, or 2pi, or 4pi, or -2pi, or 1248pi, or whatever. Never anything else.
  • And for eix? Well, it turns out that the only way to get lna equal to ix is to make a=cosx + isinx.
So from the original definition of the exponential function as the inverse of the natural logarithm, and the natural log as the integral of 1/t from 1 to x, it seems that the "right" answer for eix is cosx + isinx. If we chose some other value, then it wouldn't fit the definition of ex for real numbers x.

3  Derivatives

We know that the derivative of emx is memx. So, the derivative of eix should be ieix, and the second derivative should be -eix. Therefore eix satisfies the differential equation
d2y

dx2
+y=0.
On the other hand, cosx and sinx are also solutions to the very same differential equation. The general solution of a second order linear differential equation will be a linear combination of two independent solutions, so we could say the general solution of y"+y=0 is y=Acosx+Bsinx.
By "general" solution, we mean any solution can be written Acosx+ Bsinx. Now y=eix is a solution. Does this mean eix=Acosx + Bsinx for some A and B? Yes!
We can find the values of A and B by comparing the LHS and the RHS of eix=Acosx + Bsinx at particular values of x. Choosing x=0, for example, gives 1 = A + 0, so A=1. Differentiating both sides and then substituting x=0 gives ie0i = -Asin0 + Bcos0, so i=B. Therefore, eix = cosx+isinx as before.

4  Exponent laws

If eix=cosx+isinx, do the exponent laws still work? What is ei(x+y), for example?
According to the exponent law, we should have ei(x+y)=eixeiy. If we assume eix=cosx+isinx, we can use this formula to simplify both sides of the equation.
The left hand side becomes cos(x+y)+isin(x+y). Do you remember your trigonometry? If so, you'll remember that this is
[cosx cosy -sinx siny ] + i[cosxsiny + sinx cosy].
The right hand side, meanwhile, becomes (cosx + isinx)(cosy + isiny). Multiplying this out, we again get
[cosx cosy -sinx siny ] + i[cosxsiny + sinx cosy]
.
So the formula eix=cosx+isinx is consistent (at least this much) with the exponent law we've just tested.
If we tried (eix)2=e2ix or (eix)3=e3ix and so on, we'd get the same result.

5  Taylor series

The Taylor series for ex is

ex = 1 + x

1!
+ x2

2!
+ x3

3!
+ ... + xn

n!
+ ...
Substituting x=1 gives the famous formula

e = 1 + 1 + 1

2
+ 1

6
+ 1

24
+ ... + 1

n!
+ ...
We don't have to substitute x=1. We can substitute anything we like. Why not substitute ix?

eix = 1 + ix

1!
+ (ix)2

2!
+ (ix)3

3!
+ ... + (ix)n

n!
+ ...
If we take out the powers of i, we get

eix = 1 + i x

1!
+ i2 x2

2!
+ i3 x3

3!
+ ... + in xn

n!
+ ...

= 1 + i x

1!
- x2

2!
- i x3

3!
+ x4

4!
+ ...
Then, we can collect the real and imaginary parts together.

eix =
1 - x2

2!
+ x4

4!
- x6

6!
+ ...

+ i
x - x3

3!
+ x5

5!
- x7

7!
+ ...
But hang on, these real and imaginary parts look very familiar. Aren't the Taylor series for the sine and cosine functions just

cosx = 1 - x2

2!
+ x4

4!
- x6

6!
+ ...  and

sinx = x - x3

3!
+ x5

5!
- x7

7!
+ ...  ?
So once again, it seems that eix = cosx+isinx.

6  Laplace Transforms

If the Laplace Transform of eax is 1/(s-a), doesn't that mean that the Laplace Transform of eix should be 1/(s-i)? Just to refresh your memory, the Laplace Transform of f(x) is a function of s given by



0 
e-stf(t)dt.
Substituting f(x)=eax, this gives



0 
e-steatdt =


0 
e-(s-a)tdt,
which gives
1

s-a
.
Well, if the Laplace transform of eix is 1/(s-i), what about the Laplace transform of cosx + isinx? Looking up a table of Laplace transforms tells me that the Laplace transforms of cosx and sinx respectively are
s

s2+1
and  1

s2+1
,
so that the Laplace transform of cosx+isinx is
s

s2+1
+i 1

s2+1
= s+i

s2+1
Doesn't look much like 1/(s-i)? Well, we haven't simplified things yet. Remembering that s2+1=(s-i)(s+i) means that we can do some simplifying.
s+i

s2+1
= s+i

(s+i)(s-i)
= 1

s-i
.
Since the Laplace transforms of eix and cosx+isinx are equal, this means the functions are also equal.

7  Summary

In each case, we took one property of the exponential function, extended it to the imaginary axis, and found the formula eix = cosx+isinx. In general, we say eu+iv = eu (cosv+isinv).
Since so many different ways of working out eix all give the same answer, it seems that maths is something real that mathematicians are busy discovering, rather than something artificial that mathematicians invent. Maybe this is related to the fact that maths is so useful for describing the real world?
As a post-scriptum, let me introduce the famous "Euler's formula"

eip+1=0
It's a simple consequence of the formula we've just worked out. On the other hand, It's also quite neat, since it contains so many basic elements of mathematics in one simple formula ... 0, 1, =, +, e, p and i.



File translated from TEX by TTH, version 3.76.
On 03 Oct 2006, 10:45.