Skip to main content

Coordinated Differential Equations

Section 1.8 Complex Numbers and Differential Equations

Recall the real numbers, denoted by R, which consist of all numbers which are positive, negative, or zero. The real numbers include numbers such as 17,2,βˆ’5.231,Ο€,e,45, and so on. We define a complex number to be a "number" of the form z=a+bi, where a and b are real numbers, and i2=βˆ’1. Loosely speaking, we think of i as being equal to βˆ’1, but its defining property is i2=βˆ’1.
The real number a is called the real part of z, denoted Re(z), and the real number b (not bi) is called the imaginary part of z, denoted Im(z). (Note that this means that the "imaginary part" is actually a real number.) Every real number a can be thought of as a complex number with its imaginary part equal to zero: a=a+0i. The word "complex" in "complex number" does not mean "complicated", but instead refers to the fact that a complex number is composed of two parts, similar to the usuage of the word "complex" in "apartment complex".
The set of all complex numbers is denoted by C. Numbers of the form z=0+bi=bi where b is real are called imaginary numbers or sometimes pure imaginary numbers. The set of all imaginary numbers does not have its own symbol, but since they are just i times a real number, we will denote this set by iR. We can picture the complex numbers on a 2D space called the complex plane, shown below.
described in detail following the image
The complex plane
Figure 1.8.1. The complex plane C with two complex numbers, z and w, drawn both as a points and as vectors (i.e., arrows pointing from the origin 0+0i to the point in the plane).
Before we get too involved with the details, let’s take a quick look at an example of how multiplication works:
(3+5i)(7+2i)=7(3+5i)+2i(3+5i)=21+35i+6i+10i2=21+41i+10(βˆ’1)=11+41i
Here, we simply used the distributive rule to "foil out" the binomials, used the fact that i2=βˆ’1, and collected like terms. Multiplication of complex numbers always works like this. In general, for two complex numbers z=a+bi and w=c+di, we define their product as
zw=(a+bi)(c+di)=(acβˆ’db)+(ad+bc)i
although there is little need to memorize this formula; it is usually easier to just work it out as in the example above.
Addition (and subtraction) are easier: we just add (or subtract) the real parts and the imaginary parts separately:
z+w=(a+bi)+(c+di)=(a+c)+(b+d)izβˆ’w=(aβˆ’bi)+(c+di)=(aβˆ’c)+(bβˆ’d)i
We can also think of addition graphically, as in the image below.
described in detail following the image
Complex addition
Figure 1.8.2. Visualization of adding two complex numbers. Notice that we simply add the real parts, and separately add the complex parts. The result is shown in terms of vectors: one vector is "dragged" so that its tail is placed on the tip of the other vector, resulting in a new vector which is the sum of the complex numbers.
Division is only slightly more involved. It uses the multiplication rule, but also the high school technique of "multiplying and dividing by the conjugate".
zw=a+bic+di=(a+bi)(cβˆ’di)(c+di)(cβˆ’di)=(ac+bd)+(bcβˆ’ad)ic2+d2=ac+bdc2+d2+bcβˆ’adc2+d2i
To check your understanding, try to show that the following is true:
3+5i7+2i=3153+2953i.
It turns out that the conjugate of a complex number is so special that it gets its own notation. For a complex number of the form z=a+bi, where a and b are real, we denote its complex conjugate by
z―=aβˆ’bi(the complex conjugate of z)
described in detail following the image
Complex conjugation
Figure 1.8.3. Visualization of complex conjugation. The complex numbers z and z― are reflections of each other over the real line.
It is straightforward to check (try it!) that for any complex numbers z and w ,
z+w―=z―+w―,zβˆ’w―=zβ€•βˆ’w―,zw―=z―w―,(zw)―=z―w―.
We also have
z――=z
and, moreover,
z+z―=(a+bi)+(aβˆ’bi)=2a,zβˆ’z―=(a+bi)βˆ’(aβˆ’bi)=2bi.
That is,
 z+z―=2Re(z)andz+z―=2iIm(z). 
The complex conjugate can also be thought of as a reflection in the complex plane about the real axis. In particular, the only numbers that do no change upon this reflection are the real numbers. This implies that
 z is a real number if and only if z=z―. 
