Integration in Complex Variables
Integration in Complex Variables
Integration in Complex Variables
This material is a supplement to Appendix G of Stewart. You should read the ap-
pendix, except the last section on complex exponentials, before this material.
What about integration? Of course, we still define the indefinite integral of a function
to be its antidervatives. We only define the definite integral for functions of a real variable.
The function, such as f (x) = (1 + 2i)x + i3x2 , may have complex values but the variable
x is only allowed to take on real values. In this case nothing changes:
• The Riemann sum definition of an integral still applies.
• The Fundamental Theorem of Calculus is still true.
• The properties of integrals, including substitution and integration by parts still work.
For example,
Z 2 µ ¸2
2 (1 + 2i)x2 3
((1 + 2i)x + ix ) dx = + ix = (1 + 2i)2 + 8i = 2 + 12i.
0 2 0
∗
The definitions are nearly copies of Stewart Sections 2.4 and 2.8. We have used z and
α instead of x and a to emphasize the fact that they are complex numbers and have called
attention to the fact that δ and ² are real numbers.
1
Appendix G Supplement
R1
On the otherR hand, we can’t evaluate right now 0 (x + i)−1 dx. Why is that? We’d
expect to write (x + i)−1 dx = ln(x + i) + C and use the Fundamental Theorem of
Calculus, but this has no meaning because we only know how to compute logarithms of
positive numbers. Some of you might√suggest that we write ln |x + i| instead of ln(x + i).
This does not work. Since |x + i| = x2 + 1, the function f (x) = ln |x + i| only takes on
real values when x is real. Its derivative cannot be the complex number (x + i)−1 since
(f (x + h) − f (x))/h is real.
How should we define ea+bi where a and b are real numbers? We would like the nice
properties of the exponential to still be true. Probably the most basic properties are
Definition of complex exponential: ea+bi = ea (cos b+i sin b) = ea cos b+iea sin b
We need constants (probably complex) so that it’s reasonable to let eix = A cos x + B sin x.
How can we find A and B? When x = 0, eix = e0 = 1. Since
2
Appendix G Supplement
we want A = 1. We can get B by looking at (eix )0 at x = 0. You should check that this
gives B = i. (Remember that we want the derivative of eix to equal ieix .) Thus we get
z 0 ez+w − ez ez ew − ez z ew − 1
(e ) = lim = lim = e lim .
w→0 w w→0 w w→0 w
Since x and y are small, we can use linear approximations∗ for ex , cos y and sin y, namely
1 + x, 1 and y. (The approximation 1 comes from (cos y)0 = 0 at y = 0.) Thus (ew − 1)/w
is approximately
When x and y are very small, their product is much smaller than either of them. Thus
ixy
limw→0 x+iy = 0 and so limw→0 (ew − 1)/w = 1. This shows that (ez )0 = ez .
Finding Euler’s formula and checking that it did what we want was a bit of work.
Now that we have Euler’s formula, it’s easy to get formulas for the trig functions in terms
of the exponential. Look at Euler’s formula with x replaced by −x:
∗
Linear approximations are discussed in Section 3.11 of Stewart.
3
Appendix G Supplement
Adding and dividing by 2 gives us cos x whereas subtracting and dividing by 2i gives us
sin x:
Setting x = α = a + bi gives formulas for the sine and cosine of complex numbers. We can
do a variety of things with these formula. Here are some we will not pursue:
• Since the other trig functions are rational functions of sine and cosine, this gives us
formulas for all the trig functions.
• Identities such as cos2 (α) + sin2 (α) = 1 can be verified for complex numbers.
• The hyperbolic and trig functions are related: cos x = cosh(ix) and i sin x = sinh(ix).
e2x ³ ´
= (1 − 2i)(cos x + i sin x) + (1 + 2i)(cos x − i sin x) + C,
10
where we used cos(−x) = cos x and sin(−x) = sin x on the last line. Collecting terms
together, we finally get
Z
e2x (cos x + 2 sin x)
e2x cos x dx = + C.
5
4
Appendix G Supplement
Example (Products of sines and cosines) Let’s integrate 8 cos(3x) sin2 x. One way to
do this is to automatically reduce the product to a sum of sines and cosines using our
formulas for them:
µ ¶µ ¶2
2 e3ix + e−3ix eix − e−ix
8 cos(3x) sin x = 8
2 2i
This function is easily integrated. Another approach is to integrate the second line of the
previous result as follows
Z Z
2
8 cos(3x) sin x dx = −(e5ix − 2e3ix + eix + e−ix − 2e−3ix + e−5ix ) dx
Next use Euler’s formula and combine terms to obtain an answer in terms of sines and
cosines. All the imaginary numbers will disappear since the function we were integrating
had no imaginary numbers in it.
The logarithm function is defined to be the inverse of the exponential function. Since
(ez )0 = ez , the argument used at the start of Section 3.8 of Stewart shows that (ln z)0 = 1/z.
This tells us how to compute the derivative of the logarithm, but we still don’t know how
to calculate the value of ln z. That’s our first goal in this section.
What is ln 1? The answer is 0 if we are limited to real numbers, but with complex
numbers it is not so simple. Suppose k is an integer. By Euler’s formula,
Since the logarithm is the inverse of the exponential, we could let ln 1 = 2kπi for any
integer k. It turns out that z = 2kπi are the only solutions to ez = 1. In other words,
these are the only possible values for ln 1.
What are the possible values for ln(a + bi)? In other words, what are the solutions to
a + bi = ez ? Write z = x + yi. Then
5
Appendix G Supplement
which we must solve for x and y. We leave it for you to show that ex = |a + bi| and
y = arg(a + bi). Thus x = ln |a + bi|. If we write α = a + bi, these results become
Partial Fractions
How do we know it is always possible to write a rational function as a polynomial plus
a sum of partial fractions? It depends on the following result which we will not prove.
This tells us that we can factor an polynomial of degree n into a product of n linear factors.
For example,
• 3x2 + 2x − 1 = (3x − 1)(x + 1) (n = 2 here), √
• x3 − 8 = (x − 2)(x + α)(x + α) where α = 1 ± i 3 (n = 3 here),
• (x2 + 1)2 = (x + i)2 (x − i)2 (n = 4 here).
Thus, if we allow complex numbers, partial fractions can be done with only linear
factors. When we only allowed real numbers as coefficients of the factors, we obtained
both linear and quadratic factors.
6
Appendix G Supplement
The constants can be found by the method of Stewart’s Section 7.4. It turns out that
A1 = 3i, A2 = −3, A3 = 2 − 2i and Bi = Ai . Thus the integral is
µ ¶ µ ¶ ³ ´
−1 + i −1 − i 3 3
+ + + + 3i ln(x + i) − 3i ln(x − i) +C
(x + i)2 (x − i)2 x+i x−i
1 + 4x − 2x2 6x
= 2 2
+ 2 + 6 arctan x + C,
(x + 1) x +1
where we used
3 3 3(x − i) + 3(x + i) 6x
+ = 2
= 2 .
x+i x−i x +1 x +1
and the fact that i ln(x + i) − i ln(x − i) can be replaced by 2 arctan x. The fact about the
arctangent is left to the exercises.
The partial fraction constants can be found by the method in the text. There are
easier methods.
You can save a lot of time when there are no repeated factors in the denominator.
We’ll tell you the general principle and then do some specific examples. Suppose that
xn + a1 xn−1 + · · · + an−1 x + an = (x + α1 ) · · · (x + αn )
where α1 , . . . , αn are all distinct. Suppose also that the degree of p(x) is less than n Then
p(x) C1 Cn
= + ··· + , (2)
xn + a1 xn−1 + · · · + an−1 x + an x + α1 x + αn
where the constants C1 , . . . , Cn need to be determined to find the partial fraction expan-
sion. Multiply both sides of (2) by x + αi and then set x = −αi . The left side is some
number. On the right side, we are left with only Ci because all the other terms have a
factor of x + αi which is 0 when x = −αi .
7
Appendix G Supplement
x2 + 2 C1 C2 C3
= + + .
(x − 1)(x + 2)(x + 3) x−1 x+2 x+3
Multiply by x − 1:
x2 + 2 C2 (x − 1) C3 (x − 1)
= C1 + + .
(x + 2)(x + 3) x+2 x+3
Set x = 1:
1+2
= C1
(1 + 2)(1 + 3)
and so C1 = 1/4. Similarly,
¸
x2 + 2 4+2
C2 = = = −2
(x − 1)(x + 3) x=−2 (−3)1
and ¸
x2 + 2 9+2
C3 = = = 11/4.
(x − 1)(x + 2) x=−3 (−4)(−1)
x+1
Example (Partial fractions with no repeated factors. II) Let’s expand x3 +x . We have
x+1 x+1 C1 C2 C3
3
= = + + .
x(x + x) x(x − i)(x + i) x x−i x+i
Since x = x − 0,
1
C1 = = 1.
(−i)i
Also
i+1 −1 − i −i + 1 −1 + i
C2 = = C3 = = .
i(2i) 2 (−i)(−2i) 2
You should fill in the details.
Notice that C3 = C2 in the previous example. This often happens and can save us
work. When and why? Suppose p(x) and q(x) are polynomials with real coefficients and
think of x as a real number. Suppose (x+α)k is a factor of q(x) where α not a real number.
Then (x + α)k is also a factor:
(a) Since (x + α)k is a factor of q(x), q(x) = (x + α)k r(x) for some polynomial r(x).
(b) With complex conjugates, q(x) = (x + α)k r(x).
(c) Since q(x) has real coefficients, q(x) = q(x) and so by (b), (x + α)k is a factor of q(x).
8
Appendix G Supplement
p(x) A B
= k
+ + ···,
q(x) (x + α) (x + α)k
p(x) A B
= k
+ + · · ·,
q(x) (x + α) (x + α)k
4x3 − 12x + 16
f (x) =
(x2 + 1)3
If we multiply by (x + i)3 and set x = −i, we get A3 in the same way as happened when
there were no repeated factors in the denominator. Thus we find A3 = 2 − 2i and so
B3 = A3 = 2 + 2i.
How can we get A1 and A2 ? We can’t simply multiply by (x + i)2 and set x = −i in
an attempt to find A2 because some terms will have a factor of x + i remaining in their
denominator and so will become infinite. So what can we do? There are at least three
methods.
• Go back to the Stewart approach, with the values of A3 and B3 known, so there are
two less unknowns. This is not attractive since what we’ve been doing is easier than
Stewart.
• Subtract the known terms to obtain a function with smaller denominator: Let
A3 B3
h(x) = f (x) − 3
− .
(x + i) (x − i)3
After cancelling common factors from numerator and denominator, the denominator
of h(x) will be (x2 + 1)2 . In fact, h(x) = (x212
+1)2 The method used for finding A3
and B3 for f (x) can now be used to find A2 and B2 for h(x). Another round of this
process gives A1 and B1 .
• Recall that
4x3 − 12x + 16
= A3 + A2 (x + i) + A1 (x + i)2 + g(x)(x + i)3 , (3)
(x − i)3
9
Appendix G Supplement
Differentiating (3) twice and setting x = −i gives 2A1 on the right side. The derivative
of the left side is
Exercises
1. The goal of this exercise is to use the definition of a complex exponential to prove
that eα+β = eα + eβ . Let α = a + bi and β = c + di.
(a) Show that, by the definition of a complex exponential,
eα+β = ea+c (cos(b + d) + i sin(b + d)).
(b) State similar formulas for eα and eβ .
(c) Using some algebra and the formulas for the sine and cosine of a sum of angles,
conclude that eα+β = eα eβ .
2. Use the relationship between the sine, cosine and exponential functions to express
cos3 x as a sum of sines and cosines.
3. Prove that eπi +1 = 0. This uses several basic concepts in mathematics (π, e, addition,
multiplication, exponentiation and complex numbers) in one compact equation.
4. When discussing integration near the start of these notes, we argued that f (x) =
ln |x+i| could not be an antiderivative of (x+i)−1 because f (x) is real valued. Another
way to do this is to simply compute f 0 (x). Do that and check that f 0 (x) 6= (x + i)−1 .
R
5. RIn the text we learned that dx/x = ln |x| + C. Using complex numbers, we can write
dx/x = ln x + C because ln |x| and ln x differ by a constant when x < 0. Find the
constant.
10
Appendix G Supplement
7. The purpose of this exercise is to derive a formula for arcsin t like the formula for
arctan t. Let sin x = t and z = eix .
√
(a) Derive the formula z = it ± 1 − t2 .
√ √
(b) By setting x = 0, decide whether z = it + 1 − t2 or z = it − 1 − t2 .
(c) Complete the derivation of a formula expressing arcsin t in terms of ln.
8. In this exercise, you use a different method to derive the formula for arctan t that
appears in these notes. We can write 1 + x2 = (1 − ix)(1 + ix). Use this and partial
Rt 1
fractions to compute 0 1+x 2 dx, which equals arctan t.
This
R 2 is doesn’t look like the formula for the arctangent derived in the text even though
(x + 1)−1 dx = arctan x + C. We could show that they agree by differentiating both
expressions and showing that the results are equal. Find a more “direct” approach:
Use properties of the logarithm and arctan 0 = 0 to show that the two formulas agree.
10. By looking at a right triangle, one can see that arctan t = π/2 − arctan(1/t) when
t > 0. By using properties of logarithms, show that our formula for the arctangent
satisfies this equation.
x3 +2
11. Find the partial fraction expansion of x(x2 −1)(x2 −4) .
2x+1
12. Find the partial fraction expansion of (x−1)2 (x+2) .
x3 +2
13. Find the partial fraction expansion of x(x2 +1)(x2 +4) .
11