If z=z―, it is sometimes said that z satisfies the reality condition. Recall that absolute value symbol |x|=x2 for real numbers x. One can think about |x| as the distance of x away from zero. In the same spirit, we extend this notation to complex numbers:
|z|=a2+b2(for z=a+bi)
This can also be thought of as the distance of z away from the origin 0+0i. The symbol |z| is called the complex modulus, the norm, or simply the absolute value. Make note of the following useful identity:
zz―=(a+bi)(aβˆ’bi)=a2βˆ’b2i2=a2βˆ’b2(βˆ’1)=a2+b2=|z|2.
Are complex numbers "real"? Before we move on, it may be worth addressing a question that may be on some readers’ minds: Do complex numbers "really exist" in some sense? This is a great question for a philosophy class, but one should also ask whether any numbers "really exist." What does it mean for the number 5 to "exist"? What about the number 2? Indeed, for centuries, many people even doubted the existence of negative numbers; how can you have, for instance, βˆ’5 apples?
In fact, complex numbers and negative numbers gained acceptence at roughly around the same time: in the early-to-mid 19th century. In modern mathematics, if we can define a self-consitent structure (that is, one that doesn’t let to any internal logical contradictions), this is good enough to say that something "exists", at least in the mathematical sense. In any case, complex numbers, just like negative numbers, have found such an enormous number of applications in science, engineering, and mathematics (and in particular, differential equations), that it is worth learning how to use them.

Subsection 1.8.1 Complex Functions and Calculus

The aim of this section is to learn about complex differential equations. However, first it will be useful to understand complex-valued functions of time. These are functions whose input is a real number, interpreted as a time variable, and whose output is a complex number. If we denote a complex-valued function at a time t by z(t), we can consider its real and imaginary parts, which will themselves be functions of t. Let us write:
z(t)=a(t)+b(t)i
where a(t) and b(t) are real-valued functions of t. Derivatives are defined in the usual way:
zβ€²(t)=dzdt(t)=limhβ†’0z(t+h)βˆ’z(t)h=limhβ†’0[a(t+h)+b(t+h)i]βˆ’[a(t)+b(t)i]h=limhβ†’0[a(t+h)βˆ’a(t)]+ib(t+h)βˆ’b(t)]ih=limhβ†’0a(t+h)βˆ’a(t)h+limhβ†’0b(t+h)βˆ’b(t)hi=aβ€²(t)+bβ€²(t)i
provided that the limits exist. For example:
If z(t)=t2+5t3i, then zβ€²(t)=2t+15t2i.
Integration is defined similarly:
∫z(t)dt=∫(a(t)+b(t)i)dt=∫a(t)dt+i∫b(t)dt
We give an example with a definite integral:
∫0Ο€/2(sin⁑(t)+icos⁑(t))dt=(βˆ’cos⁑(t)+isin⁑(t))|0Ο€/2=(βˆ’cos⁑(Ο€2)+isin⁑(Ο€2))βˆ’(βˆ’cos⁑(0)+isin⁑(0))=1+i
It is straightforward to verify that all of the familiar derivative and integral rules, such as the product rule, the quotient rule, the chain rule, integration by parts, u-substitution, and so on, extend to the complex case.

Subsection 1.8.2 Complex Differential Equations

Now that we have defined complex derivatives and integrals, there is nothing to stop us from considering complex differential equations! Let us start with an example: Find a function z(t) satisfying:
{dzdt=iz,z(0)=1.
Before we see a method to solve problems like this, let us first verify that the function z(t)=cos⁑(t)+isin⁑(t) is a solution. We check:
dz(t)dt=ddtcos⁑(t)+iddtsin⁑(t)=βˆ’sin⁑(t)+icos⁑(t)=i2sin⁑(t)+icos⁑(t) (since i2=βˆ’1)=i(isin⁑(t)+cos⁑(t))=iz(t)
and also
z(0)=cos⁑(0)+isin⁑(0)=1+i0=1.
Therefore, z(t)=cos⁑(t)+isin⁑(t) is a solution to the initial value problem above. But wait! We already know how to solve problems like this when the coefficients are real. Consider the following initial value problem, where r is real:
{dxdt=rx,x(0)=1.
As we have already seen in earlier sections, the unique solution to this problem is given by
x(t)=ert
If we imagine that this formula extends to the complex case, we would have that the solution z(t) to the original problem is given by
z(t)=eit
What is meant by a complex exponent? First of all, note that the standard existence and uniquness theorems for real-valued initial value can easily be extended to the case of complex differential equations (with the same proofs, except that we use the complex modulus |z| instead of the absolute value). Hence, we simply interpret the notation eit to mean "the solution to the initial value problem zβ€²=iz,z(0)=1." One can then show that all of the usual exponent rules hold. For example, suppose that z(t) is the solution to zβ€²=aiz,z(0)=1, and w(t) is the solution to wβ€²=biw,w(0)=1. Then,
(zw)β€²=zβ€²w+zwβ€²=(aiz)w+z(biw)=(a+b)izw,(zw)(0)=z(0)w(0)=1β‹…1=1,
from which it follows that eaitebit=e(a+b)it. We have found ourselves in a fortunate position: we have two different expressions which satisfy the same initial value problem; namely, z(t)=eit and z(t)=cos⁑(t)+isin⁑(t). Therefore, by uniqueness of solutions, we have:
(1.8.1) eit=cos⁑(t)+isin⁑(t) 
This important result is called Euler’s formula. (Note: "Euler" is pronounced like "OY-ler", not "YOU-ler.") It is highly worth memorizing. Euler’s formula is a major key to understanding complex analysis, as we will see in the next section.
We can get more out of Euler’s forumla. By replacing t by βˆ’t and using the fact that cosine is an even function and sine is an odd function, we obtain
eβˆ’it=cos⁑(βˆ’t)+isin⁑(βˆ’t)=cos⁑(t)βˆ’isin⁑(t).
By adding this to Euler’s identity, we obtain:
eit+eβˆ’it=(cos⁑(t)βˆ’isin⁑(t))+(cos⁑(t)βˆ’isin⁑(t))=2cos⁑(t).
Subtracting, we obtain
eitβˆ’eβˆ’it=(cos⁑(t)βˆ’isin⁑(t))βˆ’(cos⁑(t)βˆ’isin⁑(t))=2isin⁑(t).
Dividing the first equation by 2 and the second by 2i, we can express the trig functions entirely in terms of complex exponentials. These formulas are also worth memorizing.
(1.8.2) cos⁑(t)=eit+eβˆ’it2andsin⁑(t)=eitβˆ’eβˆ’it2i. 
A beautiful identity. Leonhard Euler (1707-1783) discovered his formula in his mid-thirties and published it in 1748. His proof used Taylor series, a branch of analysis that deals with approximating functions by polynomials. He also realized that by setting t=Ο€, one obtains eiΟ€=cos⁑(Ο€)+isin⁑(Ο€)=βˆ’1. Adding 1 to both sides yields a formula that was engraved on Euler’s tombstone:
eiΟ€+1=0.
This is known as Euler’s identity, and it has been call "the most beautiful theorem in mathematics", perhaps because it unites five very important mathematical constants in one formula: e,i,Ο€,1, and 0.

Subsection 1.8.3 The Polar Form of Complex Numbers

In this section, we will find a very convenient way to write complex numbers, called the polar form of a complex number. First, consider a complex number of the form:
z=x+iy.
Since x and y are uniquely identifed with z, we can identify z with the point in the Cartesian plane (x,y). Recall that we can always write a point (x,y) in the plane as
{x=rcos⁑(θ),y=rsin⁑(θ),
where rβ‰₯0 is the distance from the origin to (x,y) (that is, r=x2+y2=|z|), and ΞΈ is the angle between the positive x-axis and the ray pointing from the origin to the point (x,y). Using Euler’s identity from the previous section with t replaced by ΞΈ; that is, eiΞΈ=cos⁑(ΞΈ)+isin⁑(ΞΈ), we find that
z=x+iy=rcos⁑(θ)+irsin⁑(θ)=r(cos⁑(θ)+isin⁑(θ))=reiθ
Therefore, any complex number can be written as either z=x+iy or z=reiΞΈ. The first form is called the Cartesian form and the second form is called the polar form. In this form, sometimes r is called the magnitude or amplitude of z.
The polar form gives us a very convenient way to multiply complex numbers together. For example:
If z1=r1eiΞΈ1 and z2=r2eiΞΈ2, then z1z2=r1r2ei(ΞΈ1+ΞΈ2).
That is, to multiply two complex numbers together, multiply their amplitudes and add their angles. This gives us a new way to interpret multiplication by complex numbers. Recall that multiplying by a real number can be thought of as scaling; for example, multiplying by 2 "scales" a quantity to a larger size, and multiplying by 12 "scales" a quantity to a smaller size. Multiplication by a complex number not only scales a quantity by r, but also rotates it by angle ΞΈ. This is pictured below.
described in detail following the image
Complex multiplication
Figure 1.8.4. Visualization of multiplying two complex numbers. The angles (Ξ± and Ξ²) add, and then lengths (|z| and |w|) multiply.
With this pictute in mind, notice that
i=0+1i=cos⁑(Ο€2)+isin⁑(Ο€2)=eiΟ€/2.
Hence, the differential equation we saw earlier, namely
dzdt=iz,
can be interpreted as giving an instantaneous rotation by Ο€/2 radians (i.e., 90∘). Such a path traces out a circle, centered at the origin, with radius r=1; that is, the unit circle, pictured in the complex plane below.
described in detail following the image
The complex unit circle
Figure 1.8.5. The unit circle in the complex plane.
We can also handle fully complex exponents as follows. Let Ξ»=a+bi where a and b are real. For any real number t, let z(t)=eΞ»t. Then
z(t)=eλt=e(a+bi)t=eat+ibt=eateibt=eat(cos⁑(bt)+isin⁑(bt))
In particular, since eat>0,
|z(t)|=eat|cos⁑(bt)+isin⁑(bt)|=eat(cos2⁑(bt)+sin2⁑(bt))=eat.
This shows that the real part of Ξ» , namely a, controls the growth or decay of z(t) (growth if a>0, decay if a<0, no growth or decay if a=0). Moreover, the imaginary part of Ξ», namely b, controls the oscillation frequency of z(t) (larger b means faster oscillations, b=0 means no oscillations).
It is useful to note that the conjugate of z(t)=e(a+bi)t can also be found as follows.
z(t)―=e(a+bi)t―=eat(cos⁑(bt)+isin⁑(bt))―=eat(cos⁑(bt)βˆ’isin⁑(bt))=e(aβˆ’bi)t.

Subsection 1.8.4 Applications to Differential Equations

Very often in differential equations (starting in the next chapter), even if the coefficients are real, we will find that the solutions come in the form of complex numbers. For example, a real-value function y(t) might be expressed in the form
y(t)=c1e(a+bi)t+c2e(aβˆ’bi)t
where c1 and c2 are complex constants, and a and b are real constants. Euler’s identity can be used to rewrite such expressions entirely in terms of real-valued functions. First, let us notice what happens when we take the complex conjugate of a complex function in the form z=e(a+bi)t. Since y is real-valued, the reality condition says that y=y―. Hence, we have:
c1e(a+bi)t+c2e(aβˆ’bi)t=y=y―=c1―e(aβˆ’bi)t+c2―e(a+bi)t
Comparing both sides shows that c1=c2― and c2=c1―; that is, the coefficients must be complex conjugates. Writing c1=k1+ik2, where k1 and k2 are real, we have c2=k1βˆ’ik2. Using the rules of conjugates shown in a previous section, we find
y(t)=c1e(a+bi)t+c2e(aβˆ’bi)t=(k1+ik2)e(a+bi)t+(k1βˆ’ik2)e(aβˆ’bi)t=(k1+ik2)e(a+bi)t+(k1+ik2)e(a+bi)t―=2Re[(k1+ik2)e(a+bi)t]=2Re[(k1+ik2)eat(cos⁑(bt)+isin⁑(bt))]=2eatRe[(k1+ik2)(cos⁑(bt)+isin⁑(bt))]=2eatRe[k1cos⁑(bt)βˆ’k2sin⁑(bt)+ik1cos⁑(bt)+ik2sin⁑(bt)]=2eat(k1cos⁑(bt)βˆ’k2sin⁑(bt))=C1eatcos⁑(bt)+C2eatsin⁑(bt)
where C1 and C2 are real constants (one can work out that C1=c1+c2 and C2=i(c1βˆ’c2), which are both real, since c1=c2―, but it really only matters that they are some real constants).

Reading Questions 1.8.5 Reading Questions

1.

Explain what the real and imaginary parts of a complex number are in your own words.

2.

Explain how to add a pair of complex numbers together graphically. Consider further the action of multiplying a complex number z=a+bi by a another complex number eiΞΈ of modulus 1. What effect does this action have on z?

Exercises 1.8.6 Exercises

Real and imaginary parts.

Identify the real and imaginary part of each complex number in Exercise Group 1.8.6.1–6.

Converting to polar form.

Convert each complex number in Exercise Group 1.8.6.7–10 to polar form.
10.
2cos⁑(ΞΈ)+2isin⁑(ΞΈ), for ΞΈ an angle in [0,2Ο€).

Trigonometric identities and trigonometric derivatives and integrals.

Each exercise in Exercise Group 1.8.6.11–14 deals with a trigonometric identity, or a derivative or integral formula for trigonometric functions.
11.
Using Euler’s formula, show the angle sum formulae
sin⁑(α+β)=sin⁑(α)cos⁑(β)+cos⁑(α)sin⁑(β)
cos⁑(Ξ±+Ξ²)=cos⁑(Ξ±)cos⁑(Ξ²)βˆ’sin⁑(Ξ±)sin⁑(Ξ²)
for real numbers Ξ± and Ξ². (Hint: Expand both sides of e(Ξ±+Ξ²)i=eΞ±ieΞ²i and compare the real and imaginary parts.)
12.
The Pythagorean Theorem states that for any real ΞΈ,
sin2⁑(θ)+cos2⁑(θ)=1.
Using the complex definitions of sin and cos derived in (1.8.2), prove the Pythagorean Theorem.
13.
One way of computing integrals of the form
∫eαtsin⁑(βt)dt
involves doing integration by parts twice, then solving an algebraic equation in which the variable of interest is the integral itself.
Instead of using integration by parts, compute this integral by using the complex definition of sin in (1.8.2) and integrating directly.
14.
Show that
βˆ«βˆ’Ο€Ο€cos⁑(mt)sin⁑(nt)dt=0
for all integers m and n. To compute the integral, use the complex definitions of sin and cos in (1.8.2).

Complex ODEs.

Solve the following complex ordinary differential equations Exercise Group 1.8.6.15–18 up to an arbitrary constant.