Shaw_Complex Analysis With Mathematica
Shaw_Complex Analysis With Mathematica
M
up em
da ati
te ca
d ®6
fo
r
Complex Analysis
with Mathematica®
William T. Shaw
Complex Analysis with Mathematicar
Complex Analysis with Mathematica
r
William T. Shaw
St Catherine’s College, Oxford and
Oxford Centre for Industrial and Applied Mathematics
University Printing House, Cambridge cb2 8bs, United Kingdom
www.cambridge.org
Information on this title: www.cambridge.org/9780521836265
© Cambridge University Press 2006
This publication is in copyright. Subject to statutory exception
and to the provisions of relevant collective licensing agreements,
no reproduction of any part may take place without the written
permission of Cambridge University Press.
First published 2006
Reprinted with corrections 2008
A catalogue record for this publication is available from the British Library
isbn 978-0-521-83626-5 Hardback
Additional resources for this publication at www.cambridge.org/9780521836265
Cambridge University Press has no responsibility for the persistence or accuracy
of URLs for external or third-party internet websites referred to in this publication,
and does not guarantee that any content on such websites is, or will remain,
accurate or appropriate.
All additional material supplied from the Cambridge University Press website is protected by copyright and
other intellectual property laws. The customer acquires only the right to use the additional material and does
not acquire any other rights, express or implied, unless these are stated explicitly in a separate licence.
To the extent permitted by applicable law, Cambridge University Press is not liable for direct
damages or loss of any kind resulting from the use of this product or from errors or faults
contained in it, and in every case Cambridge University Press’s liability shall be limited to the
amount actually paid by the customer for the product.
For Helen and Benjamin
A CD-ROM formerly accompanied this publication:
the contents of the CD-ROM are now located at
www.cambridge.org/9780521836265
Contents
Preface xv
Why this book? xv
How this text is organized xvi
Some suggestions on how to use this text xxi
About the enclosed CD xxii
Exercises and solutions xxiv
Acknowledgements xxiv
Bibliograpy 553
Index 558
Preface
The idea of this part of the book is to explain how and why complex numbers
were introduced, and then to go on to discuss elementary properties of the complex
number system. This material is at a level normally to be found in final year high
school programs or introductory college level. Chapter 3 should be regarded as
optional, but is highly recommended for any students with an interest in the
history of the subject. It covers the treatment of cubics and quartics, which is
not usually taught in modern courses, and also includes some material on the
visualization of roots of polynomials.
Preface xvii
zn+1 = f (zn )
You will be able to explore how this works for various choices of the function f .
One way or other, f is to be associated with the solution of a low-order polynomial
equation. The association of the iterated map with the polynomial equation can
take place in several ways, and two will be considered here.
The first approach will involve polynomial (or even transcendental) equations
of the form
g(z) = 0
and you will explore the Newton–Raphson iteration scheme given by the choice
g(z)
f (z) = z −
g (z)
The second scheme will involve a polynomial equation that is already written (for
example, by simply isolating the linear term, if there is one) in the form
z = f (z)
and you will explore the ‘cobwebbing’ solution scheme based on iteration of this
representation.
Attention will be focused on four topics, each of which constitutes one chapter.
Of these four topics, the first is specifically Newton–Raphson. The next two may
be regarded as being associated with the cobwebbing method. The fourth topic
is a complex extension of the cobwebbing method with symmetry. In order of
presentation, the topics are:
xviii Preface
The logistic map, as developed by May (1976), is the place where this experi-
mentation will commence for real, with Chapter 5. This is usually regarded as a
real mapping, so what is it doing here? The point is that we shall not just indulge
in computation, but shall attempt to predict, through the machinery of complex
numbers, what should happen in a certain experiment. It will turn out that the
period-doubling behaviour of the logistic map is in fact a simple and predictable
result that requires nothing more than ‘end of high school’ mathematics. The
experimentation will serve to confirm our hypotheses about it. What is surprising
and fascinating is the transition to chaos that follows, and there are indeed many
properties of the logistic map that are still not properly understood.
There are various ways of presenting and ordering this material, and it is worth
explaining the particular approach taken here. Our approach is to give a first
introduction to standard functions in Chapter 8, by extension of their definitions
for real variables. Next, in Chapter 9, we assume some basic results from real
analysis related to sequences and series. A summary of results about sequences
and series are presented without formal proof. Students of pure mathematics
should consult a good calculus or basic real analysis text for background on this
(a comprehensive text is the book by Rudin, 1976). Then we define power series
for complex functions, and establish their convergence within a circle of conver-
gence. Then, in Chapter 10, differentiability is introduced. The approach to
complex differentiability is based on the notion of a local linear approximation to
a function – equivalent to the notion that there is a tangent to a complex curve.
The definition quite frequently given, based on the quotient formula, is given as
an aside. There are several very good reasons for this approach. First, the quo-
tient formula for the derivative does not work for functions of two or more real or
complex variables, so if we were to take this approach we could not sensibly relate
complex differentiation to differentiation of functions of two real variables, nor
can we make a generalization to functions of several complex (or real) variables
without starting again with the linear approximation approach. I think it is better
to do it properly in the first place. Second, the standard properties of derivatives
such as the product, ratio and chain rules are really easy to write down within the
linear approximation framework. Once differentiability has been defined, the dif-
ferentiability of a power series within the circle of convergence is then established
xx Preface
The novel features in this part of the book include the use of Mathematica to visu-
alize conformal maps and their applications to potential flow. The generalization
of the convolution theorem for Laplace transforms due to Efros is also presented,
and the discussion of fluid dynamics includes a discussion of viscous flow and the
biharmonic equation in complex form.
Preface xxi
The first three of these chapters have been added because the integration of
the presentation with Mathematica allows a full treatment of some issues that
require a combination of numerical/advanced analytical and graphical methods
on a computer. With a computer one can explore the numerical treatment of
transforms, the beautiful applications of the Schwarz–Christoffel transformation,
and produce stunning hyperbolic tilings! Finally, in the last two chapters, you
can see how complex numbers are very useful for doing physics and geometry
in more than two dimensions. For example, you will discover that the Möbius
transformation is not just a dry device for mapping circles and lines, but is really
the mapping at the heart of Einstein’s theory of special relativity. You will discover
how complex numbers may be used to solve non-linear partial differential equations
such as arise for the shape of a soap bubble, in a formalism – Penrose’s theory
of twistors – that links the nineteenth century work of Weierstrass to modern
minimal surface and string theory. In the last chapter you will see at last the true
power of holomorphic functions in solving the 3-D Laplace equation and the wave
equation in four dimensions, again through Penrose’s theory of twistors.
AAtraditional
traditionalmathematics
mathematicscourse
courseon
oncomplex
complexanalysis
analysis
As
Asaaminimum
minimumthis thiswould
wouldconsist
consistofofChapters
Chapters8–15,
8–15,with
withparts
partsofofChapters
Chapters1–3
1–3for
for
less
lesswell
wellprepared
preparedstudents,
students,and
andsome
someportions
portionsofofChapters
Chapters16–19,
16–19,21–22
21–22depending
depending
on
onthe
thescope
scopeofofthe
thepresentation.
presentation.
For
Forphysics
physicsand
andengineering
engineering
Students
Studentstaking
takingaaserious
seriousmathematics
mathematicscomponent
componentcould
coulduse
useChapters
Chapters8–15
8–15to-
to-
gether
getherwith
withmaterial
materialfrom
from16–19
16–19and
and23–24.
23–24.
For
Foraanumerical
numericalprogramme
programme
Students
Studentsstudying
studyingnumerical
numericalmethods
methodscould
coulddraw
drawononmaterial
materialfrom
fromChapters
Chapters4–6,
4–6,
with
with77for
forfun,
fun,aareview
reviewofof17–18
17–18and
andthen
then20–21.
20–21.
Material
Materialfor
forspecific
specificcourses
coursesin
inphysics
physicsand
andengineering
engineering
ItItisishopefully
hopefullyevident
evidentthat
thatsome
sometopics
topicsmay
maybe beuseful
usefulfor forparts
partsofofother
otherpro-
pro-
grammes.
grammes.Obvious
Obviouscases
casesinclude
includecourses
courseson
onpotential
potentialtheory,
theory,whether
whetherininelectro-
electro-
statics,
statics,gravity
gravityororfluids,
fluids,which
whichfrequently
frequentlydip
dipinto
intocomplex
complexvariable
variabletheory.
theory.This
This
material
materialisisavailable
availablehere,
here,notably
notablyininChapter
Chapter19,
19,but
butititisistotobe
behoped
hopedthat
thatthose
those
who
whodipdipinto
intoChapter
Chapter19 19also
alsotake
takeaagood
goodlook
lookatatChapters
Chapters23 23and
and24!
24!
Motivational
Motivationalmathematics
mathematics
Many
Manyofofthe
thetopics
topicsdeveloped
developedhere
herecould
couldalso
alsobe
beused
usedasasmotivational
motivationalmaterial,
material,
perhaps
perhapsfor
forstudents
studentsnot
nottaking
takingspecialist
specialistmathematics,
mathematics,physics
physicsororengineering
engineering
programs,
programs,butbutononmore
moregeneral
generalcourses.
courses. InInmymyview,
view,having
havingananappreciation
appreciationofof
the
thebeauty,
beauty,indeed
indeedthe
theart,
art,ofofmathematics
mathematicsisisaavital
vitalcomponent
componentofofananadvanced
advanced
education.
education. The
Thematerial
materialininPart
PartIIIIcould
couldbebeextensively
extensivelydrawn
drawnononfor
forsuch
suchaa
program,
program,ininaddition
additiontotosnippets
snippetsfrom
fromother
otherchapters.
chapters.
Playing
Playing
Everybody
Everybodyshould
shouldplay!
play!You
Youcan
canhave
havefun
funjust
justtrying
tryingout
outthe
theMathematica
Mathematicaimple-
imple-
mentations
mentationsininmany
manyofofthe
thechapters.
chapters. You
Youcan
canhave
haveeven
evenmore
morefun
funby
bycoming
comingupup
with
withbetter
betterways
waysofofdoing
doingthings
thingsthan
thanthe
theauthor
authorhas
hasdone
donehere
hereand
andletting
lettingthe
the
author
authorknow.
know.
*About the
About theenclosed
enclosed CD
CD
The
Theenclosed
enclosedCD
CDcontains
containsthree
threedirectories,
directories,entitled
entitled‘Notebooks’,
‘Notebooks’,‘MathLink’
‘MathLink’and
and
‘Goodies’.
‘Goodies’.
*A CD-ROM formerly accompanied this publication: the contents of the CD-ROM are
now located at www.cambridge.org/9780521836265
Preface xxiii
The Notebooks directory contains electronic copies of all the chapters of the
text, in the form of Mathematica notebooks. These have been finalized in Mathe-
matica 5.1 and therefore should open directly in V5.1 or later. If you are using an
earlier version you will get a warning that you can ignore and open the file anyway.
If you are using version 4.x or even 3.x you may find that some things do not quite
work as in the text. The results from Integrate have now stabilized but differed
in earlier versions, so you should watch out for that, particularly in the sections
where you check a contour integral or work out a Schwarz–Christoffel map. There
are other minor stylistic issues, such as Conjugate appearing in output form as
the whole word ‘Conjugate’ in older versions, whereas now the output form is a
simple star!
The MathLink directory contains MathLink code in the form of (a) source for
any system, (b) binaries for some systems. The source consists of .tm files and
.c files. A lack of resources prevents me from making immediately useful binaries
for every operating system.
The Goodies directory contains encrypted information pertinent to Mathe-
matica technologies beyond version 5.2 that will be made available once such
technology is officially released. See below for more details on this. First I need
to remark on kernel compatibility issues in general.
The author is unable to offer support on the code or MathLink issues. But I do
wish to receive bug reports on kernel operation. This code started off as working
in Mathematica 2.2, and has been updated for compatibility with 3.x, 4.x, 5.x. As
Mathematica has been updated it has become increasingly difficult to retain total
compatibility with older versions, as noted above. The evolution of the software
has in fact resulted in better code for this book, as I have been driven to write
code that relies less on a trick that might work in one version, and more towards
code that uses the fundamental principles of Mathematica .
Please let me know if you find anything that does NOT work under versions
5.1 or 5.2. You are strongly encouraged to use version 5.x or later, until a new
version is released. I have made an effort to explain where there is a significant
different between the way this book works between major versions. As for Math-
ematica technologies beyond Version 5.2, I cannot comment on any of the details
of unreleased software, but you should see the author’s web site at King’s College
London:
www.mth.kcl.ac.uk/staff/w_shaw.html
www.cambridge.org/0521836263
for updates when a new version is released, including a key to unlock the encrypted
material in the ‘Goodies’ section of the CD. If you are using a Mathematica tech-
nology beyond version 5.2, please do not send me bug reports until you have first
checked the CD and then the on-line information, as the author will do his best
to ensure that the book as distributed together with the CD is future-proof.
xxiv Preface
Acknowledgements
I need to start with the mathematics staff of Manshead School who, during the
1970s, inspired me with a love of mathematics. Then the inspirational teaching
of A. F. Beardon and T. W. Körner at Cambridge got me hooked on complex
analysis, and J. M. Stewart taught me how to apply it. Sir R. Penrose, F.R.S.
showed me what could be done with complex variables and relativistic physics,
and has provided me with more inspiration than anyone has a right to have. M.
Perry set me on the course of looking at twistor models of string theory, and some
of the material in Chapter 23, especially the twistor solution of the relativistic
string (minimal surface) equations, arose from these studies.
Particular topics presented here have benefited from contributions from par-
ticular people. I am particularly grateful to L.N. Trefethen, F.R.S. for providing
me with background material on modern approaches to conformal mapping, and
to Vanessa Thomas for allowing me to use her work on tiling the hyperbolic plane.
In addition, N. Hitchin, F.R.S. taught me how properly to use twistor methods in
3-D. The material of Chapter 7 was inspired by the beautiful book by M. Field
and M. Golubitsky. The material in the final two chapters (23 and 24) owes a
great deal to R. Penrose, who has educated me in all sorts of other matters in-
cluding the hyperbolic tilings of Chapter 22, the fine details of fractals (Chapter
6) as well as everything to do with twistors. I am also grateful to J. Ockendon,
F.R.S. for making me aware of the advanced applications of complex variables to
fluids, so that this text, unusually for a first course, includes a discussion of viscous
(biharmonic) flow. He also provoked me in several ways, most constructively by
suggesting I look into ways of deducing the full structure of holomorphic functions
from a purely algebraic treatment of their real (or imaginary) parts. I published
a short educational note on this method (Shaw, 2004) and requested information
on the history of the method. I am grateful to H. Boas, B. Margolis and others
for responding to this request, and also providing some suggestions that lead to
the improved Mathematica implementation given in Section 10.10.
Preface xxv
Introduction
The complex number system is now such an accepted part of mathematical analysis that
it requires some adjustment of your point of view just to ask why you need so-called
imaginary or complex numbers. But you should understand that there was, at first,
considerable resistance to their introduction, even amongst those who felt compelled to
invent them! Probably the first person to discuss them was Girolamo Cardano, in his text
Ars magna (The Great Art), published in 1545 (Cardano, 1993). Cardano also was one of
the first Western algebraists to cope with the concept of negative numbers, and to
introduce negative roots. The additional headache involved in dealing with imaginary
numbers was such that he largely kept them out of his book, with the exception of a brief
discussion of the solution of the quadratic equation :
xH10 - xL = 40 (1.1)
Cardano did not cope terribly well with the processes involved in managing this equation
– as he put it: ‘putting aside the mental tortures involved, multiply 5
, ,
+ H-15L by 5 - H-15L, making 25 - H-15L, whence the product is 40’. He went on
to add: ‘So progresses arithmetic subtlety the end of which, as is said, is as refined as it
is useless.’
One view of this book is therefore that it is devoted to a useless topic, but it is
likely that Cardano might have shifted his opinions if he could only have experienced the
outcome of his mental tortures. If you wish to experience Cardano's reservations person-
ally, his text is available in translation. Also, an excellent exposition of the history of
algebra in the sixteenth century is given by Burton (1995). Cardano pushed his luck in
other ways, and through his fascination for astrology he managed to get himself impris-
oned for heresy. The author hastens to add that it was not so much the introduction of
imaginary numbers that got him into trouble – rather more offence was taken at his
publishing a horoscope of Jesus Christ. Controversy surrounded Cardano and others
interested in the solution of polynomial equations – the intense competition to understand
quadratic, cubic and quartic equations generated considerable rivalry!
This book is devoted to explaining why complex numbers and complex analysis
are two of the most useful topics in pure and applied mathematics, physics and engineer-
ing. You need them.
ax2 + bx + c = 0 (1.2)
2 Complex Analysis with Mathematica
As long as x is real, the left side of this equation is the square of a real number, and is
therefore non-negative. The right side is non-negative if and only if
b2 - 4 ac ¥ 0 (1.6)
You can, in this case, take the ordinary square root, to obtain
,
x + bê H2 aL = I Hb2 - 4 acLM ë H2 aL (1.7)
,
x = I-b Hb2 - 4 acLM ë H2 aL (1.8)
b2 - 4 ac < 0 (1.9)
the square root cannot be taken in the usual way. The introduction of a quantity Â
(Mathematica® uses a double-struck character for the standard mathematical representa-
tion) satisfying
Â2 = -1 (1.10)
Thus you obtain complex roots of an equation with real coefficients. It is another matter
to understand what happens when the coefficients themselves are complex. At first you
might wonder if you have to extend the number system still further to cope. It is one of
the important results of complex analysis that this is unnecessary. You will discover that
all polynomial equations of degree n, with coefficients that are complex numbers, have n
roots that are complex numbers. In other words: Complex numbers are enough.
Now is a good time to get a grip on the use of Mathematica to solve simple
equations. If you are completely new to Mathematica you may first wish to explore the
booklet Getting Started with Mathematica… (see your Mathematica documentation kit).
If you do not wish to explore the use of Mathematica to solve equations, skip to the next
chapter.
1 Why you need complex numbers 3
mysolution = Solve@x2 - 1 == 0, xD
88x Ø -1<, 8x Ø 1<<
Note that you use a double equal sign when you wish to denote equality in a Mathemat-
ica expression representing an equation. (The use of a single equal sign is reserved for
assignment.) The solution to this quadratic is now contained in the Mathematica expres-
sion mysolution, and we can ask about this expression:
mysolution
88x Ø -1<, 8x Ø 1<<
What we really want are the values of x given the result contained in mysolution. In
Mathematica the English word ‘given’ is expressed by the combination /. (slash dot):
myx = x ê. mysolution
8-1, 1<
This gets you a list of the solutions expressed in the variable myx. This list contains two
elements, and we can extract each one by referring to the position in the list. This is
achieved by the use of double square brackets, containing the position in the list of the
result of interest:
myx@@2DD
1
4 Complex Analysis with Mathematica
myxTwo = x ê. Solve@x2 - 2 == 0, xD
è!!! è!!!
9- 2 , 2 =
myxTwo@@1DD
è!!!
- 2
myxThree = x ê. Solve@x2 + 2 x - 2 == 0, xD
è!!! è!!!
9-1 - 3 , -1 + 3 =
myxFour = x ê. Solve@x2 - x - 1 == 0, xD
1 è!!! 1 è!!!
9 ÅÅÅÅÅ I1 - 5 M, ÅÅÅÅÅ I1 + 5 M=
2 2
If you wish to extract the numerical values of the solution, you use the N[ ] function.
This can be applied by placing the expression to be numericalized in single square
brackets – this is how Mathematica expects to see all arguments to functions, including
N[ ]:
N@myxFourD
8-0.618034, 1.61803<
myxFour êê N
8-0.618034, 1.61803<
myxFive = x ê. Solve@x2 + 1 == 0, xD
8-Â, Â<
1 Why you need complex numbers 5
myxSix = x ê. Solve@x2 + 2 == 0, xD
è!!! è!!!
9-Â 2, Â 2=
myxSeven = x ê. Solve@x2 + 12 == 0, xD
è!!! è!!!
9-2 Â 3, 2Â 3=
Note that in Mathematica's standard form and traditional form for expressions, the square
root of -1 is denoted by Â. You can always ask Mathematica for the traditional mathemat-
ical form of an expression by using explicit conversion to TraditionalForm. In most
of this book the traditional form is used for output – it is more elegant than
StandardForm.
StandardForm@myxSixD
è!!! è!!!
9-Â 2, Â 2=
TraditionalForm@%D
è!!! è!!!
9-Â 2, Â 2=
Note that StandardForm uses an upright font and TraditionalForm an italic font.
If you are new to Mathematica, note that the "per cent" symbol % is a useful shortcut to
the last output. In this case there is just some basic tidying up of the spacing. In the
second example there is more tidying to present the output essentially as you would write
it on paper. If you look under the Mathematica Cell Menu you will see that there are
menu commands and keyboard shortcuts for converting between:
myxEight = x ê. Solve@x2 + x ê 2 + 1 == 0, xD
1 è!!!!!! 1 è!!!!!!
9 ÅÅÅÅÅ I-1 - Â 15 M, ÅÅÅÅÅ I-1 + Â 15 M=
4 4
N@myxEightD
It is always a good idea to check that your answers regenerate the original quadratic:
6 Complex Analysis with Mathematica
myxNine =
x ê. Solve@H1 + IL x ^ 2 + H2 + IL x + 3 - 2 I == 0, xD
1 Â è!!!!!! 1 Â è!!!!!!
9J ÅÅÅÅÅ + ÅÅÅÅÅ N IH-1 + 2 ÂL + 17 M, J- ÅÅÅÅÅ - ÅÅÅÅÅ N IH1 - 2 ÂL + 17 M=
4 4 4 4
Finally, you can consider the case we started with:
myxTen = x ê. Solve@a x ^ 2 + b x + c == 0, xD
è!!!!!!!!!!!!!!!!!!!! è!!!!!!!! !!!!!!!!!!!!
-b - b2 - 4 a c b2 - 4 a c - b
9 ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ =
2a 2a
Factor@2 x ^ 2 - 2D
2 Hx - 1L Hx + 1L
You can get a list of the factors together with their powers as follows:
FactorList@2 x ^ 2 - 2D
ij 2 1y
zz
jj
jj x - 1 1 zzz
j z
k x+1 1 {
Factor@x ^ 2 + 1D
x2 + 1
1 Why you need complex numbers 7
Options@FactorD
8Extension Ø None, GaussianIntegers Ø False, Modulus Ø 0, Trig Ø False<
If we allow Gaussian integers, that is, complex numbers whose real and imaginary parts
are both integers, then a different result is obtained:
Hx - ÂL Hx + ÂL
You can obtain further information about Factor, or indeed any Mathematica function,
by prefixing the function name with a question mark:
? Factor
So, for example, if you try the following, you get nowhere:
x2 + 2
You can build up lists of suitable extensions very easily. Here you make a list of the
square roots of the first three primes:
But now we have jumped to higher-order polynomials. It is time to develop some more
theory. In the next chapter you will see how to define complex numbers properly, and
8 Complex Analysis with Mathematica
you will soon be able to explore the solution of cubic, quartic and other polynomial
equations.
Exercises
1.1 Using pen and paper only (i.e. not using Mathematica) find the solutions of the
following quadratic equations:
x2 - 3 = 0
x2 + 2 x + 1 = 0
x2 + 3 = 0
x2 + x + 4 = 0
ax2 + bx + c
and for what value of x does it occur? When is this minumum value negative, and what
does this imply about the roots of the quadratic equation
ax2 + bx + c = 0 ?
What happens when this minumum value is zero? What happens when it is positive?
Interpret your results graphically.
1.3 Suppose that x1 and x2 are the roots of the quadratic equation
ax2 + bx + c = 0
aHx - x1 LHx - x2 L = 0
show that
x1 x2 = c ê a
x1 + x2 = -b ê a
f HxL = lxH1 - xL
x = f HxL
Hence, without using Mathematica, find all the solutions of the quartic equation:
1 Why you need complex numbers 9
x = f H f HxLL
Hint: the solutions of the quadratic equation are necessarily solutions of the quartic
equation.
1.5 Ÿ Use Mathematica's Solve function to solve the quadratic equations in Exercise
1.1, and compare your solutions.
1.6 Ÿ Plot the functions x2 , x2 - 1, and x2 + 1, using the Mathematica Plot function,
For example, the first of these may be plotted with:
1.7 Ÿ Repeat the exercise of problem 1.6, but parametrize the constant by a value c.
Explore the use of an animation to see the results, by trying the following:
What is the relationship between the quantity b2 - 4 ac in this case, and the location of
the curve?
1.8 Ÿ Use Factor to find the real linear and quadratic factors of the expression x4 - 1,
and hence find all solutions of the quartic equation x4 - 1 = 0.
1.9 Ÿ Using the methods of Exercise 1.8, find all six solutions to the equation x6 - 1 = 0.
2 Complex algebra and geometry
Introduction
In the first chapter you saw why you need imaginary and complex numbers, by consider-
ing the solution of simple quadratic equations. In this chapter you will see how we set up
complex numbers in general, and establish their basic algebraic and geometrical proper-
ties.
We shall assume that you have some understanding of what is meant by a real
number. The exact nature and depth of this understanding will not materially affect the
discussion thoughout most of this book, and this is not a book about the fundamentals of
real analysis. We should, however, take a moment to remind ourselves what a ‘real’
number is, before we start defining ‘imaginary’ and ‘complex’ numbers. Students of pure
mathematics should remind themselves of the details of these matters – there is really
nothing for it but to go for a proper mathematical definition, and experience has shown
that one needs to be slightly abstract in order to get it right, in the sense that the resulting
definition contains all the numbers ‘we need’. For a full exposition, complete with
proofs, you should consult a text on real analysis, such as that by Rudin (1976). For our
purposes it will mostly be sufficient to regard real numbers as being all the points on a
line (which we call the real axis) extending to infinity in both directions. This contains
positive and negative integers, rational numbers, such as 1/2 and 17/15, simple square
roots such as the square root of 2, and other numbers such as p and ‰. When we come to
consider certain results about limits of infinite sequences and series, it will be necessary
to call on more formal results from analysis.
Solve@2 x == 16, xD
88x Ø 8<<
x ê. Solve@2 x == 16, xD
88<
The first, and here only, element of this list can be picked out using the double square
brackets to indicate position in the list:
x ê. Solve@x ^ 2 == 9 ê 4, xD
3 3
9- ÅÅÅÅÅ , ÅÅÅÅÅ =
2 2
x ê. Solve@x ^ 2 == 2, xD
è!!! è!!!
9- 2 , 2 =
The first equation with rational coefficients has a solution that is rational, but for the
second, we have obtained an answer from Mathematica that remains expressed with
square roots. There is in fact no rational number whose square is 2. So clearly we need to
extend the system of rationals to cope with such equations. How do we do so? One might
imagine that one could work through various equations, generating numbers such as the
square roots of 2, 3, etc., to add to our number system. Unfortunately, it is no use just
trying to add, one at a time, various fractional powers such as the square and higher order
roots of the rationals, for we shall miss important irrational numbers such as ‰ and p,
though these numbers can be obtained in terms of limiting processes involving sequences
of rationals. This results in the need for a more abstract approach, as described, for
example, by Rudin (1976).
However, although this process of ‘adding new numbers’ is not adequate for
giving a proper definition of the real numbers, it serves perfectly well as a motivation for
defining complex numbers, and this is the route we shall take.
12 Complex Analysis with Mathematica
‡ x + jy notation (engineering)
In some branches of engineering, particularly electrical engineering, the symbol j or j is
used instead of i. It can usually be used completely interchangeably, though sometimes
matters of convention (usually in the treatment of time-dependent complex functions)
make it useful to think of j as being -i , in order to make sensible comparisons between
different texts. This slightly odd point arises as the world of applied mathematics,
physics and engineering is divided in many ways. One division arises from whether
time-harmonic functions have a time-dependence of the form ‰-Â wt or ‰+ jwt . Don't blame
this author! Send e-mail to anyone but me, such as to anyone writing a book about
applied electromagnetics that uses a convention opposite to the one you have been taught.
2 Complex algebra and geometry 13
InputForm@exprD
E^((-2*I)*f*Pi*t)
StandardForm@exprD
‰-2 Â f p t
TraditionalForm@exprD
‰-2 Â f p t
Note that in some older versions of Mathematica the capital I of InputForm is also
used in StandardForm. Another way of converting Mathematica cells between the
different formats is to use the commands under the ‘Cell Menu’. You might want to
explore this now.
Note that for this to work, it cannot be the case that c = d = 0 – in other words, division
is possible by any complex number except zero. Bearing in mind these definitions, it is
14 Complex Analysis with Mathematica
z = x + Ây (2.4)
zê = x - Ây (2.5)
†z§2 = z zê = x2 + y2 (2.6)
è!!!!!ê!
†z§ = zz (2.7)
From these definitions a number of simple relations follow. First, complex conjugation is
involutory – if we do it twice we arrive back at our original complex number:
zê = z (2.8)
Furthermore, we can extract the real and imaginary parts of a complex number by the use
of conjugation:
It is important to realize that the imaginary part of a complex number is real – we refer to
the imaginary part as y rather than as Ây. Finally, we can see that the operation of taking
complex conjugates commutes with addition and multiplication:
êêêêêêêêêê êêê ê êêêêêêê ê êêê
Hw + zL = w + z Hz wL = z w (2.10)
First, the modulus †z§ gives the length of the vector Hx, yL. Second, the complex
conjugate zê is associated with the point with coordinates Hx, -yL. In the following
diagram the point z = 3 + 2 Â is shown, together with its complex conjugate. The Mathe-
matica code for generating the diagram is also shown – you may ignore it or modify it to
show other complex numbers in Argand form, if you are using the electronic form of this
text with Mathematica.
This is a good point to note how to write the double-struck  in Input Form. It is
obtained by typing: ÂiiÂ
3+2Â
3-2Â
z = x + Ây (2.11)
r = †z§ (2.12)
Given such a point Hx, yL in the Argand plane, you can describe it in various coordinate
systems. Instead of Cartesian Hx, yL coordinates, you can use polar coordinates, Hr, qL,
related to Cartesian coordinates by the relations
16 Complex Analysis with Mathematica
x = r cosHqL
(2.13)
y = r sinHqL
This is the polar form of a complex number. The quantity q is called the argument of z.
3+2Â
q
x
since you can add any multiple of 2p to q and preserve this relation. This is the simplest
example of a phenomenon that affects functions of complex variables in many important
ways. In the present situation you just need to know how to define the argument unambig-
uously. The first step in doing so is to set a principal range for the argument. Two
principal ranges are in common use, but it is important to understand that others may be
defined. The two most commonly employed are to demand that either
2 Complex algebra and geometry 17
or that
-p < q b p (2.17)
A value of q satisfying one of these inequalities is called a principal value of the argu-
ment. Such a value can be denoted by a subscript P – you write qP for such a value. If
such a value has been defined through the choice of a principal range, then any other
valid value may be written
q = qP + 2pk (2.18)
So the modulus of the product is the product of the moduli, and the argument of the
product is the sum of the arguments. A similar calculation gives
z1 r1
ÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅ HcosHq - fL + Â sinHq - fLL (2.24)
z2 r2
Arg@3 + 2 ID
2
tan-1 J ÅÅÅÅÅ N
3
This leaves the answer in exact trigonometric form, which will be simplified if possible:
Arg@2 + 2 ID
p
ÅÅÅÅÅÅ
4
This function uses the range -p < Arg b p as the principal range. You can check this
by asking for the argument of some values scattered near the negative real axis:
8-3.13159, p, 3.13159<
This is a good place to illustrate the nice way in which many Mathematica functions
behave when acting on lists. A very useful shorthand is to write
8-3.13159, p, 3.13159<
This works for any function that has the attribute of ‘being listable’, and this can be
checked by applying the Attributes function:
Attributes@ArgD
The modulus of a complex number is found by using the Abs function, an abbreviation
for absolute value:
Abs@3 + 2 ID
è!!!!!!
13
The real and imaginary parts are extracted by use of the functions Re and Im, while
complex conjugates are taken by the use of the Conjugate function:
Re@3 + 2 ID
Im@3 + 2 ID
2
2 Complex algebra and geometry 19
Conjugate@3 + 2 ID
3-2Â
Note that these are the representation of the functions in StandardForm. If you
convert them to TraditionalForm, you obtain a representation that looks more
familiar.
TraditionalForm[mylist]
Note that older versions of Mathematica do not use the star superscript for complex
conjugates – rather the word ‘Conjugate’ is used in full. (The star was introduced
relatively recently in version 5.1 of the software.)
? ComplexExpand
At first sight, it gives results that are barely distinguishable from the ordinary Expand
function:
ComplexExpand@Hx + I yL ^ 3D
x3 - 3 y2 x + Â H3 x2 y - y3 L
Expand@Hx + I yL ^ 3D
x3 + 3 Â y x2 - 3 y2 x - Â y3
However, the ability to retain some symbols as complex, and to set options to change the
way the function works, gives some useful capabilities. First, we keep z as complex, and
work out the real part of the cube of z:
Options@ComplexExpandD
ComplexExpand@Re@z ^ 3D,
8z<, TargetFunctions -> ConjugateD
3
z3 Hz L
ÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
2 2
We shall revisit ComplexExpand later - it is particularly powerful when dealing with
functions of complex variables, as the following simple example illustrates:
ComplexExpand@Sin@x + I yDD
coshHyL sinHxL + Â cosHxL sinhHyL
Head@3 + 2 ID
Complex
Head@Re@3 + 2 IDD
Integer
Head@3. + 2. ID
Complex
Head@Re@3. + 2. IDD
Real
So Mathematica uses different forms of Head for different types of number. This is
related to the way Mathematica represents such quantities internally. The internal
2 Complex algebra and geometry 21
FullForm@2 + 3 ID
Complex@2, 3D
If you work with lists of complex numbers, FullForm reveals still more internal
structure:
FullForm@82 + 3 I, 4 + 5 I<D
Once you understand the exponential form of complex numbers, this theorem will
become completely obvious. However, it is useful to see how to prove and apply it
without such knowledge, in various cases. The simplest and most important case is for
positive integers, where a = n > 1. Once you see the case n = 2 it becomes clear how to
generalize via induction
HcosHqL + Â sinHqLL2
= cos2 HqL - sin2 HqL + 2 Â sinHqL cosHqL (2.26)
= cosH2 qL + Â sinH2 qL
where the last line is obtained by application of the elementary trigonometric identities.
becomes
pq pq q
JcosJ ÅÅÅÅÅÅÅÅÅÅ N + Â sinJ ÅÅÅÅÅÅÅÅÅÅ NN = cosHpqL + Â sinHpqL = HcosHqL + Â sinHqLL p (2.36)
q q
This is true by DeMoivre's theorem for a positive integer, applied twice, first with q, then
with p. So, taking the qth root of both sides,
pq pq
cosJ ÅÅÅÅÅÅÅÅÅÅ N + Â sinJ ÅÅÅÅÅÅÅÅÅÅ N = HcosHqL + Â sinHqLL pêq (2.37)
q q
You will see shortly that there are other values of the qth roots of a complex number.
2 Complex algebra and geometry 23
cos4 HqL + 4 Â sinHqL cos3 HqL - 6 cos2 HqL sin2 HqL - 4 Â cosHqL sin3 HqL + sin4 HqL (2.39)
cosH4qL = cos4 HqL + sin4 HqL - 6 cos2 HqL sin2 HqL (2.40)
You can now write sin2 HqL = 1 - cos2 HqL and expand the result, to obtain
If you take nth powers of both of these relations, and apply DeMoivre's theorem, you
obtain:
1
z + ÅÅÅÅÅ = 2 cosHqL (2.46)
z
1
z - ÅÅÅÅÅ = 2 Â sinHqL (2.47)
z
Secondly, you get, for general n:
1
zn + ÅÅÅÅnÅÅÅÅ = 2 cosHnqL (2.48)
z
1
zn - ÅÅÅÅnÅÅÅÅ = 2 Â sinHnqL (2.49)
z
Now consider an example. On the one hand, we have
1 4
Jz + ÅÅÅÅÅ N = H2 cosHqLL4 = 16 cos4 HqL (2.50)
z
By the binomial theorem, we also have
1 4 4 1 1 1
Jz + ÅÅÅÅÅ N = z4 + 4 z2 + ÅÅÅÅ2ÅÅÅÅ + ÅÅÅÅ4ÅÅÅÅ + 6 = Jz4 + ÅÅÅÅ4ÅÅÅÅ N + 4 Jz2 + ÅÅÅÅ2ÅÅÅÅ N + 6 (2.51)
z z z z z
Now, using the results obtain so far, the right side can be written as
or
1
cos4 HqL = ÅÅÅÅÅ H4 cosH2qL + cosH4qL + 3L (2.54)
8
This makes it easy to integrate a function like cos4 HqL, because the right side is a sum of
terms, each of which gives a simple integration problem.
TrigExpand@Cos@4 qDD
The operation can be completed by asking Mathematica to expand the result, given a
supplementary rule about how powers of sin(q) are to be treated:
2 Complex algebra and geometry 25
The opposite operation can be effected with the TrigReduce function. You can apply
this to the two examples considered above:
cosH4 qL
TrigReduce@Cos@qD ^ 4D
1
ÅÅÅÅÅ H4 cosH2 qL + cosH4 qL + 3L
8
Another function that is sometimes useful is TrigFactor:
TrigFactor@Cos@4 qDD
? TrigFactor
zn = w (2.55)
‡ Square roots
Suppose that w is a given complex number and we wish to solve the equation
z2 = w (2.56)
è!!! q q
z= r JcosJ ÅÅÅÅÅ N + Â sinJ ÅÅÅÅÅ NN (2.58)
2 2
In the case of the square root, you can probably guess how to find the other root:
è!!! q q
z = - r JcosJ ÅÅÅÅÅ N + Â sinJ ÅÅÅÅÅ NN (2.59)
2 2
But there is another way of thinking about this second solution that allows you to
generalize to nth roots. For any integer value of k, we can use the ambiguity in the
definition of the argument to write
è!!! q q
z= r JcosJ ÅÅÅÅÅ + kpN + Â sinJ ÅÅÅÅÅ + kpNN (2.61)
2 2
è!!!!
where r is the ordinary positive square root of the positive real number r. Now, if k is
even, we get the same value of z, whereas if it is odd we get the other root. To see this,
note, for example, that
and
So it is sufficient to consider the cases k = 0, 1 only, to extract both square roots. This
is the pattern we shall generalize to nth roots.
‡ nth roots
Suppose that w is a given complex number and we wish to solve the equation
zn = w (2.64)
where k is any integer. By applying DeMoivre's theorem to this expression, you obtain:
q 2 kp q 2 kp
z = r1ên JcosJ ÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ N + Â sinJ ÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ NN (2.66)
n n n n
This time, as you vary k, you can find n distinct complex numbers, all of which are roots
of the number w. It is sufficient to consider
To get a better feel for how this works, it is a good idea to consider the simplest case
beyond square roots, and where w = 1.
w3 = 1 (2.71)
H1 - wLH1 + w + w2 L = 1 - w3 = 0 (2.72)
we have the result that the sum of the three cube roots of unity is zero:
1 + w + w2 = 0 (2.73)
Note also that the modulus of w is unity. The quantity w and its powers lie at the corners
of a triangle in the complex plane, with the vertices of the triangle on the unit circle. You
can easily visualize this, using the following plot:
CPlot@z_ListD :=
Module@8r<, r = Map@8Re@#D, Im@#D< &, zD;
ParametricPlot@8Cos@qD, Sin@qD<, 8q, 0, 2 p<,
AspectRatio -> 1,
PlotRange -> 88-1.1, 1.1<, 8-1.1, 1.1<<,
PlotRegion -> 880.05, 0.95<, 80.05, 0.95<<,
Epilog -> [email protected], Map@Point, rD<DD
1 è!!!!
w = ÅÅÅÅ I-1 + Â 3 M;
2
CPlot@81, w, w2 <D
28 Complex Analysis with Mathematica
0.5
-1 -0.5 0.5 1
-0.5
-1
The behaviour of higher-order roots is similar. Here is a visualization of the n nth roots
of unity, implemented in Mathematica :
ShowNthRoots@7D
0.5
-1 -0.5 0.5 1
-0.5
-1
ShowNthRoots@27D
2 Complex algebra and geometry 29
0.5
-1 -0.5 0.5 1
-0.5
-1
There are a few different ways of understanding how one can arrive at this equation.
Each of them relies on some knowledge from other areas of mathematics. Perhaps the
simplest is to write down the Taylor series for the three functions involved. We may as
well ask Mathematica to generate the relevant series for us, using the Series com-
mand. You might like to use the general Taylor series formula to check the following.
First, let's take a look at the series for the exponential function:
x2 x3 x4 x5 x6
1 + x + ÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅ +
2 6 24 120 720
x7 x8 x9 x10
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + OHx11 L
5040 40320 362880 3628800
Next, the series for the trig functions:
x2 x4 x6 x8 x10
1 - ÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + OHx11 L
2 24 720 40320 3628800
30 Complex Analysis with Mathematica
x3 x5 x7 x9
x - ÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + OHx11 L
6 120 5040 362880
Now consider the series for the complex combination:
x2 Â x3 x4 Â x5 x6
1 + Â x - ÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅ -
2 6 24 120 720
Âx 7
x 8
Âx 9
x 10
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + OHx11 L
5040 40320 362880 3628800
This is compared with the series for the exponential function with an imaginary
argument:
x2 Â x3 x4 Â x5 x6
1 + Â x - ÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅ -
2 6 24 120 720
 x7 x8  x9 x10
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + OHx11 L
5040 40320 362880 3628800
The terms displayed are identical. Once the pattern of the denominators is seen as
factorials, it becomes clear that the relationship is exact. Another approach is to develop
some differential equations. If we use the rule
d‰y
ÅÅÅÅÅÅÅÅÅÅÅÅÅ = ‰ y (2.75)
dy
d‰Â q
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ =  ‰Â q (2.76)
dq
Differentiating again, if follows that
d‰Â q
ÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅ = -‰Â q (2.77)
dq
Now the general solution of the equation
d 2 gHqL
ÅÅÅÅ = -gHqL
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (2.78)
dq2
is given by
for some constants a and b. But if we also impose initial conditions of the form
2 Complex algebra and geometry 31
it follows that a = 1 and b = Â. In summary, however you derive it, the relationship leads
to the statement that
‰Â p = -1 ó ‰Â p + 1 = 0 (2.84)
This relationship ties together, in one simple and rather mysterious equation, the five
quantities ‰, Â, p, 0, 1!
w = r ‰Â q = r ‰Â Hq+2kp L (2.86)
must hold for complex numbers, as it does for real ones. If we write
z = x + Ây (2.89)
32 Complex Analysis with Mathematica
then
You will see a more extensive discussion of the logarithm function and its properties
later. For now, note that we can reorganize the exponential form for a complex number
into the relation
z = ‰w (2.92)
Note that the logarithm inherits the same ambiguity as the argument. This is the source of
several interesting and useful properties of the log function that you will revisit many
times.
Now consider
êêêêêêêêêêêê
†z1 + z2 §2 = Hz1 + z2 L Hz1 + z2 L = †z1 §2 + †z2 §2 + êêê
z2 z1 + êêê
z1 z 2 =
êêê (2.97)
†z1 § + †z2 § + 2 ReHz1 z2 L b †z1 § + 2 †z2 § †z1 § + †z2 §2 = H†z1 § + †z2 §L2
2 2 2
That is,
This is the fundamental triangle inequality. You can extract another related inequality by
repeating the argument with a minus sign:
êêêêêêêêêêêê
†z1 - z2 §2 = Hz1 - z2 L Hz1 - z2 L = †z1 §2 + †z2 §2 - êêê
z2 z1 + êêê
z1 z 2 =
êêê (2.100)
†z1 § + †z2 § - 2 ReHz1 z2 L r †z1 § + †z2 § - 2 †z2 § †z1 § = H†z1 § - †z2 §L2
2 2 2 2
Now we do not know which modulus is bigger, so the strongest statement we can make
is that
ViewRootSurface@n_Integer, resolution_IntegerD :=
ParametricPlot3D@8r * Cos@thetaD,
r * Sin@thetaD, r ^ H1 ê nL * Cos@theta ê nD<,
8r, 0, 2<, 8theta, 0, 2 * n * Pi<,
PlotPoints -> 8resolution, resolution * n<,
Boxed -> False, Axes -> False,
AspectRatio Ø 1, ViewPoint -> 8-3, -3, 0<D
Here is the plot for a square root (n = 2), showing the two-valued nature of the square-
root function:
ViewRootSurface@2, 20D
34 Complex Analysis with Mathematica
A similar view of the logarithm function reveals how the function never joins up again.
Here we plot the imaginary part, which is just the argument:
ViewLogSurface@n_Integer, resolution_IntegerD :=
ParametricPlot3D@
8r * Cos@thetaD, r * Sin@thetaD, theta<,
8r, 0, 2<, 8theta, 0, 2 * n * Pi<,
PlotPoints -> 8resolution, resolution * n<,
Boxed -> False, Axes -> False, AspectRatio -> 1 ê 2,
ViewPoint -> 8-3, -2, 3<D
ViewLogSurface@3, 30D
You might like to explore some other functions this way. If you are using Mathematica
technology beyond version 5.2, there may be other options for displaying and viewing
3D graphics. Be sure to check the Front End menus and your documentation for options
available in your current version. Also see the on-line supplement and CD.
2 Complex algebra and geometry 35
8TraditionalForm@x * yD,
TraditionalForm@x yD, TraditionalForm@xyD<
8x y, x y, xy<
The quantity xy with no space has a meaning all of its own as a new symbol! In this
respect Mathematica's conventions are rather more careful than those of ordinary mathe-
matics. However, there is a downside to this in that TraditionalForm expressions can
result in less than satisfactory layout for typesetting purposes. For example, the output of
TraditionalForm@x * y * z * p * q * rD
pqrxyz
is too widely spaced for most purposes, and the first example above means that omitting
spaces altogether is wrong. Instead, the default spacing can be adjusted by surrounding
each space in the output by a pair of  characters, which creates a thin space as follows:
pqrxyz
Exercises
The reader should note that familiarity with the material exemplified here will be
assumed throughout the rest of this text – it is vital that you work through this entire set,
otherwise later material involving many basic calculations with complex numbers, in
their various forms, will be incomprehensible.
ü Algebra
2.1 Express in the form x + Ây each of the following numbers
1
ÅÅÅÅÅ
Â
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
3 - 6Â
36 Complex Analysis with Mathematica
H2 + 3ÂL + H3 - 6ÂL
H2 + 3ÂL - H3 - 6ÂL
H2 + 3ÂL * H3 - 6ÂL
2 + 3Â
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
3 - 6Â
2.2 If z = -2 + 5Â, express in the form x + Ây the quantity
2
3z2 + z + ÅÅÅÅÅ
z
2.3 Express in the form x + Ây each of the following:
Â2 , Â3 , Â4
Â9 , Â43 , Â4002
z2 = zê2
2.8 Let a be any real number and z be any complex number. Show that
†z - a§ = †zê - a§
z1 , z2 , z 1 - z2 , z1 + z2
What is the geometrical meaning of the complex number z1 - z2 and what is the interpre-
tation of the quantity »z1 - z2 »?
8zœ : †z§=2<
8zœ : †z-3§=1<
8zœ : †z+1+§=1<
2.12 Show on a drawing of the Argand plane the following loci:
8zœ : †z-1§=»z+1»<
8zœ : 2 †z-1§=»z+1»<
ü Polar forms
2.14 For each of the following complex numbers
(i) find the modulus;
(ii) find the principal value of the argument;
(iii) express each in the form rHcosHqL + Â sinHqLL.
z=Â
z = -Â
z=1+Â
z = -1 - Â
è!!!
z= 3 +Â
è!!!
z=1+Â 3
è!!!
z = -1 - Â 3
2.15 For each of the following pairs of complex numbers, z1 , z2 , convert each into the
modulus–argument form, and use this to calculate both z1 z2 and z1 ê z2 .
38 Complex Analysis with Mathematica
1+Â 1-Â
z1 = ÅÅÅÅÅÅÅÅ
è!!! ÅÅÅÅÅÅÅ , z2 = ÅÅÅÅÅÅÅÅ
è!!! ÅÅÅÅÅÅÅ
2 2
è!!!
3 +Â
z1 = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , z2 = Â
2
2.17 Express each of cosH3 qL, cosH4 qL, cosH5 qL, in powers of cosHqL.
‡ sin HqL „ q
5
ü Roots
2.23 The three cube roots of unity are: 1, w, w2 , where
2 Complex algebra and geometry 39
1 è!!!
w = ÅÅÅÅÅ I-1 + Â 3 M
2
Show that 1 + w + w2 = 0.
2.24 Show that the sum of the n nth roots of unity is zero.
2.26 Find the three cube roots of 3, and the four fourth roots of 4, in the form a + Â b.
2.28 Find the three cube roots of 3, and the four fourth roots of 4, in the form r‰Âq .
log Â
7pÂ
logI‰3+ ÅÅÅÅÅ4ÅÅÅÅÅÅÅ M
logH-4L
è!!!
logIÂ + 3M
ü Ÿ Mathematica exercises
2.31 Ÿ Apply the format conversion operations InputForm, StandardForm and
TraditionalForm to each of the following expressions:
2.32 Ÿ Use Mathematica to display on the Argand plane the locations of the four points
equivalent to the complex numbers
1 + Â, -1 + Â, -1 - Â, 1 - Â
2.33 Ÿ Use Mathematica's built-in functions to calculate the modulus, argument and
complex conjugate of each of the following:
40 Complex Analysis with Mathematica
1-Â
3 + 2 Â, ÅÅÅÅÅÅÅÅ
è!!! ÅÅÅÅÅÅÅ , 3 + 4 Â
2
2.34 Ÿ Use the Mathematica function ComplexExpand to work out the real and
imaginary parts, with x and y real, of each of the following functions:
Hx + ÂyL4
Hx - ÂyL5
cosHx + ÂyL
coshHx + ÂyL
sinhHx + ÂyL
2.35 Ÿ Use the Mathematica function TrigExpand to re-work Exercise 2.17 (also see
the comment in Section 2.7 about supplementary rules).
2.37 Ÿ Show the eight eighth roots of unity in the Argand plane.
2.38 Ÿ Find out what value Mathematica returns for the square and cube roots of
1, -1, Â, -Â. (Use the N function to get a firm grip on the choice made.)
2.40 Ÿ What does Mathematica return for the values of the log function you were asked
to compute in Exercise 2.30?
2.41 Ÿ Use the function ViewRootSurface to investigate the behaviour of the cube
and fourth-root functions. If you are using Mathematica technology beyond version 5.2,
be sure to investigate both Front End and kernel options for graphics in your current
version of Mathematica. See the on-line supplement and CD.
3 Cubics, quartics and visualization of
complex roots
Introduction
The solution of general quadratic equations becomes possible, in terms of simple square
roots, once one has access to the machinery of complex numbers. The question naturally
arises as to whether it is possible to solve higher-order equations in the same way. In
fact, we must be careful to pose this question properly. We might be interested in
whether we need to extend the number system still further. For example, if we write
down a cubic equation with coefficients that are complex numbers, can we find all the
roots in terms of complex numbers? We can ask similar questions for higher-order
polynomial equations. The investigation of the solution of cubic and quartic equations is
a topic that used to be popular in basic courses on complex numbers, but has become less
fashionable recently, probably because of the extensive manipulations that are required.
Armed with Mathematica, however, such manipulations become routine, and we can
revisit some of the classic developments in algebra quite straightforwardly. These topics
have become so unfashionable, in fact, that the author received some suggestions from
readers of early drafts of this book that this material should be, if not removed altogether,
relocated to an appendix! I have left this material here quite deliberately, having found
numerous applications for the solutions of cubics, at least, in applied mathematics. You
may feel free to skip this part of the material if you have no interest in cubics and higher
order systems.
A further topic that is placed is here is the demonstration of some important
techniques for visualizing the behaviour of roots of equations in the complex plane – root
movies and root locus plots. This will use Mathematica functions for the numerical
solution of polynomial equations.
The formula we shall develop for a cubic is a modern view of one commonly
attributed to one ‘Tartaglia’, more correctly known as N. Fontana, and developed
sometime before 1539. It was a special case for cubics with no quadratic term. A solution
for such cubics was first published by Cardano in the Ars Magna (see Cardano, 1993),
having allegedly being obtained confidentially from Tartaglia, in 1539, with a promise
that it would not be revealed. This led to something of a feud. It is possible that Cardano
was the first to realise that any cubic can be transformed to one where the quadratic term
is absent, but the rest of the work (if not more) appears to be creditable to S. del Ferro.
Cardano published his work mentioning the work by del Ferro and Tartaglia, having
investigated del Ferro's posthumous papers and satisfied himself that del Ferro had a
solution by 1526 (see Penrose, 2004). Tartaglia was not at all pleased. The management
of quartic equations led to an escalation of the arguments between Cardano and Tarta-
glia, as the problem of the quartic was solved by L. Ferrari, a pupil of Cardano, using the
solution of the cubic along the way. It all became terribly heated. As Ferrari said to
42 Complex Analysis with Mathematica
Tartaglia: ‘You have written things that falsely and unworthily slander Signor Cardan,
compared with whom you are hardly worth mentioning.’ In return, Tartaglia referred to
Ferrari as ‘Cardan's creature’. We must of course always be grateful that modern day
scientists never resort to this type of dreadful bickering, or have childish disputes about
who established what result first!
We can approach the management of cubic equations by proceeding historically
and traditionally, or by seeing what Mathematica does and then trying to understand it.
Either way we come to the same conclusion, so we shall in fact begin by seeing what
Mathematica does when presented with a cubic in symbolic form.
solOne = x ê. Solve@x3 - 1 == 0, xD
è!!!!!!
3 !
91, - -1 , H-1L2ê3 =
solTwo = x ê. Solve@x3 - c x2 - 3 a x - b == 0, xD
c 1 è!!!! è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9 ÅÅÅÅÅ + ÅÅÅÅÅÅÅÅè!!!!
ÅÅÅÅÅÅÅÅÅÅÅÅ II2 c3 + 27 a c + 27 b + 3 3 -108 a 3 - 9 c2 a2 + 54 b c a + 4 b c3 + 27 b2 M ^ H1 ê 3LM -
3 3 2
3
è!!!!
3 è!!!! è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I 2 H-c2 - 9 aLM ë I3 I2 c3 + 27 a c + 27 b + 3 3 -108 a 3 - 9 c2 a 2 + 54 b c a + 4 b c3 + 27 b2 M ^ H1 ê 3LM,
c 1 è!!!! è!!!! è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅè!!!
ÅÅÅÅ
3 !
ÅÅÅÅÅÅ Å II1 - Â 3 M I2 c3 + 27 a c + 27 b + 3 3 - 108 a 3 - 9 c2 a2 + 54 b c a + 4 b c3 + 27 b2 M ^ H1 ê 3LM +
3 6 2
è!!!!
II1 + Â 3 M H-c2 - 9 aLM ë
è!!!! è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I3 2 I2 c3 + 27 a c + 27 b + 3 3 -108 a 3 - 9 c2 a2 + 54 b c a + 4 b c3 + 27 b2 M ^ H1 ê 3LM,
2ê3
è!!! ! "################
è!!!!!!!! ######## ####!#!!### Â Jè!!!
!!!!!!!! ! è!!!! è!!!!!!!!!!!!!!!!!!! 2ê3 è!!!!
2 IÂ + 3 M Ib + b2 - 4 a3 M - 2 I-Â + 3 M aN
3 3
b + b2 - 4 a3
3
2 a
: ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ è!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
! ÅÅÅÅÅ ÅÅÅ
Å Å , ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ Å ,
"################
3 è!!!!!!!! ########
!!!!!!!!
########
!!! 3
2 "################
3 è!!!!!!!! ########
!!!!!!!!
########
!!!
b + b2 - 4 a3 2 22ê3 b + b2 - 4 a3
è!!!! è!!!
3 ! è!!!! è!!!!!!!!!!!!!!!!!!! 2ê3
2 Â IÂ + 3 M a + 2 I-1 - Â 3 M Ib + b2 - 4 a3 M
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ >
"################
3 è!!!!!!!! ########
!!!!!!!!
########
!!!
2 22ê3 b + b2 - 4 a3
To get a better grip on this pattern you will need to investigate the cube roots of unity in
some detail. First, however, note that any cubic can be reduced to a cubic with no
quadratic term, by making a simple translation of the coordinates. You can get Mathemat-
ica to do this for you:
3 Cubics, quartics and visualization of complex roots 43
x3 - c x2 - 3 a x - b ê. x -> X + A
HA + XL3 - c HA + XL2 - 3 a HA + XL - b
Expand@%D
A3 - c A2 + 3 X A2 + 3 X 2 A - 3 a A - 2 c X A + X 3 - c X 2 - b - 3 a X
Collect@%, XD
A3 - c A2 - 3 a A + X 3 + H3 A - cL X 2 - b + H3 A2 - 2 c A - 3 aL X
Coefficient@%, X ^ 2D
3A-c
1 è!!!!
w = ÅÅÅÅ I-1 + I 3 M;
2
Expand@w3 D
1
As a consequence of this we also have the following (which can be stated as the fact that
the sum of the three cube roots of unity is zero):
Expand@w2 + w + 1D
The quantity w and its powers lie at the corners of a triangle in the complex plane. You
can easily visualize this, using the following plot routine, which we recall from Chapter
2:
CPlot@z_ListD :=
Module@8r<, r = Map@8Re@#D, Im@#D< &, zD;
ListPlot@r, PlotStyle -> [email protected],
AspectRatio -> 1,
PlotRange -> 88-1.1, 1.1<, 8-1.1, 1.1<<,
PlotRegion -> 880.05, 0.95<, 80.05, 0.95<<DD
CPlot@81, w, w2 <D
44 Complex Analysis with Mathematica
0.5
-1 -0.5 0.5 1
-0.5
-1
z1 = x - a - b;
z2 = x - a w - b w2 ;
z3 = x - a w2 - b w;
ü Exercise
Using pen and paper, you should work out for yourself, and simplify, the product of
these three numbers. Here is what Mathematica gives as a check (the Collect function
groups the terms multiplying each power of x):
Collect@Expand@z1 z2 z3 D, xD
x3 - 3 a b x - a3 - b3
x3 - 3ax - b (3.1)
a b = a; a3 + b3 = b (3.2)
We now show how this can be done, using Mathematica to develop the argument. Again,
it is a useful exercise to work through this yourself with pen and paper.
3 Cubics, quartics and visualization of complex roots 45
eqn = a3 + b3 - b ê. b -> a ê a
a3
ÅÅÅÅÅÅÅÅÅ + a3 - b
a3
This is now an equation involving a3 , so we substitute accordingly:
a3
ÅÅÅÅÅÅÅÅÅ - b + l
l
This gives a quadratic equation for l, which is readily solved:
Solve@sub == 0, lD
1 è!!!!!!!!!!!!!!!!!! 1 è!!!!!!!!!!!!!!!!!!
99l Ø ÅÅÅÅÅ Ib - b2 - 4 a3 M=, 9l Ø ÅÅÅÅÅ Ib + b2 - 4 a3 M==
2 2
alpharoots = a ê. Solve@eqn == 0, aD
"################
3 è!!!!!!!!
########
!!!!!!!!
#######
!!
1 "################
è!!!!!!!!
########
! !!!!!!!
# ######
! ! b - b2 - 4 a3
9- $%%%%%%%%%
3
- ÅÅÅÅÅ
3 b - b - 4 a , ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
2 3
è!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ ,
2 3
2
"################
3 è!!!!!!!! ########
!!!!!!!!
#######
!!
H-1L2ê3 b - b2 - 4 a3 b 1 è!!!!!!!! !!!!!!!!3!!%
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!! ÅÅÅÅÅ , $%%%%%%%%%%%%%%%%
ÅÅÅÅÅÅÅÅ 3 ÅÅÅÅÅ + ÅÅÅÅÅ %%%%%%%%%%%%%%%%
b2 - 4%%%%%%%
a ,
3
2 2 2
è!!!!!!
! 3 b 1 è!!!!!!!! !!!!!!!!3!! % b 1 è!!!!!!!! !!!!!!!!3!! %
- -1 $%%%%%%%%%%%%%%%%
ÅÅÅÅÅ + ÅÅÅÅÅ %%%%%%%%%%%%%%%%
b2 - 4%%%%%%%
a , H-1L2ê3 $%%%%%%%%%%%%%%%%
3 ÅÅÅÅÅ + ÅÅÅÅÅ %%%%%%%%%%%%%%%%
b2 - 4%%%%%%%
3
a =
2 2 2 2
Superficially, we get six roots, but as our equations are symmetric under the swapping of
a and b, three of the roots are the bs associated with three of the as.The three roots of the
cubic are then just:
a+ b
b w2 + a w (3.3)
a w2 + b w
This, with a little reorganization, results in the formula already given. As noted in the
introduction, the formula given is essentially equivalent to one developed by Tartaglia in
about 1530 for cubics with no quadratic term.
If you want to see what the full quartic solution is like, execute the following code. The
output is not given here for reasons that will be obvious if you try it!
solTwo = x ê. Solve@x4 - d x3 - c x2 - 3 a x - b == 0, xD
The output of this is rather hard to interpret. This time, matters are not much simpler if
you restrict attention to quartics containing no cubic term, which can be effected by a
simple translation, as before. This time we shall show the result, suitably reduced:
solThree = x ê. Solve@x4 - c x2 - 3 a x - b == 0, xD
ijj 2 c ijj ijj y yzz
1 1
jj jj- 2 c3 - 72 b c + 243 a 2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3 zz
:- ÅÅÅÅ Å . jjj ÅÅÅÅÅÅÅ ÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ Å I- 2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a 2 M %%%%%%%%%%%%%%%%
2
- 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%bM%%%%%%%% zzz ^ H1 ê 3Lzzz +
2 j 3 3è!!!! jj jj z z
k 3 2 kk { {
3è!!!! ji ji 3 z
y zyzy
J 2 Ic2 - 12 bMN ì jjj3 jjj-2 c3 - 72 b c + 243 a2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bM%%%%%%%% zzzz ^H1 ê 3Lzzzzzzzz -
2
I- 2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a 2 M %%%%%%%%%%%%%%%%
- 4 Ic2%%%%%%%%%%%%%%%%
- 12%%%%
j j z zz
k k { {{
jij jji y
3%%%% zzzz zzy zzy
jj 3 jj- 2 c3 - 72 b c + 243 a 2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I-2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a2 M 2%%%%%%%%%%%%%%%%
- 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%
bM%%%% zz
jj jj zz ^H1 ê 3Lzzz zzz,
k k { {{
3è!!!! ji ji 3 z
y zyzy yzz
J 2 Ic2 - 12 bMN ì jjj3 jjj -2 c3 - 72 b c + 243 a2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bM%%%%%% % zzzz ^H1 ê 3Lzzzzzzzz zzz +
2
I-2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a2 M %%%%%%%%%%%%%%%%
- 4 Ic2%%%%%%%%%%%%%%%%
- 12%%%%
j j z zz z
k k { {{ {
4c 1 i
jijj 3 z
y zzy 3è!!!!
bM%%%%%%%% zzz ^H1 ê 3Lzz - J 2 Ic2 - 12 bMN ì
2
ÅÅÅÅÅÅ ÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ Å jjjj -2 c3 - 72 b c + 243 a2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I-2 c 3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a2 M %%%%%%%%%%%%%%%%
- 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%
3 3è!!!! jj z z
3 2 kk { {
jij jij 3 z
y zy zy
bM%%%%%%%% zzz ^H1 ê 3Lzzz zzz -
2
jj 3 jj- 2 c3 - 72 b c + 243 a 2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I-2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a2 M %%%%%%%%%%%%%%%%
- 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%
j j z zz
k k { {{
1 ij 2 c 1 ijij yz yz
ÅÅÅÅÅ . jjj ÅÅÅÅÅÅ ÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ jjjj -2 c3 - 72 b c + 243 a2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I-2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a2 M2%%%%%%%%%%%%%%%% bM%%%%3%% % zzz ^ H1 ê 3Lzzz +
- 4 Ic2%%%%%%%%%%%%%%%%
- 12%%%%
2 j 3 3è!!!! jjjj z z
k 3 2 kk { {
3è!!!! ji ji y yy
3%%%% zzzz ^H1 ê 3Lzzzzzz
J 2 Ic2 - 12 bMN ì jjj3 jjj-2 c3 - 72 b c + 243 a2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I- 2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a 2 M2%%%%%%%%%%%%%%%%
- 4 Ic2%%%%%%%%%%%%%%%%
- 12%%%%
bM%%%% zz zzzz ,
j j zz
k k { {{
1 ji ji ji 2 c 1 ji ji 3 z
y zy
ÅÅÅÅÅ . jjj H6 aL ì jjj . jjj ÅÅÅÅÅÅÅ ÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ Å jjj jjj- 2 c3 - 72 b c + 243 a 2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bM%%%%%%%% zzz ^H1 ê 3Lzzz +
2
I- 2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a2 M %%%%%%%%%%%%%%%%
- 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%
2 j j j 3 3 !! j j
è!! z z
k k k 3 2 kk { {
3è!!!! ji ji 3 z
y zy zyzy
J 2 Ic2 - 12 bMN ì jjj3 jjj- 2 c3 - 72 b c + 243 a 2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bM%%%%%%%% zzz ^H1 ê 3Lzzz zzzzzz +
2
I- 2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a 2 M %%%%%%%%%%%%%%%%
- 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%
j j z z zz
k k { { {{
jijjij y y
4c 1 3%%%% zzz ^H1 ê 3Lzzz - J3
è!!!! 2
ÅÅÅÅÅÅ ÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ Å jjjj -2 c3 - 72 b c + 243 a2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I-2 c 3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a2 M2%%%%%%%%%%%%%%%%
- 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%bM%%%% zz zz 2 Ic - 12 bMN ì
3 3è!!!! jj
3 2 kk { {
jij jji 3 zz
y zzy zzy
jj 3 jj- 2 c3 - 72 b c + 243 a 2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I-2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a2 M %%%%%%%%%%%%%%%%
2
- 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%bM%%%%%%%% zzz ^H1 ê 3Lzzz zzz,
jj jj z zz
k k { {{
1 jji 2 c 1 ii
jj jj 2 3 zz
y zzy
ÅÅÅÅ Å . jjj ÅÅÅÅÅÅÅ ÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ Å jjj jj- 2 c3 - 72 b c + 243 a 2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I- 2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a 2 M %%%%%%%%%%%%%%%%
- 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%bM%%%%%%%% zzz ^H1 ê 3Lzzz +
2 j 3 3 !! j j
è!! z z
k 3 2 kk { {
ij ji y zyzzyz
3è!!!! 3 zz
J 2 Ic2 - 12 bMN ì jjj3 jjj-2 c3 - 72 b c + 243 a2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
I- 2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a 2 M %%%%%%%%%%%%%%%% bM%%%%%%%% zzz ^H1 ê 3Lzzzzzz +
- 4 Ic2%%%%%%%%%%%%%%%%
- 12%%%%
j j z zz
k k { {{
ij ij ij 2 c ij ij y yz
1 1 3 z
ÅÅÅÅÅ . jjj H6 aL ì jjj . jjj ÅÅÅÅÅÅÅ ÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ Å jj jj- 2 c3 - 72 b c + 243 a 2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bM%%%%%%%% zzz ^H1 ê 3Lzzz +
2
j I- 2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a2 M %%%%%%%%%%%%%%%%
- 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%
2 j j j 3 è!!
3 !! jj j z z
k k k 3 2 kk { {
ji ji y yz zyzy
3è!!!! 3 z
J 2 Ic2 - 12 bMN ì jjj3 jjj- 2 c3 - 72 b c + 243 a 2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bM%%%%%%%% zzz ^H1 ê 3Lzzz zzzzzz +
2
I- 2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a 2 M %%%%%%%%%%%%%%%%
- 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%
j j z z zz
k k { { {{
ii y zzy 3
4c 1 jjjjjj 3 zz è!!!!
jjjj -2 c3 - 72 b c + 243 a2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I-2 c 3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a2 M %%%%%%%%%%%%%%%%
2
ÅÅÅÅÅÅ ÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ Å - 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%bM%%%%%%%% zzz ^H1 ê 3Lzzz - J 2 Ic2 - 12 bMN ì
3 3è!!!! jj z z
3 2 kk { {
ijj ijj y yzz yzz
jj 3 jj- 2 c3 - 72 b c + 243 a 2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3 zz
I-2 c3 - 72 b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c + 243 a2 M %%%%%%%%%%%%%%%%
2
- 4 Ic%%%%%%%%%%%%%%%%
2 - 12%%%%bM%%%%%%%% zzz ^H1 ê 3Lzzz zzz>
jj jj z zz
k k { {{
3 Cubics, quartics and visualization of complex roots 47
quartic = x4 + p x2 + q x + r;
lhs = x ^ 4 + p x ^ 2;
rhs = -q x - r;
lhs - rhs == 0
x4 + p x2 + q x + r 0
lhs == rhs
x4 + p x2 -r - q x
lhsa = lhs + p x2 + p2 ;
rhsa = rhs + p x2 + p2 ;
Factor@lhsaD
2
Hx2 + pL
rhsa
p2 + x2 p - r - q x
We now add to both sides something that preserves the fact that the left side is a perfect
square, but will give us the flexibility to arrange that the right side is also:
lhsb = lhsa + 2 Hx ^ 2 + pL z + z ^ 2;
rhsb = rhsa + 2 Hx ^ 2 + pL z + z ^ 2;
Factor@lhsbD
2
Hx2 + p + zL
rhsb
p2 + x2 p + z2 - r - q x + 2 Hx2 + pL z
If we can choose z so that this new right-hand side is a perfect square, we can take square
roots of both sides, leading to two quadratic equations. Now, recall from Chapter 1, that
if we take a quadratic in the form
b2 = 4ac (3.5)
So we need to apply this constraint to rhsb to get an equation for z. Let's pull out the
various pieces:
a = Coefficient@rhsb, x ^ 2D
p+2z
b = Coefficient@rhsb, xD
-q
c = Expand@rhsb - a x ^ 2 - b xD
p 2 + 2 z p + z2 - r
Collect@b ^ 2 - 4 a c, zD
-4 p3 - 20 z2 p + 4 r p - 8 z3 + q2 + H8 r - 16 p2 L z
Thus we arrive at a cubic equation, the resolvent cubic, which can be solved by Tarta-
glia's method. In Chapter 39 of the Ars Magna, Cardano considered an example that is
worth investigating. Here we work through it with Mathematica.
lhs = x ^ 4 - 10 x ^ 2;
rhs = -4 x - 8;
Factor@lhsaD
2
Hx2 - 10L
Factor@lhsbD
2
Hx2 + z - 10L
rhsb
a = Coefficient@rhsb, x ^ 2D
2 z - 10
b = Coefficient@rhsb, xD
-4
c = Expand@rhsb - a x ^ 2 - b xD
z2 - 20 z + 92
Collect@b ^ 2 - 4 a c, zD
cubic = Simplify@% ê 8D
y ê. Solve@reducedcubic == 0, yD
4 1 è!!!!!! 1 è!!!!!!
9- ÅÅÅÅÅ , ÅÅÅÅÅ I2 - 3 15 M, ÅÅÅÅÅ I2 + 3 15 M=
3 3 3
It looks like algebra will be minimized if we take the first root, so let
z = %@@1DD + 25 ê 3
lhsb ê. z -> 7
rhsb ê. z -> 7
Let us define two quantities, which are each side represented as a perfect square:
perflhs = Factor@lhsbD
2
Hx2 - 3L
perfrhs = Factor@rhsbD
H2 x - 1L2
We now define two quadratic equations by taking the square roots of both sides. It is
helpful to use PowerExpand here to force Mathematica to do the job, and note that we
use the double equals to denote equality:
x2 - 3 ã 2 x - 1
x2 - 3 ã 1 - 2 x
x ê. Solve@quada, xD
è!!! è!!!
91 - 3, 1+ 3=
x ê. Solve@quadb, xD
è!!! è!!!
9-1 - 5 , -1 + 5 =
3 Cubics, quartics and visualization of complex roots 51
x ê. Solve@lhs == rhs, xD
è!!! è!!! è!!! è!!!
91 - 3 , 1 + 3 , -1 - 5 , -1 + 5 =
Next we define a function that extracts the complex roots of a polynomial equation in list
form. To keep matters simple, we always work with z as our variable.
PolySolver@poly_D := z ê. NSolve@poly == 0, zD
mypoly@z_, l_D := z ^ 5 + z ^ 3 + z ^ 2 + z + l;
When we apply the solver the the example, we get the five roots in numerical form. If
you have done so calculations earlier where a value of z has been assigned you will need
to clear it as follows first:
Clear@zD;
PolySolver@mypoly@z, 3DD
‡ Movies
This is done in versions 4 and 5 of Mathematica using a simple loop to generate succe-
sive frames of an animation:
1.5
0.5
-1
-1.5
-2
3 Cubics, quartics and visualization of complex roots 53
You can execute the animation by selecting a group of frames to animate, then applying
‘Animate Selected Graphics’ from the Cell Menu of Mathematica. If you are using
Mathematica technology beyond version 5.2, be sure to investigate the options for your
current version of Mathematica. Also see the on-line supplement and CD.
CRPlot@Flatten@
Table@PolySolver@mypoly@z, lDD, 8l, 0, 4, 0.2<DD,
8-2, 2<, 0.015D
1.5
0.5
-1
-1.5
-2
Note that we get a useful measure of the ‘speed’ of the roots as l changes, expressed by
the separation of the dots. Root locus plots are more traditionally given by joining up the
dots to give a smooth curve. This of course discards the velocity information. It is also
sometimes difficult to decide what dots to join up – our approach avoids this problem as
there is no requirement to join anything up.
Exercises
3.1 Let a and b be the roots of the quadratic equation
ax2 + bx + c = 0
By writing the quadratic ax2 + bx + c in the form aHx - aLHx - bL deduce that
54 Complex Analysis with Mathematica
b c
a + b = - ÅÅÅÅÅ , a b = ÅÅÅÅÅ
a a
3.2 Let a, b, g be the roots of the cubic equation
ax3 + bx2 + cx + d = 0
By writing the cubic polynomial ax3 + bx2 + cx + d in the form aHx - aLHx - bLHx - gL
deduce that
b c d
a + b + g = - ÅÅÅÅÅ , a b + ag + bg = ÅÅÅÅÅ , a bg = - ÅÅÅÅÅ
a a a
3.3 Let a, b, g, d be the roots of the quartic equation
By writing ax4 + bx3 + cx2 + d x + e in the form aHx - aLHx - bLHx - gLHx - dL deduce that
b
a + b + g + d = - ÅÅÅÅÅ
a
c
a b + ag + ad + bg + bd + gd = ÅÅÅÅÅ
a
d
a bg + a bd + adg + bgd = - ÅÅÅÅÅ
a
e
a bgd = ÅÅÅÅÅ
a
3.4 Using the results of Exercises 3.1 and 3.2, write down
(i) a quadratic equation with roots 2 + Â and 2 - Â;
(ii) a cubic equation with roots 3, 4 - Â, 4 + Â.
x3 - 2x - 1 = 0
x3 - 3x - 2 = 0
x3 - 3x + 1 = 0
x4 - 10x2 + 9 = 0
x4 - 9x2 - x + 9 = 0
3.9 Show that x2 + x + 1 is a factor of the quntic expression x5 + x + 1, and find the other
(cubic) factor. Hence find all roots of the equation
x5 + x + 1 = 0
3.10 Ÿ Use the Mathematica functions Expand and Collect to re-work Exercises 3.2
and 3.3 on your computer.
3.11 Ÿ Using Mathematica's Expand function, and the approach of Exercises 3.1, 3.2
and 3.3, find
(i) a quadratic equation with roots 3 and 2 + Â;
(ii) a cubic equation with roots 3, 2 + Â, 2 - Â;
(iii) a quartic equation with roots 2, -2, 3 + Â, 3 - Â.
3.12 Ÿ Use Mathematica's Solve function to solve directly the cubic equations given
in Exercise 3.5.
3.13 Ÿ Use Mathematica's Solve function to find the solutions of the cubic equations
given in Exercise 3.6. What do you notice about the way Mathematica presents the
solutions?
3.14 Ÿ Use Mathematica's Solve function to find the solutions of the quartic equation
given in Exercise 3.8.
3.15 Ÿ Use Mathematica's Solve function to find, in exact form, all roots of the quintic
equation
x5 + x + 1 = 0
3.16 Ÿ Using Solve and NSolve, establish two ways of finding approximate numeri-
cal values to all of the complex roots of the quintic equation
x5 + x + 1 = 0
3.17 Ÿ Using the function FindRoot, how many roots can you find of
x5 + x + 1 = 0
Hint: Try experimenting with different starting values of x0 in the solution method:
3.18 Ÿ Build root movie and root locus plots of the following polynomial, with l
varying:
Introduction
You may already have seen how to solve polynomial equations numerically in Chapter 3,
using the NSolve function, or FindRoot. How in general can we solve an equation,
polynomial or otherwise, numerically? There are many schemes for doing this, with one
or perhaps many variables. Given that we cannot solve most polynomials, or indeed
other equations, in an exact analytical form, we need to consider a numerical treatment.
Let's look now at the most important such scheme. It leads naturally to the
consideration of the solution of polynomial equations by iteration of rational functions,
and this chapter is a brief introduction to this theory. Entire books can and have been
written about both the art and mathematics of this. In the view of the author there is none
better than that by Beardon (1991), which should be consulted by anyone serious about
exploring the matter thoroughly. This chapter contains only introductory analytical
comments on the matter, and for the most part we shall focus on exploring the art with
Mathematica!
So here we take a novel route, looking at how the business of equation solving,
which was the motivation for introducing complex numbers in the 16th century, becomes
a whole new area of interest when we combine complex numbers with a computer
system.
Note that in this chapter we shall be producing moderately complicated graphics.
A machine running at 1 GHz or better is recommended for interactive use of the more
complicated examples presented. If you are using an old machine just lower the plot
resolution.
f HxL = 0 (4.1)
The idea is to take a starting value, say x0 , and compute f Hx0 L. Now consider the tangent
to the curve y = f HxL at the point Hx0 , f Hx0 LL, which has slope f £ Hx0 L, and consider
where this tangent intercepts the x axis. We call the value of x at which this happens x1 .
In travelling from x0 to x1 , the increase in x is Hx1 - x0 L, and the increase in y is
H0 - f Hx0 LL. The slope of the tangent line is therefore given by
0 - f Hx0 L
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (4.2)
x1 - x0
4 Newton–Raphson iteration and complex fractals 57
This now defines a new iteration scheme, since we can just repeat this process, defining
f Hxn L
xn+1 = xn - ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅ (4.5)
f £ Hxn L
The program works by constructing a list, called pointlist, to which is added new
values of the pairs Hxn , 0L, Hxn , f Hxn LL. We then plot the function together with a line
through the final value of pointlist. Here is NRIter applied to a straightforward polyno-
mial, f HxL = x3 + x2 - 3, expressed as a Mathematica pure function, where # is the
argument:
NRIter[(#^3+#^2-3)&, 3.5]
4 Newton–Raphson iteration and complex fractals 59
? FindRoot
This is a very useful function, but one of the lessons of this chapter is that it must be used
carefully. The following examples make the point. Let's make a list of six starting values,
and apply FindRoot for each one:
Let x* be a root of the equation f HxL = 0. The global basin of attraction of x* is the set
that is, the set of starting values that will yield the given root after many iterations.
Cayley was interested in finding the geometrical form of BHx* L when f is a simple
polynomial of low degree, and solved the problem completely for quadratic polynomials.
As he said (Cayley, 1879): ‘Throwing aside the restrictions as to reality, we have what I
call the Newton–Fourier Imaginary Problem ... The solution is easy and elegant in the
case of a quadratic equation, but the next succeeding case of a cubic equation appears to
present considerable difficulty.’ This was something of an understatement. Indeed, it
would take about a hundred more years, fast computers, and an appreciation of fractal
geometry, before Cayley's difficulty could properly be appreciated. Our main task in this
chapter (apart from having some fun with the computer graphics) is to explore these
issues.
f HzL = z2 - 1 = 0 (4.10)
Some algebra (it is left for you as an exercise) leads to the observation that
è
NRHwL = w2 (4.15)
mapped around on the unit circle, and the unit circle is the boundary between the two
basins. Now you just have to interpret this in z-coordinates. Clearly, if wn Ø 0, then
zn Ø 1, and if wn Ø ¶, then zn Ø -1, and what is required is an understanding of what
the unit circle, in w-coordinates, is in z-coordinates. If you set
w = ‰if (4.16)
In the case of a general quadratic mapping similar results apply – the plane is divided
into two basins by the perpendicular bisector of the line joining the two roots.
M@z_D := Hz - 1L ê Hz + 1L
Simplify@M@InverseM@xDDD
x
NR@z_D = 1 ê 2 Hz + 1 ê zL
1 1
ÅÅÅÅÅ Jz + ÅÅÅÅÅ N
2 z
M@NR@InverseM@wDDD
-w-1
ÅÅÅÅ12 H ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅ
w-1
-w-1
ÅÅÅÅÅÅ L - 1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
w-1
-w-1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅ2 H ÅÅÅÅÅÅÅÅ
1
w-1
ÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅ
w-1
-w-1
ÅÅÅÅÅÅ L + 1
Simplify@%D
w2
Finally, note that the parametrization of the imaginary axis in z-coordinates can be seen
to be the unit circle in w-coordinates, as follows:
cosHfL + Â sinHfL
g[z_] := z^3 - 1
z - g@zD ê g '@zD
z3 - 1
z - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅ
3 z2
Simplify@%D
2z 1
ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ
3 3z
What we want to do is to evaluate the progress of iterates of this mapping to each of the
three roots of the cubic equation. These three roots of unity were discussed in Chapter 2,
and can just as easily be found using Mathematica:
z ê. Solve@g@zD == 0, zD
è!!!!!!
3 !
91, - -1 , H-1L2ê3 =
4 Newton–Raphson iteration and complex fractals 63
N@%D
There are various ways of developing an algorithm to manage this. One approach makes
use of the standard kernel function FixedPoint:
? FixedPoint
This will tell us which root has been found, but not how rapid the convergence is. (Look
on MathSource for fractal generators that implement this approach, and see, for example,
Dickau, 1997). Although it requires some more computation, we are interested in
developing a convergence-time algorithm analogous to the escape-time algorithm we
used for the Mandelbrot set. This can also be sorted out by applying the Mathematica
function Length to the function FixedPointList, which generates a list of the
iterates – the length of this list with a suitable termination criteria gives a convergence
time. However, the author's own experiments with this on the Mandelbrot set, as in
Chapter 6, suggests that it is less efficient than the compiled Mathematica approach. It is
left for you to pursue these ideas as programming examples for the Newton–Raphson
case, and draw your own conclusions on efficiency, in the first two exercises. The results
of this may change as the kernel develops!
‡ A convergence-time algorithm
We shall define a function that counts how rapidly progress is made towards a given
root, and that separates the roots by mapping the counter into three distinct intervals
within the set 0 to 255. In order to evaluate this rapidly, the function to evaluate it is
compiled:
NewtonCounter = Compile[{{z,_Complex}},
Module[{counter=0, zold=N[z]+1.0, znew=N[z]},
If[Abs[znew] < 10^(-9), znew = 10^(-9)+0.0*I,
znew=znew];
For[counter = 0,
(Abs[zold-znew] > 10^(-6)) && (counter < 85),
counter++,
(zold = znew;znew = 2*zold/3 + 1/(3*zold^2))];
Which[Abs[znew-1] < 10^(-4), counter,
Abs[znew+0.5-0.866025I] < 10^(-4), 85+counter,
Abs[znew+0.5+0.866025I] < 10^(-4), 170+counter,
True,255]]];
Let's make a quick check to see that it is working:
64 Complex Analysis with Mathematica
82, 105<
Using NewtonCounter, an array of values can be built up for a region of the complex
plane:
‡ Colouring schemes
The next part of our plan is to colour points according to how many iterations is takes to
get to each root. To get nice pictures it is helpful to introduce a capping function that
allows us to amplify colours without breaking Mathematica's rules about the arguments
to functions such as RGBColor[x,y,z], which require that their arguments lie
between 0 and 1.
tr[x_] = Which[x<0,0,x>1,1,True,x];
The first colouring scheme will colour all points in the basins of attraction of complex
roots black, and colour those approaching z = 1 according to the number of iterations.
NewtonColorOne[x_] :=
If[x < 0.333, Hue[6x,1,1], Hue[0,0,0]]
Now we define two other color schemes, based on the use of three different colours, one
for each root:
NewtonColorAll[x_] :=
Which[
x <0.333, RGBColor[tr[5(3x)],tr[5(3x)],tr[5(3x)]],
0.334<x<0.666, RGBColor[tr[5(3x-1)],tr[5(3x-1)],0],
0.667<x<1, RGBColor[0,tr[5(3x-2)],tr[5(3x-2)]],
True, RGBColor[0,0,0]]
NewtonColorRGB[x_] :=
Which[
x <0.333, RGBColor[tr[5*3x],0,0],
0.334<x<0.666, RGBColor[0,tr[5*(3x-1)],0],
0.667<x<1, RGBColor[0,0,tr[5*(3x-2)]],
True, RGBColor[0,0,0]]
.,('%(,
111* &$'* &/21$&&$'$&&/22,2
(%(*!-'
$+, '+$,0%(,,
+) ,,$($&&/$&&$'* &/* &$'
+#%+ *& %+
%(,'" 1 2
(%(*-',$('(%(*!-'
Factor[p[z,r]]
Hz - 1L Hz2 + z + rL
roots[r_] := z /. Solve[p[z,r]==0,z]
roots@rD
1 è!!!!!!!!!!!!!! 1 è!!!!!!!!!!!!!!
91, ÅÅÅÅÅ I- 1 - 4 r - 1M, ÅÅÅÅÅ I 1 - 4 r - 1M=
2 2
Although this might look like a special type of cubic, in fact any cubic is equivalent to
one of this family by a linear transformation – so we are dealing with a general cubic
(see the exercises). This time the Newton–Raphson mapping is given by:
2 z3 + r
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
3 z2 + r - 1
A simple way of treating this map is to supply the parameter r as an additional argument,
and the value of just one of the two complex roots. In the following we shall treat r as
real.
#0#0.)(,,2,33,#'%(,#'143%''%(
%''144-.#*-)"/!,)). +,.
, 4
333,#'%(,#'143%''%(%''144
&#
##0#0.)()/(.#,12,!,)).
32%''%(%''1%''1%''%(-.#*-4
31,#'%(,#'1,#'1,#'%(-.#*-44
!! ""!"#
#0.)(&).,#$%)(#0.)()&),
#011=)*,4146&<('
-&:,3!&1446& <''"4146&'
"4146& ''
#011=)*,4146&<('
%/0*/&
< -&:,3!&1446& <''"4146&'
"4146&86& <'''
<-&:,3!&1446& <''
"4146&'"4146&86& < '''
< -&++!&1446& <''"4146&'
"4146&86& < '''
$69,"4146&''
)*,,;843 148&>>>6,203(6,2)<(?>02203(022)<(??
+)8)(?*4146-3('
078,3708= 148&",:,67,&$6)37547,&+)8)''
,7/)17,6)2,)17,
148")3.,> ?75,*8")8049842)80*
414693*8043*4146-3'
!
!
!$!"
4 Newton–Raphson iteration and complex fractals 71
f HzL = zn - 1 = 0 (4.20)
GenNewtonCounter = Compile[{{z,_Complex},
{n,_Integer}}, Module[{counter=0, zold=N[z]+1,
znew=N[z], k, m},
If[Abs[znew] < 10^(-9), znew = 10^(-9)+ 0.0*I,
znew=znew]; For[counter = 0,
(Abs[zold-znew] > 10^(-6)) && (counter < 85),
counter++,
(zold = znew;znew = zold*(1-1/n) + 1/(n*zold^(n-1)))];
For[k = 0, (Abs[znew - Exp[2*Pi*I*k/n]] > 0.1) && (k <
n), k++, counter = counter + 85]; counter]];
GenNewtonPlot[
{{{remin_, remax_}, {immin_, immax_}}, data_}, n_,
colorfunc_] :=
ListDensityPlot[data,
AspectRatio -> (immax-immin)/(remax - remin),
Mesh -> False, Frame -> False,
PlotRange -> {0, 85*n},
ColorFunction -> (colorfunc[n, #]&)]
tr[x_] = Which[x<0,0,x>1,1,True,x];
The colour functions are similar to those defined previously, but we also make one
adapted specially to the degree seven case:
)/)520/0.01/)$/&6&%
*$6 /3)$ /6% 0.01$ %%
)/)520/0.01!)4)/$/&6&%
#,-(,$6
0.01$21$ 6%21$ 6%21$ 6%%
6
0.01$21$ 6 %21$ 6 % %
6
0.01$ 21$ 6 %21$ 6 %%
6
0.01$21$ 6 % 21$ 6 %%
6 0.01$21$ 6 % %
6 0.01$ 21$ 6% %
6 0.01$ 21$ 6%%
"13) 0.01$ %%
)/)520/.02$+)/1)+-0/)/)520/0.01/)%
)/)520/.02$+)/1)+-0/)/)520/0.01!)4)/%
+'!-+$&)- 1$(),$(
$(),1 "!)+'
!/-)()&)+!/-)().(-!+0* )- 22
1$$21$2$"#-$(" &,!
)0! &,!
0!, &,!!( !+&& &,!&)-)$(-,
1 2
$!/)$(- 1 2%"+).( )&)+
74 Complex Analysis with Mathematica
This is a picture of the cubic ‘Cayley planet’ (let's call it ‘Cayley 3’) viewed from below
its South pole. You can explore many fractal planets of this class by suitable modifica-
tions for the code. Here, for example, is a view of a corresponding ‘Cayley 7’ viewed
from above the equator:
ParametricPlot3D[
{Sin[q] Cos[f], Sin[q] Sin[f],Cos[q],
{EdgeForm[],
GenNewtonColorSeven[7, GenNewtonCounter[Exp[I f]
Cot[q/2],7]/595]}},
{q, 0.001, Pi-0.001}, {f, 0, Pi},
Lighting -> False, Boxed -> False,
Axes -> False, RenderAll -> False,
PlotPoints -> {400,800},
ViewPoint -> {0,3,0},Background -> RGBColor[0,0,0]]
4 Newton–Raphson iteration and complex fractals 75
ParametricPlot3D[
{Sin[q] Cos[f], Sin[q] Sin[f],Cos[q]},
{q, 0.001, Pi-0.001}, {f, 0, 2 Pi},
ColorFunction -> (GenNewtonColorSeven[7,
GenNewtonCounter[Exp[I #5] Cot[#4/2],7]/595]&),
ColorFunctionScaling -> False,
Lighting -> True, Boxed -> False, Mesh -> False,
Axes -> False, RenderAll -> False,
PlotPoints -> {50,100},
ViewPoint -> {0,3,0},Background -> RGBColor[0,0,0]]
In these examples a lower value of PlotPoints has also been chosen initially in order
to get things working on a slower machine. Also, the polar coordinates q and f run over
their full ranges @0, pD and @0, 2 pD respectively, so that you have the entire fractal planet
to view, for example by changing the viewpoint. The value of q is truncated at the North
and South pole to avoid kernel complaints about singular behaviour. Also see the on-line
supplement and CD.
Exercises
4.1 Ÿ Develop a variant of the Newton–Raphson scheme for cubics that uses Fixed-
Point and a simple coloring scheme (i.e. ignore the convergence time issue, and colour
only according to which root is found.) Note that FixedPoint takes an optional
second argument that gives the maximum number of iterations to be used.
4.2. Ÿ Extend the analysis of Exercise 4.1 to use the length of FixedPointList to
generate a colouring scheme for the cubic Newton–Raphson map based on the Length
function, and that colours the plot also according to convergence time Note that Fixed-
PointList takes an optional further argument that gives the maximum number of
iterations to be used. Compare the efficiency with that of the compiled routines used in
this chapter.
4.3. Show that by the use of a suitable linear transformation a cubic polynomial can be
reduced to one of the form
z3 + Hr - 1L z - r
4.5. Ÿ For the case of real r, construct a routine to produce an animation of Newton-
Plot with r playing the role of a frame counter or time coordinate. Try this out first at
low resolution, and when you are happy with the results, increase the number of plot
points. The interval between r = 0 and r = 2 is particularly interesting. Explore this first
and then zoom in on 0.2 < r < 0.3. By examining the factorization of the cubic, explain
4 Newton–Raphson iteration and complex fractals 77
what is special about the point r = 0.25. What happens to the iteration scheme at this
point, and why?
4.6. (To be considered after reading Chapter 5). Show that if z0 is a zero of the function
f : f Hz0 L = 0, and
f H zL
FHzL = z - ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ
f £ HzL
then z0 is a stable fixed point of F, in the sense of Chapter 5. You may assume that f HzL
may be written as
f HzL = Hz - z0 Lk gHzL
for some differentiable gHzL with gHz0 L non-zero. (If you know about the properties of
holomorphic functions, you should note that this assumption is guaranteed by the Taylor
series, if f is a holomorphic function.)
5 A complex view of the real logistic map
Introduction
You have already read about how to motivate the introduction of complex numbers by
the need to solve quadratic equations, and have seen how to solve higher order polyno-
mial equations both through ‘pen and paper’ analysis and with the help of Mathematica.
In the previous chapter you looked at Newton–Raphson iteration. This is not the only
way of defining an iterative solution method, and there is another approach called
‘cobwebbing’ which is the subject of this chapter.
You are now in a position to perform a basic investigation of some of the most
fascinating topics in modern mathematics: period doubling and transitions to chaos. This
topic can be introduced by considering simple quadratic or cubic functions. However,
rather than solving a simple quadratic or cubic equation, you are now going to be
concerned with applying a function over and over again, given a starting value. Under
certain circumstances, this has the effect of finding the solutions to the original equation,
but in other situations you will be led to the solutions of other polynomial equations.
Hence the need for a complex view.
There are many good reasons for you to investigate these topics. First, you
should appreciate the emergence of complexity and beauty from the iteration (repeated
application) of a simple quadratic or cubic map. Second, you should appreciate that there
is some value in doing ‘experimental mathematics’. However, here and elsewhere in this
book we shall be concerned with appreciating the special role that complex numbers
play. In particular, you should appreciate that on its own ‘experimental mathematics’ is
not particularly useful – understanding why things happen is considerably more useful
than just seeing what happens. It is not enough to just report the results of feeding
non-linear equations to a computer and plotting the (admittedly fascinating) results. This
is not, at least in itself, mathematics, at least in the view of the author (unless it is in the
context of reporting an entirely new phenomenon), but does raise interesting questions.
It is also, however, sometimes fun, and we shall indulge in this later in this chapter and
elsewhere.
You will be encouraged to use the power of Mathematica to understand, given
the theory of complex numbers, why it is likely that certain real iterated maps should
behave in a certain way. When this has been accomplished, you will be encouraged to do
some numerical experiments to check the theoretical expectations. Later in this book
(Chapter 7) you will see how to generalize these real iterated maps to complex iterated
maps. We begin this chapter by exploring the theory of ‘cobwebbing’ as a method for
finding the roots of equations. Then the logistic and odd logistic maps are introduced,
and the relation to cobwebbing explored. You may wonder why the term ‘cobwebbing’
is used – this will emerge from one visualization of the theory, later on.
5 A complex view of the real logistic map 79
x = f HxL (5.1)
The idea is to try to solve such an equation by iteration. We make a starting guess, say
x0 , and keep applying the function over and over again. So we set
x1 = f Hx0 L
x2 = f Hx1 L
(5.2)
...
xn+1 = f Hxn L
Does this work? Under certain circumstances, it does. Suppose the solution is x, and that
our current iterate is xn . The current error is
en = xn - x (5.3)
Suppose that xn is close enough to x that we can approximate this last relation, assuming
differentiability, by a Taylor series expansion:
So the errors can only diminish if the absolute value of the derivative is less than unity at
the solution. We need
We refer to a solution of Eq. (5.1) satisfying this property as a stable solution; otherwise
it is an unstable solution. You will see some examples of stable and unstable solutions in
the next section. Note that the condition of stability does not guarantee the convergence
for any given starting value, it just says that if we are close enough to neglect higher-
order terms, we will get closer to the solution.
OrdLogistic@l_, x_D := l x H1 - xL
This is a quadratic mapping of great interest, because it is the simplest system exhibiting
the phenomena of bifurcations, period doubling and transitions to chaos. It also arises
from some fundamental considerations regarding population dynamics. If you wish to
explore where this map comes from, see Field and Golubitsky (1992) and the original
paper by May (1976). You will be encouraged to investigate this map in the exercises,
using methods identical to those given below for a slightly different map. For several
reasons, this chapter will develop the ideas using an interesting cubic variant of the usual
logistic map, which is the cubic or odd logistic map, given by:
Logistic@l_, x_D := l x H1 - x2 L
We shall just use the term Logistic to refer to this odd mapping, throughout the text
of this chapter. So when we apply this to a variable, x, we obtain:
Logistic@l, xD
x H1 - x2 L l
This has the property that it is an odd function of x, so that it possesses a symmetry. This
leads to an additional feature, that of a symmetry-generating bifurcation, not possessed
by the ordinary mapping. This is an effect that is particularly important when you come
to see how to generalize the logistic maps to complex mappings. Furthermore, the
ordinary logistic map has been analysed in detail by several authors working with
Mathematica, including Gray and Glynn (1991), Wagon (1991) and Maeder (1995). You
might like to consult these references if you get stuck on the exercises, but the exercises
should be straightforward if you follow the corresponding arguments for the odd map.
We shall iterate this map on starting values for x. Our goal is to apply cobwebbing
theory to try to predict what will happen. First you will find the fixed points of the
logistic map, by solving a cubic equation. This is easy, but you can also get Mathemat-
ica to sort it out.
5 A complex view of the real logistic map 81
So there are three easy solutions. Are they stable? We just work out the derivative
mapping and apply it to the solutions:
H1 - x2 L l - 2 x2 l
Expand@Dlog@l, logsolDD
8l, 3 - 2 l, 3 - 2 l<
This tells us what we want to know right away. The first solution, at zero, is stable if |l|
è!!!!!!!!!!!!!!!!!
< 1, while the other solutions, at ± 1 - l-1 , are stable provided 1 < l < 2. So if we
iterate the logistic map on a given starting value, we would expect convergence to zero
è!!!!!!!!!!!!!!!!!
if |l| < 1 and convergence to ± 1 - l-1 if l is larger than unity but less than two.
Given that we shall focus attention on positive l, the question therefore arises as to what
happens when l > 2? We no longer expect to obtain a convergent sequence. But there
might be convergent subsequences. It is important to appreciate that when we iterate a
mapping
x = f HxL (5.8)
x = f H f HxLL = f2 HxL;
x = f H f H f HxLLL = f3 HxL; (5.9)
x = f H f H f H f HxLLLL = f4 HxL;
82 Complex Analysis with Mathematica
and so on. It is very instructive to look also at the sets of stable solutions of the fixed
point equations
x = fn HxL (5.10)
in the same manner as we have done for f1 , which is just f . This is where we bring the
machinery of complex variables into play, since in general we expect to find solutions of
the resulting high-order polynomial equations as complex numbers. We shall look
carefully at f2 , which can be treated analytically. Then we shall inspect f3 , f4 , and so
on, using Mathematica's numerical root finding functions. Then, when we have an idea
about what we think will happen, it will be time to do some numerical experimentation.
We can use Mathematica's Nest function to treat the compound mappings, as illus-
trated by the case n = 2, first on some general function:
Nest@f, x, 2D
f H f HxLL
Our mapping is a function of two variables, and we want to focus the iteration on the
second variable. To iterate the function on the x-argument, we convert the logistic map
to a pure function involving its second argument, retaining l as a parameter
l4 x9 - 3 l4 x7 + 3 l4 x5 - l4 x3 - l2 x3 + l2 x
Let's take a look at the fixed points of this mapping. In spite of the fact that this is a
ninth-order polynomial equation, Mathematica has no difficulty in finding the roots!
logsol2 =
FullSimplify@ x ê. Solve@x == Logistic2 @l, xD , xDD
è!!!!!!!!!!!!
$%%%%%%%%%%%%%%%%
1 - ÅÅÅÅÅÅÅÅ ÅlÅÅÅ%%%%%%
l2 -4
ÅÅÅÅÅÅ
l-1 l-1 1 1
$%%%%%%%% % %%%%
90, - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , $%%%%%%%% % %%%%
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅè!!!
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ,
l l "#########l "#########l 2
ÅÅÅÅ
Å
l+1 ÅÅÅ
Å Å ÅÅÅÅ
Å
l+1 ÅÅÅ
Å Å
è!!!!!!!!!!!!
$%%%%%%%%%%%%%%%%
1 - ÅÅÅÅÅÅÅÅ ÅlÅÅÅ%%%%%%
l2 -4
ÅÅÅÅÅÅ è!!!!!!!! !!!!! è!!!!!!!! !!!!!
l2 - 4 %%%%%% 1 l2 - 4 %%%%%% 1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , - $%%%%%%%%%%%%%%%%
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅè!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ%%%%%%%%
ÅÅÅÅ + ÅÅÅÅÅ% , $%%%%%%%%%%%%%%%%
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ%%%%%%%%
ÅÅÅÅ + ÅÅÅÅÅ % =
2 2l 2 2l 2
This is useful – we can see that the fixed points of this mapping contain those of f , as
they should, but we have found several others also. As before, let us investigate the
stability of these fixed points, by considering the derivative map:
5 A complex view of the real logistic map 83
H3 x2 - 1L l2 H3 l2 x6 - 6 l2 x4 + 3 l2 x2 - 1L
Now we apply this map to the zeroes, and plot the results as functions of l
There are only four distinct functions in this list, so we boil the list down to just these
four:
We see that for some of the solutions, we obtain stability criteria identical to those
associated with Logistic. Let's plot all four functions together:
Plot@Evaluate@relevant@lDD,
8l, 0, 3<, PlotRange -> 8-5, 5<,
PlotStyle ->
[email protected], 0.01<D<, [email protected]<,
[email protected]<, [email protected]<<D
-4
For positive l, one pair of solutions is ruled out completely – this is the pair of solutions
with derivative H3 + 2 lL2 . Matters are clearer if we force the plot range to be in the
interval -1 to 1, in order to see when the various points are stable:
Plot@Evaluate@relevant@lDD,
8l, 0, 3<, PlotRange -> 8-1, 1<,
PlotStyle ->
[email protected], 0.01<D<, [email protected]<,
[email protected]<, [email protected]<<D
84 Complex Analysis with Mathematica
1
0.75
0.5
0.25
l ê. Solve@9 - 2 l2 == -1D
è!!! è!!!
9- 5 , 5 =
The larger of these two values, and a numerical approximation, is given by:
We can finally nail down the expected behaviour by observing the action of the logistic
map on each of the four fixed points of f2 that are associated with the derivative map
being 9 - 2 l2 . These are the last set of four roots:
è!!!!!!!!!!!! è!!!!!!!!!!!!
$%%%%%%%%%%%%%%%%
1 - ÅÅÅÅÅÅÅÅ l2 -4
ÅÅÅÅÅÅ $%%%%%%%%%%%%%%%%
ÅÅÅÅ%%%%%% 1 - ÅÅÅÅÅÅÅÅ ÅlÅÅÅ%%%%%%
l2 -4
ÅÅÅÅÅÅ è!!!!!!!! !!!!! è!!!!!!!! !!!!!
l l2 - 4%%%%%%%%%%%%%% l2 - 4%%%%%%%%%%%%%%
1 % $%%%%%%%%%%%%%%%% 1
9- ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅè!!!
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅè!!! $%%%%%%%%%%%%%%%%
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅ , ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅ % =
2 2 2 l 2 2 l 2
Apply the logistic map to these four, to obtain (this may take a little while):
This set is actually just a permutation of the original four. We perform a cyclic permuta-
tion of this second set of four values, effectively swapping the first and third elements,
and the second and fourth. The division of the original list setoffour by the list
mapped, suitably permuted, should give us a list of ones. To see this you need to force
Mathematica to use additional simplification rules:
setoffour ê RotateRight@mapped, 2D ê.
Sqrt@x_D Sqrt@y_D -> Sqrt@x yD
è!!!!!!!!!!!!! è!!!!!!!!
l2 -4
!!!! è!!!!!!!!!!!!! è!!!!!!!!
l2 -4
!!!!
Il + l2 - 4 M I1 - ÅÅÅÅÅÅÅÅ
1 &'''''''''''''''''''''''''''''''' ÅlÅÅÅÅÅÅÅÅÅ M 1 Il + l2 - 4 M I1 - ÅÅÅÅÅÅÅÅ ÅlÅÅÅÅÅÅÅÅÅ M
9 ÅÅÅÅÅ l ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ''''''''''''''''
ÅÅÅÅÅÅÅÅ''''''''
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ' , ÅÅÅÅÅ l &''''''''''''''''''''''''''''''''
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ''''''''''''''''
ÅÅÅÅÅÅÅÅ''''''''
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ' ,
2 l 2 l
è!!!!!!!!
2 !!!! è!!!!!!!!
2 !!!! è!!!!!!!!
2 !!!! è!!!!!!!!
2 !!!!
l $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I1 - ÅÅÅÅÅÅÅÅ l -4 l%%%%%%%%%%%%%%%%
ÅÅÅÅÅÅÅÅÅÅ M I ÅÅÅÅÅÅÅÅ
l 2l
ÅÅÅÅÅÅ + ÅÅÅÅ12%%%%M l $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ÅÅÅÅ-4 I1 - ÅÅÅÅÅÅÅÅ l -4 l%%%%%%%%%%%%%%%%
ÅÅÅÅÅÅ + ÅÅÅÅ12%%%%M
ÅÅÅÅ-4
ÅÅÅÅÅÅÅÅÅÅ M I ÅÅÅÅÅÅÅÅ
l 2l
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ =
2 2
PowerExpand@FullSimplify@%DD
81, 1, 1, 1<
setoffour
è!!!!!!!!!!!! è!!!!!!!!!!!!
$%%%%%%%%%%%%%%%%
1 - ÅÅÅÅÅÅÅÅ l2 -4
ÅÅÅÅÅÅ $%%%%%%%%%%%%%%%%
ÅÅÅÅ%%%%%% 1 - ÅÅÅÅÅÅÅÅ ÅlÅÅÅ%%%%%%
l2 -4
ÅÅÅÅÅÅ è!!!!!!!! !!!!! è!!!!!!!! !!!!!
l l2 - 4 %%%%%% 1 l2 - 4 %%%%%% 1
9- ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅè!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , - $%%%%%%%%%%%%%%%%
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅè!!! ÅÅÅÅ + ÅÅÅÅÅ% , $%%%%%%%%%%%%%%%%
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ%%%%%%%% ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ%%%%%%%%
ÅÅÅÅ + ÅÅÅÅÅ % =
2 2 2 l 2 2 l 2
lambdalist =
80.001, 0.9, 1.0, 1.1, 1.9, 2.0, 2.1, 3.0<;
86 Complex Analysis with Mathematica
TableForm@
N@Table@Join@8l<, setoffourD ê. l -> lambdalist@@iDD,
8i, 8<DD, TableSpacing Ø 81, 1<D
0.001 -22.3663 + 22.3551 Â 22.3663 - 22.3551 Â -22.3663 - 22.3551 Â 22.3663 + 22.3551 Â
0.9 -0.897527 + 0.552771 Â 0.897527 - 0.552771 Â -0.897527 - 0.552771 Â 0.897527 + 0.552771 Â
1. -0.866025 + 0.5 Â 0.866025 - 0.5 Â -0.866025 - 0.5 Â 0.866025 + 0.5 Â
1.1 -0.839372 + 0.452267 Â 0.839372 - 0.452267 Â -0.839372 - 0.452267 Â 0.839372 + 0.452267 Â
1.9 -0.71635 + 0.114708 Â 0.71635 - 0.114708 Â -0.71635 - 0.114708 Â 0.71635 + 0.114708 Â
2. -0.707107 0.707107 -0.707107 0.707107
2.1 -0.589529 0.589529 -0.807747 0.807747
3. -0.356822 0.356822 -0.934172 0.934172
TableForm@
N@Table@Join@8l<, logsol D ê. l -> lambdalist@@iDD,
8i, 8<D, 3D, TableSpacing Ø 81, 1<D
0.001 0 0. µ 10 -2 - 31.607 Â 0. µ 10-2 + 31.607 Â
0.9 0 0. µ 10 -4 - 0.333333 Â 0. µ 10-4 + 0.333333 Â
1. 0 0. 0.
1.1 0 -0.301511 0.301511
1.9 0 -0.688247 0.688247
2. 0 -0.707107 0.707107
2.1 0 -0.723747 0.723747
3. 0 -0.816497 0.816497
You see that setoffour are complex for l < 2. Two of the roots in logsol are
complex for l < 1. In the case l < 1 the only real solution (it is also stable) is x = 0.
As lambda passes through 1 the root at zero becomes unstable (check the derivative
again). Simultaneously the two complex roots become zero and stable. Then the roots
separate and move along the real axis. Each is stable, so one will be chosen by the
iteration, depending on the starting value of x. (This is an example of a symmetry-break-
ing bifurcation, but more of this later.) This continues as l increases to 2, but the two
roots in logsol become unstable at this point. At this stage the roots of the second
iterate become real and stable, then separate, and move off. We can visualize this very
easily using Mathematica's prgramming and graphics tools. First, we make lists contain-
ing both the roots and the absolute values of the derivative:
Next we make a colouring scheme. Stable roots are large and blue, unstable ones are
smaller and red:
cfunc@x_D :=
If@x <= 1,
[email protected], RGBColor@0, 0, 1D<,
[email protected], RGBColor@1, 0, 0D<D
5 A complex view of the real logistic map 87
pts@r_D :=
Map@Flatten@8cfunc@#@@1DDD, Point@8Re@#@@2DDD,
Im@#@@2DDD<D<D &, Transpose@values@rDDD
We can look at the results in various ways. First you can look at the root loci of all
points:
Show@Graphics@[email protected], plotdata<D,
AspectRatio -> 1,
Frame -> True, FrameTicks -> NoneD
The effect is clearer if you produce a movie, and tidy up a bit (the output is not shown in
the printed text). If you have Mathematica 6 or later replace the Do command by
Manipulate to get real-time control of the movie in the notebook.
If you are using a computer, the above graphic can be animated. Some of the frames of
the film that best communicate what is happening are shown here (this does rely on a Do
function in the code above):
Show@GraphicsArray@
88frame@1D, frame@4D, frame@9D<,
8frame@10D, frame@11D, frame@16D<,
8frame@19D, frame@22D, frame@25D<<DD
We now have a very clear picture of the process. There are various stable and unstable
roots of f1 and f2 . If we focus attention on just the stable roots, we obtain the phenome-
non of bifurcation at the values l = 1 and l = 2.
We see that a bifurcation is simply the process whereby a previously real and
stable root becomes unstable, simultaneously with a pair of previously complex roots
becoming both real and stable.
è!!!
Given that the final quartet of roots becomes unstable at l = 5 , we might
5 A complex view of the real logistic map 89
Let's take a look at the fixed points of the first of these mappings The output of the
following is suppressed here, try it out for yourself if you have Mathematica running!
Unfortunately we no longer have an analytical picture. But instead you can use
NSolve as follows:
Nlogsol@l_, n_D :=
N@ x ê. Solve@x == Logistic@l, x, nD , xDD
-27 l13 x26 + 225 l13 x24 - 828 l13 x22 + 1764 l13 x20 + 63 l11 x20 -
2394 l13 x18 - 399 l11 x18 + 2142 l13 x16 + 1071 l11 x16 - 1260 l13 x14 -
1575 l11 x14 - 45 l9 x14 + 468 l13 x12 + 1365 l11 x12 + 195 l9 x12 -
99 l13 x10 - 693 l11 x10 - 330 l9 x10 + 9 l13 x8 + 189 l11 x8 + 270 l9 x8 +
9 l7 x8 + 9 l5 x8 - 21 l11 x6 - 105 l9 x6 - 21 l7 x6 - 21 l5 x6 +
15 l9 x4 + 15 l7 x4 + 15 l5 x4 - 3 l7 x2 - 3 l5 x2 - 3 l3 x2 + l3
Let's take a look at these stable fixed points of f3 , by tabulating them. What we shall do,
since we are now dealing with a polynomial equation of degree 27, is to count the
è!!!
number of stable real roots, rather than tabulate them. We start from the value l = 5 ,
just tabulating the number of real roots initially:
TableA8l,
Length@Select@Nlogsol@l, 3D, HHead@#D == RealL &DD<,
è!!!!
9l, 5 , 2.5, 0.02=E
90 Complex Analysis with Mathematica
ij 2.23607 3 y
jj zz
jj 2.25607 3 zzzz
jj z
jj 2.27607
jj 3 zzzz
jj z
jj 2.29607
jj 3 zzzz
jj zz
jj 2.31607 3 zzz
jj zz
jj 2.33607
jj 3 zzz
jj zz
jjj 2.35607 3 zzzz
jj z
jj 2.37607
jj 3 zzzz
z
jj 2.39607
jjj 3 zzzz
jj zz
jj 2.41607 3 zzz
jj zz
jj 2.43607
jj 3 zzzz
jj z
jjj 2.45607 15 zzzz
jj zz
jj 2.47607
jj 15 zzz
j zz
k 2.49607 15 {
Clearly the number of real roots jumps between 2.436 and 2.456. Now you can home in
on this region. At the same time you can restrict attention to the number of real and
stable roots:
Table@8l,
Length@Select@Nlogsol@l, 3D,
HHead@#D == Real && Abs@Dlog3 @l, #DD <= 1L &DD<,
8l, 2.436, 2.456, 0.002<D
0y
jij
2.436
zz
jj 2.438
jj 0 zzzz
jj z
jj 2.44
jj 0 zzzz
z
jj 2.442
jj 0 zzzz
jj z
jj 2.444
jj 0 zzzz
z
jj 2.446
jj 0 zzzz
jj z
jj 2.448
jj 0 zzzz
jj zz
jj 2.45 0 zzz
jj zz
jj 2.452
jj 6 zzzz
jj zz
jj 2.454
jj 6 zzz
j zz
k 2.456 6{
By homing in on where these roots come and go, you can establish that the stability
interval is @2.45044, 2.46083D. So there is a very small region, centred on about the
point x = 2.456, where we obtain stable solutions of x = f3 HxL. So what happens in the
è!!!
gap between l = 5 , and 2.45044? This could be investigated along the same lines as
was done for f3 , but is a little messy, since it involves seeking real stable roots of a
polynomial equation of degree 81! It is time for another approach, but first we summa-
rize our findings so far.
5 A complex view of the real logistic map 91
Just as in the case of the existence of two stable roots, the trio and quartet of stable roots
are permuted by f1 . This gives us a picture of what happens when we iterate the odd
logistic map. For low positive values of l < 2 we expect to converge to one of the two
roots of x = f1 HxL. When we go above 2 we expect the sequence to settle down to an
è!!!
oscillation between the two stable roots of x = f2 HxL, and then when we hit 5 we
might guess, quite reasonably in fact, that the system will settle down to wander among
some set of four roots of x = f4 HxL. What happens next? We might hypothesize that this
bifurcation process continues, moving to 8, 16, 32 roots in ever smaller intervals. But
then something very odd must happen. By the time we get to 2.45044, just three stable
roots of x = f3 HxL emerge. What happens in between is part of the subject of our experi-
ments, and is the topic that is genuinely hard to predict.
? NestList
In the next few sections you can either just do the experiment or note the analytical
hypothesis (given in italics) and then do the experiment. Experiment three in section 5.9
and subsequent plots will also yield the visual justification for the term ‘cobwebbing’.
92 Complex Analysis with Mathematica
Note that there is no need to converge to zero if the initial value is large!
It is very illuminating to develop a plot that shows the convergence. The form of these
plots shows why the term ‘cobwebbing’ is used. We can regard the iteration as moving
between the line y = x and the line y = f HxL. We write a function to draw lines between
these points.
0.5
0.4
0.3
0.2
0.1
0.8
0.6
0.4
0.2
è!!!
5.9 Ÿ Experiment three: 2 < l < 5
(Sections 5.3. to 5.5 suggests that the system will contain a pair of convergent subse-
quences, that is, the system will settle down to oscillating between two values. Let's look
at a starting value of 0.5, l = 2.1, so we expect to converge to the fixed points of f2 that
are not fixed points of f1 . The fixed points of the latter are given by:
94 Complex Analysis with Mathematica
So we inspect
to predict that the system will settle down to an oscillation between 0.589529 and
0.807747.)
0.8
0.6
0.4
0.2
So we inspect the fixed points of the former that are real and stable:
Select@[email protected], 3D,
HHead@#D == Real && Abs@Dlog3 @2.46, #DD < 1 &LD
to predict that the system will settle down to an osccilation between 0.243947, 0.946145,
0.564397.)
It is taking its time. Let's iterate 1000 times and extract the last three:
1.2
1
0.8
0.6
0.4
0.2
è!!! è!!!
5.11 Ÿ Experiment five: 5 <l< 5 +e
(Sections 5.3 to 5.5 suggests that the system will contain four convergent subsequences.)
Looking at the last eight elements after 1000 iterations appears to confirm this:
è!!!!
TakeANestListALogisticA 5 + 0.001, #E &, 0.17, 1000E, -8E
è!!!!
PlotterA 5 + 0.001, 0.17, 100E;
1
0.8
0.6
0.4
0.2
è!!!
5.12 Ÿ Experiment six: 5 <l
We need to go fully numerical now:
Sqrt@5D êê N
2.23607
5 A complex view of the real logistic map 97
1
0.8
0.6
0.4
0.2
1
0.8
0.6
0.4
0.2
1.2
1
0.8
0.6
0.4
0.2
scatter@l_D :=
Map@Point@8l, #<D &,
Take@NestList@Logistic@l, #D &, 0.1, 1000D, -128DD
0.5
-0.5
-1
for a while and then a transition to chaotic behaviour is made. The double and transition
to chaos reasserts itself in the triple fixed point region. We see this next.
0.9
0.8
0.7
0.6
0.5
0.4
0.3
Show@
Graphics@[email protected], 2.32, 200D, Frame -> TrueDD
0.9
0.8
0.7
0.6
0.5
0.5
-0.5
-1
scatter@l_D :=
Map@Point@8l, #<D &,
Take@NestList@Logistic@l, #D &, -0.1, 1000D, -128DD
0.5
-0.5
-1
Logistic@l, xD
x H1 - x2 L l
This can only become zero, for positive x, for x = 1. (Note how the bifurcation plot
spreads out to zero and one at the same time.) So now we argue that unity has to lie in
the image of the logistic map for real positive x. When is this possible? Let's find out:
preimages@l_D = x ê. Solve@Logistic@l, xD == 1, xD
"#####
3 2
ÅÅÅÅ3 l "################################
3 è!!! è!!!!!!!!!!!!!!!! ################
!!!!!!!!##
9 l2 + 3 27 l4 - 4 l6
9- ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!! ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ ,
"################################
3 è!!! è!!!!!!!!!!!!!!!! ################
!!!!!!!!## 3
2 32ê3 l
9 l2 + 3 27 l4 - 4 l6
Evidently the form of preimages is influenced by the factor 27l4 - 4l6 , which is zero
è!!!
when l = 3 3 ë 2 . This is indeed the critical value. Let's look at what happens to the
preimages in a neighbourhood of this value:
102 Complex Analysis with Mathematica
N@3 Sqrt@3D ê 2D
2.59808
N@%D
N@ComplexExpand@preimages@26 ê 10DDD
So for values of l just less than this critical value, there are no preimages with positive
real part that are real, whereas on or above this value there are such points. So the
mapping attains the value unity, and hence, on iteration, the value 0, when
è!!!
l = l c = 3 3 ë 2.
5.15 Remarks
Note how much of the behaviour of this system can be extracted merely by looking at
the behaviour of certain associated low-order polynomials, and whether their roots are
real, complex and stable. Such an analysis allows us to predict the phenomenon of
bifurcations, and to appreciate when such a bifurcation is symmetry-generating. We can
also make predictions about the outcomes of numerical experiments, confirm our
predictions and go on to investigate the transition to chaos.
A detailed examination of the transition to chaos takes us outside the scope of
the complex analytical point of view. With enough computer power we could look at
several of the higher order polynomials responsible for the continuation of the bifurca-
tion process, but it becomes more efficient to pursue an essentially numerical approach.
This can also be done with Mathematica, and has been discussed in the Mathematica
Journal by R. Maeder (1995). You are encouraged to consult this article for further
information, particularly regarding the computation of the ‘Feigenbaum number’
governing the locations of the values of l at which bifurcations occur.
5 A complex view of the real logistic map 103
Exercises
In the following exercises your goal is to explore the behaviour of the standard quadratic
logistic function
x Ø lxH1 - xL (5.11)
using methods identical to those used in the text for the corresponding cubic map.
Everything, apart from the symmetry-breaking/generating bifurcation should go through
in a very similar fashion. To get you started, the first two exercises give very explicit
guidance. After that, it is up to you to adapt the material in the text to treat the quadratic
case.
5.1 Ÿ Define the ordinary (quadratic) logistic map by the Mathematica function
Logistic@l_, x_D := l x H1 - xL
(In this and all the other exercises, Logistic now refers to this standard quadratic
mapping.) Find the set of fixed points of this mapping, and identify them with the
Mathematica list logsol. Construct a suitable derivative mapping Dlog and show that
the positive fixed point is zero provided 1 < l < 3.
and
Hence, using plotting techniques similar to that used for the odd logistic map, show that
the fixed points of the first compound mapping f2 (that are not fixed points of the
è!!!
logistic map) are stable provided 3 < l < 1 + 6 . What does the original logistic map
do to the pair of stable fixed points that arise in this interval?
5.3 Ÿ Construct visualizations of the first bifurcation of the logistic map, in the Argand
plane, using methods similar to those employed for the odd logistic map.
5.4 Ÿ Show that, for the approximate interval 3.8284 < l < 3.8415, there are three
stable roots of the thrice-iterated logistic map.
104 Complex Analysis with Mathematica
5.6 Ÿ Show that there are no stable real roots of any of the first four iterated mappings
in the approximate interval 3.55409 < l < 3.8284.
5.8 Ÿ Using the bifurcation plot, zoom in on the doubling region and see how many
doublings you can identify.
5.9 Ÿ Using the bifurcation plot, zoom in on the triple fixed point region and see how
the doubling and transition to chaos reasserts itself.
5.10 ‘I would therefore urge that people be introduced to, say, equation (5.11) early in
their mathematical education. This equation can be studied phenomenologically by
iterating it on a calculator, or even by hand. Its study does not involve as much concep-
tual sophistication as does elementary calculus. Such study would greatly enrich the
student's intuition about nonlinear systems.’ This is a quote (verbatim apart from the
equation reference) from the conclusion of Sir Robert May's original paper (May, 1976)
on the logistic map. Discuss whether you agree with May's view.
6 The Mandelbrot set
Introduction
In Chapter 5 we looked at the logistic map given by the equation
LogisticHx, lL = lxH1 - xk L
for values of k = 1, 2. Although this is a real mapping, considerable insight was gained
into its behaviour by allowing x to be complex and investigating fixed points of the
iterated logistic map. We will now consider the first of two approaches to complexifying
this map, by allowing both x and l to be complex. In the first case we shall consider
k = 1, but consider a general complex quadratic map. In the second case we shall
investigate complex generalizations of the k = 2 case that possess various degrees of
symmetry. We defer this until Chapter 7.
As in Chapter 5, there are two routes you can take through this chapter. If you
really want to understand what is happening, you are encourage to read through in order.
If you just want to see how to use Mathematica to make pictures of the Mandelbrot set
and zoom in to interesting regions, then feel free to skip to Section 6.4.
The author is grateful to Professor Sir Roger Penrose, F.R.S., for encouraging
me to think about the issues involved in computing the Mandelbrot set, within a purist
black and white representation. A brief sketch of the issues involved is given in Section
6.7.
quad@x_D := a2 x ^ 2 + a1 x + a0
z@x_D := a2 x + a1 ê 2
sqd = Expand@z@xD ^ 2D
a2
ÅÅÅÅÅ1ÅÅÅÅ + x a2 a1 + x2 a22
4
c = Simplify@z@quad@xDD - sqdD
a2 a1
- ÅÅÅÅÅ1ÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ + a0 a2
4 2
106 Complex Analysis with Mathematica
So we can write
z@quad@xDD = z@xD ^ 2 + c;
quadc@z_D := z ^ 2 + c
l l2
ÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅ
2 4
We can therefore repeat our investigations of the logistic map in these new coordinates,
characterizing the bifurcation behaviour in terms of values of c. We shall not do this in
any detail, but will just check that the iterated map bifurcates where it should. First we
standardize our function name:
Remove@cD;
Quad@z_, c_D := z ^ 2 + c
Quad@z, cD
z2 + c
fixeda = z ê. Solve@Quad@z, cD == z, zD
1 è!!!!!!!!!!!!!! 1 è!!!!!!!!!!!!!!
9 ÅÅÅÅÅ I1 - 1 - 4 c M, ÅÅÅÅÅ I 1 - 4 c + 1M=
2 2
Therefore Quad has a pair of real fixed points provided c < 1 ê 4. What about stability?
The derivative of Quad is just 2 z:
Clearly the second is excluded for real solutions, and the first works provided
c > -3 ê 4. We expect the fixed points of the first iterated map to become real here, and
they do:
6 The Mandelbrot set 107
0.276393
-0.276392
This would lead us down the same path as already described in Chapter 5, so we shall
pursue this particular route no further. But we do ask: what happens if c > 1 ê 4?
Clearly rapid progress to infinity is obtained. For large enough » c » we would expect to
see this type of behaviour. But we also know that for small c the system can converge to
a limit, or bounce around periodically or chaotically.
2z
What we want to do is to characterize the regions where the derivative is less than one in
magnitude. To do this we parametrize the derivative:
c ê. Solve@derivs@@1DD == m, cD@@1DD
1
ÅÅÅÅÅ H2 m - m2 L
4
So the stability region is given parametrically by
1
cstable@m_D := ÅÅÅÅ H2 m - m2 L
4
for |m| < 1. Let's plot this region:
stableregion = ParametricPlot@
Evaluate@Table@8Re@cstable@r Exp@I qDDD,
Im@cstable@r Exp@I qDDD<, 8r, 0, 1, 0.2<DD,
8q, 0, 2 Pi<, AspectRatio -> 1,
PlotStyle -> Hue@6 ê 7D, PlotRange Ø AllD
0.6
0.4
0.2
-0.4
-0.6
4 z Hz2 + cL
84 c + 4, 4 c + 4<
The result is remarkably simple, and it is easy to parametrize the derivative map:
c ê. Solve@derivsb@@1DD == m, cD@@1DD
m-4
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
4
So the stability region is given parametrically by
cstableb@m_D := Hm - 4L ê 4
for |m| < 1. Let's plot this region – it's obviously a circle!
stableregionb = ParametricPlot@
Evaluate@Table@8Re@cstableb@r Exp@I qDDD,
Im@cstableb@r Exp@I qDDD<, 8r, 0, 1, 0.2<DD,
8q, 0, 2 Pi<, AspectRatio -> 1, PlotStyle -> Hue@5 ê 7DD
110 Complex Analysis with Mathematica
0.2
0.1
-0.1
-0.2
Unfortunately the higher order-iterates do not have an simple analytic solution allowing
us to parametrize the stable regions in this way, so we take this route no further. But we
can do something else to find out what this map is doing!
fixed@n_D :=
c ê. Solve@Nest@Quad@#, cD &, 0, nD == 0, cD;
Nfixed@n_D :=
c ê. NSolve@Nest@Quad@#, cD &, 0, nD == 0, cD;
one = fixed@1D;
none = N@oneD
80.<
two = fixed@2D
8-1, 0<
Now one of these points is the fixed point (zero) for n = 1, so we pull this out to leave
the fixed point of the iterated map that is not a fixed point of the map itself:
three = fixed@3D;
nthree = N@threeonlyD
We can now proceed semi-automatically: n = 4 gets new fixed points, and we delete
those already found. Note how the symbolic power of Mathematica allows us to take out
the elements already found without a messy numerical comparison:
four = fixed@4D;
fouronly = Complement@four, one, twoD;
nfour = N@fouronlyD
five = fixed@5D;
fiveonly = Complement@five, oneD;
nfive = N@fiveonlyD;
six = fixed@6D;
sixonly = Complement@six, one, two, threeD;
nsix = N@sixonlyD;
seven = fixed@7D;
sevenonly = Complement@seven, oneD;
nseven = N@sevenonlyD;
data =
8none, ntwo, nthree, nfour, nfive, nsix, nseven<;
Map@Length, dataD
We shall plot the various periodic cycles coloured according to the period. To this end
we attach the periodicity as a list:
aux = Range@1, 7D
81, 2, 3, 4, 5, 6, 7<
realplotdata =
Map@8Hue@1 - #@@1DD ê 7D, [email protected],
Map@ Point@8Re@#D, Im@#D<D &, #@@2DDD< &, plotinfoD;
plota = Show@Graphics@realplotdataDD
This graphic will probably start to remind you of some familiar pictures.
Let's look at the first few values of c so obtained – in each case we delete fixed points
already found:
8-2.<
80. - 1. Â, 0. + 1. Â<
If we plot these, we obtain the first few Misiurewicz points – here we colour them black:
datab =
Flatten@8nthreeoneonly, nfouroneonly, nfourtwoonly<D;
plotdatab = [email protected], Map@
Point@8Re@#D, Im@#D<D &, databD<;
plotb = Show@Graphics@plotdatabD,
PlotRegion -> 880.05, 0.95<, 80.05, 0.95<<D
Now we overlay this with our first plot of periodic orbits containing the origin, AND the
plot of the stable regions:
what ‘the Mandelbrot set’ is. It is the set of values of c for which the iterated map never
reaches infinity. In our initial investigations below we will not dwell on this too much,
but you should appreciate that the nicely coloured illustrations you will develop here,
and that feature in many of the books on the matter, are representations of the escape
time, usually through some colouring scheme. While they give an indication of the shape
of the Mandelbrot set itself, they often give a rather distorted picture. It is actually rather
difficult to draw the pure Mandelbrot set with a computer, and one should also appreci-
ate that a proper picture of it would really just be black and white (or indeed any two
different colours), where black would denote points in the set and white those that are
not. This will be discussed in more detail in Section 6.7.
It is actually quite straightforward to implement the escape-time algorithm, but it
raises some interesting programming issues. We will use the following discussion not
only to illuminate the detailed structure of the Mandelbrot set, but also to show how to
use Mathematica in various different ways. If you follow the coding issues carefully,
you will be in a much better position to understand how to use Mathematica to do other
types of simulation. We shall use Mathematica in three different ways to solve the
problem, based on:
Most of the time we use Mathematica in interpreted mode. Here we shall see
how to compile a numerical operation for efficient evaluation. We shall also show how a
C program can be written to be added in to Mathematica, and look at some of the details
of how Mathematica renders graphics in order to optimize our C further. It should be
noted, however, that most of the benefit comes from just using the Mathematica com-
piler – it is virtually no effort to take a well-written Mathematica expression and com-
pile it, whereas the creation of a separate C program and its linking to Mathematica
requires some effort.
The following discussion follows a similar logic (interpreted, compiled, Math-
Link) to that developed by the author and J. Tigg in Applied Mathematica (Shaw and
Tigg, 1993). However, the following code contains a number of improvements, in that
variables are treated as essentially complex, and the final MathLink version is much
more efficient. In one implementation we have borrowed and extended some interesting
ideas from Tom Wickham Jones' excellent book, (Wickham Jomes, 1994) ‘Mathematica
Graphics, Techniques and Applications’, which is a very useful reference on graphics
generally. His algorithm for fast black and white fractals is generalized here to include
colour management.
‡ Interpreted Mathematica
First we define a function to count the number of iterations it takes to leave a circle of
radius 100. The number of iterations is capped at 100:
116 Complex Analysis with Mathematica
IterationsToLeave[z_, c_] :=
Module[{cnt, nz=N[z], nc=N[c]},
For[cnt=0,
(Abs[nz] <100) && (cnt<100), cnt++,
nz = nz*nz+nc];
N[cnt]];
To define the graphics of interest, we fix a starting value of z and allow c to vary over a
rectangular region in the complex plane:
Next we define a simple function for coloring our plots. The idea is that points that hit
the 100 iteration cap will be coloured black, while all others will be coloured according
to the number of iterations:
So let's try it out on a small block, with z = 0 as our starting value – you should try
something like this first to make sure things are working. The way the picture and output
statement (including the timing) are combined will depend on the version of Mathemat-
ica you are using.
6 The Mandelbrot set 117
Timing[
FracPlot[FracM[0,{{-2.1,0.5},{-1.2,1.2}},50],
FracColor]
]
That is great, and we can already see the shape computed previously analytically,
complete with tendrils! However, it is a bit slow. Here and elsewehere the timings have
all been done on a Power Macintosh G4 running at 1.4 GHz. With a GHz-class machine
it is a little time-consuming to make lots of pictures this way. However, it is easy to
make it go much faster, without the need to go out and buy newer hardware, as we shall
see.
‡ Compiled Mathematica
The built-in compiler allows one to produce optimized numerical routines from Mathe-
matica code. We used this without much explanation in Chapter 4. Here is what Com-
pile does in more detail:
? Compile
Compile@8x1, x2, ... <, exprD creates a compiled function which evaluates
expr assuming numerical values of the xi. Compile@88x1, t1<, ... <,
exprD assumes that xi is of a type which matches ti. Compile@88x1, t1,
n1<, ... <, exprD assumes that xi is a rank ni array of objects each of
a type which matches ti. Compile@vars, expr, 88p1, pt1<, ... <D assumes
that subexpressions in expr which match pi are of types which match pti.
So let's make some minor adjustments and implement this operation. We only need to
make small changes to two of our functions:
118 Complex Analysis with Mathematica
FastIter = Compile[
{{z, _Complex}, {c, _Complex}},
Module[{cnt, nz=N[z], nc=N[c]},
For[cnt=0,
(Abs[nz] <100) && (cnt<100), cnt++,
nz = nz*nz+nc];
N[cnt]]];
Timing[
FracPlot[FracMC[0,{{-2.1,0.5},{-1.2,1.2}},50],FracColor
]]
The calculation is now going nearly ten times faster! Now we can generate some serious
pictures.
6 The Mandelbrot set 119
Timing[
FracPlot[FracMC[0,{{-2.1,0.5},{-1.2,1.2}},200],FracColo
r]]
At the time of final editing we know that computers running at over 3 Ghz can go at
least twice as fast.
‡ Using FixedPointList
A tempting and compact alternative to FastIter is to use the built-in function Fixed-
PointList and the length of the list it generates subject to termination conditions that
parallel those already used. The following modification to FastIter may be tried, but
it turns out to take at least half as long again. (You might want to revisit this, as with
different versions of Mathematica there are different optimizations of the built-in
functions.)
Timing[
FracPlot[FracMC[0,{{-2.1,0.5},{-1.2,1.2}},200],FracColo
r]]
‡ MathLink version 1
Here is the template file:
:Begin:
:Function: fractalml
:Pattern:
FractalML[a_?NumberQ,b_?NumberQ,{{c_?NumberQ,d_?NumberQ},{e_?NumberQ,
f_NumberQ}},g_Integer]
:Arguments: { N[a],N[b],N[c],N[d],N[e],N[f],g }
:ArgumentTypes: { Real,Real,Real,Real,Real,Real,Integer}
:ReturnType: Manual
:End
6 The Mandelbrot set 121
#include "mathlink.h"
MLPutFunction(stdlink,"List",divs);
x = x0;
y = y0;
xadd = xmin + (xmax-xmin)*xco/(divs-1.0);
dist = x0*x0+y0*y0;
for(counts = 0; counts<100 && dist < 10000; counts++){
temp = x*x-y*y+xadd;
y = 2*x*y+yadd;
x = temp;
dist = x*x+y*y;
}
MLPutInteger(stdlink,counts);
}
}
}
SetDirectory@"êBooksêComplexMath2005êMathLinkêbinOSX"D;
Note that this path should be set to wherever you have put them – the above works only
on the author's computer! See the CD notes for location and other information of the
files on the enclosed CD.
Install["mandel"]
LinkObject@.êmandel, 2, 2D
122 Complex Analysis with Mathematica
We can query the operation of the function as with any built-in function, The query
returns information contained in the template file and references to the fact that it is a
LinkObject:
?FractalML
Global`FractalML
FracColorA := (
If[#==1,
RGBColor[0,0,0],
If[#<=0.5, RGBColor[2#,2#,2#],
RGBColor[2-2#,2-2#,1]]]&)
FracColorB := (
If[#==1,
RGBColor[0,0,0],
If[#<=0.5, RGBColor[1,1-2#,0], Hue[1.5-#]]]&)
We can now try it out. We not not use a Timing command as this reports kernel time
only, but this routine is about four times faster than the compiled Mathematica:
6 The Mandelbrot set 123
FracPlot[FracML[0,
{{-2.1,0.5},{-1.2,1.2}},200],FracColorA]
FracPlot[FracML[0,
{{-2.1,0.5},{-1.2,1.2}},200],FracColorB]
Note that with the mandel.c code, only the counting of iterations is farmed out to
external code. This means that this code generates fractals that can be coloured as you
choose, as above.
124 Complex Analysis with Mathematica
Clear[HexaFracPlot];
Install["hexaman"];
?HexaFrac
Global`HexaFrac
Here is the result of a call to HexaFrac of the type used in the Module.
FF0000FF00000000FF0000FF0000FFFF0000
0000FF0000FFFF0000FF0000FF00000000FF
0000FFFF0000FF00000000000000FF0000FF
0000FFFF0000FF00000000000000FF0000FF
0000FF0000FFFF0000FF0000FF00000000FF
FF0000FF00000000FF0000FF0000FFFF0000
We do not report a kernel timing as it is again misleading, as it does not include the time
taken to render the image by the front end. But this method is, overall, significantly
faster than our previous method. The kernel is actually doing very little work by now,
and not much effort is actually required to join the strings together, as the following
computation illustrates:
‡ Places to visit
The following place to visit was suggested by some guesswork. It is chosen as it demon-
strates the concept of self-similarity, revealing a copy of the Mandelbrot set deep within
itself. In Mathematica 4 and 5 the resulting movie can be animated by selecting the
block of cells and choosing ‘Animate Selected Graphics’ from the Cell Menu. You
should see what options are available in your current version of Mathematica for
animation. (See the on-line supplement and CD.) If you have not already done so, install
the C binary file with the following:
Install["mandel"];
In the printed version you will see one frame from the movie at full resolution. If you
have a computer running at less than 1 GHz you should consider halving the size of the
grid in the arguments of FracML, given below as 288.
Do[
FracPlot[
FracML[0, g[-1.40835915,0.13627737,n,0.8],288],
FracColorB],
{n, -3, 30}]
128 Complex Analysis with Mathematica
If you a version of Mathematica compatible with hexaman, you can similarly try the
following:
Install["hexaman"];
Do[
HexaFracPlot[0, g[-0.78,0.15,n,0.8],288],
{n, -4, 30}]
Install["rasterman"];
Show@
Graphics@RasterArray@RasterFrac@0, 0, 88-0.8, -0.75<,
80.1, 0.15<<, 600DDD, AspectRatio Ø 1D
(1) You are either in the set or out of it, so pretty and detailed colouring schemes are
really rather pointless, and you might as well stick to black and white.
(2) The threshold for the number of iterations is technically infinite, so in practice you
need to compute with larger and larger caps on the iteration, and explore what happens.
(3) The set is composed of very fine elements, which can easily be missed in a black and
white representation at finite resolution. In fact, the highly coloured schemes make it
easier to perceive some aspects of the structure. You should try out some of the movies
above to see this.
130 Complex Analysis with Mathematica
The major difficulty is the coupling between issues (2) and (3). Finally, if you want to
view the results, whether on paper or on a computer screen, you have to deal with the
finite resolution of the viewing device.
500.
Computing a picture of the set in the large can be done as before (we increase the
resolution for this discussion – you should try significantly lower numbers than 2000 to
get started!):
FracPlot@
FracMC@300, 0, 88-21 ê 10, 1 ê 2<, 8-12 ê 10, 12 ê 10<<,
2000D, FracColorBW, 300D
6 The Mandelbrot set 131
If you compare this with the figure computed in the sub-section on compiled Mathemat-
ica, or the figure computed with FixedPointList, it looks like we have ‘misplaced’
some filamental structure joining some of the outlying black regions. This issue is
highlighted very dramatically if we dive deep into the fractal to look at a well-known
region:
ij -0.749238 -0.746762 yz
j z
k 0.105762 0.108238 {
Let's take a look a reasonable resolution (2000 µ 2000) computation with caps of 100,
300, 500, 700 and 900:
newcap = 100;
FracPlot@
FracMC@newcap, 0, g@-748 ê 1000, 107 ê 1000, 30, 8 ê 10D,
2000D, FracColorBW, newcapD
132 Complex Analysis with Mathematica
newcap = 300;
FracPlot@
FracMC@newcap, 0, g@-748 ê 1000, 107 ê 1000, 30, 8 ê 10D,
2000D, FracColorBW, newcapD
newcap = 500;
FracPlot@
FracMC@newcap, 0, g@-748 ê 1000, 107 ê 1000, 30, 8 ê 10D,
2000D, FracColorBW, newcapD
6 The Mandelbrot set 133
newcap = 700;
FracPlot@
FracMC@newcap, 0, g@-748 ê 1000, 107 ê 1000, 30, 8 ê 10D,
2000D, FracColorBW, newcapD
newcap = 900;
FracPlot@
FracMC@newcap, 0, g@-748 ê 1000, 107 ê 1000, 30, 8 ê 10D,
2000D, FracColorBW, newcapD
134 Complex Analysis with Mathematica
If we drop our purist view and go to one of our jollier colouring schemes for this last
region we get a rather different outcome. The reader is left to make their own judgement
about the relative merits!
newcap = 900;
FracPlot@
FracMC@newcap, 0, g@-748 ê 1000, 107 ê 1000, 30, 8 ê 10D,
2000D, FracColorA, newcapD
The reader might like to compare these last few illustrations with Plates 37–39 of
Peitgen and Sauper (1986), The region illustrated here is centred slightly to the ‘left’ of
their plate 38. It is also, with a cap of 200, the region shown by Penrose (2004), Figure
6 The Mandelbrot set 135
Exercises
6.1 Ÿ Construct and explore compiled escape-time algorithms for each of the following
mappings:
z Ø z3 + c
z Ø sinHzL + c
In each case construct suitable coloured visualizations, find some interesting regions,
and zoom in on them.
z Ø z3 + Hl - 1L z - l
Use Mathematica's Solve function to find the fixed points of this mapping, and
establish where these fixed points are stable. Numerical studies are helpful here!
6.3 Ÿ Build a compiled escape-time visualizer for the cubic polynomial of Exercise 6.2,
and identify the stable fixed point zones on your plot.
ÅÅÅÅ
ÅÅÅÅÅÅ ReHzL ¥ 0
z-1
c
zØ9
ÅÅÅÅ
êêcÅÅÅÅÅÅ ReHzL < 0
z+1
{
MLPutString(stdlink,"0000FF");
}}}
if(yco < divs-1)
{MLPutString(stdlink,"\n");
}
else
{}}
}
int main(int argc, char *argv[])
{return MLMain(argc, argv);}
Introduction
The existence of functions such as Nest and NestList, together with extensive
visualization tools, ensure that Mathematica is a natural system for investigating the
iteration of mappings. One favourite is the logistic map that was considered in Chapter
5. Complex numbers play a very natural role, from two quite different points of view.
First, we wish to understand why maps such as the logistic map behave the way they do,
without relying merely on numerical simulation. Second, we wish to extend the use of
numerical simulation to mappings of the complex plane.
You explored the first point in Chapter 5, and the second in Chapters 4 and 6, for
simple polynomial maps. Now you will consider some other mappings of the complex
plane into itself. These mappings are non-holomorphic (in the sense that will be defined
properly in Chapter 10 – for now it suffices to realize that this means the functions
involve complex conjugation in an essential way). Normally, when considering the
theory of complex numbers, one's interest is quite rightly focused on the analytical
properties of holomorphic or meromorphic functions. I hope the constructions described
here will suggest that there is much that is both beautiful and interesting in complex
structures that are not holomorphic. My approach is based on that of Field and Golu-
bitsky (1992), and the use of Mathematica on this topic was first given by the author
(Shaw, 1995). Readers are encouraged (a) to get the original book by Field and Golu-
bitsky, (b) to see M. Field's web site at http://nothung.math.uh.edu/~mike/
and (c) to pay attention to the copyright notices on that web site!
The odd logistic map considered in Chapter 5 can be extended very trivially to
the complex plane, complete with the symmetry of a circle, by introducing
if f is real. However, this is not terribly interesting. We will obtain the same dynamics
as the odd logistic map, but along a ray in the complex plane. Matters are significantly
more interesting, if, rather than the symmetry of the circle, we require that maps are
symmetric under the action of the discrete groups Zn (the cyclic group consisting of
rotations by 2p ên and Dn (the dihedral group, consisting of such rotations and a flip). In
this chapter you will explore the simplest possible non-linear maps possessing the
discrete symmetries. For polynomial maps, these take the form
with l, a, b, g and w real, and n an integer. These possess the cyclical symmetry
7 Symmetric chaos in the complex plane 139
2p 2pÂ
gI‰ ÅÅÅÅÅnÅÅÅÅÅÅÅ z, l, a, b, g, w, nM = ‰ ÅÅÅÅÅnÅÅÅÅÅÅ gHz, l, a, b, g, w, nL (7.4)
ü Acknowledgement
I am very grateful to Professors Brian Twomey and Donal Hurley for useful discussions
on these and other topics during a visit to University College, Cork.
makedata[func_, n_] :=
Module[{start=Nest[func, 0.5+0.5I,2000]},
NestList[func,start,n]];
Finally, we make a function that does it all and plots the resulting attractor:
140 Complex Analysis with Mathematica
What you should appreciate from these pictures is that extensive iteration of the map-
pings, in common with the odd logistic map for some values of its parameters, reinstates
the symmetry in the original mapping – this is shown very dramtically in the pictures.
Later on we shall see more explicitly how the symmetry can be initially broken and then
reinstated.
142 Complex Analysis with Mathematica
Now we break the full dihedral symmetry down to cyclical symmetry only, by introduc-
ing a complex term into the function. This produces some rotation or ‘swirl’ in the
resulting plots. To induce this we supply an extra parameter to our MakeMap function –
previously this assumed its default value of zero.
familiar =
MakeMap[1.00, -2.10, 0.00, 1.00, 3, 0.00, 1.00, 1];
star =
MakeMap[-2.42, 1.00, -0.04, 0.14, 6, 0.00, 0.088, 0];
Do[
(tri = MakeMap[2.16+0.005*k,-1.0, 0.0,-0.5, 3];
frame[k] = ScaledSymChaos[tri, 2000, RGBColor[0,0,1],
0.01, 2.0];),{k, 0, 35}]
For printing purposes, one can just show selected frames that show the overall
increase in symmetry. Note how the movie shows that this process is not in any sense
monotonic. Having gone chaotic once, it collapses to a periodic orbit and then goes
chaotic again – this mirrors the behaviour of the logistic map (islands of periodicity
within chaos) very nicely.
The conjugation symmetry is more easily perceived if we transpose the data so that the
reflection symmetry is about the vertical axis – I therefore transpose before plotting:
ListDensityPlot[Transpose[pdata],
Mesh -> False, Frame -> False]
146 Complex Analysis with Mathematica
Timing[pdata = MakeVisitDensity[familiar,100000,250];]
ListDensityPlot[Transpose[pdata],
Mesh -> False, Frame -> False]
cfunca =
(If[#==0, RGBColor[0,0,0], RGBColor[1-#,1-#,1]]&);
cfunch =
(If[#==0, Hue[0.5,0.5,0], Hue[2#/3]]&);
cfuncb =
(If[#==0, RGBColor[0,0,0], RGBColor[0,0,#]]&);
cfuncr =
(If[#==0, RGBColor[0,0,0], RGBColor[#,0,0]]&);
cfuncrb =
(If[#==0, RGBColor[0,0,1], RGBColor[#,0,0]]&);
gold =
(If[#==0, RGBColor[0,0,0], RGBColor[1,1-#,0]]&);
7 Symmetric chaos in the complex plane 147
The following two functions split the range into two and assigns a separate function to
each range. This is a useful way of arranging that sufficient contrast is applied to ensure
that the detail in infrequently visited regions is not washed out.
metallica =
(Which[#==0, RGBColor[0,0,0],
0<#<0.5, RGBColor[2#,2#,2#],
0.5<=#<=1.0, RGBColor[2-2#,2-2#,1]
]&);
stellartipped =
(Which[#==0, RGBColor[0,0,0],
0<#<=0.5, RGBColor[1,1-2#,0],
0.5<#<=1.0, Hue[1.5-#]
]&);
ListDensityPlot[Transpose[pdata],
Mesh -> False, Frame -> False,
ColorFunction -> stellartipped]
Is it left for you (in Exercise 7.1) to explore what this looks like with other colour
functions.
148 Complex Analysis with Mathematica
SetDirectory@
"êBooksêComplexMath2005êAAMathLinkêbinMacOSX"D;
Install["symchaos"]
LinkObject@.êsymchaos, 2, 2D
?SymChaos
Global`SymChaos
The parameters play exactly the role they do in Mathematica. For now we consider
omega = 0 and radius = 1, and now itmax is to be measured in thousands of iterations.
We also supply the extent of the symmetry through a parameter sym. This can take any
integer value, and we have carried out additional C optimization for low values of the
integer parameter sym that gives the degree of symmetry. We can also automate the plot
routines as follows:
SymChaosPlot[object_,colorfunc_] :=
ListDensityPlot[Transpose[object],
Mesh -> False, Frame -> False,
ColorFunction -> colorfunc]
As a test, try the following (on a 1.4 GHz machine, this takes about 1 ê 4 second to
calculate using one million iterations):
7 Symmetric chaos in the complex plane 149
Timing[sanddollar=SymChaos[-2.34,2,0.2,0.1,5,0,0,0,1.0,
100,200];]
80.27 Second, Null<
SymChaosPlot[sanddollar, metallica]
You should experiment with the settings to determine what is practical for your own
system. I suggest computing a few medium resolution samples, based on 60 million
iterations, and a visitation density based on a 400 µ 400 grid. This involves the last two
parameters of SymChaos being set to 6000, 400. Below I have shown, for printing
purposes, plots based on a billion iterations and a 1000 µ 1000 array. The number of
iterations governs the execution time for the C code, while the grid size influences the
time taken by Mathematica to render the image. On a 1.4 GHz G4 machine, the real
elapsed time is less than 1 minute for the calculation of sanddollar with the parame-
ters I suggest you try. Note that the binary files supplied are not optimized – if you are
an expert with compiler settings you may be able to achieve significant speed
improvements!
SymChaosPlot[sanddollar,metallica]
150 Complex Analysis with Mathematica
quadgig =
SymChaos[-1.86,2,0.0,1.0,4,0,0,0,1.0,100000,1000];
SymChaosPlot[quadgig,stellartipped]
7 Symmetric chaos in the complex plane 151
pentibug =
SymChaos[-2.32,2.32,0,0.75,5,0,0,0,1.0,100000,1000];
SymChaosPlot[pentibug,gold]
152 Complex Analysis with Mathematica
flintstone =
SymChaos[2.5,-2.5,0,0.9,3,0,0,0,1.5,100000,1000];
SymChaosPlot[flintstone,gold]
familiar =
SymChaos[1,-2.1,0,1,3,0,1,1,1.1,100000,1000];
SymChaosPlot[familiar,gold]
7 Symmetric chaos in the complex plane 153
swirlygig =
SymChaos[-1.86,2.0,0,1,4,0.1,0,0,1.0,100000,1000];
SymChaosPlot[swirlygig,stellartipped]
154 Complex Analysis with Mathematica
flowerv =
SymChaos[-2.5,5.0,-1.9,1.0,5,0.188,0,0,0.75,100000,1000
];SymChaosPlot[flowerv,gold]
ü Cleaning up
Remove the installed routine with:
Uninstall["symchaos"];
Remove[SymChaos]
Ÿ Exercises
7.1 Ÿ Recreate and explore the data set pdata, and view it with various choices of
colour function, such as cfuncx, metallica, stellartipped and gold.
7 Symmetric chaos in the complex plane 155
7.2 Ÿ Load the symchaos C MathLink program, and the definitions of SymChaos-
Plot and the colour functions of Exercise 7.1. Explore the visitation densities of the
following systems, and of those arising from small variations in parameters from those
given here:
washington =
SymChaos[2.6,-2,0,-0.5,5,0,0,0,1.4,6000,400];
SymChaosPlot[washington,metallica];
halloween =
SymChaos[-2.7,5,1.5,1,6,0,0,0,1.0,6000,400];
SymChaosPlot[halloween,metallica];
bracelet =
SymChaos[-2.08,1,-0.1,0.167,7,0,0,0,1.3,6000,400];
SymChaosPlot[bracelet,stellartipped];
glass =
SymChaos[-2.05,3,-16.79,1,9,0,0,0,0.8,6000,400];
SymChaosPlot[glass,gold];
7.3 Ÿ Create the analogs of the symmetry-generating movie of Section 7.2 for some of
the other examples in Section 7.1, using the scatterplot technique.
7.4 Ÿ If you have a fast computer, try to create a movie of the symmetry-generating
process viewed by a visitation density. Use of the symchaos add-in is recommended!
#include "mathlink.h"
#include <stdlib.h>
#include <math.h>
long **isqmatrix(nsize)
int nsize;
{int i;
long **mat;
mat = (long **) malloc((unsigned) (nsize + 1)*sizeof(long*));
for(i=0;i<nsize;i++)
{mat[i] = (long *) malloc((unsigned) (nsize + 1)*sizeof(long));
};
return mat;
}
void symchaos(lambda,alpha,beta,gamma,sym,omega,delta,pee,radius,itmax,
nopoints)
double lambda,alpha,beta,gamma,omega,delta,radius;
int itmax,nopoints,sym,pee;
{ double l,a,b,g,w,de,r;
double xold, yold, xnew, ynew, xsq, ysq, xfo, yfo;
double xsqysq, temp, argum, absz, abssq;
int i, n, j, k, p, q, nsym, pe;
long **d;
d = isqmatrix(nopoints);
l = lambda;
a = alpha;
b = beta;
g = gamma;
w = omega;
de = delta;
i = itmax;
n = nopoints;
r = radius;
7 Symmetric chaos in the complex plane 157
nsym = sym;
pe = pee;
switch(nsym)
{ case 3:
temp = l+a*abssq+b*xold*(xsq - 3.0*ysq)+de*absz*cos(3.0*pe*argum);
xnew = xold*temp + g*(xsq - ysq) - w*yold;
ynew = yold*temp - 2.0*g*xold*yold + w*xold;
break;
case 4:
temp=l+a*abssq+b*(abssq*abssq - 8.0*ysq*xsq)+de*absz*cos(4.0*pe*argum);
xnew = xold*temp + g*xold*(xsq - 3.0*ysq) - w*yold;
ynew = yold*temp - g*yold*(3.0*xsq - ysq) + w*xold;
break;
case 5:
xfo = xsq*xsq;
yfo = ysq*ysq;
xsqysq = xsq*ysq;
temp = l+a*abssq+b*xold*(xfo-10*xsqysq+5*yfo)+de*absz*cos(5.0*pe*argum);
xnew = xold*temp + g*(xfo-6*xsqysq+yfo) - w*yold;
ynew = 4*g*xold*yold*(ysq - xsq) + yold*temp + w*xold;
break;
case 6:
xfo = xsq*xsq;
yfo = ysq*ysq;
xsqysq = xsq*ysq;
temp=l+a*abssq+b*(xfo*xsq-15*xfo*ysq+15*xsq*yfo-yfo*ysq)+de*absz*cos(6.0*p
e*argum);
xnew = xold*temp + g*xold*(xfo-10*xsqysq+5*yfo) - w*yold;
ynew = g*yold*(10*xsqysq - 5*xfo -yfo) + yold*temp + w*xold;
158 Complex Analysis with Mathematica
break;
default:
temp=
l+a*abssq+b*pow(absz,nsym)*cos(nsym*argum)+de*absz*cos(nsym*pe*argum);
xnew = xold*temp + g*pow(absz,nsym-1.)*cos((nsym-1.)*argum) - w*yold;
ynew = yold*temp - g*pow(absz,nsym-1.)*sin((nsym-1.)*argum) + w*xold;
}
xold = xnew;
yold = ynew;
if (j > 0)
{
k = floor(0.5*n*(xold+radius)/radius);
p = floor(0.5*n*(yold+radius)/radius);
if ((p < n) && (k < n) && (p > -1) && (k > -1))
{
d[p][k] += 1;
}}}}
Introduction
In this section we give a more precise characterization of complex functions and review
their basic properties. We also introduce some formal concepts, such as neighbourhoods
and open sets, in order to lay the foundations for a discussion of continuity and differen-
tiability. We shall then make a first definition of basic functions such as the exponential
and trigonometric functions, and their inverses, by referring back to real definitions. This
will be revisited in Chapter 9 from a power series perspective. We shall also look at the
concept of branch points, and the extended complex plane or ‘Riemann sphere’.
We shall also explore various ways of visualizing complex functions using
Mathematica. We can build various routines for looking at functions. The first one we
will consider takes a two-dimensional point of view, where functions are regarded as
mappings taking one region of the complex plane to another. The second regards the
function as a pair of functions of two real variables, and we show how to use Mathemati-
ca's three-dimensional plotting routines to view simultaneously both the modulus and
argument of complex functions. Then we shall develop some plot routines tailored to
bring out the folded structure of certain complex functions. Note that, in this chapter, the
output of all Mathematica computations is set to appear in TraditionalForm. If you
are using Mathematica technology beyond version 5.2, you should explore the options
provided in your current version for managing graphics. See also the on-line supplement
and enclosed CD.
w = f HzL (8.1)
The set U is called the domain of definition of f , and the set of points
is called the range of f , often simply denoted by f HUL. Such a function will normally be
characterized by supplying a definition of U, such as the upper half-plane Im@zD ¥ 0, and
a formula, such as
f HzL = ‰z (8.3)
Often, however, one leaves out a detailed specification of the set U, and U is to be
somehow, but reasonably, inferred from the formula, as ‘wherever this formula makes
sense’. A good example of this would be the function
160 Complex Analysis with Mathematica
1
f HzL = ÅÅÅÅ3ÅÅÅÅ (8.4)
z
where U would be inferred to be the set of all complex numbers except zero.
It has come to be a standard to describe complex variables using certain variable
names. There is no compulsion to use these lettering schemes, but many books use them.
We set
z = x+ Ây (8.5)
and a function f HzL is often written as a new complex variable w, that is also decom-
posed into real and imaginary parts as
or, alternatively, as
The use of one of the choices u and v, or f and y, is almost universal. As an example,
consider
f HzL = zn (8.8)
u = f = x2 - y2 ; v = y = 2 x y (8.9)
u = f = x3 - 3 x y2 ; v = y = 3 x2 y - y3 (8.10)
expr = Expand@Hx + I yL ^ 2D
x2 + 2 Â y x - y2
Re@exprD
ReHx2 - y2 L - 2 ImHx yL
This is true, but not what we want! In general, this operation can be made to do what we
want by doing one of several things, the approach depending on the complexity of the
expression.
8 Complex functions 161
ü ComplexExpand revisited
We already visited this function in Chapter 2, where we looked at it applied to simple
arithmetical functions. It works very well in the extraction of real and imaginary parts:
? ComplexExpand
ComplexExpand@Re@exprDD
x2 - y2
In general, we define a pair of new functions, re and im, that apply ComplexExpand
appropriately, but also reserving z and w as complex expressions.
re@expression_D :=
ComplexExpand@Re@expressionD, 8z, w<D;
im@expression_D := ComplexExpand@
Im@expressionD, 8z, w<D;
8re@exprD, im@exprD<
8x2 - y2 , 2 x y<
re@Hx + I yL ^ 4D
x4 - 6 y2 x2 + y4
re@Hx + I yL ^ 6 + z ^ 3D
However, this approach is not perfect. In some earlier versions of Mathematica you
might obtain, for example,
re@1 ê Hx + I yLD
x
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ
†x + Â y§
re@1 ê Hx + I yLD
x
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ
x + y2
2
Timing@re@Hx + I yL ^ 10 DD
Our functions operate reasonably quickly! There is a package that boosts the functional-
ity of Re and Im that forces decomposition into the required pieces, but at a price. This
is certainly necssary in older versions of Mathematica, but is less of a necessity in
versions 5 or later.
Needs@"Algebra`ReIm`"D
This package operates by adding a list of rules about real and imaginary parts. The price
that is to be paid is that searching the list and trying the rules takes some time, and the
search may be carried out even when quite simple expressions are supplied.
Timing@re@Hx + I yL ^ 10 DD
Whether you are using an older version with this package, or a recent version, we can
manage quite tricky expressions:
Together@partsD
1
9 ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ3ÅÅ H‰x HcosHyL coshH2 yL sinH2 xL x3 - cosH2 xL sinHyL sinhH2 yL x3 +
Hx2 + y2 L
3 y coshH2 yL sinH2 xL sinHyL x2 + 3 y cosH2 xL cosHyL sinhH2 yL x2 -
3 y2 cosHyL coshH2 yL sinH2 xL x + 3 y2 cosH2 xL sinHyL sinhH2 yL x -
y3 coshH2 yL sinH2 xL sinHyL - y3 cosH2 xL cosHyL sinhH2 yLLL,
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ3ÅÅ H‰x HcoshH2 yL sinH2 xL sinHyL x3 + cosH2 xL cosHyL sinhH2 yL x3 -
Hx2 + y2 L
3 y cosHyL coshH2 yL sinH2 xL x2 + 3 y cosH2 xL sinHyL sinhH2 yL x2 -
3 y2 coshH2 yL sinH2 xL sinHyL x - 3 y2 cosH2 xL cosHyL sinhH2 yL x +
y3 cosHyL coshH2 yL sinH2 xL - y3 cosH2 xL sinHyL sinhH2 yLLL=
A good working practice is to use our definitions re and im as is unless this fails. Only
then should you load the ReIm package. Other tricks for getting things to work include
liberal applications of PowerExpand, and possibly introducing your own supplemen-
tary rules – use of a subset of the rules given in the ReIm package can be quite efficient.
T. Bahder (1995), in his book Mathematica for Scientists and Engineers, has suggested
8 Complex functions 163
that ReIm be avoided altogether on efficiency grounds, and that your own customized
rules sets be used in preference. I recommend that you consult Section 5.11 of that text
for further information if you find yourself confronted with a problem that the approach
described here cannot treat.
It may also be denoted by DHa; L. Geometrically, it consists of the points that are a
distance strictly less than from a.
Sometimes, in dealing with functions that are singular at a point, but defined
elsewhere, it will be convenient to deal with a neighbourhood with a hole in it, usually
called a punctured disc or deleted neighbourhood. These are the sets:
There are also structures called closed discs (the term neighbourhood tends to be
reserved for the open objects), where the boundary points are added. These are sets of
the form:
êêê êêê
DHa; L = N HaL = 8z œ : †z - a§ b < (8.13)
‡ Open sets
Armed with the concept of an open neighbourhood, we can now define open sets in
general. A set U Õ is said to be open, if given any z œ U, there is a real positive
(which can and usually will depend on z), such that N HzL Õ U. That is, there is room to
wander a small distance in any direction and stay within U. An example is the set of
points whose distance from a given point is strictly less than a given radius – this is just
a standard neighbourhood.
ü Closed sets
A set U Õ is said to be closed, if its complement, - U = 8z œ : z – U<, is open.
An example is the set of points whose distance from a given point is less than or equal
to a given radius – this is just a standard closed disk.
164 Complex Analysis with Mathematica
ü Limits
Suppose that f is a function defined on a set that contains a punctured disk centred on
z0 . We say that the limit of f as z tends to z0 is w0 , or,
if, given any e > 0, there is a positive number d such that 0 < » z - z0 » < d implies that
We can rephrase this as saying that the image of a deleted d-neighbourhood lies within
an e-neighbourhood about w0 .
ü Continuity
Suppose that f is a function defined on a set that contains a disk centred on z0 . So now
f Hz0 L is defined. We say f is continuous at z0 if
We need these definitions for future reference. There are various basic theorems that can
be proved about limits of sums, products, quotients, and compositions of functions, and
the relationship between the complex forms and corresponding real forms. We shall not
labor the proofs of these points, as they belong in a basic analysis course, but shall just
remark that if f HzL and gHzL are continuous at z0 , then
We therefore define
This definition has an important consequence related to the fact that the function is not
1:1 as a mapping. Suppose that
Then
Writing
z1 - z2 = x + Ây (8.21)
166 Complex Analysis with Mathematica
it follows that
x = 0, y = 2kp (8.23)
z1 - z2 = 2kp (8.24)
The exponential function is not only not 1:1, it is actually periodic in the imaginary
direction.
This extends the usual real periodicity property into the complex plane. We know that in
the real case, the real zeroes of sinHxL and cosHxL are located at np and Hn + ÅÅÅÅ12 Lp respec-
tively. We can ask where the zeroes are in the complex plane. For example, if
sinHzL = 0 (8.31)
then
‰2Âz = 1 (8.33)
So there are no additional complex zeroes in the complex plane. Similarly, the zeros of
cosHzL are located at z = Hn + ÅÅÅÅ12 L p. The proof of this is left for you as an exercise. In the
case of hyperbolic functions we also make the obvious extension of the real definition to
the complex plane:
1
coshHzL = ÅÅÅÅÅ H‰z + ‰-z L (8.36)
2
1
sinhHzL = ÅÅÅÅÅ H‰z - ‰-z L (8.37)
2
These are periodic in the imaginary direction:
nÂp (8.40)
With any of these functions, some solutions for the zeroes may be found by direct use of
Mathematica, but others may need to be inferred from periodicity properties. You do get
a warning about what solutions are being found:
z ê. Solve@Cosh@zD == 0, zD
— Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.
Âp Âp
9- ÅÅÅÅÅÅÅÅÅ , ÅÅÅÅÅÅÅÅÅ =
2 2
We will consider inverse functions shortly.
168 Complex Analysis with Mathematica
ComplexExpand@Exp@x + I yDD
‰x cosHyL + Â ‰x sinHyL
ComplexExpand@Sin@x + I yDD
ComplexExpand@Cos@x + I yDD
ComplexExpand@Sinh@x + I yDD
ComplexExpand@Cosh@x + I yDD
TrigExpand@Sin@z + wDD
TrigExpand@Cos@z + wDD
TrigExpand@Sinh@z + wDD
coshHzL sinhHwL + coshHwL sinhHzL
TrigExpand@Cosh@z + wDD
Finally, the reverse identities can be generated by the use of TrigReduce - here we
just invert the last example:
8 Complex functions 169
TrigReduce@%D
coshHw + zL
and we must make a choice about what value of the argument is to be taken. This is of
course related to the fact that the exponential function is periodic, i.e. it is many-to-one
as a function. A picture of the log function showing its many-valued character was given
in Section 2.11.
The inverse trigonometric and hyperbolic functions also have this many-valued
property, again arising from the fact that the trigonometric and hyperbolic functions are
periodic. The problem can also be seen by expressing the inverse trigonometric and
hyperbolic functions in terms of logarithms. Let's do an example of this. Suppose first
that
sinhHwL = z (8.42)
‰w - ‰-w = 2 z (8.43)
q = ‰w (8.44)
so that
1
q - ÅÅÅÅÅ = 2 z (8.45)
q
q2 - 2zq - 1 = 0 (8.46)
è!!!!!!!!
!!!!! è!!!!!!!!!!!!!
9z - z2 + 1 , z + z2 + 1 = (8.47)
Now we demand that z = 0 implies w = 0, and hence that q = 1. This involves picking
the second root. Finally taking logs suggests that we set
è!!!!!!!!
!!!!!
arcsinhHzL = logIz + z2 + 1 M (8.48)
1 1+z
arctanhHzL = ÅÅÅÅÅ logJ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ N (8.50)
2 1-z
Similarly, for the trigonometric functions
è!!!!!!!!!!!!
!
arcsinHzL = -Â logIÂ z + 1 - z2 M (8.51)
è!!!!!!!!!!!!
!
arccosHzL = -Â logIz + Â 1 - z2 M (8.52)
1 Â+z
arctanHzL = ÅÅÅÅÅ Â logJ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ N (8.53)
2 Â-z
? ArcSin
We will explore some of the interesting properties of this function in Section 8.6.
8 Complex functions 171
1
0 2
-1
0
-2
0 -2
2
1
0 2
-1
0
-2
0 -2
2
2
0 2
-2
0
-2
0 -2
2
Other representations of branch cuts can also be given – we defer this until necessary,
when we consider the evaluation of integrals involving multi-valued functions.
Examination of this function reveals that we do not have to worry here about the log
function, as its argument does not vanish, but we take the square roots of both 1 - z and
1 + z. So there are branch points at 1 and -1. How should these, and possibly infinity, be
linked by branch cuts? One might start by guessing that we take the line joining -1 to 1
along the real axis. But this would be foolish, as we would be cutting away precisely that
8 Complex functions 173
region on which arcsin(x) makes sense as a real function! Remember that as a real
function sin(x) attains values between -1 and 1, so ideally we would like to keep a
complex neighbourhood of this region within the domain of the inverse function. An
alternative is to place branch cuts along the intervals H-¶, -1L and H1, ¶L - this is what
is normally done and is also Mathematica's convention. Let's take a look at the imagi-
nary part of the inverse sine function - the branch cuts are clearly visible.
2
1
0 2
-1
-2
0
-2
0 -2
2
This is quite a good example as it illustrates the fact that there is no hard and fast rule for
drawing branch cuts, and that we may be influenced by the real form of the function of
interest. Sometimes we may wish to make other choices that at first sight seem perverse.
For example, there are sometimes good reasons to take the branch cut of the log function
to be along the positive real axis.
Mathematica's conventions for branch cuts for various multi-valued functions
are described in detail in relevant sections of The Mathematica Book (Wolfram, 2003).
In the text for versions 3, 4 and 5, the conventions for the inverse trigonometric and
hyperbolic, as well as nth root and log functions, are given in Section 3.2.7.
It is well worth exploring what Mathematica does when confronted with, for
example, trigonometric functions and their many-valued inverses, as this raises two
interesting issues. In the real setting, we might have got used to the inverse sine function
being relevant only to the interval H-1, 1L, but in the full complex setting the inverse
sine works for general complex arguments, for example,
8ArcSin@12D, [email protected]<
8Sin@ArcSin@12DD, Sin@[email protected]<
Chop@%@@2DDD
12.
Sin@[email protected] DD
12.000000000000000000 + 0. µ 10-19 Â
But aside from these numerical complications, Sin[ArcSin[z]] returns z for all
complex z. On the other hand, if we apply the single-valued forward function first and
then the multi-valued inverse, we may return to a different branch. This is illustrated by
the following sample calculations:
ArcSin@Sin@12DD
12 - 4 p
1.5
1
0.5
-10 -5 5 10
-0.5
-1
-1.5
8 Complex functions 175
z = ‰Â f (8.56)
which is the unit circle. As we decrease q we obtain values of z of larger modulus, and
with f varying from 0 to 2p we obtain all possible arguments. We can see that points of
the sphere, apart from the north pole, are in 1:1 correspondence with finite points in the
complex plane. The Riemann sphere, or extended complex plane, is obtained by just
adding back the north pole.
We can make the relationship between this hypothetical sphere and the complex
plane more explicit by introducing a sphere of radius R centred at the origin, and to
letting
be the standard mapping between the spherical polar and Cartesian coordinates for the
sphere
x2 + y2 + z2 = R2 (8.58)
This relation can be interpreted as a stereographic projection from the north pole of the
sphere to a point on the Argand plane viewed as a horizontal plane in three-dimensional
space. Details of this interpretation for the case R = 1 are in the exercises.
176 Complex Analysis with Mathematica
Given any function f , we can ask questions about its behaviour at infinity by asking
corresponding questions about the function
è è
f Hz L = f HzL (8.61)
(1) plot the images of the coordinate lines or curves under the mapping;
(2) plot pre-images of the coordinate lines or curves under the mapping.
The former can be done with a package supplied with Mathematica. The latter is essen-
tially a pair of overlaid contour plots of either the real and imaginary parts, or the
modulus and phase, of the function. The construction of such a composite plot can be
done directly with the supplied package, if a suitable inverse function can be written
down, or alternatively constructed by hand from Mathematica's built-in contour plotting
routines. This type of plot is often used in control theory, where it is called a Nichols
chart.
8 Complex functions 177
‡ ComplexMap package
This package is supplied with Mathematica and is documented in the packages documen-
tation. It was written by Roman Maeder and he has documented the programming issues
involved extensively in his book ‘Programming in Mathematica’, (Maeder, 1997) where
it is used as an example to illustrate how one builds a Mathematica package. We will not
therefore go into the construction of this package and the reader is referred to Maeder's
text for programming details. In what follows we shall illustrate the use of the plot
routines with two different functions:
Needs@"Graphics`ComplexMap`"D
? Graphics`ComplexMap`*
Graphics`ComplexMap`
CartesianMap Lines PolarMap $Lines
? CartesianMap
When you use CartesianMap with a built-in function with a single argument, you
can just supply the name of the function.
SetOptions@ParametricPlot,
PlotStyle Ø [email protected];
-3 -2 -1 1 2 3
-1
-2
-3
If you wish to use your own custom functions with this package it is easiest if you
supply them as pure functions, where the variable being plotted is labelled # and the
function is completed by an ampersand (&). If you wish to use a built-in function that
takes several arguments, the same idea applies: use the # for the variable, and set any
other parameters explicitly (e.g. BesselJ[0, #]&). Here are some examples. Be
warned – some of these take a while to generate!
0.6
0.5
0.4
0.3
0.2
0.1
ü Polar version
The package is also set up to treat polar coordinates:
? PolarMap
PolarMap@f, 8r0:0, r1, HdrL<, 8phi0, phi1, HdphiL<D plots the image of the
polar coordinate lines under the function f. The default for the phi
range is 80, 2Pi<. The default values of dr and dphi are chosen so
that the number of lines is equal to the value of the option Lines.
8 Complex functions 179
-2 -1 1 2
-1
-2
-3
75
50
25
-40-20 20 40 60 80 100
-25
-50
-75
Watch out for singularities in the function – sometimes you may have to remove the
origin from the range of polar coordinates, if you do not want Mathematica to complain!
You may be unfamiliar with the definitions of some of the functions used here, and
might consider asking Mathematica for the definition of the Erfc and Zeta functions.
180 Complex Analysis with Mathematica
‡ Pre-image graphics
In this case we wish to see the function the other way round. That is, we wish to locate
the pre-images of a given set of coordinate curves or lines under the mapping. If the
function has an explicit inverse you can feed it to CartesianMap or PolarMap as
before:
1.5
1
0.5
More frequently, an explicit inverse will not be available and the plot will have to be
constructed differently. Note that now the x and y ranges refer to the plot domain, and
not to the extent of the axes range under consideration:
SetOptions@ContourPlot,
ContourStyle Ø [email protected];
CartesianPreImage@func_,
xrange_, yrange_, options___D :=
Module@8tempa, tempb, xlist, ylist<,
tempa = ContourPlot@
Re@func@x + I yDD, Evaluate@Prepend@xrange, xDD,
Evaluate@Prepend@yrange, yDD,
ContourShading -> False,
DisplayFunction -> Identity, optionsD;
tempb = ContourPlot@Im@func@x + I yDD,
Evaluate@Prepend@xrange, xDD,
Evaluate@Prepend@yrange, yDD,
ContourShading -> False,
DisplayFunction -> Identity, optionsD;
Show@tempa, tempb,
DisplayFunction -> $DisplayFunctionDD
8 Complex functions 181
1.5
1
0.5
0
-0.5
-1
-1.5
-1.5 -1 -0.5 0 0.5 1 1.5
-1
-2
-2 -1 0 1 2
The following three examples are some of the nicer plots that can be extracted this way.
The first one shows the complementary error function and the second explores the
Riemann zeta function. The third looks at the inverse sine function using polar coordi-
nates.
1.5
1
0.5
0
-0.5
-1
-1.5
-1.5-1-0.5 0 0.5 1 1.5
1.5
1
0.5
0
-0.5
-1
-1.5
-1.5-1-0.5 0 0.5 1 1.5
-1
-2
-2 -1 0 1 2
It is left to the reader to try other PolarPreImage examples. These types of pre-im-
age plots, particularly the Cartesian version, are very useful, not just for seeing what a
complex function looks like, but also for understanding the geometry to which they
relate in applications. We will use them extensively later in this book in applications
such as fluid dynamics. As a foretaste of this, we have superimposed a unit circle on a
plot that will turn out to represent flow around a cylinder (this is discussed in detail in
Chapter 19).
-1
-2
-3
-3 -2 -1 0 1 2 3
Unprotect@ArgD; Arg@0D = 0 ;
ComplexPlot3D@func_, xrange_, yrange_, options___D :=
Plot3D@8Abs@func@x + I yDD,
Hue@N@HPi + Arg@func@x + I yDDL ê H2 PiLDD<,
xrange, yrange, optionsD
100
75
50
25
0
-2 -2
-1 -1
0 0
1 1
2
ComplexPlot3D@Sin, 8x, -2, 2<, 8y, -2, 2<,
PlotPoints -> 30, Mesh -> False, FaceGrids -> AllD
3
2
2
1 1
0
-22 0
-1
0 -1
1
2 -2
8 Complex functions 185
20
15 1
10
5 0.5
0
-4
4 0
-3
-2 -0.5
-1
0
1 -1
‡ Alternative routines
There is nothing to stop you building your own plotting routines, using some custom
colouring functions. The following is particularly dramatic, and is especially effective
when you are limited to a black and white display or printer. The idea is to colour the
function according to its phase, just using two alternating colours – here black and
white. Make up some more of your own!
Whacky@x_D := If@EvenQ@Floor@xDD,
RGBColor@0, 0, 0D, RGBColor@1, 1, 1DD
WhackyComplexPlot3D@8func_, levels_<,
xrange_, yrange_, options___D :=
Plot3D@8Abs@func@x + I yDD,
Whacky@N@levels * HPi + Arg@func@x + I yDDL ê H2 PiLDD<,
xrange, yrange, optionsD
3
2
1
0
-2 -2
-
-1 -1
0 0
1 1
22
Sometimes the limited resolution of the plot routines can be used to generate some
interesting special effects, but this is more for fun than for understanding the function!
30
20 1
10 0.5
0
-11 0
-0.5
0 -0.5
0.5
1 -1
8 Complex functions 187
HoleyPlot3D[{f_,g_,h_},{u_,v_},{c_,d_},{n_,m_},
{cola_}, opts___] :=
Module[{data, plotdata},
data = Table[N[Through[{f, g, h}
[u+x*(v-u)/(n-1),c+y*(d-c)/(m-1)]]],
{x,0,n-1},{y,0,m-1}];
plotdata = Table[{cola,
Polygon[{data[[x,y]],data[[x+1,y]],
data[[x+1,y+1]],data[[x,y+1]]}]},
{x,1,n-1},{y,If[EvenQ[x], 2, 1],m-1, 2}];
Show[Graphics3D[plotdata], opts,
Lighting -> False, Boxed -> False]]
Now we apply it to redraw one of the surfaces given in Chapter 2, showing the real part
of the fourth root of z:
HoleyPlot3D[{((#1)*Cos[#2]&),((#1)*Sin[#2]&),
((#1)^(1/4)*Cos[(#2)/4]&)},
{0.01,1},{0, 8 Pi},{15,120}, {RGBColor[0,0,1]},
ViewPoint -> {-3, -3, 0}]
188 Complex Analysis with Mathematica
ChekerPlot3D[{f_,g_,h_},{u_,v_},{c_,d_},{n_,m_},
{cola_, colb_}, opts___] :=
Module[{data, plotdata},
data = Table[N[Through[{f, g, h}
[u+x*(v-u)/(n-1),c+y*(d-c)/(m-1)]]],
{x,0,n-1},{y,0,m-1}];
plotdata = Table[{If[EvenQ[x+y], cola, colb],
Polygon[{data[[x,y]],data[[x+1,y]],
data[[x+1,y+1]],data[[x,y+1]]}]},
{x,1,n-1},{y,1, m-1}];
Show[Graphics3D[plotdata], opts,
Lighting -> False, Boxed -> False]]
Here is a filled-in checkerboard plot of the (real part of the) cube root function:
ChekerPlot3D[{((#1)*Cos[#2]&),((#1)*Sin[#2]&),
((#1)^(1/3)*Cos[(#2)/3]&)},
{0.01,1},{0, 6 Pi},{15,120}, {RGBColor[1,1,1],
RGBColor[0, 0, 0]},
ViewPoint -> {-3, -3, 0}]
8 Complex functions 189
Such routines can often make the folds and intersections of a complex surface much
clearer.
ComplexPlot3D@HSin@Sin@#DD &L,
8x, -Pi, Pi<, 8y, -Pi, Pi<,
PlotPoints -> 50, PlotRange -> 80, 100<D
190 Complex Analysis with Mathematica
100
80
60
40 2
20
0
0
-2
0
-2
2
ComplexPlot3D@HSin@Sin@Sin@#DDD &L,
8x, -Pi, Pi<, 8y, -Pi, Pi<,
PlotPoints -> 60, PlotRange -> 80, 10 ^ 6<D
6
1µ 10
800000
600000
400000 2
200000
0
0
-2
0
-2
2
8 Complex functions 191
It is a simple matter to modify the escape-time algorithm to treat the case of the sine
function, or any other that you choose:
FracPlot[SinFrac[0,
{{-1.5 Pi,1.5 Pi},{-1.5 Pi,1.5 Pi}},600],FracColor]
192 Complex Analysis with Mathematica
Exercises
8.1 Show that the zeroes of cosHzL are located at Hn + ÅÅÅÅ12 L p.
8.2 Using the definition of the sine and cosine functions in terms of the exponential
functions, show that for all complex z,
8.3 Using the definition of the sinh and cosh functions in terms of the exponential
functions, show that for all complex z,
8.4 Using the definition of the sine and cosine functions in terms of the exponential
functions, show that for all complex z and w,
8.5 Using the definition of the sinh and cosh functions in terms of the exponential
functions, show that for all complex z and w,
8.6 Work out the real and imaginary parts of the following functions, assuming that x
and y are real:
Hx + ÂyL5
cos Hx + ÂyL
sin Hx + ÂyL
cosh Hx + ÂyL
sinh Hx + Â yL
z = x£ + Ây£
Show that
x + Ây
z = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
1-z
8 Complex functions 193
Deduce that
êê êê
Hz + z L Â Hz - z L H†z§2 - 1L
8x, y, z< = 9 ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅ
Å ÅÅ , - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅ , ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ =
†z§2 + 1 †z§2 + 1 †z§2 + 1
cos-1 HzL
cosh-1 HzL
tanh-1 HzL
Hint: use the logarithmic form of the inverse function. What branch cuts are possible for
these functions? Which choices make sense given the behaviour of these functions when
z is real?
Before trying out the following Mathematica examples, enter these definitions into the
kernel:
re@expression_D :=
ComplexExpand@Re@expressionD, 8z, w<D;
im@expression_D := ComplexExpand@
Im@expressionD, 8z, w<D;
8.9 Ÿ Use Mathematica to work out the real and imaginary parts of
Hx + ÂyL5
cos Hx + ÂyL
sin Hx + ÂyL
cosh Hx + ÂyL
sinh Hx + Â yL
8.10 Ÿ Use Mathematica to plot the inverse functions cos-1 HzL, cosh-1 HzL and tanh-1 HzL.
Where do these plots suggest the branch cuts are? Do the plots reflect the answers you
have given for Exercise 8.8?
9 Sequences, series and power series
Introduction
In this chapter we introduce the concepts of sequences and series, and explore their
convergence properties. We also look briefly at how elementary functions can be
defined by series. We begin by reviewing basic concepts of convergence. This is
intended to be a review only, and to supply statements of a number of key definitions
and theorems without the proofs that would be traditionally the domain of a rigorous
course in real analysis, where the extension of results to complex numbers is a largely
trivial matter. We focus our attention, when it comes to supplying proofs, on matters
related to power series, since it is such series that are of critical interest to complex
analysis. Students of pure mathematics should ensure that they are aware of the back-
ground material, whereas more applications-oriented people can just take note of the
results. The main result of this section, on the radius of convergence of a power series, is
of critical importance to all.
z1 , z2 , …, zn , … (9.1)
for all n. We say that such a sequence has a limit a, or is convergent to a, if, given any
e > 0, we can find an integer N such that, for all n > N,
We say that such a sequence is convergent to f HzL, if, for each z, given any e > 0, we can
find an integer N such that, for all n > N,
In general, we may need to choose a different e for each z. If we can find one that will do
for all z, we say that the sequence is uniformly convergent. More formally, we say that
such a sequence is uniformly convergent to f HzL, if, given any e > 0, we can find an
integer N such that, for all z, and all n > N,
Such a series is said to be convergent if the sequence Sn HzL is convergent. We write this
limit as
¶
SHzL = ‚ fn HzL (9.10)
n=1
Similarly, we say that the series is uniformly convergent if the partial sums are uni-
formly convergent as a sequence.
‡ Absolute convergence
The series
¶
SHzL = ‚ fn HzL (9.11)
n=1
is convergent. Note that the convergence of the absolute values implies the convergence
of the original series. If the series itself converges, but the corresponding series of
absolute values does not, we say that the series is conditionally convergent.
196 Complex Analysis with Mathematica
z1 , z2 , …, zn , … (9.15)
an b an+1 (9.17)
an r an+1 (9.18)
†a p - aq § < (9.19)
9 Sequences, series and power series 197
then the sequence an is convergent. Note the use of › to indicate that both inequalities
have to be satisfied.
is absolutely convergent.
then
¶
‚ an (9.23)
n=1
converges absolutely if L < 1 and diverges if L > 1. No information is available (the test
fails) if L = 1.
then
¶
‚ an (9.25)
n=1
is convergent.
x r x0 (9.28)
Then
¶
‚ f HnL (9.29)
n=1
is convergent (divergent) if
M
lim ‡ f HxL „ x (9.30)
Mض x0
is convergent (divergent).
converges. Note that this is a special case of Dirichlet's test. The alternating series test
can often be used to check the behaviour of a power series at z = -1, whereas the
Dirichlet test can be used to test behaviour elsewhere on the unit circle – we shall look at
this later in Section 9.3.
A number of results follow from this. A full statement and proof of some of them must
wait until we have defined complex integration and differentiation properly, but it is also
convenient to group them here.
for all z œ U. Let w œ U. Then, since fn is continuous at w, we can find a d such that
» z - w » < d fl » fn HzL - fn HwL» < e ê 3. Then, using the triangle inequality, given that
Hence f is continuous on U.
This is a good place to remind you that in constructing any sort of ‘e - d’ proof
of this type, it is not necessary to pull ‘out of a hat’, in advance, convenient factors such
as e ê 3. The point is to show that » f HzL - f HwL » can be made as small as you like. This
often involves many applications of the triangle inequality.
This can be applied to a series just as easily as to a sequence. This then says that we can
integrate a uniformly convergent series term by term. The corresponding differentiation
theorem for series is slightly weaker. Suppose that each fn HzL is differentiable and that
the series of derived terms
¶
£
‚ fn HzL (9.36)
n=1
is convergent. Then
¶
‚ fn HzL (9.40)
n=1
¶
RN = ‚ fn HzL (9.41)
n=N+1
ƒƒ ¶ ƒƒ ¶ ¶
ƒƒ ƒƒ
†R N § = †ƒ ‚ fn HzL§ƒ b ‚ † fn HzL§ b ‚ Mn (9.42)
ƒƒƒn=N+1 ƒƒƒ n=N+1 n=N+1
Now since the series of Mn is convergent, given e > 0, we can find an N0 such that
N > N0 implies
¶
‚ Mn < e (9.43)
n=N+1
l
o 0 if x = 0
o
o
o n2 x if 0 < x b 1 ê n
fn HxL = m
o (9.45)
o
o n - n2 Hx - 1 ê nL if 1 ê n < x b 2 ê n
o
n 0 if x > 2 ê n
To what function of x does fn HxL converge pointwise? Is the convergence uniform? What
is the integral of fn HxL over positive x? What is the integral of the limit function over
positive x? Try the following Mathematica input to investigate matters visually:
plotn@n_D :=
Plot@plotf@x, nD, 8x, 0, 2<, PlotRange -> 80, 20<D;
converges for z = z1 0. Then the series is absolutely convergent at each point in the
open set defined by
To prove this, note that the terms in the series with z1 are bounded :
and let
z
r = ¢ ÅÅÅÅÅÅÅÅ ¶ (9.51)
z1
9 Sequences, series and power series 203
then
z n
†an zn § = †an zn1 § ¢ ÅÅÅÅÅÅÅÅ ¶ b M rn (9.52)
z1
with r < 1. This allows us to use the comparison test with a convergent series to infer
that
¶
‚ †an zn § (9.53)
n=0
is convergent. Hence the series is absolutely convergent when †z§ < †z1 §. What we want
for R is the largest value of †z1 § for which this works. We define it by the following:
¶
R = sup 9 †z§ : ‚ †an zn § converges= (9.54)
n=0
We find the radius by using simple tests such as the ratio test.
is instructive in this respect.We can use the ratio test to demonstrate that the radius of
convergence is 1 for all k. If k = 0 then the terms do not go to zero anywhere on the
boundary, so that the series is not convergent anywhere on the boundary. This occurs in
spite of the fact that
1
sH0, zL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (9.59)
1-z
for
and this function may be evaluated everywhere in the complex plane except z = 1.
When k = 1 matters are more complicated. If z = 1 the series is divergent (to see this
use the ‘old trick’ of grouping the terms in pieces, each of which is greater than 1 ê 2).
For other z on the unit circle, we can use the Dirichlet test to show that the series is
convergent. When k = 2, we use the fact that
¶
1
‚ ÅÅÅÅÅ2ÅÅÅÅ (9.61)
n=1
n
†z1 §n
Mn = ÅÅÅÅÅÅÅÅÅÅÅÅnÅÅ (9.63)
†z0 §
converges, then
lim an z0 n = 0 (9.65)
nض
1
†an § < ÅÅÅÅÅÅÅÅÅÅÅÅnÅÅ (9.66)
†z0 §
It follows that
¶
H-1Ln-1 zn z2 z3
logH1 + zL = „ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = z - ÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅ - ... (9.70)
n 2 3
n=1
Finding the radii of convergence of these and related series is left to you as an exercise.
Needs@"Graphics`ParametricPlot3D` "D
Exercises
9.1 Use the ratio test to show that the radii of convergence of each of the series (in
powers of z) for expHzL, sinHzL, cosHzL, logH1 + zL, are, respectively, ¶, ¶, ¶, 1.
in a power series about the point z = 0. What is the radius of convergence of this series?
Repeat this exercise by expanding about the point z = -1. What is the radius of conver-
gence of this new series. (Note that to expand about z = -1 you write the function in
terms of w = z + 1 and expand in powers of w.)
9.5 Bessel functions Jn HzL are defined for n real and non-negative by the power series
¶ 2n+n
H-1Ln H ÅÅÅÅ2z L
„ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
n ! Hn + nL!
n=1
9.7 Ÿ Mathematica can generate power series using the Series function. Try, e.g.,
Explore the power series for sinHzL, coshHzL and J0 HzL in terms of powers of z. Use
?Series to find out how Series works, and find series of these functions about z = 1.
9.8 Ÿ Sometimes you can generate series about infinity also. Explore the action of
Introduction
In this chapter we introduce the concept of differentiation of a complex function of a
complex variable. There are several ways of approaching this topic, and we shall
consider at least two. Given that a complex number may be regarded as a pair of real
numbers, we need to make very clear the distinction between differentiability of a
function that has two real arguments and differentiability of a function with a single
complex argument, and shall take as our starting point a review of the differentiation of
functions of two real variables. This approach has the merit of generalizing in a straight-
forward way to functions of many real or complex variables. We shall also consider
another simple approach to differentiation based on the limit of a ratio. This latter
approach is perhaps more familiar if you have taken a course in one-variable real
calculus, but does not generalize to functions of several real or complex variables. A key
result that we will establish is that a complex function is differentiable in the complex
sense if (a) it is differentiable when considered as two real functions of two real vari-
ables and also (b) the Cauchy–Riemann equations (partial differential equations) apply.
These equations link the real and imaginary parts of the function. After proving some
basic results about complex differentiability, e.g., the product, quotient and chain rules,
we then derive one of the principal results of basic complex analysis – that power series
are differentiable within their radius of convergence. This establishes the differentiabil-
ity of a large class of functions and explains why, as in Chapter 9, we like to think about
functions in terms of power series.
In this chapter you will also see traditional and novel ways of recovering a
holomorphic function from either its real or its imaginary part. This is accomplished
traditionally by solving the Cauchy–Riemann equations. You will see here, in Section
10.10, how this can be accomplished algebraically by considering holomorphic func-
tions of two complex variables. This is another good reason for approaching differentia-
tion in a way that can be applied to two or more variables. This result has a rather
intriguing history. The author uncovered some of the details of the history as a result of
an appeal for information in an article published in SIAM Review (Shaw, 2004) where a
Mathematica implementation of the main result was first given. The author wishes to
expresses his thanks to Prof. Harold Boas and others for responding and submitting
information leading to the discussion in Section 10.10. The title of that section is ‘The
Ahlfors–Struble(?) Theorem’, the ? reflecting the nagging feeling that the result might
be older than the original text by Ahlfors (1953). Further information on the result, as
given, predating Ahlfors’ 1953 text, would be appreciated.
Our first task, to which we now turn, is to define what it means for a complex
function to be differentiable at a point.
10 Complex differentiation 209
Let's define differentiability of a real function of two real variables. We say that a
function uHx, yL is differentiable at Hx, yL if we can write, for some pair of real numbers
A, B
uHx + h, y + kL = uHx, yL + Ah + Bk + rHh, k, x, yL (10.2)
è!!!!!!!!
!!!!!!!
for all Hh, kL with h2 + k2 < e, subject to the condition that
ƒƒ ƒƒ
ƒ r ƒ
†ƒ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ
Å ÅÅÅ
Å Å §ƒ Ø 0 (10.3)
ƒƒ è!!!!!!!!
h2 + k2 ƒƒ
! !!!!!!
as Hh, kL Ø H0, 0L. This says that we can find a linear approximation to the function in
the neighbourhood of the point of interest. This is the proper definition of differentiabil-
ity, and it says, geometrically, that the surface defined by f has a tangent plane at the
point in question. It is related in quite a subtle way to the existence of ordinary partial
derivatives, as the following two observations will point out.
xy
uHx, yL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ (10.6)
x2 + y2
exist everywhere. [Hint: At the origin you need to apply the basic definition.] By
considering uHr cosHqL, r sinHqLL , show that u is not continuous at the origin. [Hint: Look
at what happens to the function as you approach the origin from various directions.] At
the end of this chapter, Exercise 10.16 gives another nicely perverse example, illustrat-
ing the fact that having one-dimensional differentiability in all directions (not just the x-
and y-axis directions) is still not sufficient to guarantee differentiability in the two-dimen-
sional sense!
Plot3D@x y ê Hx ^ 2 + y ^ 2L,
8x, -1, 1<, 8y, -1, 1<, PlotPoints -> 50D
0.5
0.25 1
0
-0.25 0.5
-0.5
-11 0
-0.5
0 -0.5
0.5
1 -1
0.5
0.25
0 1
-0.25 0.5
-0.5
-1 0
-0.5
0 -0.5
0.5
-1
1
We say that the pair of real functions u v are differentiable at Hx, yL if there are real
numbers A, B, C, D such that we can write, with u and v defined in a neighbourhood of
Hx, yL
uHx + h, y + kL = uHx, yL + Ah + Bk + rHh, k, x, yL (10.9)
for all Hh, kL in an -neighbourhood of H0, 0L, subject to the conditions that
ƒƒ ƒƒ ƒƒ ƒƒ
ƒ r ƒ ƒ s ƒ
†ƒ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!! ÅÅÅÅÅÅÅÅ
! Å ÅÅÅ
!!!!!!Å Å § Ø 0, †ƒ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!! ÅÅÅÅÅÅÅÅ
! Å ÅÅÅ
!!!!!!Å Å §Ø0 (10.11)
ƒƒ h2 + k2 ƒƒƒ ƒƒ h2 + k2 ƒƒƒ
as Hh, kL Ø (0,0). This again says that we can find a linear approximation to each real
function in the neighbourhood of the point of interest. This is the proper definition of
differentiability of mappings 2 Ø 2 . So far so good. We see that the differentiability
of such a map relies in part on the existence of numbers A, B, C and D, which may be,
and usually will be, independent. This approach allows us to define differentiation of
vector-valued functions of vectors using a matrix formalism, since we can write
ij uHh + x, k + yL yz uHx, yL A B ij h yz r
j z=J N+ J N.j z + J N (10.12)
k vHh + x, k + yL { vHx, yL C D k k { s
212 Complex Analysis with Mathematica
The matrix with components A…D is a linear map that we call the derivative of the
mapping 2 Ø 2 . It should now be obvious what the derivative of a mapping m Ø n
is – it is a matrix, as here in the case m = n = 2.
E = a + Âb (10.16)
s = r + Âs (10.17)
uHh + x, k + yL + ÂvHh + x, k + yL
(10.18)
= uHx, yL + ÂvHx, yL + Ha + bÂL Hh + ÂkL + r + Âs
This is just like the pair of real equations, except that the four independent numbers A,
B, C, D, have been replaced, respectively, by a, - b, b, a. So there is a constraint
between the partial derivatives of u and v. If we write this in conventional form, we see
that
u v
ÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅ (10.21)
x y
10 Complex differentiation 213
u v
ÅÅÅÅÅÅÅÅÅ = - ÅÅÅÅÅÅÅÅÅÅ (10.22)
y x
These relations are very important and are given a special name: ‘The Cauchy–Riemann
equations’. This analysis has established the following important result:
The number E = a + Âb, is called the complex derivative of the map, and is usually
referred to simply as f £ HzL.
(1) Show that this definition is equivalent to the one we have given.
(2) By considering w real, and then imaginary, derive the Cauchy–Riemann equations
from this definition.
Note that the definition by the quotient method is very popular in elementary texts, but
does not, for obvious reasons (how do you divide by a vector?) generalize to many
variables. For this reason this test will develop the theory within the approach of Section
10.3.
214 Complex Analysis with Mathematica
ij ÅÅÅÅ
u
ÅÅ y
x z
j
grad u = jj u zzzz
j (10.24)
k ÅÅÅÅ
ÅÅ
y {
u 2 u 2 v 2 v 2
J ÅÅÅÅÅÅÅÅÅ N + J ÅÅÅÅÅÅÅÅÅ N = J ÅÅÅÅÅÅÅÅÅÅ N + J ÅÅÅÅÅÅÅÅÅÅ N (10.25)
x y x y
and that
u v u v
ÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ = 0 (10.26)
x x y y
10 Complex differentiation 215
so that the normals to the two curves have the same length, and are, by the second
relation, orthogonal.
2 u 2 u
ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ = 0 (10.28)
x y
We shall prove all the basic rules, using the ‘approximate linear mapping’ definition of
differentiability. Within this framework the proofs are all easy. Note the order of the
proofs of the rules: sum, product, chain, 1 ê z, 1 ê f , quotient. As long as one can write
down the rule for 1 ê z, it is not necessary to do much else to establish the quotient rule.
ü Sum rule
Let h = f + g, then
è HwL
hHz + wL = f Hz + wL + gHz + wL = f HzL + Ew + sHwL + gHzL + Fw + s
= f HzL + gHzL + HE + FLw + Hs + s èL (10.31)
£
= hHzL + h HzL w + S
ü Product rule
To make the operation of multiplication rather more explicit, we temporarily use the
‘times’ symbol μ rather than an implicit multiplicative space.
Let h = f μ g, then
hHz + wL = f Hz + wL μ gHz + wL
= H f HzL + Ew + sHwLL μ HgHzL + Fw + s è HwLL (10.32)
= f HzL μ gHzL + H f HzL μ F + gHzL μ ELw + R
ü Chain rule
Let p = f HzL and suppose that f is differentiable at z and that g is differentiable at p, i.e.
ü 1 ê z rule
The quotient rule is best derived by working with the function f = 1 ê z and applying the
rules already developed. First let's do some basic algebra:
1ê Hz + wL= 1 ê z + H1 ê Hz + wL - 1 êzL
= 1 ê z + Hz - Hz + wLL ê Hz * Hz + wLL
= 1 ê z - w ê Hz * Hz + wLL
(10 41)
10 Complex differentiation 217
= 1 ê z - w ê z2 + Hw ê z2 - w ê Hz * Hz + wLLL
= 1 ê z - w ê z2 + Hw ê zL * H1 ê z - 1 ê Hz + wLL
= 1 ê z - w ê z2 + w2 ê Hz2 Hz + wLL
ü 1 ê f rule
The rule for differentiating 1 ê f HzL now follows by the result for 1 ê z and the chain rule,
applied as above with f given and gHpL = 1 ê p. So the derivative of 1 ê f HzL exists
provided f HzL 0 and equals
f £ HzL
- ÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ (10.43)
f HzL
ü f ê g rule
The quotient rule follows from the product rule and the result for 1êg. The derivative is
g£ HzL f HzL f £ HzL
- ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2 ÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (10.44)
gHzL gHzL
nzn-1 (10.47)
218 Complex Analysis with Mathematica
Let f HzL = ⁄¶
n=0 an z have radius of convergence R > 0. Then within the circle of
n
It is a good idea to prove this in two parts, and to first consider the origin.
where
¶
SHzL = ‚ an zn (10.49)
n=2
Consider
¶
SHzL
ÅÅÅÅÅÅÅÅ2ÅÅÅÅÅ = ‚ an zn-2 (10.50)
z n=2
Now, within the circle of convergence of f HzL, the series for f HzL is absolutely conver-
gent, so by setting » z » = Rê 2, we can see that
¶
R n
‚ †an §J ÅÅÅÅÅÅ N (10.51)
n=0
2
is convergent, and so is
¶
R n-2
M = „ †an §J ÅÅÅÅÅÅ N (10.52)
2
n=2
f £ H0L = a1 (10.54)
It follows that
is convergent. Now consider our original series with z = w + Hz - wL. The binomial
theorem gives us
¶
¶
ij n n rz
y
‚ an z = „ an jjj‚ J N wn-r Hz - wL zzz
n
(10.59)
r
n=0
n=0
k r=0 {
We now know that this series is absolutely convergent, so we can rearrange it to give
¶ ¶
‚ an zn = ‚ br Hz - wL
r
(10.60)
n=0 r=0
where
¶
n
br HwL = ‚ J N wn-r an (10.61)
r
n=r
z = x + Ây (10.63)
zê = x - Ây (10.64)
1
x = ÅÅÅÅÅ Hz + zê L (10.65)
2
-Â
y = ÅÅÅÅÅÅÅÅÅ Hz - zê L (10.66)
2
f f x f y 1 f f
ÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅ J ÅÅÅÅÅÅÅÅÅ - Â ÅÅÅÅÅÅÅÅÅ N (10.67)
z x z y z 2 x y
f f x f y 1 f f
ÅÅÅÅÅÅÅÅêÅ = ÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅêÅ + ÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅêÅ = ÅÅÅÅÅ J ÅÅÅÅÅÅÅÅÅ +  ÅÅÅÅÅÅÅÅÅ N (10.68)
z x z y z 2 x y
Exercise 10.3 at the end of this chapter confirms that the Cauchy–Riemann equations are
equivalent to
f
ÅÅÅÅÅÅÅÅêÅ = 0 (10.71)
z
This is more than just a notational convenience – it also gives a handy way of spotting
when a simple function is or is not holomorphic. If the formula involves zê the function is
f
not holomorphic, since then ÅÅÅÅ
ÅÅÅ 0. Now since
zê
it is easy to see why functions involving the modulus, real or imaginary parts in some
way cannot be holomorphic, as they all involve zê in some way.
where g and h are arbitrary functions of their arguments. Consistency demands that both
of these functions must be the same constant, say c. So v = 2xy + c for some real
constant c, and furthermore
This procedure can be summarized as follows: (i) differentiate u; (ii) integrate the
Cauchy–Riemann equations for v, picking arbitrary functions for consistency; (iii)
identify f HzL.
You should try this out yourself for the function uHx, yL = x3 - 3 x y2 , and some
further examples are given in Exercise 10.17. If you persevere with Exercise 10.17 you
will rapidly come to the conclusion that an easier route would be helpful. The following
theorem, believed to be due to Ahlfors and Struble (see later) is very useful.
This result for the case a = 0 was given by Ahlfors (1953) and given as an exercise by
Spiegel (1981). A full discussion and a simple proof of the general case has been given
by this author (see Shaw, 2004 and ‘a simple view’, below). In the proof of this we will
make use of the holomorphic reflection of f , given by
` êêêêêê
f HzL = f Hzê L (10.81)
`
You might like to satisfy yourself that if f is holomorpic on U Õ then f is holomor-
êêê
phic on U Õ . This is the reflection of U in the real axis (not its closure).
ü An example
A good illustration of the method is to consider the function
x
uHx, yL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ (10.89)
x + y2
2
x2 - y2
4 x y Hy2 - x2 L
‰x cosHyL
2
+y2 L y
‰xêHx cosJ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ N
x + y2
2 (10.94)
1
ÅÅÅÅÅ logHx2 + y2 L
2
è!!!!!!!!!!!!!!! 1
x2 + y2 cosJ ÅÅÅÅÅ tan-1 Hx, yLN
4
2
You can check the answers against an automatic calculation with Mathematica, the code
for which is given below.
224 Complex Analysis with Mathematica
uHx, yL = x (10.95)
1
uHx, yL = ÅÅÅÅÅ HHx + Â yL + Hx - Â yLL (10.96)
2
1
uHx, yL = ÅÅÅÅÅ HHx + Â yL + Hx + Â yL L (10.97)
2
1
uHx, yL = ÅÅÅÅÅ HHx - Â yL + Hx - Â yL L (10.98)
2
The first two work out fine, while Eqs. (10.97) and (10.98) give x and 0 respectively if
you just blindly apply the extraction formula for f ! So it is important that you first
simplify to the real analytic form of u. Another way of looking at this problem is that
one can contrive a zero u to have a non-zero complexification, but not if you limit
attention to the real analytic case. This is related to the reason why Mathematica's
ComplexExpand function has to have its target functions set to Re and Im, (see
below), in order to provide a purely real characterization of u.
10 Complex differentiation 225
We also note that given a knowledge of uHx, yL alone, on the assumption that it is real
anaytic about (a1 , a2 ) and a solution of Laplace's equation, such a representation must
exist and be unique (apart from Im@c0 D). This is because the Laplace condition is just
2 u
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅê = 0 ñ u = gHzL + hHzê L. (10.101)
z z
and reality constrains h to be expressed in terms of the conjugate of g. Then the exist-
ence of a series supplies Eq. (10.100) uniquely, apart from the imaginary part of c0 .
Now define UHw1 , w2 L uniquely, up to the imaginary part of c0 , by
¶ ¶
1 1
UHw1 , w2 L = ÅÅÅÅÅ ‚ cn Hw1 + Â w2 - aLn + ÅÅÅÅÅ ‚ êê
c n Hw1 - Â w2 - êê
a Ln , (10.102)
2 n=0 2 n=0
and second,
¶
z + a z - êê
¶
a 1 1
UJ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ , ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ N = ÅÅÅÅÅ ‚ cn Hz - aL + ÅÅÅÅÅ ‚ êê
n êê - êê
c n Ha a Ln =
2 2Â 2 n=0 2
n=0 (10.104)
1 1 1 1 êêêêêê
ÅÅÅÅÅ f HzL + ÅÅÅÅÅ êê
c 0 = ÅÅÅÅÅ f HzL + ÅÅÅÅÅ f HaL
2 2 2 2
226 Complex Analysis with Mathematica
The result then follows. This is essentially the same argument as that given by Cartan
(1961) for the case a = 0.
Here are all the functions given for you to try in the previous sub-section, expressed as a
Mathematica list:
Let's try this first with the origin playing the role of the base point a (you will get some
warnings that are not shown here).
The extraction is failing when the origin is not a point at which the functions are defined.
If we shift the base point to, for example, a = 1, then all is well:
Let's see if we can induce any non-uniqueness by writing down u in various different
ways.
10 Complex differentiation 227
The corresponding formula for obtaining the holomorphic function from its imaginary
part is:
Of course, this is also done within RealToHolo, but we also wish to exhibit the
expressions in the right form here. Now consider the following:
ComplexExpand@Re@1 ê Hx + I yLDD
228 Complex Analysis with Mathematica
x
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ
x2 + y2
ComplexExpand@Im@Exp@1 ê Hx + I yL ^ 2DDD
x -y
2 2
i 2xy y
sinjjj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ zzz
ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ2ÅÅÅÅÅ2Å Å
-‰ Hx 2 +y L
k Hx2 + y2 L {
ComplexExpand@Re@Hx + I yL ^ H1 ê nLD,
TargetFunctions Ø 8Re, Im<D
1
i tan-1 Hx, yL y
Hx2 + y2 L 2 n cosjj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ zz
ÅÅÅÅÅÅ Å
k n {
"######
1 logHzL
 b+2 z ÅÅnÅÅ coshJ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ N - 1
2n
ü Some history
This approach to reconstructing f from its real or imaginary part has an interesting
history, and for much of the following information I wish to thank Prof. Harold Boas
(‘HB’ in further comments below). First, it is interesting to note that this result has been
rediscovered several times over the years! Indeed, the author's interest in this method
stemmed from an observation by John Ockendon that the result for the case a = 0 holds,
and he issued a challenge to explain it and figure out what happens if f is singular at the
origin. This and the desire to find a Mathematica implementation resulted in the paper
(Shaw, 2004).
I am grateful to Bill Margolis for e-mailing me to let me know that Theorem
10.3 with a = 0, was given as an exercise (Exercise 3 of Chapter III) by J. D'Angelo in
his monograph (D'Angelo 2002). HB asked J. D'Angelo about his source and D'Angelo
recalls discovering the formula for himself in 1988.
10 Complex differentiation 229
Moving a step further back into history, the book by R.P. Boas (Boas, 1987), has
a statement and proof of the result and some other short-cut methods (see pages 158-
164). One of these short-cut methods is particularly interesting from a historical point of
view as its development is curiously interwined with the extraction theorem. The result
is that, if one already knows uHx, yL and vHx, yL then
From my point of view this result is rather less interesting, as you do need to know both
u and v, whereas the extraction result allows the construction of f from just one of u and
v. However, the historical link is very interesting. Let's call Eq. (10.105) the ‘alternative
method’ for getting f HzL. So far as I am aware, and according to E.V. Laitone (Laitone,
1977), this alternative method was first given by L.M. Milne-Thomson (Milne-Thom-
son, 1937) and it also appeared in the first edition of his ‘Theoretical Hydrodynamics’
(Milne-Thomson, 1938). It also appeared in the second (1949) and third (1955) editions.
In the fourth (1962) and later editions Milne-Thomson dropped the alternative method
and replaced it with the algebraic extraction theorem in the style of Ahlfors, and did so
far as I can tell, without comment or attribution (see note 5.32 on pp. 130-131 of the
fourth edition). The story of Milne-Thomson's contribution was discussed up by Laitone
(1977). Laitone's emphasis was on the alternative method, and he describes the extrac-
tion theorem as ‘a very dubious procedure that utilized the complex conjugate’!
All of these discussions refer to the theorem with a = 0, where the base point is
the origin. Indeed, the note by Laitone (1977) goes on to say that ‘Milne-Thomson's
method (i.e. in his 4th ed) cannot be justified in general since it results in Hx2 + y2 L = 0
so that any f HzL containing z-n cannot be obtained from any combination of u and v’. So
the issue, at least in this particular thread of papers, of how to cope with a general
base-point, was not properly understood in 1977.
My best understanding, based on papers to which I have had access, is that the
issue of the base point was resolved by R.A. Struble (Struble, 1979). It should be noted
however that an outline discussion of the result with a general base point has also been
given by Volkovyskii et al (1960). Struble gave a proof of what I called Theorem 10.3
based on Taylor series, and made the point that the identities ‘should be better known
than they appear to be’. He also made the explicit comment that (in the context of fluid
dynamics, for which further discussion is given in Chapter 19) ‘each stream function can
be expressed algebraically in terms of the potential function, and vice versa.’ On the
basis of Ahlfors (1953) being the first to shed light on the matter, and Struble (1979)
sorting out the general base point, I have called this result the Ahlfors–Struble theorem.
However, this is only on the basis of information received by the author thus far! Some
may view the contribution of Cartan (1961) as being more critical. It has also been
suggested that the ideas are implicit in the work of I.N. Vekua from the 1940s. Work on
polar representations has also been done (Huilgol, 1981; Shaw, 2004).
This, for now, is the end of the historical discussion. We now turn back to other
things you can do with this result and Mathematica.
230 Complex Analysis with Mathematica
Âb
2z+Â b-1
Note the dependence on the base point. It is far from clear whether such transformations
have any useful interpretation, and they certainly do not serve as an inverse to Complex-
Expand. For example
ComplexExpand@Re@% ê. 8z Ø x + I y, b Ø 0<DD
2x-1
So it is a good idea to include a check to exclude this case. In the following extended
code we include an explicit check that the Laplacian operator gives zero. Note that this
check involves (a) invoking FullSimplify to boil down the Laplacian as much as
possible, having used Together to put things over a common denominator, (b) the use
of the ‘identically equals’ within Mathematica, given by ===.
RealToHoloCheck@expr_,
anum_, 8xsym_, ysym_, zsym_ <D :=
Module@8abar = Conjugate@anumD, exprf,
H*This may need improving to stop false negatives *L
laplacian = FullSimplify@Together@
D@expr, 8xsym, 2<D + D@expr, 8ysym, 2<DDD<,
exprf = ComplexExpand@expr,
TargetFunctions Ø 8Re, Im<D;
If@laplacian === 0,
func =
2 * exprf ê. 8xsym Ø Hzsym + abarL ê 2,
ysym Ø Hzsym - abarL ê H2 * IL<; basecorr =
- exprf ê. 8xsym Ø Re@anumD, ysym Ø Im@anumD<;
FullSimplify@func + basecorr + I * bD,
Print@"This expression is not the
real part of a holomorphic function -
its Laplacian is "D; laplacianDD
10 Complex differentiation 231
Note that the output is a message together with the Laplacian if the check fails, so you
do at least have the chance to do further manual simplifications of the Laplacian if you
really think the input is harmonic, and then use the non-checking code to finalize
matters.
This expression is not the imaginary part of a holomorphic function - its Laplacian is
2
48 Hx2 - y2 L Hx2 + y2 L
Comments on how to improve these functions are very welcome, especially if you, the
reader, find cases where the Laplacian check fails.
ComplexExpand@Re@Hx + I yL ^ 4DD
x4 - 6 y2 x2 + y4
ComplexExpand@Im@Hx + I yL ^ 4DD
4 x3 y - 4 x y3
4 p y x3 - 4 p y3 x + b
92 x y + b, x4 - 6 y2 x2 + y4 + b - 1, b + ‰ x sinHyL,
x
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅ y è!!!!!!!!
!!!!!!! 1
ÅÅÅÅÅÅ N, b + tan-1 Hx, yL, b + x2 + y2 sinJ ÅÅÅÅÅ tan-1 Hx, yLN=
b - ‰ x +y sinJ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
2 2
4
x2 + y2 2
TableForm@Transpose@8TestUSet, %<DD
x2 - y2 2xy+ b
4 x y Hy - x L 2 2
x4 - 6 y2 x2 + y4 + b - 1
‰x cosHyL b + ‰x sinHyL
x x
ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ2ÅÅ y ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ2ÅÅ y
‰x 2 +y
cosI ÅÅÅÅÅÅÅÅ
x2 +y2
ÅÅÅÅÅÅ M b-‰x 2 +y
sinI ÅÅÅÅÅÅÅÅ
x2 +y2
ÅÅÅÅÅÅ M
ÅÅÅÅ12 logHx2 + y2 L b + tan-1 Hx, yL
è!!!!!!!! !!!!!!! è!!!!!!!!
!!!!!!!
x2 + y2 cosH ÅÅÅÅ12 tan-1 Hx, yLL b + x2 + y2 sinH ÅÅÅÅ12 tan-1 Hx, yLL
4 4
4 b a3 - 4 b3 a + b
This expression is not the real part of a holomorphic function - its Laplacian is
12 Ha2 + b2 L
Exercises
10.1 Show that
f HzL = †z§2
10.2 (Harder!) Show that the function given by f H0L = 0, and otherwise
z5
f HzL = ÅÅÅÅÅÅÅÅ4ÅÅÅ
†z§
10.3 By taking real and imaginary parts, show that the Cauchy–Riemann equations are
equivalent to
f
ÅÅÅÅÅÅÅÅêÅ = 0
z
10.4 An ‘anti-holomorphic’ function f is defined by the condition
f
ÅÅÅÅÅÅÅÅÅ = 0
z
Derive the analogue of the Cauchy–Riemann equations for such a function, by taking
real and imaginary parts of this condition.
p = x + ¸y
subject to the multiplication rule obtained by requring that the symbol ¸ satisfies
¸2 = +1
234 Complex Analysis with Mathematica
2 u 2 u
ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ = ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ
x y
10.6 Calculate the complex derivatives of the following functions, explaining which
properties of complex differentiation you are using:
z3 + 4
hHzL = ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅ
z2 - 7
10.7 Where, if anywhere, are the functions f , g, h defined in Exercise 10.6 not differentia-
ble?
10.8 By making direct use of the definition of differentiability, prove L'Hospital's rule: if
f HzL and gHzL are differentiable at z0 and f Hz0 L = gHz0 L = 0, but g£ Hz0 L 0, show that
f HzL f £ Hz0 L
lim ÅÅÅÅÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅ
zØz0 gHzL g£ Hz0 L
z2 + 1
lim ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅ
zØÂ z6 + 1
Note: in questions 10–12 you may assume that U is an open disc or neighbourhood. If
you know the term connected, this will also suffice – it is defined in this book in Section
12.1. You might like to consider what happens, for example, if U is the disjoint union of
two neighbourhoods.
10.12 If f HzL is holomorphic in an open set U and † f HzL§ is constant, show that f is
constant. (Hint: differentiate † f HzL§2 .)
10.13 If f = u + Âv is written as a function of polar coordinates Hr, qL, show that the
Cauchy–Riemann equations become:
10 Complex differentiation 235
u 1 v
ÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ
r r q
v 1 u
ÅÅÅÅÅÅÅÅÅ = - ÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ
r r q
and hence derive the Laplace equation in polar form:
2 u 1 u 1 2 u
ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ + ÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅ2ÅÅÅÅ ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ = 0
r r r r q
and similarly for v.
10.14 What are the real and imaginary parts of the function
 log(z)
expressed in terms of Cartesian coordinates? Check that these satisfy Laplace's equation.
Repeat the exercise with the real and imaginary parts expressed in polar coordinates.
10.16 (Harder) Show that the function f given by f H0, 0L = 0, and otherwise
x3
f Hx, yL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ
x + y2
2
for fixed t, show that g is differentiable at s = 0 for all t. By establishing this you are
showing that f is differentiable in a ‘one-dimensional’ sense along any line through the
origin. Show, nevertheless, that f is not differentiable. (Hint: try writing f in approxi-
mate linear form, using the partial derivatives as coefficients, and see what goes wrong.)
10.17 Given the following functions u, find the corresponding imaginary functions v and
hence find the holomorphic f HzL whose real part is u:
uHx, yL = 4 x y Hy2 - x2 L
2
+y2 y
uHx, yL = ‰xêx cosJ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ N
x2 + y2
è!!!!!!!!
!!!!!!! 1 y
uHx, yL = x2 + y2 cosJ ÅÅÅÅÅ tan-1 J ÅÅÅÅÅ NN
4
2 x
10.18 Ÿ Produce a surface plot (i.e. use Plot3D) of the function discussed in Exercise
10.1.
236 Complex Analysis with Mathematica
10.19 Ÿ Produce a surface plot (i.e. use Plot3D) of the function discussed in Exercise
10.3.
10.21 Ÿ Use the Mathematica function ContourPlot, with the option Contour-
Shading -> False, to visualize and overlay the contours of the following pairs of
functions:
u = x2 - y2 ; v = 2xy
1
u = ÅÅÅÅÅ logHx2 + y2 L; v = tan-1 Hx, yL
2
To what holomorphic function do each of these function pairs correspond? (Hint: You
may need to increase the value of PlotPoints to obtain a good plot, and you should
note for the last example that Mathematica has a special ArcTan function that accounts
for the precise location of x and y in the complex plane.)
10.22 Ÿ Use Mathematica's D and Simplify functions to show that each of the four
functions defined in Exercise 10.19 satisfy Laplace's equation.
z2 + 1
lim ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅ
zØÂ z6 + 1
(Use ?Limit to find out how this function works if you need to.)
10.24 Ÿ Use Mathematica to check your results for Exercise 10.17, including a check
that the given examples of u are harmonic.
10.25 Ÿ Use Mathematica to find the harmonic conjugates of the examples of u given in
Exercise 10.17.
11 Paths and complex integration
Introduction
In this chapter we introduce the concept of integration of a complex function of a
complex variable. This relies on understanding what is meant by a ‘path’ in the complex
plane, because integrals are defined with respect to a path. This chapter is mostly
concerned with defining integration by referring back to the real case. You will also see
how to generalize the fundamental theorem of calculus to the complex setting. Through-
out this chapter we will refer to complex functions of a real variable, and refer to them
as being, respectively, continuous or differentiable. All this means is that the real and
imaginary parts are, respectively, continuous or differentiable in the ordinary real sense.
11.1 Paths
A path f is a continuous mapping from a segment of the real axis into the complex
numbers:
f : @a, bD Õ Ø (11.1)
The square brackets indicate that the domain of definition of f contains end-points, i.e.
fHxL is defined for
abxbb (11.2)
A path f is a differentiable path if its real and imaginary parts are differentiable in the
usual sense for t œ Ha, bL, i.e. a < t < b and one-sided derivatives exist at the end-
points a and b.
Remark 1: If you have not taken a formal course in real analysis, you can think of sup,
short for supremum, as being the maximum value along the path. More formally, the
supremum S of a set of reals A is the smallest number such that x œ A fl x b S.
238 Complex Analysis with Mathematica
Remark 2: Note that the ‘obvious’ generalization, to complex numbers, of the real mean
value theorem
for some t œ Ha, bL is simply untrue. You might like to check this by considering the path
fHtL = ‰Ât for 0 b t b 2 p.
Proof of theorem: Suppose that fHbL fHaL, for otherwise there is nothing to prove, and
let m = fHbL - fHaL, yHtL = êê
m fHtL. Clearly, y£ HtL = êê
m f£ HtL, and
yHbL - yHaL = m êê
m = †fHbL - fHaL§2 (11.6)
for some c œ Ha, bL, by the real mean value theorem. But
Hb - aL y£1 HcL b Hb - aL » êê
m »» f£ HcL » (11.8)
and so
†fHbL - fHaL§2 b Hb - aL » êê
m »» f£ HcL » (11.9)
f : @ai-1 , ai D Ø (11.11)
PlotPath@path_ , options___D :=
Module@8argand = Map@8Re@#D, Im@#D< &, pathD<,
grdata = 8Line@argandD,
[email protected], Map@Point, argandD<<;
Show@Graphics@grdata, AspectRatio -> 1,
Axes -> True, optionsDDD
0.5
-1 -0.5 0.5 1
-0.5
-1
cpsp = 81, I, -1, -I, 1<; PlotPath@cpspD
0.5
-1 -0.5 0.5 1
-0.5
-1
Here is a piecewise linear path that gives a polygon that tends to a circle as its argument
n gets large:
PlotPath@path@30DD
0.5
-1 -0.5 0.5 1
-0.5
-1
The real and imaginary parts of the integrand are now manifestly continuous functions
of t, and so are integrable. Note that this looks a great deal like the ordinary substitution
rule for changing variables in real integration. Indeed, this is a good way of remember-
ing the formula! But here it is a definition of the integral over the path. Also, in complex
analysis, we often tend to refer to integration over ‘contours’. Remember - you should
think of the word contour as synonymous with ‘piecewise smooth path’. For a piecewise
smooth path you just add up the integrals associated with each smooth piece.
But the integral on the right side is zero unless n = -1, because the exponential function
is periodic, with period 2 p, and the values of the indefinite integral at the limits of
integration cancel. When n = -1, the integral is  µ 2 p. So around any circle centred on
the origin, parametrized by the function f,
1
‡ ÅÅÅÅÅ „ z = 2p (11.16)
f z
The fact that this is non-zero, while all other powers give zero, is surprisingly important,
as you will see later.
Proof: First note that we just need to consider smooth paths, as the result for piecewise
smooth paths follows by adding up the pieces, and noting cancellations of intermediate
terms (you might like to check this!). The rest follows by reducing the problem to the
corresponding real fundamental theorem of calculus, applied to the real and imaginary
parts of the second line of the following:
b b
‡ f HzL „ z ª ‡ f @fHtLD f£ HtL „ t = ‡ F '@fHtLD f£ HtL „ t
f a a
(11.18)
b
d
=‡ ÅÅÅÅÅÅÅÅÅÅ F@fHtLD „ t = FHfHbLL - FHfHaLL
a dt
There is one very important consequence: if there is such a function and f is closed, so
that fHbL = fHaL, then
‡ f HzL „ z = 0 (11.19)
f
when the path is any circle centred on the origin. It follows that there is no holomorphic
function F defined on - 80< with the property that F£ HzL = 1 ê z. This is related to the
242 Complex Analysis with Mathematica
many-valued nature of the logarithm function, and you will see this discussed more fully
in the next chapter.
where R is real and positive, we have, using the fact that Re@zD b » z »,
ƒƒ b ƒƒ
ƒ ƒ b b
†ƒ‡ gHtL „ t§ƒ = R = ‡ ‰- q gHtL „ t = ‡ Re@‰-Âq gHtLD „ t
ƒƒ a ƒƒ a a
(11.23)
b b
-Âq
b ‡ †‰ gHtL§ „ t = ‡ †gHtL§ „ t
a a
The length is the sum of several such terms if the path is piecewise smooth. There is an
‘almost obvious’ inequality that relates the size of an integral to the length of the path
and a bound on the function being integrated. The length inequality is the following
theorem: Let
† f HzL§ § M f (11.26)
Proof: By the value inequality, and the definition of the path length:
11 Paths and complex integration 243
ƒƒ ƒƒ ƒƒ b ƒƒ
ƒ ƒ ƒ ƒ
†ƒ‡ f HzL „ z§ƒ = †ƒ‡ f HfHtLL f£ HtL „ t§ƒ
ƒƒ f ƒƒ ƒƒ a ƒƒ
(11.28)
b b
£ £
b ‡ † f HfHtLL§ †f HtL§ „ t b ‡ M f †f HtL§ „ t = M f L HfL
a a
is uniformly convergent. Then the series can be integrated term by term, over a piece-
wise smooth path f œ U, i.e.
¶
Since SHzL is continuous, so are Sn HzL (it is a finite sum of continuous functions) and
Rn HzL (it is then the difference of a pair of continuous functions), so they can be inte-
grated. Furthermore, we can expand out the integral in Sn , since it consists of finitely
many terms:
N
Since the series is uniformly convergent, given any e > 0, we can find an integer N,
independent of z, such that n > N fl » Rn HzL » < e. Now let L be the length of f, then, by
the length inequality, we have
ƒƒ ƒƒ
ƒƒ ƒ
ƒƒ ‡ Rn HzL „ z ƒƒƒ < e L
ƒƒ ƒƒ (11.33)
ƒ f ƒ
So
ƒƒ ƒƒ
ƒƒ N
ƒ
ƒƒ SHzL „ z - ‚ f HzL „ z ƒƒƒ
ƒƒƒ ‡ ‡ n ƒƒ
ƒƒ
(11.34)
ƒƒ f n=1 f ƒ
244 Complex Analysis with Mathematica
can be made as small as we like, by taking N large enough. Hence the result. Theorem
11.2 will be used elsewhere. Note that uniform convergence is necessary, as the exam-
ples given in Chapter 9 made clear. A weaker statement of the theorem can also be given
by mimicking the proof of the Weierstrass M-test and assuming some bounds on fn ,
without mentioning the words ‘uniform convergence’ at all, but the statement and proof
within the framework of uniform convergence are by far the cleanest.
8psp, cpsp<
These lists can also be used to supply information to Mathematica's contour integration
routine. In the complex plane, the Mathematica functions Integrate and NInte-
grate expect to receive a list consisting of the variable of integration and points on the
contour. This makes use of the Prepend function
? Prepend
NContourIntegral@1 ê z, z, cpspD
Chop@%D
6.28319 Â
% ê H2 Pi IL
1.
Chop@NContourIntegral@Sin@zD ê z ^ 2, z, cpspDD
6.28319 Â
11 Paths and complex integration 245
Imortant Warning: this type of integration is most reliably done by doing the calculation
both symbolically and numerically in Mathematica, so that the path is explicitly fed in to
the numerical integrator. When using symbolic integration, Mathematica will attempt to
find a definite integral and apply the fundamental theorem of calculus to the end points
of the contour. For closed contours where the integrand has a singularity within the
contour, this can lead to problems, especially in older versions of Mathematica, such as
the following pair, neither of which are correct:
N@ContourIntegral@Sin@zD ê z ^ 2, z, cpspDD
0. + 0 Â
N@ContourIntegral@1 ê z, z, cpspDD
0.
In version 5, these do return the correct results, both numerically and symbolically.
N@ContourIntegral@Sin@zD ê z ^ 2, z, cpspDD
0. + 6.28319 Â
N@ContourIntegral@1 ê z, z, cpspDD
0. + 6.28319 Â
ContourIntegral@Sin@zD ê z ^ 2, z, cpspD
-CiH-1L + CiH-1L
ContourIntegral@1 ê z, z, cpspD
2Âp
The lesson of this is to keep up with version upgrades, but always check the numerics
against the analytics!
Exercises
11.1 Evaluate the integral
ê
‡ z„z
over a circle of radius r centred on the origin. Is the integrand a holomorphic function of
z?
in Section 11.4. Does this agree with your intuition? Evaluate the integral of z and of zê
around this path.
ê
‡ z „ z and ‡ z „ z
11.5 Let PHzL be a polynomial of degree n ¥ 2 with leading term a0 zn . By writing PHzL in
the form
PHzL = a0 zn QHzL
11.6 Let G be a path from the point z1 = 2 to the point z2 = Â. Using the Fundamental
Theorem of Calculus, calculate each of the following integrals:
‡ sin z „ z
G
‡ ‰ sin z „ z
z
11.7 Let PHzL be any polynomial of degree n. Using the Fundamental Theroem of
Calculus, show that
11 Paths and complex integration 247
‡ PH zL „ z = 0
G
11.8 Ÿ Use Mathematica to evaluate the integral of z over the square with vertices
1 + Â, -1 + Â, -1 - Â, 1 - Â. How does the result compare with your answer from
exercise 11.2?
11.9 Ÿ Use Mathematica to evaluate the integral of 3 z2 + 2 over each of the following
polygonal paths:
(i) The straight line from +1to -1.
(ii) The union of the three line segments from (a) +1 to +1 + Â, (b) from +1 + Â to
-1 + Â, (c) from -1 + Â to -1.
How do your answers compare with those you calculated for Exercise 11.4?
11.10 Ÿ Use Mathematica to calculate each of the integrals given in Exercise 11.6.
ContourIntegral@z, z, path@nDD
and
NContourIntegral@Conjugate@zD, z, path@nDD
for a variety of increasing values of n. Useful starting choices might be n = 5, 20, 100.
To what value does the latter appear to converge as n becomes very large?
12 Cauchy's theorem
Introduction
In this chapter we discuss the integration of holomorphic functions around closed paths.
The main result, Cauchy's theorem, is that such integrals vanish when the function is
holomorphic on and inside the path. This superficially null result has astonishing
consequences when fully developed – in particular it will ultimately focus our attention
on functions with singularities (i.e. functions that fail to be holomorphic at certain
points), in order to get interesting results from integration. First, however, we need to
explain Cauchy's theorem. There are several levels of explanation of this result, depend-
ing on how general one wishes to make the conditions of the theorem. At one level, the
theorem can be explained by reference to Green's theorem in the plane (the planar form
of Stokes' theorem), from elementary vector calculus, and this will be considered first.
But the theorem can be stated and proved using fewer assumptions than are involved in
the Stokes'/Green's theorems, and we shall consider such a case also.
The first part of this chapter assumes a basic familiarity with real line integrals
of the form
‡ Topological preliminaries
An open set U is said to be connected if every pair of points in U can be joined by a
polygonal path that lies entirely in U. An open connected set is called a domain. A
simply connected domain D is a domain with the property that if C is any simple closed
contour lying in D, then the domain interior to C is entirely within D. We may visualize
simply connected domains as being open sets of the complex plane consisting of a single
piece with no holes. A contour C with domain interior to C, called D£ , is understood to
be ‘traversed in the positive sense’ if a hypothetical observer travelling along C always
has D£ to her left.
12 Cauchy's theorem 249
‡ A „x + B „y (12.2)
C
obtained by traversing C in a positive sense, is equal to the following area integral over
D£ :
B A
‡ J ÅÅÅÅÅÅÅÅxÅÅ - ÅÅÅÅÅÅÅÅyÅÅ N „ x „ y (12.3)
D£
We take this result from elementary vector calculus, texts on which should be consulted
for a proof.
We set A = u + Âv, B = -v + Âu, and so, by Green's theorem applied to the real and
imaginary parts, this is equal to
H-v + ÂuL Hu + ÂvL
‡ J ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
x
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ N „ x„ y
y
D£
HÂv + uL Hu + ÂvL
= Â ‡ J ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + Â ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ N „ x„ y (12.5)
x y
D£
f
=  ‡ J ÅÅÅÅÅÅÅÅÅÅ +  ÅÅÅÅÅÅÅÅÅÅ N Hu + ÂvL „ x„ y = 2 ‡ ÅÅÅÅÅÅÅÅêÅÅ „ x„ y
x y z
D£ D£
where we have used the notation introduced in Chapter 10. So, to summarize, if f HzL is
continuous with continuous partial derivatives, then
f
‡ f HzL „ z = 2  ‡ ÅÅÅÅÅÅÅÅzêÅÅ „ x „ y (12.6)
C D£
250 Complex Analysis with Mathematica
‡ f HzL „ z = 0 (12.8)
C
Suppose that f : U Ø is holomorphic on the open set U, and that Ta,b,c Õ U. This
triangle has a boundary given by the piecewise smooth path
l
o a + tHb - aL 0btb1
fa,b,c HtL = m
o b + Ht - 1LHc - bL 1btb2 (12.10)
n c + Ht - 2LHa - cL 2 b t b 3
Then the Cauchy–Goursat Theorem for a triangle states that, given that f : U Ø is
holomorphic on the open set U, with Ta,b,c Õ U,
‡ f HzL „ z = 0 (12.11)
fa,b,c
ü Proof by contradiction
To prove this result, we assume that the result is not true, so we set
J = ‡ f HzL „ z 0
(12.12)
fa,b,c
and we aim to show that this leads to a contradiction. To prove this first requires some
basic geometry. The length of the path fa,b,c is
L = †b - a§ + †c - b§ + †a - c§ (12.13)
Show@plotaD
Now consider adding up the four contour integrals obtained by proceeding around each
sub-triangle in a positive sense. Since there are two integrals around each interior line,
one in each direction, these integrals over interior lines cancel, leaving just the integrals
around the exterior lines. Hence we can write
252 Complex Analysis with Mathematica
J = ‡ f HzL „ z
fa,b,c
(12.15)
= ‡ f HzL „ z + ‡ f HzL „ z + ‡ f HzL „ z + ‡ f HzL „ z
fa,c1 ,b 1 fc1 ,b,a 1 fa1 ,c,b 1 fa1 ,b1 ,c1
By appplying the triangle inequality to this expression, and picking the sub-integral that
is largest in magnitude – we call its boundary points aH1L , bH1L , cH1L – we have con-
structed a sub-triangle TaH1L ,bH1L ,cH1L satisfying the following three conditions:
In each case we pick the triangle where the integral is that of the four obtained with the
largest magnitude. This defines a sequence of triangles Tn = TaHnL ,bHnL ,cHnL with boundaries
given by the images f*n of the mappings fn HtL, with the properties that
L
L faHnL ,bHnL ,cHnL = ÅÅÅÅÅnÅÅÅÅ (12.21)
2
This sequence of triangles has a limiting point contained in all the triangles of the
sequence. This can most easily be seen by exploiting the Cauchy convergence criteria
discussed in Chapter 9, Section 9.2. Note first that if n < p < q, and aq œ Tq , then
aq œ T p Õ Tn , so that if aq œ Tq also, the distance between aq and a p satisfies
L
†a p - aq § b L fn = ÅÅÅÅÅnÅÅÅÅ (12.22)
2
The same holds if n < q < p. So a p is a Cauchy sequence, and there must be a limit
point a such that a p Ø a. Furthermore, note that
L
†a p - a§ b L f p = ÅÅÅÅÅpÅÅÅÅ (12.23)
2
Finally the fact that the function f HzL is differentiable at a is used to obtain a contradic-
tion. Note that the differentiability condition can be written as
Now, given e > 0, there is a d > 0 such that if †z - a§ < d then †sHz - aL§ < e » z - a ».
Next pick n such that L ê 2n < d:
ƒƒ ƒƒ
ƒƒ ƒƒ
ƒƒ ƒ
ƒƒ f HzL „ z ƒƒƒ b Lfn e L ê 2n = e L2 ê 4n
ƒƒ ‡ ƒƒ (12.27)
ƒƒ ƒƒ
ƒƒ fn ƒƒ
which contradicts the inequality that the integral has been constructed so that it is larger
than †J§ ê 4n . So we cannot have that » J » > 0. Hence J = 0 and the result is proved.
For example, a convex open set is, by definition, star-shaped about any of its points. So
suppose that U is star-shaped about a, and that z œ U. We define (bear in mind w is just
a dummy integration variables)
We can now state the theorem – note that we do not need all possible contours – all
triangles will do.
Proof: Fix z œ U, and let r be such that » h » < r fl z + h œ U. So the line segments
@a, zD, @a, z + hD, @z, z + hD are all within U. So consider the closed triangular contour T
from a to z to z + h to a. The Cauchy–Goursat Theorem for a triangle establishes that:
That is,
12 Cauchy's theorem 255
FHz + hL - FHzL 1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - f HzL = ÅÅÅÅÅ ‡ @ f HwL - f HzLD „ w (12.34)
h h
@z,z+hD
and then
ƒƒ ƒƒ
ƒ ƒƒ
FHh + zL - FHzL 1 ƒƒƒƒ ƒƒ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ - f HzL¶ = ÅÅÅÅÅÅÅÅÅ ƒƒƒ ‡ @ f HwL - f HzLD „ w ƒƒƒƒ
¢ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
h †h§ ƒƒ ƒƒ
ƒƒ @z,z+hD ƒƒ
(12.35)
1
b ÅÅÅÅÅÅÅÅÅ †h§ sup † f HwL - f HzL§ = sup † f HwL - f HzL§
†h§ wœ@z,z+hD wœ@z,z+hD
(1) Whether we can deform the contour defining an integral between two points A and B
without changing the result for the integral.
256 Complex Analysis with Mathematica
(2) Whether we can shrink simple closed contours to integrals around a circle. (This is
useful to do some explicit calculations.)
Consider the first point. Suppose we have two piecewise smooth paths C and C£ from A
to B, as shown below:
$DefaultFont = 8"Helvetica ", 12<; a = 81, 1<; b = 85, 5<; c = 83, 3<;
l = Line@8a, b<D; c = Circle@c, 2 Sqrt@2D, 8Pi ê 4, 5 * Pi ê 4<D;
pts = 8PointSize @0.04D, Map@Point, 8a, b<D<;
labels = 8Text@"A", 81.4, 1<D,
Text@"B", 85.4, 5<D, Text@"C", 83.4, 3<D, Text@"C£ ", 81.4, 5<D< ;
Show@Graphics @8pts, l, c, labels <D, AspectRatio -> 1D
C£ B
A
Let D denote the contour obtained by traversing C from A to B and then traversing
backwards along C£ from B to A. Clearly D is a closed contour, so that
‡ f HzL „ z = 0 (12.36)
D
But
Hence the integral from A to B is independent of the route taken. This of course links in
to the notion that f possesses an ‘anti-derivative’ F.
‡ Deformation to a circle
The last basic consequence of Cauchy's theorem involves seeing that we may replace
quite complicated contours by circles around points of interest. Such points may arise
quite naturally as points where the function being integrated may actually fail to be
holomorphic.
12 Cauchy's theorem 257
Suppose that we have a piecewise smooth, positively traversed, simple, path fHtL within
an open set U Õ , and that f is holomorphic on U - 8a<, where a is inside f* . To keep
the proof straightforward we shall assume further that U is actually star-shaped about a.
Note that we do not exclude the possibility that f is holomorphic on all of U – we just
want to allow for the possibility of non-differentiability at a. Since U is open there is a
number r such that the open disk
is contained entirely within U. Suppose that R < r and let g be the positively traversed
smooth path given by the circle radius R centred on a. What we want to establish is that
Note first that the fact that the path f is simple means it cannot intersect itself, so it loops
around a just once. Now take a line L through a that intersects f* at c and d, and inter-
sects g at p and q. This line lies entirely within U because U is star-shaped about a. The
geometry is as shown below:
d
q
g f
p
c
Now focus attention on one part of this geometry as shown below, where the line
segment from q to d is split into two neighbouring lines L and L£ as shown:
258 Complex Analysis with Mathematica
d
L£
q L
g f
‡ f HzL „ z = 0 (12.40)
C
but
So we can replace quite complicated contours by circles as long as they are simple and
closed.
12 Cauchy's theorem 259
ij 0 1 ÅÅÅÅ12 + ÅÅÅÅ2Â yz
jj zz
jj z
jj
jj 1 ÅÅÅÅ32 + ÅÅÅÅ2Â ÅÅÅÅ12 + ÅÅÅÅ2Â zzzz
jj zz
z
jj
jj 1 2 ÅÅÅÅ32 + ÅÅÅÅ2Â zzzz
jjj zzz
k ÅÅÅÅ2 +
3
ÅÅÅÅ2Â 1 + Â ÅÅÅÅ12 + ÅÅÅÅ2Â {
ViewDivision@data_D :=
Show@Graphics@Map@Triangle, dataDDD;
260 Complex Analysis with Mathematica
plota = ViewDivision@checkaD
plotb = ViewDivision@checkbD
plotc = ViewDivision@checkcD
plotd = ViewDivision@checkdD
12 Cauchy's theorem 261
plote = ViewDivision@checkeD
Exercises
12.1 Use Green's theorem in the plane for the case f HzL = zê to show that if C has interior
D£ , then
£
‡ f HzL „ z = 2ÂAHD L
C
12.2 (The last part needs an understanding of moments of inertia in mechanics.) Use the
complex form of Green's theorem in the plane for the case
-Â
f HzL = ÅÅÅÅÅÅÅÅÅ zê 2 z
4
to show that if C has interior D£ , then
‡ f HzL „ z = ‡ †z§ „ x „ y
2
C D£
Hence show, by evaluating a suitable integral around the unit circle, that the moment of
inertia of a circular disk of radius r, and mass per unit area r, with respect to an axis
normal to the disk through its centre (the polar moment), is
pr
ÅÅÅÅÅÅÅÅÅ r4
2
If the total mass is M, deduce that the polar moment of inertia is M r2 ê2.
12.3 A two-dimensional vector field êvê = Hv1 Hx, yL, v2 Hx, yL, 0L is said to be irrotational
if
“
êê ä êvê = ê0ê
Show that this reduces to the constraint that
v2 v1
ÅÅÅÅÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅ
x y
262 Complex Analysis with Mathematica
12.4 A two-dimensional vector field êvê = Hv1 Hx, yL, v2 Hx, yL, 0L is said to be divergence-
free, or solenoidal, if
“
êê . êvê = 0
Show that this reduces to the constraint that
v1 v2
ÅÅÅÅÅÅÅÅÅÅÅÅÅ = - ÅÅÅÅÅÅÅÅÅÅÅÅÅ
x y
12.5 Show that if f = v1 - Âv2 is holomorphic, then the two-dimensional vector field
corresponding to f is both irrotational and divergence-free.
12.6 If a two-dimensional vector field has the property that its line integrals are indepen-
dent of the path taken, then vector calculus theory tells us that there is a potential F with
the property that
êê F
êvê =“
How is this related to the existence of an anti-derivative for the corresponding function
f ? How do we interpret Cauchy's theorem in this context?
over the square with corners at H0, 0L, H-2, 0L, H-2, -2L, H0, -2L, to be traversed
counter-clockwise. (Hint: factorize and do a partial fraction expansion on the denomina-
tor, and deform the square to a small circle around -1 - Â.)
12.8 Ÿ Explore the integrals of the following functions around a unit square centred on
the origin, using Mathematica's NIntegrate function. What is the pattern in the
answers? What special cases are there?
1 1
z , †z§ , ConjugateHzL , J0 HzL , J0 H†z§L , ÅÅÅÅÅ , ÅÅÅÅ2ÅÅÅÅ
z z
13 Cauchy's integral formula and its
remarkable consequences
Introduction
In this chapter we introduce and prove the Cauchy integral formula and look at one part
of the remarkable chain of consequences that results from it. The Cauchy integral
formula is itself almost obvious from the deformation of an integral to a small circle, but
its consequences are truly astonishing. First one establishes Taylor's theorem – in this
case expressed as the fact that if a function is holomorphic, it is in fact infinitely differen-
tiable, and can be represented as a power series involving all its derivatives. Formulae
are also available for the derivatives. This is in manifest distinction to the real case,
where being differentiable once is no guarantee of further differentiability, and being
infinitely differentiable is no guarantee of having a power series! The formulae for the
derivatives can be converted into useful inequalities (the Cauchy inequalities) for the
scale of the derivatives, which allows a quick proof of the remarkable theorem of
Liouville – that any bounded function that is holomorphic everywhere must be constant.
Again, we explore the manifest distinctions with the real case of this odd result, and use
it to establish a neat proof of the fundamental theorem of algebra – that any non-constant
polynomial with complex coefficients has a root (and hence all its roots) in . This
finally justifies the remark made in Chapter 1, Section 1.1 – that ‘complex numbers are
enough’ – so we do not need to extend the number system any further to solve polyno-
mial equations. Then we establish Morera's theorem, which is the converse to Cauchy's
theorem.
ü Proof
We apply our deformation results from Chapter 12 to argue that if 0 < s < R, we may
replace our original circle by a smaller one of radius s:
f HzL f HzL
‡ ÅÅÅÅÅÅÅÅ
z-a
ÅÅÅÅÅÅÅÅ „ z = ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z
z-a (13.3)
fR fs
Now f HzL is differentiable at a, so given any e > 0, there is a d : 0 < d < R such that, if
» z - a » < d, then
f HzL - f HaL e
¢ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - f £ HaL¶ < ÅÅÅÅÅÅ (13.4)
z-a R
(This is just the statement that the remainder term in the definition of differentiability
goes to zero). So choose s such that 0 < s < d. Then using the length inequality
ƒƒ ƒƒ
ƒƒ ƒƒ
ƒ f HzL - f HaL £
ƒ e 2pd
†ƒ‡ J ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - f HaLN „ z§ƒ b ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ b 2 pe (13.5)
ƒƒƒ z-a ƒƒ
ƒƒ
R
ƒfs
But also, we have that
£
‡ f HaL „ z = 0 (13.6)
fs
f HaL
‡ ÅÅÅÅÅÅÅÅ
z-a
ÅÅÅÅÅÅÅÅ „ z = 2p f HaL (13.7)
fs
ƒƒ ƒƒ
ƒƒ ƒƒ
ƒ 1 f HzL ƒ
†ƒ ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z - f HaL§ƒ b e (13.8)
ƒƒ 2p z-a ƒƒ
ƒƒ fs ƒƒ
for 0 b t b 2np. Then a simple extension of the argument given above shows that
f HzL
2pÂn f HaL = ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z
z-a (13.10)
fR,n
More generally still, given a path f, we can define its winding number about a, nHf, aL,
by the integral
1
2pÂnHf, aL = ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z
z-a (13.11)
f
It can be shown that this is well-defined, and obtain a result generalizing the CIF in the
form
f HzL
2pÂnHf, aL f HaL = ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z
z-a (13.12)
f
We shall not go into details about such winding numbers in our main discussion – they
are beyond the scope of this book.
and the series converges absolutely and uniformly for h œ Nr H0L . Before looking at the
proof some remarks are in order.
This result goes some way to explaining our early interest in power series. It has
turned out that any holomorphic function can be locally represented as a power series.
We also know, from Chapter 9, that power series converge and are differentiable within
their radius of convergence. Once one knows this result it is tempting to regard
‘holomorphic’ and ‘power series’ as synonymous. The term ‘analytic’ is used by some
to mean ‘having a power series’, irrespective of whether the context is real or complex.
266 Complex Analysis with Mathematica
This new function is not differentiable at the origin. The following plots of the function
(on the left) and its derivative (on the right) show the reason why one cannot differenti-
ate twice:
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
-1 -0.5 0.5 1 -1 -0.5 0.5 1
Another function illustrates the failure of the power series representation even when the
function is infinitely differentiable. Let gHxL be defined by
l
o 0 x=0
gHxL = m
o ‰-1êx2 (13.17)
n x0
It requires some work to see what is happening here, and the proofs of the following are
discussed in the exercises. It turns out that gHxL is infinitely differentiable everywhere,
including the origin, but
for all values of n. The function is incredibly flat in a neighbourhood of the origin:
0.8
0.6
0.4
0.2
-1 -0.5 0.5 1
It is hopeless trying to make analogues of these functions that are differentiable at the
origin. The function
gHzL = ‰-1êz
2
(13.19)
actually possess one of the nastiest types of singularity, known as an essential singular-
ity, at the origin. Not only does it blow up badly along the imaginary axis, but it also
attains any non-zero value infinitely often in a neighbourhood of the origin! A demonstra-
tion of this is in one of the exercises. We will define and discuss this and other types of
singularity in Chapter 14.
where frê2,a+h @tD = a + h + Hr ê 2L‰Ât , 0 b t b 2p. Why do we do this? Well, the point
a + h is at most rê 2 from a, and a circle of radius rê2 centred on a + h is therefore within
268 Complex Analysis with Mathematica
Nr HaL. So this expression is over a circular contour lying entirely within U. We now
deform this contour to the original circular contour of radius r centred on a, to write
n! f HzL
f HnL Ha + hL = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z (13.21)
2p Hz - Ha + hLLn+1
fr, a
It does not hurt to remind the reader why such a deformation is allowed – we apply
Cauchy's theorem to the contour g shown here. We have drawn it using Mathematica
with illustrative values of a and h.
a a+h
The outer circle is fr,a and the inner is fa+h,rê2 . The contour g first traverses almost all of
the outer circle anticlockwise, jumps to the inner circle, traverses it clockwise, then
jumps back out to the outer circle. By Cauchy's theorem, we have
f HzL
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z = 0 (13.22)
Hz - Ha + hLLn+1
g
Given that we can deform the contour to the same one used for f HnL (a), we consider the
definition of differentiability of f HnL , with the proposed integral expression for f Hn+1L , by
examining
Hn + 1L ! f HzL
s = f HnL Ha + hL - f HnL HaL - h ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅ „ z
2p Hz - aLn+2 (13.23)
fr, a
13 Cauchy's integral formula and its remarkable consequences 269
To show that the nth derivative is differentiable, with f Hn+1L given by the same integral
formula, it is sufficient to show that s is OHh2 L, so that s ê h Ø 0, as h Ø 0. But we can
write
ÅÄÅ hHn + 1L ÑÑÑÑ
É
s = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ f HzLÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
n! 1 1
ÅÅÅÅÅÅÅÅ
Å ÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ
Å ÅÅÅ
Å - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ
Å ÅÅÅ
Å ÑÑ „ z
2p ÅÅÇ Hz - Ha + hLLn+1 Hz - aLn+1 Hz - aLn+2 ÑÑÖ (13.24)
fr, a
So we need to estimate the bracketed term in the integrand. The astute reader may well
have noticed by now that the fact that the bracketed term is of the right order is nothing
more than the observation that 1 êHz - aLn+1 is differentiable, with the obvious derivative,
but we can check it explicitly. First, putting it all over a common denominator, we have
1 1 Hn + 1Lh
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ ÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅ =
Hz - Ha + hLL n+1
Hz - aL n+1
Hz - aLn+2
(13.25)
Hz - aLn+2 - Hz - Ha + hLLn+1 Hz - a + Hn + 1LhL
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
Hz - aLn+2 Hz - Ha + hLLn+1
where R is OHh2 L. On insertion of this the term in the numerator in Hz - aLn+2 is can-
celled, leaving us with
2
Hz - aLn h2 Hn + 1L - Hz - a + hHn + 1LLR
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (13.27)
Hz - aLn+2 Hz - Ha + hLLn+1
So everything in the numerator is OHh2 L. Hence we have shown that f HnL is differentia-
ble, with f Hn+1L also given by the integral formula. This proves parts (i) and (ii) of the
theorem, by induction.
1 f HzL
f Ha + hL = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z
2p Hz - Ha + hLL
fs
ÄÅ ÉÑ
1 ÅÅ 1 hn hn+1 ÑÑ
= ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ f HzLÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ... + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
Å ÅÅÅ
Å + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ
Å ÅÅ ÑÑ „ z
Ñ
2p ÅÅÇ Hz - aL Hz - aL n+1
Hz - aL Hz - a - hL ÑÑÖ
n+1
fq
(13.28)
hn
= f HaL + h f £ HaL + … + ÅÅÅÅÅÅÅÅÅ f HnL HaL
n!
ÄÅ ÉÑ
n+1
Å ÑÑ
+ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ‡ f HzLÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
h 1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ
Å ÅÅ ÑÑ „ z
2p ÅÅÇ Hz - aLn+1 Hz - a - hL ÑÑÑÖ
fq
So let's look at the size of the remainder term. Suppose that » f HzL » b M on the path
over the image of fq . Then
ƒƒƒ 1 ÄÅ ÉÑ ƒƒ
Å ÑÑ ƒ
†ƒ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ hn+1 ‡ f HzLÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅ ÅÅÅÅ ÅÅÅ ÑÑ „ z§ b
ƒƒ 2 p  ÅÅÇ Hz - aL H-a - h + zL ÑÑÑÖ ƒƒƒ
n+1
n (13.29)
rn+1 M M r I ÅÅÅÅqr M
ÅÅÅÅÅÅÅÅÅÅÅÅÅ B ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅn+1
ÅÅÅÅÅÅÅÅÅ F 2 pq = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
2 p Hq - rL q q-r
and by comparison with a geometric series, this is absolutely convergent, and. by the
Weierstrass M-test, is uniformly convergent.
êêê
closed disk N r HaL lies within U. This closed disk is a closed and bounded subset of ,
and we assume a result from basic analysis that a continuous function defined on such a
subset is bounded on such a subset and attains its bounds. In particular, dHzL attains its
êêê
lower bound on N r HaL. This value is necessarily greater than zero, we call it dmin . It then
it follows that Nr+dmin HaL Õ U.
All we have done is to prove carefully that, along the circle, the minimum
distance to a point not in U is greater than zero, so we can stretch the circle out a little.
f £ HaL = 0 (13.36)
†sinHxL§ b 1 (13.37)
272 Complex Analysis with Mathematica
But if we extend this function into the complex plane, the function sinHzL grows in the
imaginary direction, and is unbounded as one approaches ¶. It is nicely frustrating to
play this game with any bounded real function. As a second example, consider
1
f HxL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ (13.38)
a + x2
2
This again is bounded for x real, but if we extend this function (holomorphically) into
the complex, by considering
1
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ (13.39)
a + z2
2
it inevitably blows up at z = Âa. This notion can be neatly extended to prove the next
important result, about roots of polynomials.
and suppose that there are no points w where PHwL = 0. Under this assumption f is
continuous. We have to show carefully that we get a contradiction unless P is constant.
We do this by demonstrating that, under our assumptions, f is bounded, and this begins
by writing out P in the form
an-1 a0
PHzL = a0 + a1 z + … + an zn = zn Jan + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + … + ÅÅÅÅÅnÅÅÅÅ N (13.41)
z z
Let's consider the absolute value of that part of the bracketed term not involving an . This
is just
an-1 a0
À ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + … + ÅÅÅÅnÅÅÅÅÅ À (13.42)
z z
By choosing a sufficiently large value for R, we can arrange that if » z » > R, then
an-1 a0 an
À ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + … + ÅÅÅÅnÅÅÅÅÅ À b ¢ ÅÅÅÅÅÅÅÅÅ ¶ (13.43)
z z 2
It follows by the triangle inequality that if » z » > R, then
1
†PHzL§ r ÅÅÅÅÅ Rn †an § (13.44)
2
and hence that
13 Cauchy's integral formula and its remarkable consequences 273
2
f HzL b ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ (13.45)
R †an §
n
2
0
-2 1
0
-1
0 -1
1
The five zeroes stand out as peaks in this plot.
274 Complex Analysis with Mathematica
‡ f HzL „ z = 0 (13.46)
f
FHwL = ‡ f HzL „ z
(13.47)
cw
Now let y be the straight line joining w and w + h, for w + h œ Nr HzL. Clearly,
and, making a subtraction that will lead to the right expression for the derivative
The right side of this is an integral over a path of a length that goes to zero, of a function
that goes to zero, and hence is oH » h »L – to prove this formally, given e > 0, we can find a
d > 0 such that » f HzL - f HwL » < e for » z - w » < d. So if » h » < d,
ƒƒ ƒƒ
ƒƒ ƒƒ
ƒƒ ƒ
ƒƒ @ f HzL - f HwLD „ z ƒƒƒ < e †h§
ƒƒ ‡ ƒƒ (13.50)
ƒƒ ƒƒ
ƒƒ y ƒƒ
13 Cauchy's integral formula and its remarkable consequences 275
We can deduce some other important results directly from the CIF. These other results
do not rely on Taylor's Theorem. To establish the main result we first rewrite the CIF
using an explicit parametrization on the circle:
z = z0 + R‰Â t
and we have established Theorem 13.6 (the mean-value theorem): the value of a
holomorphic function f at a point is the average of its values on a circle centred at that
point. We can deduce from this that
2p
1
† f Hz0 L§ § ÅÅÅÅÅÅÅÅÅÅ ‡ † f HR‰Ât + z0 L§ „ t (13.53)
2p 0
It follows that we can deduce Theorem 13.7 (maximum modulus theorem): for a
non-constant function f , » f Hz0 L » cannot be a maximum of the modulus of f . The proof
relies on the fact that if the result is not true then Eq. (13.53) leads to a contradiction (see
Exercise 13.4 for details). This observation is the starting point for a chain of theorems
involving the maximum of the modulus.
Exercises
13.1 (Harder) Consider the function defined by:
l
o 0 x=0
gHxL = m
o ‰-1êx2 x 0
n
Show, using the first-principles definition of differentiability, that g has derivatives of all
orders at x = 0, and that gHnL H0L = 0 for all positive integers n.
1
gHzL = ‰- ÅÅÅÅz ÅÅÅ 2
w = gH zL
in the set » z » < , where is given. (Hint: use the multi-valued nature of the logarithm
function to analyse this problem.) Does this function tend to a limit as z Ø 0? Does it
tend to infinity?
13.3 Suppose that PHzL is a polynomial of degree n and that PHwL = 0. By considering
the identity
for 1 b k b n show that PHzL can be written as Hz - wLQHzL for some polynomial Q of
degree n - 1. Deduce that P has exactly n zeroes, counting repeated roots as making
multiple contributions.
13.4 Suppose that f is holomorphic and that » f HzL » has a maximum at z = z0 . Show that
Eq. (13.53) implies that » f » must be constant. Deduce from the Cauchy–Riemann
equations, and the constancy of » f »2 , that if this holds on any open disk or connected
set, f must be constant on such a set.
13.5 Use the formula for the derivatives supplied by Taylor's theorem (Eq. 13.13) to
deduce the value of
‰6z
‡ ÅÅÅÅÅÅÅÅ
z4
ÅÅ „ z
where the integral is taken over a unit circle centred on the origin.
13.6 Use Taylor's theorem to give a rigorous proof of the fact that if f HzL is holomor-
phic, then, if we write f HzL = uHx, uL + Â vHx, yL
2 u 2 u
ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ = 0
x y
13.7 Let PHzL be a polynomial of degree n and suppose that its zeroes are at z = zk for
k = 1, …, n. Show that
P£ HzL
n
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = ‚ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
PH zL k=1
z - zk
13.8 Let C be a simple closed positively traversed contour, and suppose that PHzL is a
polynomial of degree n with no zeroes on C. Use the result of Exercise 13.7 to show that
the number of zeroes of P inside C, counting multiplicities, is
13 Cauchy's integral formula and its remarkable consequences 277
1 P£ HzL
ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z
2p P HzL
13.9 For each of the following real differentiable and bounded functions explain how the
complex generalization shown fails to satisfy the conditions for Liouville's theorem:
1 1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ ö ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ
Ha + x L
2 2 Ha + » z »2 L
2
q@z_D := z ^ 5 - 3 z - 1
13.11 Ÿ Using the values you found in the previous exercise as starting values for
FindRoot, find accurate values for all roots of qHzL = 0. Check your results using
NSolve.
13.12 Ÿ Use Exercise 13.8 and a polygonal approximation to a circle to calculate the
number of zeroes of the polynomial
Introduction
In this chapter we introduce the generalization of a Taylor series to the Laurent series,
and discuss the consequences of the existence of a Laurent series. We also makes some
definitions that allow us to get a grip on the concept of a singularity of a complex
function, and introduce a definition and classification of isolated singularities. The
notion of a reside at an isolated singularity is introduced, and various devices for calculat-
ing residues are introduced for simple functions of interest. This chapter is fundamental
to the development of the theory of integration, and the evaluation of Fourier and
Laplace transforms and their inverses. It also highlights the importance of seeking out
and investigating singularities.
where
0 b d1 < d2 b ¶ (14.2)
Note that the annulus can have a hole that is just the point z0 , and its outer limit can be
infinity. Now we can state the theorem:
a-2 a-1
= … + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + a0 + a1 Hz - z0 L + a2 Hz - z0 L2 + … (14.4)
Hz - z0 L z - z0
where the second line is just there to emphasize that the series contains negative powers
of Hz - z0 L. Furthermore, if d1 < r1 < r2 < d2 , the series converges absolutely and
14 Laurent series, zeroes, singularities and residues 279
uniformly in the set 8z : r1 b †z - z0 § b r2 <, and the coefficients are all given by the
formula
f HzL
2p an = ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅn+1
ÅÅÅÅÅÅÅÅ „ z (14.5)
Hz - z0 L
fr
where d1 < r < d2 , fr = z0 + r ‰Â t , for 0 b t b 2p. In particular, note that the constant
term is given by what would be the Cauchy Integral Formula (CIF) for f Hz0 L, if the
function were holomorphic ‘all the way in’:
f HzL
2pÂa0 = ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z
Hz - z0 L (14.6)
fr
Note that these all vanish if the function is holomorphic in a disk, rather than just an
annulus – then the result reduces to Taylor's theorem, with the corresponding formula
for the coefficients.
How we proceed depends a little on which version of Cauchy's theorem we use. Given
that we have the Cauchy–Goursat result for star-shaped regions, it is logical to divide up
the annular region into n blocks, each of which is star-shaped, so that we can apply the
result.
a = 80, 0<;
phione@t_D := 8Cos@tD, Sin@tD<; phitwo @t_D := 2 * phione @tD;
inner@t_D := 0.5 * phione @tD; outer @t_D := 2.5 * phione @tD;
lines = Table @Line@88Cos@qD, Sin@qD<, 82 Cos@qD, 2 Sin@qD<<D,
8q, Pi ê 16, 31 Pi ê 16, Pi ê 8<D;
ParametricPlot @Evaluate @8phione @tD, phitwo @tD, inner@tD, outer@tD<D,
8t, 0, 2 Pi<, AspectRatio -> 1, Axes -> False, Compiled -> False ,
PlotRange Ø 88- 3, 3<, 8-3, 3<<, PlotRegion -> 880., 1<, 80., 1<<,
PlotStyle -> 8Thickness @0.01D, Thickness @0.01D,
Thickness @0.005 D, Thickness @0.005D<,
Epilog -> 8PointSize @0.03D, Point@aD, Point @81.5, 0<D,
Text@"z0 ", 80, -0.2<D, Text@"z", 81.7, -0.1<D,
Text@"d1 ", 80, -0.6<D, Text@"r1 ", 80, -1.1<D,
Text@"r2 ", 80, -2.1<D, Text@"d2 ", 80, -2.6<D,
Thickness @0.01D, lines<D
280 Complex Analysis with Mathematica
z0 z
d1
r1
r2
d2
Let the anticlockwise contour bounding each block be denoted gi , for i = 1, …, n, with
i = 1 giving the block containing z. By the CIF, using w as the integration variable, we
have
1 f HwL
f HzL = f Hz0 + hL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ w
2p Hw - Hz0 + hLL (14.10)
g1
Now we add together all these results. The integrals over radial lines cancel in pairs,
leaving two integrals:
1 f HwL 1 f HwL
f Hz0 + hL = ÅÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ w - ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ w
2 p Hw - Hz0 + hLL 2p Hw - Hz0 + hLL (14.12)
f r2 f r1
We have dealt with one of these already, in Taylor's theorem. The integral over fr2 can
be expanded precisely as in part (ii) of Taylor's theorem in Section 13.2, with coeffi-
cients given by the same formula. This leaves us to deal with
14 Laurent series, zeroes, singularities and residues 281
-1 f HwL 1 f HwL
= ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ w = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ w
2p Hw - Hz0 + hLL 2p Hh - Hw - z0 LL (14.13)
fr1 f r1
1 w - z0 Hw - z0 L2 Hw - z0 Ln-1 Hw - z0 Ln
ÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
Å ÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ
Å ÅÅÅ + ... + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ
Å ÅÅÅ
Å ÅÅÅ
ÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (14.15)
h h2 h3 hn hn Hh - Hw - z0 LL
Suppose that d1 < s < r1 and that » f HzL » < M on the path fr1 . Then
1 M sn Ms s n
†Rn H hL§ § ÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ 2ps = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ J ÅÅÅÅÅÅÅÅ N (14.19)
2p r1 Hr1 - sL
n
r 1 - s r1
¶
f HzL = ‚ bn Hz - z0 Ln (14.21)
n=-¶
that applies within the annulus. Inspection of the positive and negative n terms in this
expansion reveals that each is a power series, in Hz - z0 L and 1 ê Hz - z0 L respectively, and
hence is uniformly convergent in the interior and exterior of a pair of disks that overlap
in the annulus. Now take the formula
1 f HzL
an = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅn+1
ÅÅÅÅÅÅÅÅ „ z (14.22)
2p Hz - z0 L
fr
and insert the expansion in terms of bm . Uniformity of the convergence implies that we
can swap the order of integration and summation. Evaluation of the integral of each term
then gives
an = bn (14.23)
so that the residue measures the extent to which Cauchy's theorem fails. In fact, there is
rather more to it than that – by getting a value for a-1 , using independent methods, we
can actually evaluate contour integrals with very little work – more on this later!
‡ Ÿ Laurent example 1
In this case we take a simple function and multiply it by a negative power of z. We
consider
14 Laurent series, zeroes, singularities and residues 283
sinHzL
f HzL = ÅÅÅÅÅÅÅÅÅ3ÅÅÅÅÅÅÅÅ (14.25)
z
In this case the route is plain – we take the known Taylor series for sinHzL and divide it
by z3 . The series for sinHzL is well known, and can be written down without or with any
help from Mathematica:
Series[Sin[z],{z,0,9}]
z3 z5 z7 z9
z - ÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + OHz10 L
6 120 5040 362880
We just divide this by z3 , leading to the following, which can also be obtained directly
with Mathematica:
1 1 z2 z4
ÅÅÅÅ2ÅÅÅÅ - ÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + OHz5 L
z 6 120 5040
‡ Ÿ Laurent example 2
Frequently, in dealing with rational functions, the binomial theorem can be applied to
get expansions about various different points. Depending on the point chosen for the
centre of the annulus, we may get a Laurent expansion or just a Taylor expansion.
Consider
1
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (14.26)
zH1 - zL
A good start here is to do a partial fraction expansion, either through pen and paper
algebra or with the Mathematica function Apart, with some tidying up of signs by use
of Cancel:
? Apart
Cancel@Apart@1 ê Hz H1 - zLLDD
1 1
ÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
z 1-z
The binomial theorem can be applied to the second term, to get the expansion
1
ÅÅÅÅÅ + 1 + z + z2 + z3 + ... (14.27)
z
284 Complex Analysis with Mathematica
This series has a radius of convergence of one. We can also apply the binomial theorem,
or Mathematica, at other points. For example, expanding this expression about z = 2
leads to:
w2
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (14.28)
w-1
which we can expand in powers of w using the binomial theorem, for » w » < 1, to obtain:
1 1 1
-w2 - w3 - w4 - … = - ÅÅÅÅ2ÅÅÅÅ - ÅÅÅÅ3ÅÅÅÅ - ÅÅÅÅ4ÅÅÅÅ - … (14.29)
z z z
which is valid for » z » > 1. This latter series can also be obtained directly with
Mathematica:
1 2 1 3 1 4 1 5 1 6 i 1 7y
-J ÅÅÅÅÅ N - J ÅÅÅÅÅ N - J ÅÅÅÅÅ N - J ÅÅÅÅÅ N - J ÅÅÅÅÅ N + OjjjJ ÅÅÅÅÅ N zzz
z z z z z k z {
‡ Ÿ Laurent example 3
Sometimes it may be convenient to combine a known Taylor series with the binomial
expansion, especially if just a few terms are required. For example, consider
1
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = cosecHzL (14.30)
sin z
The series for sin HzL begins
z3 z5
z - ÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅ + ... (14.31)
6 120
14 Laurent series, zeroes, singularities and residues 285
1 i z2 7 z4 y 1 z 7 z3
ÅÅÅÅÅ jj1 + ÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅ + ...zz = ÅÅÅÅÅ + ÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅ + ... (14.33)
z k 6 360 { z 6 360
1 z 7 z3
ÅÅÅÅÅ + ÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅ + OHz4 L
z 6 360
‡ Ÿ Laurent example 4
Here is a more interesting example:
1
f HzL = ‰ ÅÅzÅÅ (14.34)
w2 w3 w4
1 + w + ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ + OHw5 L
2 6 24
We just substitute w = 1 ê z:
1 1 1 2 1 1 3 1 1 4 i 1 5y
1 + ÅÅÅÅÅ + ÅÅÅÅÅ J ÅÅÅÅÅ N + ÅÅÅÅÅ J ÅÅÅÅÅ N + ÅÅÅÅÅÅÅÅÅ J ÅÅÅÅÅ N + OjjjjJ ÅÅÅÅÅ N zzzz
z 2 z 6 z 24 z k z {
A similar approach is also required in managing Mathematica. The obvious attempt
fails, with an interesting message:
1
‰ ÅÅÅÅzÅ
So we proceed as before:
w2 w3 w4
1 + w + ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ + OHw5 L
2 6 24
Now we make a substitution:
286 Complex Analysis with Mathematica
% ê. w -> 1 ê z
1 1 1 2 1 1 3 1 1 4 i 1 5y
1 + ÅÅÅÅÅ + ÅÅÅÅÅ J ÅÅÅÅÅ N + ÅÅÅÅÅ J ÅÅÅÅÅ N + ÅÅÅÅÅÅÅÅÅ J ÅÅÅÅÅ N + OjjjjJ ÅÅÅÅÅ N zzzz
z 2 z 6 z 24 z k z {
and recover the same result. Note that this last series has infinitely many negative terms.
This is related to Mathematica's complaint about essential singularities and will be
discussed in Section 14.5.
U = U1 ‹ U2 (14.35)
where U1 › U2 = f (the sets are disjoint), with U1 and U2 non-empty and open. A
domain is a connected open set in . Note that this is distinct from the elementary notion
of the domain of definition of a function. On domains we can make some useful state-
ments about the behaviour of functions. So let U be a domain, and let f be holomorphic
on U and not identically zero. Then, for each z œ U, there is a value of n such that
f HnL 0. (Note that this is not true for the infinitely differentiable real case, as the
example f HxL = e-1êx makes clear.)
2
U = A ‹ B, A › B = f (14.38)
That is, we can find a neighbourhood around z on which the function is non-zero except
at z itself.
Proof: Suppose that f HzL = 0, and pick the smallest n such that f HnL 0. There is a
neighbourhood of z on which there is a Taylor series
¶
f H jL HzLHw - zL j
f HwL = „ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
j!
j=n
(14.40)
¶
f Hn+ jL HzLHw - zL j
= Hw - zLn „ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = Hw - zLn gHwL
Hn + jL !
j=0
where gHwL is holomorphic (it is defined by a power series), and gHzL = f HnL HzL ên ! 0.
By continuity of g, there is a neighbourhood of z on which gHwL 0, and hence on which
f HwL 0.
14.5 Singularities
A function can fail to be holomorphic in a variety of ways. A large class of interesting
cases can be managed by exploring those singularities that are isolated in the same sense
è!!!
that zeroes are necessarily isolated. This excludes cases such as LogHzL or z near the
origin, where we have to introduce branch cuts just to have a well-defined function, but
does include a large and very important set of possibilities.
-1 ¶
f HzL = ‚ an Hz - z0 Ln + ‚ an Hz - z0 Ln (14.41)
n=-¶ n=0
(1) The point z is said to be a removable singularity if a-n = 0 for all n > 0.
(2) If a-N 0 but a-n = 0 for all n > N then z is a pole of order N.
(3) If infinitely many negative terms are present, then z is an isolated essential
singularity.
The first situation may seem puzzling – students often argue that it is not really a
singularity in this case! The reason we introduce this case is that there may be very good
reasons for excluding the centre of the annulus from the domain of definition of the
function, in terms of the way we write down the form of the function. It may only turn
out on close inspection that the excluded point is actually OK, and that we may then
extend the domain of definition to include the centre. An excellent example of this is the
function
1 1
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅ (14.42)
Hz + pLsinHzL pz
Clearly the origin z = 0 is a bad point from the point of view of working out this defini-
tion. But this point is in fact a removable singularity. Work it out yourself by computing
the Laurent series for this function in an annulus centred on the point z = 0.
Now f is bounded on a circle centred on z0 of radius s, for any s with 0 < s < r, so
suppose that » f » < M for » z » < r.
14 Laurent series, zeroes, singularities and residues 289
1
†a-n § b ÅÅÅÅÅÅÅÅÅÅ M sn-1 2ps = M sn (14.44)
2p
Since s can be as small as we wish, a-n = 0.
It is easiest to discuss these together. Suppose first that f has a pole of order k. Then the
Laurent series is
f HwL =
a-k a-k+1 1 (14.45)
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅkÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ + … = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅkÅÅÅÅ H a-k + a-k+1 Hw - zL + …L
Hw - zL Hw - zL k-1
Hw - zL
where h has a removable singularity. We remove it, defining hHzL = a-k 0. Then as
w Ø z, hHwL Ø a-k and » f » Ø ¶. Now suppose that the conditions of (2) apply. Then f
is not bounded, nor does » f » Ø ¶, so f does not have a removable singularity nor does
it have a pole. It must therefore have an isolated essential singularity.
Now suppose that f has an isolated essential singularity and that the result of (2)
fails. Therefore there is a W for which the result fails, and an e > 0 such that if
0 < » z - z0 » < e, then » f HzL - W » r e. We can make up a new function
1
gHzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (14.47)
f HzL - W
that is holomorphic on the punctured disk, and we know that » gHzL » b 1 ê e. So by the
Riemann removable singularity theorem, g can be extended holomorphically to the
whole disk. It has a Taylor series, and can therefore be written as
W = ‰1êz (14.50)
then
1
z = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (14.51)
 I2 p k + Arg p @wDM + logH†W§L
and, except for W = 0, we see that there are infinitely many solutions of Eq. (14.50) in
an arbitrarily small neighbourhood of the origin.
‡ Ÿ Pictures of singularities
We can use Mathematica's three-dimensional plot routines to get a better grip on the
behaviour of the singular functions and the way they are characterized. For a removable
singularity there is nothing to see, as we merely fill in the hole where the function is
defined. For poles and isolated essential singularities there is more to it. We begin by
recalling the definition of ComplexPlot3D:
You will find the following more interesting if you view the material in colour, and you
might like to turn off the mesh by setting it to False! In the following examples we
shall use Mathematica's pure function notation, where # stands for the argument of the
function, and the function is terminated by &. If you are using Mathematica technologies
beyond version 5.2, see the enclosed CD and on-line supplement.
ü Simple pole
In this case the function f HzL = 1 ê z blows up at the singularity at the origin, and there is
a variation of phase (colour) in the function of 2p as one loops around the singularity:
40
30 1
20
10 0.5
0
-1
1 0
-0.5
0 -0.5
0.5
1 -1
ü Double pole
In this case the function f HzL = 1 ê z2 blows up more strongly at the singularity, and
there is a variation of phase (colour) in the function of 4 p as one loops the singularity:
80
60 1
40
20 0.5
0
-1
1 0
-0.5
0 -0.5
0.5
1 -1
point:
292 Complex Analysis with Mathematica
-1
-0.5
0
0.5
80 1
60
40
0
20
0
0
-1 -0.5 0 0.5 1
ü Proof
If f HzL has a pole of order m then
14 Laurent series, zeroes, singularities and residues 293
¶
f HzL = ‚ an Hz - z0 Ln (14.55)
n=-m
so that
¶
Hz - z0 Lm f HzL = ‚ an Hz - z0 Ln+m (14.56)
n=-m
‡ Residue example 1
1
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ (14.61)
a + z2
2
Now the simple pole formula can be applied directly. For example, working at z = Âa,
multiplying by the factor Hz - ÂaL just amounts to covering up the term Hz - ÂaL in the
denominator generating the singularity, leaving
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (14.63)
z + Âa
to be evaluated in the limit as z Ø Âa, which now amounts to just substituting z = Âa in
what is left, yielding 1 ê H2ÂaL = -Â ê H2aL. Similarly, the other singularity at z = -Âa
gives a residue of 1ê H-2ÂaL = Â êH2aL.
ü Ÿ Mathematica-assisted calculation
There are two ways of using Mathematica to extract values of residues. The first is to
apply the Residue function, and the other is to use Limit. We shall explore both of
these in subsequent examples, beginning here with a direct application of Residue:
? Residue
Residue@expr, 8x, x0<D finds the residue of expr at the point x = x0.
Clear@a, fD;
1
f@z_D := ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
a2 + z2
‡ Residue example 2
1
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ (14.64)
Ha2 + z2 L
So we see a pair of double poles. Again, working first at z = Âa, we multiply by the
square of the factor z - Âa, and we must calculate
14 Laurent series, zeroes, singularities and residues 295
d 1 2
ÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ = - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ3ÅÅ (14.66)
d z Hz + ÂaL HÂa + zL
ü Ÿ Mathematica-assisted calculation
1
f@z_D := ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
Ha2 + z2 L2
‡ Residue example 3
Next we consider a more complicated rational function:
z2 - 2 z
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (14.67)
Hz + 1L2 Hz2 + 4L
and we have a double pole at -1, and a pair of simple poles at 2Â. To deal with the
double pole, first cover up the singular factor, leaving
Hz2 - 2zL
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅ (14.69)
Hz2 + 4L
2z - 2 2zHz2 - 2zL
ÅÅÅÅÅÅÅÅ
Å ÅÅÅÅÅÅÅ
Å ÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅÅ (14.70)
z2 + 4 Hz2 + 4L
and evaluation of this at z = -1 gives us -14 ê 25. For the simple pole at z = 2Â, we
cover up the term Hz - 2ÂL in the denominator, leaving
z2 - 2z
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ (14.71)
Hz + 1L2 Hz + 2ÂL
and evaluation of this at z = 2Â gives (7 + Â)/25. The other value is H7 - ÂLê 25.
296 Complex Analysis with Mathematica
ü Ÿ Mathematica-assisted calculation
Clear@fD;
f@z_D := Hz ^ 2 - 2 zL ê HHz + 1L ^ 2 Hz ^ 2 + 4LL
We can use the Residue function, or take limits using the formulae for single and
double poles:
‡ Residue example 4
1
f HzL = ‰ ÅÅzÅÅ (14.72)
This time there is no alternative but to use the known series for the exponential function:
1 1 1
‰1êz = 1 + ÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ3ÅÅÅÅ + … (14.73)
z 2z 6z
We just extract the coefficient of 1 êz as the residue, which is therefore 1.
ü Ÿ Mathematica-assisted calculation
Residue is not happy at essential singularities:
w2 w3
1 + w + ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ + OHw4 L
2 6
% ê. w -> 1 ê z
1 1 1 2 1 1 3 i 1 4y
1 + ÅÅÅÅÅ + ÅÅÅÅÅ J ÅÅÅÅÅ N + ÅÅÅÅÅ J ÅÅÅÅÅ N + OjjjjJ ÅÅÅÅÅ N zzzz
z 2 z 6 z k z {
Another option is to compute the residue by numerical integration using the NResidue
function that is in the NumericalMath package:
Needs@"NumericalMath`NResidue`"D
This is best used by controlling the radius of the circle used to do the integration:
1. + 4.16334 µ 10-17 Â
At an essential singularity the small radius used by default, 1 ê 100, can produce numeri-
cal errors:
Less extreme singularities are happy with the default radius employed by NResidue:
1.
This is all fine provided there is no other singularity very close to the one under investiga-
tion. Careful analysis is then needed. You might like to consider the example of
Exp@1 ê zD + 1 ê Hz - 1 ê 1000L
‡ Residue example 5
The following example raises a number of issues. Consider the function
‰z
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅ (14.74)
sin2 HzL
The denominator is periodic, and vanishes at z = np. Its periodicity, given that it is the
square of sinHzL, is also p. We let z = np + w, and note that
‰pn+w
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = ‰np f HwL
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (14.75)
sin2 Hpn + wL
It is sufficient to work out the residue at z = 0, since the residues elsewhere are given by
the residue at 0 multiplied by ‰np . At z = 0, we have a double pole, as sin2 HzL ~ z2 near
the origin. In contrast to our previous examples, we do not have an explicit factor we can
pull out before the differentiation. We can now proceed in one of two ways — apply the
formula anyway, or do a manual series approach. In this case the latter is easier, for we
can write
‰z ‰z ‰z
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
Å ÅÅÅ
Å = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅ ÅÅ
Å = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ
sin2 HzL Iz - ÅÅÅÅ z3
Å6 Å + ..M
2
z2 I1 - ÅÅÅÅ z2
Å6 Å + ..M
(14.76)
2 2
I1 + z + ÅÅÅÅ z
2
ÅÅ + ..M I1 + ÅÅÅÅ z
3
ÅÅ + ....M 1 1
= ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
2
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ = ÅÅÅÅ2ÅÅÅÅ + ÅÅÅÅÅ + ...
z z z
and identify the residue at z = 0 as +1. So at z = np the residue is ‰np . Note the manner
in which we have treated the function sinHzL. We look at a special point that is easy to
manage (z = 0) and about which we have a known series. Then the behaviour elsewhere
is deduced from the periodic character of the function. This type of analysis extends to
functions such as cosHzL, sinhHzL and coshHzL.
ü Ÿ Mathematica-assisted calculation
Care must be taken here. There is no problem in identifying what happens at the origin:
Clear@fD;
Exp@zD
f@z_D := ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
Sin@zD2
‰p
‰2 p
But you must not substitute general values of n, as Mathematica does not know that n is
necessarily an integer, and fails to spot the singularity in sinHzL:
‰3 p
What you can do, and what may be very helpful, is to get Mathematica to help you spot
a pattern:
Exercises
14.1 Suppose that f and g are functions that are holomorphic in a punctured disc centred
on z = a, and that they have poles of order m and n respectively at z = a. State the nature
of the singularity of the following functions:
Take care to include all possibilities. What, if anything, can be said about the case when
both have essential singularities at z = a? (For this last part you may find it helpful to
consider the function expH1 ê zL and variations of it.)
14.2 Locate and classify all the singularities of the following functions:
1
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
2
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
Hz + 2LHz + 1L Hz - 1L3
2
1 1
gHzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅ
Hz + pLsinHzL pz
1
hHzL = ‰ ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ ÅÅ
z Hz-1L
300 Complex Analysis with Mathematica
1
kHzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅ
zI‰ ÅÅzÅÅ + 1M
What is special about the origin z = 0 in the last of these four examples?
1 ‰z 1
hHzL = ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅ ; kHzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ; mHzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
z6 + 1 cosHzL coshHzL
‰z cotHzLcothHzL 1
p HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅ ; qHzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ ; rHzL = z3 ‰ ÅÅÅÅz ÅÅÅ 2
sinh2 HzL z3
14.4 Prove, using the Laurent series and the formula for the coefficients, that
¶
1
‰ ÅÅ2ÅÅ aHz-1êzL = ‚ Jn HaL zn
n=-¶
where
2p
1
Jn HaL = ÅÅÅÅÅÅÅÅÅ ‡ cosHnq - a sinHqLL „ q
2p 0
enlisting Mathematica's help if you get stuck. Hence calculate the residues of the
function
z2 + 1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅ
z + 3z - 15z - 7z2 + 18
4 3
14.6 Ÿ Using the functions Residue, Series, Limit and NResidue, find as many
ways as you can of using Mathematica to check your answers to Exercise 14.3. In the
case of the functions containing a periodic component, such as cosHzL, you should restrict
attention to considering particular points, and try to infer the general pattern from those,
in accordance with the comments made at the end of Example 5 in Section 14.7.
14 Laurent series, zeroes, singularities and residues 301
14.7 Ÿ Use the function ComplexPlot3D to visualize the functions of Exercise 14.3.
14.8 Ÿ Although it does not distinguish between singularities and zeroes so effectively,
the function ContourPlot used in conjunction with Abs gives a very revealing
picture of singularities. For example, try out:
14.9 Ÿ Use Mathematica to find out what the function Jn is in Exercise 14.4 (Hint:
consider the cases n = 0, 1).
15 Residue calculus: integration,
summation and the argument principle
Introduction
In this chapter we introduce the methods by which certain types of definite integral may
be evaluated. Similar methods may be used to sum certain types of infinite series. The
approach has many applications, and will be considered again in Chapter 16, in applica-
tions to Fourier transforms, and in Chapter 17, on Laplace transforms. We begin by
establishing the Residue theorem, which relates a contour integral to the residues of the
integrand at its various singularities. Then we explore how various types of real integral
can be transformed into contour integrals, and then evaluated by an analysis of their
singularities. Finally we take a brief look at the summation of series by residue methods.
Mathematica can play various roles in this part of the theory related to the
evaluation of integrals by the calculus of residues. It can just be there to help with the
algebra in calculating residues. You can use the functions Residue and NResidue to
work out the residues directly. Finally you can use Integrate and NIntegrate to
do a direct calculation of the answer. In this last case considerable care is required. The
symbolic treatment of general integrals is an evolving (black) art and the results, mostly
in the way they are displayed and the full details of conditions for the results to hold,
will vary from version to version of the software. This matters particularly when the
integrand contains parameters. In general, the most recent version is the most reliable,
but not necessarily the quickest. In all cases it is safest to use Mathematica to evaluate
the integrals in various different ways and check for consistency. This author's advice is
to compare the results from:
You must not make the mistake of trying to cut corners by setting GenerateCondi-
tions -> False, as this may give misleading answers.
Cauchy's theorem tells us that the integral around the entire contour is zero. Hence we
can relate the integral around the outer boundary to that around a small circle centred on
the singular point. Now we use the Laurent expansion about a, and the formula
applied on the small circle. When there are several singularities we make as many
indentations in our original contour as there are singularities, and we add up the results.
When the contour winds around any singularity more than once, the contribution is
multiplied by the winding number for that singularity.
304 Complex Analysis with Mathematica
Several examples will be considered that illustrate many different choices of contour.
The examples considered are chosen to cover most of the basic cases of interest.
Show@Graphics@
8SimplePole@81, 1<, 1D, DoublePole@85, 1<, 1D,
TriplePole@81, 5<, 1D, HighPole@85, 5<, 1D,
EssSing@83, 3<, 1D<, AspectRatio -> 1DD
15 Residue calculus 305
‡ Example 1
2p
1
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ t (15.4)
0 8 cos HtL + 1
cosof@zD := Hz + 1 ê zL ê 2
Next, we need to make the change of variable t Ø z under the integral, obtained by
mapping the differential according to the rule:
„ z
„ t Ø - ÅÅÅÅÅÅÅÅÅÅÅÅ (15.7)
z
Âz
- ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅ (15.8)
2z + 5z2 + 2
4
There are four roots on the imaginary axis, as shown here, together with the contour that
is the unit circle:
ci =
8SimplePole @80, Sqrt@2D<, 0.1D,
SimplePole @80, -Sqrt@2D<, 0.1D,
SimplePole @80, 1 ê Sqrt@2D<, 0.1D,
SimplePole @80, -1 ê Sqrt@2D<, 0.1D,
Thickness @0.01D, Circle @80, 0<, 1D<;
cplot = Show@Graphics @ci, AspectRatio -> Automatic ,
Axes -> True, Ticks -> None, PlotRange -> 88- 2, 2<, 8-2, 2<<DD
Since we know the roots of the denominator, the integrand can be factorized about the
two roots of interest and the residues computed by the method of covering up the
singular factor. Here it is easy to use the differentiation formula for a simple pole. So set
The function giving the residues of the function PHzL ê QHzL is then just:
PHzL Âz
ResfuncHzL = ÅÅÅÅÅÅÅÅ£ ÅÅÅÅÅÅÅÅÅ = - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ (15.11)
Q HzL 8z3 + 10z
15 Residue calculus 307
i  yz Â
Resfuncjjj- ÅÅÅÅÅÅÅÅ
è!!!ÅÅÅÅÅ zz = - ÅÅÅÅÅ (15.12)
k 2 { 6
i  yz Â
Resfuncjjj ÅÅÅÅÅÅÅÅ
è!!!ÅÅÅÅÅ zz = - ÅÅÅÅÅ (15.13)
k 2 { 6
ü Ÿ Mathematica-assisted approach
First we define the integrand for Mathematica and ask for its simplification:
simp = Simplify@integrandD
Âz
- ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅ
2 z + 5 z2 + 2
4
The singularities of the integrand are given by the zeroes of the polynomial denomina-
tor, so the denominator is defined as a polynomial expression, and its roots found:
poly = Denominator@simpD
2 z4 + 5 z 2 + 2
z ê. Solve@poly == 0, zD
  è!!! è!!!
è!!!ÅÅÅÅÅ , ÅÅÅÅÅÅÅÅ
9- ÅÅÅÅÅÅÅÅ è!!!ÅÅÅÅÅ , -Â 2 , Â 2 =
2 2
Note that the denominator is a fourth-order polynomial and we have found four distinct
roots – there are no multiple roots. So the four roots give four simple poles. Two are
obviously inside the unit circle. We can use the differentiation method used above, or
take limits directly. We shall ask Mathematica to do the latter. For each of these, we
multiply by the singular factor and take the limit using the Limit function:
308 Complex Analysis with Mathematica
i
j I z y I
resone = SimplifyALimitAj
jz + ÅÅÅÅÅÅÅÅÅÅ z integrand, z Ø - ÅÅÅÅÅÅÅÅÅÅ
j è!!!! z z è!!!! EE
k 2 { 2
Â
- ÅÅÅÅÅ
6
restwo = Simplify@
Limit@Hz - I ê Sqrt@2DL integrand, z -> I ê Sqrt@2DDD
Â
- ÅÅÅÅÅ
6
The value of the integral is given by 2 p  times the sum of the residues:
2 p I Hresone + restwoL
2p
ÅÅÅÅÅÅÅÅÅÅ
3
You might like to look at using Residue as another method.
Needs@"NumericalMath`NResidue`"D
? NumericalMath`NResidue`*
NumericalMath`NResidue`
NResidue Radius
? NResidue
? Radius
2 Pi I * Hnresone + nrestwoL
Chop@%D
2.0944
2 Pi ê 3 êê N
2.0944
Sometimes, because of the numerical method used, very small numbers may appear in
the final or, as here, intermediate results. Mathematica does a numerical integration
around a small circle to work out the residue! It is often useful to use the Chop function
to remove machine-precision glitches:
Chop@nresoneD
-0.166667 Â
310 Complex Analysis with Mathematica
This example illustrates that you have many options involving varying degrees of
intervention by Mathematica.
z = ‰Ât (15.16)
1 1
cosHtL = ÅÅÅÅÅ Jz + ÅÅÅÅÅ N (15.17)
2 z
1 1
sinHtL = ÅÅÅÅÅÅÅÅ Jz - ÅÅÅÅÅ N (15.18)
2Â z
 „z
„ t = - ÅÅÅÅÅÅÅÅÅÅÅÅÅ (15.19)
z
The integrand is therefore
2
ÂHz - ÅÅÅÅ1z L
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (15.20)
4zHa + ÅÅÅÅ12 bHz + ÅÅÅÅ1z LL
There is manifestly a double pole at the origin, and a pair of poles at the roots of the
polynomial
è!!!!!!!!!!!!!!!
-a - a2 - b2
z1 = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (15.24)
b
è!!!!!!!! !!!!!!!
a2 - b2 - a
z2 = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (15.25)
b
As an example, with a = 2, b = 1, the roots are as shown:
The residue at zero is given by the double-pole differentiation formula. First we differenti-
ate the integrand times the singular factor:
2
dHz2 integrandL 2ÂzHz2 - 1L ÂH2a + 2bzLHz2 - 1L
deriv = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅ ÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (15.26)
dz bz2 + 2az + b 2Hbz2 + 2az + bL2
This simplifies to
è!!!!!!!!!!!!!!!
 a2 - b2
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅ (15.29)
b2
312 Complex Analysis with Mathematica
Adding this to the residue at the origin and multiplying by 2p gives the value of the
integral as:
ij Âa è!!!!!!!!!!!!!!!
j  a2 - b2 yzz
2Â jj- ÅÅÅÅÅ2ÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅ zz p (15.30)
k b b2 {
and this simplifies to
è!!!!!!!!!!!!!!!
2pIa - a2 - b2 M
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (15.31)
b2
Clearly the integrator has taken some time to work out some very complicated condi-
tions for this integral to make sense for all possible complex a and b. Let us now feed
our assumptions about a and b to Integrate:
The integrand is an even function of x, so that the integral under consideration may be
written as
1 ¶ 1
ÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ x (15.33)
2 -¶ Ha2 + x2 LHb2 + x2 L
This is not an integral over a closed contour. We need to add a piece, in the form of a
large semicircle in either the upper or lower half plane. To check that this gives zero we
need the following definitions and theorem.
This can make a real difference to whether an integral exists! For example, the function
a
f HxL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (15.36)
pHa + x2 L
2
occurs in elementary probability, for real a > 0. It is called the ‘Cauchy Distribution’,
and is a probability density function (p.d.f.) by virtue of the fact that it is non-negative
and
¶
a
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ x = 1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (15.37)
-¶ p Ha 2 + x2 L
The mean value of the associated random variable is given by the double limit of
S
xa
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ x
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (15.38)
-R pHa 2 + x2 L
which evaluates to
a logHa2 + S2 L a logHa2 + R2 L
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (15.39)
2p 2p
Clearly, if we let R and S approach infinity independently the answer can be any value
we like! However, if we set R = S the answer is zero for all finite R, and hence the
principal value is zero. This makes sense – the p.d.f. is an even function so the expected
value of the random variable should be zero, since positive and negative values of the
same magnitude carry the same weight in the p.d.f. Or, to put it another way, the inte-
grand for the expected value is an odd function, so we should expect the total area under
the curve to be zero.
When we work with principal value integrals, the contour along the real axis
from -R to R is closed by attaching a large semicircle. The question arises as to whether
we should use the upper or lower half-plane. For ratios of polynomials, it does not
matter, provided certain conditions are satisfied. For integrands containing trigonometric
or exponential functions, it is critical that the right choice is made, and this is also very
important for the development of the theory of Fourier and Laplace transforms.
Our first semicircle theorem is the following. The proof comes with the state-
ment! Theorem 15.1: suppose f HzL satisfies the condition
M
† f HzL§ b ÅÅÅÅÅÅÅÅÅ (15.40)
Rk
on the contour G, parametrized by
z = R‰Âq (15.41)
15 Residue calculus 315
because the arc-length of G is pR. This vanishes as R Ø ¶, provided k > 1. For ratios of
polynomials, it is clearly more than sufficient that the degree of the denominator is 2 or
more greater than that of the numerator.
and these are simple poles. There are two in the upper half plane, at {Âa, Âb}. In this case
we can appeal to the rule for just differentiating the denominator, which uses the function
dQHzL
qHzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = 4zHa2 + z2 L + 4zHb2 + z2 L (15.45)
dz
The residues are, first at Âa,
1 Â
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅ (15.46)
qHÂaL 4 aHb - a2 L
(15.48)
Clearly the intermediate steps break down if a = b. In this case there is a double pole,
and the result is obtained by setting
1
gHz_L := ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ (15.50)
2Ha + z2 L
2
316 Complex Analysis with Mathematica
We cannot complete the contour in either the lower or the upper half-plane as things
stand, because the sine function blows up in each case. The trick is to consider the
integral as the imaginary part of
¶
‰Â x
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ x (15.53)
-¶ x + x + 1
2
Now we can complete in the upper half-plane, since the numerator is less than unity in
absolute value there, and the denominator sends the integrand to zero sufficiently fast for
our semicircle theorem to apply. Now, where are the poles? These are at the zeroes of
the denominator. This can be found by use of the formula for a quadratic, leading to the
factorization. Replacing x by the complex variable z, we have
15 Residue calculus 317
è!!! è!!!
i  3 yi  3 y
z2 + z + 1 = jjjjz + ÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ zzzz jjjjz + ÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ zzzz
1 1
(15.54)
k 2 2 {k 2 2 {
Simplify@ComplexExpand@%@@2DDDD
è!!!!
3
2 ‰- ÅÅÅÅÅ2ÅÅÅÅÅÅ p cosH ÅÅÅÅ12 L
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
3
318 Complex Analysis with Mathematica
The details of the output may depend on the version you are using, but the answers can
be reconciled with such simplification.
Then
b
(15.63)
sÂe‰Ât
= ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅ „ t + ‡ gHzL „ z = H b - aLÂs + ‡ gHzL „ z
a e‰Ât
fe fe
Taking limits sends the latter integral to zero, leaving the desired result. The classic type
of application of the Mousehole result is exemplified by the evaluation of
¶
x - sinHxL
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅ „ x
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (15.64)
0 x3
We first note that the integrand is even, and so consider half the value of
¶
x - sinHxL
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ „ x (15.65)
-¶ x3
First we need to consider how to put the integrand in complex form. Our first guess
might be to regard the real expression as the imaginary part of
Âz - ‰Âz
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅ (15.66)
z3
15 Residue calculus 319
but at the origin this now has a triple pole. One further correction does the trick:
Âz + 1 - ‰Âz
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅ (15.67)
z3
Expansion of the exponential in the numerator shows that
1 Â z
f HzL = ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅ + … (15.68)
2z 6 24
There is now only one singularity in f , at the origin, where there is a simple pole with
residue 1/2. Now we can apply our semicircle theorem in the upper half-plane, as the
denominator is degree two greater than the polynomial part of the numerator, and the
exponential part of the numerator is well behaved. We therefore use the contour shown
for evaluation:
ci = 8SimplePole @80, 0<, 0.25D, Thickness @0.01D, Circle @80, 0<, 0.5, 80, Pi<D,
Circle@80, 0<, 5, 80, Pi<D,
[email protected], 0<, 85, 0<<D, [email protected], 0<, 8-5, 0<<D,
Text@"C 1 ", 8-2.5, -0.3<D, Text@"C2 ", 82.5, -0.3<D,
Text@"C 3 ", 80.4, 0.7<D, Text@"C4 ", 82.5, 4<D<;
cplot =
Show @Graphics @ci, AspectRatio -> Automatic , Axes -> True, Ticks -> None,
PlotRange -> 88-6, 6<, 8-1, 6<<DD
C4
C3
C1 C2
By Cauchy's theorem
But in the limit, we can ignore the contribution of C4 . The integral we want is the
combination of C1 and C2 , and this is
But this is now the integral over a small semicircle, traversed clockwise, and so is
Âp
-H-Â pL resH f , 0L = ÅÅÅÅÅÅÅÅÅ (15.71)
2
The imaginary part of this is just p/2, and so our original integral is just p/4.
C4
C3
C1 C2
15 Residue calculus 321
These contours are good when one wishes to avoid unnecessary evaluation of residues in
the lower half-plane. Sometimes however, there may be poles on the negative real axis,
and unless they are simple, this method will fail. A good general purpose contour for
coping with a variety of functions with branch points is the following contour:
C4
C3 C1
C2
In this case the branch cut is taken along the positive real axis. We consider some
applications to illustrate the power of this method. The first gives us a powerful general
theorem. We consider an integral of the form
¶
‡ f HxL „ x (15.72)
0
where f has no branch points, and no poles on the positive real axis or at zero, and goes
to zero sufficiently fast at infinity that we neglect integrals over arcs of large circles. We
do not require that f has any even symmetry. The trick is to consider
over the contour consisting of C1 , C2 , C3 , C4 . On the contour just above the real axis,
the contribution from C1 is just
¶
‡ f HxL logHxL „ x (15.74)
0
0
‡ f HxL HlogHxL + 2pÂL „ x (15.75)
¶
Finally, we can check that the integral over the small semicircle goes to zero as its radius
goes to zero. Application of the residue theorem then shows that
¶
‡ f HxL „ x = - ‚ Res@logHzL f HzLD (15.77)
0
where the sum is over the singularities within the contour. This is a strange and beautiful
result!
and so can be factorized over these roots, but we do not actually do this, as it will be
easier to use the differentiation theorem to extract the residue. We need to consider
LogHzL times this function. The singularities are on the unit circle,
where LogHzL = Â ArgHzL, so if the function is
logHzL
gHzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅ (15.80)
Hz3 + 1L
the residue at any pole on the unit circle is the numerator divided by the derivative of the
denominator, i.e. on the unit circle
 ArgHzL
ResHzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ (15.81)
3z2
The three pieces, in order of that given in the list in Eq. (15.79), are
p Âp p
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
2Âp
ÅÅÅÅ = - ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅ
è!!! (15.82)
ÅÅÅÅ Å3ÅÅÅÅÅÅ 18
3 I3‰ M 6 3
15 Residue calculus 323
p Âp
ÅÅÅÅÅÅÅÅ2ÅÅÅÅÂÅÅÅÅpÅÅ = ÅÅÅÅÅÅÅÅ (15.83)
3‰ 3
5p 5Âp 5p
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
10 Â p
ÅÅÅÅÅ = - ÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅ
è!!! (15.84)
ÅÅÅÅÅÅÅÅ
ÅÅÅÅ
ÅÅ 18
3 I3‰ 3 M 6 3
This is the desired result, which we can check directly with Mathematica:
If you obtain something different in your current version of Mathematica, use the
simplification tools.
Now this can be treated in a variety of ways – another option is given in the exercises.
Here we proceed directly, so we consider the function
è!!!
z logHzL
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅÅÅ (15.87)
Hz + 1L
integrated over the same contour. This time the contribution from C1 is the integral we
want, and that from C2 is
¶ è!!!
‰Âp x HlogHxL + 2pÂL
-‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ x (15.88)
0 Hx + 1L2
Now there is one double pole at z = -1, so to get the residue we need to evaluate the
derivative at z = -1, of
324 Complex Analysis with Mathematica
è!!! (15.90)
z logHzL
Now we just take real and imaginary parts, to obtain the following pair of results:
¶ è!!!
x logHxL
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅÅÅÅÅ „ x = p (15.94)
0 Hx + 1L
¶ è!!!
x p
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅ „ x = ÅÅÅÅÅÅ (15.95)
0 Hx + 1L 2
ü Ÿ Mathematica checks
We can check these directly with Mathematica:
The denominator vanishes when z = Ânp, for n an integer, and these will generate simple
poles in the absence of any cancellations. The potential pole at the origin is nullified by
the presence of z in the numerator, so we consider non-zero positive and negative integer
values for n. If we tried some kind of semicircular contour we would have all kinds of
problems since there are infinitely many poles in either half-plane. The point to note
here is that the denominator is periodic in the imaginary direction:
So if we use a rectangular contour going along the real axis and back along the real axis
displaced by a multiple of  n p, we can arrange that the two integrals are closely related.
We use the following contour:
C5 C3
C4
C6 C2
C1
326 Complex Analysis with Mathematica
By Cauchy's theorem:
Now we can ignore the contributions from C2 and C6 in the limit that the ends of the
rectangle go to infinity, as the denominator blows up exponentially. For the three
horizontal sections, we can write
where the imaginary principal value integral is zero because the integrand is odd. Finally
we need to deal with the upturned mousehole contour. The residue at  p is the limit
zHz - ÂpL 2z - Âp
lim ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = lim ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = -Âp (15.101)
zØÂ p sinhHzL zØÂ p coshHzL
so J = p2 ê 2.
ü Ÿ Mathematica check
p2
ÅÅÅÅÅÅÅÅÅ
2
‡ Summation type 1
Let gHnL be an even rational function of n, holomorphic except at the origin, satisfying,
for large » z », » gHzL » = OH » z »-k L for k > 1, and we wish to evaluate
¶
‚ gHnL (15.104)
n=1
15 Residue calculus 327
We consider
First of all note that the poles of f HzL are the poles of gHzL and also at the poles of
cotHpzL. The residues of f HzL at the poles of cotHpzL are just gHnL. Now we pick a square
contour with vertices at
1 1 1 1
JN + ÅÅÅÅÅ N H1 + ÂL; JN + ÅÅÅÅÅ N H-1 + ÂL; JN + ÅÅÅÅÅ N H-1 - ÂL; JN + ÅÅÅÅÅ N H1 - ÂL; (15.106)
2 2 2 2
It is a simple task (that you should do) to show that cotHp zL is bounded on such a square
(note that this square goes between the singularities), so by the behaviour of f for large
z, by letting N Ø ¶ we deduce that the integral over this square tends to zero, and hence
that
¶
2 ‚ gHnL = - ‚ res@pgHzLcotHpzLD (15.107)
n=1 poles of g
ü Example
¶
1 p2
‚ ÅÅÅÅÅ2ÅÅÅÅ = ÅÅÅÅÅÅÅÅÅ (15.108)
n=1
n 6
This is proved by taking gHnL = 1 ê n2 and computing the residue of p cotHpzLê z2 at the
origin as -p2 ê3.
p2
ÅÅÅÅÅÅÅÅÅ
6
‡ Summation type 2
Let gHnL be an even rational function of n, holomorphic except at the origin, satisfying,
for large » z », » gHzL » = OH » z »-k L for k > 1, and we wish to evaluate:
¶
‚ H-1L gHnL
n
(15.109)
n=1
We consider
and proceed exactly as before, noting that the residue of f HzL at the poles of cosecHpzL is
now H-1Ln gHnL.
328 Complex Analysis with Mathematica
ü Example
By a similar argument as before, it follows that
¶
H-1Ln p2
‚ ÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅÅÅ = - ÅÅÅÅÅÅÅÅÅ (15.111)
n=1
n 12
This is proved by taking gHnL = 1 ê n2 and computing the residue of pcosecHpzL êz2 at the
origin as p2 ê 6.
p2
- ÅÅÅÅÅÅÅÅÅ
12
By considering sums from negative infinity to infinity we can obtain other types of
results – see the last part of Exercise 15.10 for an example. But some series cannot be
summed by these methods – try Exercise 15.19 if you want to get an idea of the depth of
the water you can rapidly find yourself in! We also have the famous Mittag-Leffler
expansion theorem, which can be thought of as a kind of fancy partial fraction expansion
based on the poles of functions, rather than on a simple factorization of a denominator.
The form of this theorem is described below.
Theorem 15.3: Mittag-Leffler Suppose that f HzL only has singularities at simple poles
a1 , a2 , … arranged in increasing absolute value, with residues b1 , b2 , ... at each of
these poles. Suppose further that f HzL is less than M in magnitude on a sequence of
circles of radius Rm , with Rm Ø ¶ as m Ø ¶, with these circles not passing through any
of the poles, and M is independent of m. Then
¶
1 1
f HzL = f H0L + ‚ bn J ÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ N (15.112)
n=1
a n z - an
The proof is left as Exercise 15.11 for more enterprising students. Some simple applica-
tions are given in Exercise 15.12. It may surprise you to learn that Mathematica is
perfectly capable of adding up series of this type, to recover the original functions. This
is very helpful, particularly for checking answers, and some examples are given in
Exercise 18.
1 f £ HzL
J = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z (15.113)
2p C f HzL
ü J as a change in argument
If we parametrize C by t, with a b t b b we can write
1 f £ HzHtLL 1 logH f HzHtLLL
J = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ z£ HtL „ t = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ t (15.114)
2p C f HzHtLL 2p C t
and so
t=b
1
J = ÅÅÅÅÅÅÅÅÅÅÅÅ @logH f HzHtLLLD (15.115)
2p t=a
which is the change in the value of the logarithm of f as we move round the path.
Decomposing the complex logarithm we obtain
t=b t=b
1 1
J = ÅÅÅÅÅÅÅÅÅÅÅÅ @logH » f HzHtLLL » + Â ArgH f HzHtLLL D = ÅÅÅÅÅÅÅÅÅ @ArgH f HzHtLLL D (15.116)
2p t=a 2p t=a
so that J is just the change in the argument of f around the path, divided by 2p. This is
normally written without reference to the parameter as
1
J = ÅÅÅÅÅÅÅÅÅ @ArgH f HzLL D (15.117)
2p C
is the number of times w winds around the origin, since it is 1 ê 2p times the change in
the argument of w = f HzL as z progresses around C and w progresses around D.
f £ HzL ni
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + hHzL (15.121)
f HzL z - zi
where hHzL = g£HzL ê gHzL is holomorphic in this same neighbourhood. Applying the
calculus of residues we see immediately that
k
J = ‚ ni (15.122)
i=1
where k is the total number of locations of the zeroes or poles. This result is usually
written as
J = N-P (15.123)
where N is the total number of zeroes, including multiplicies, and P is the total number
poles, each pole weighted by its orders. The argument principle is then summarized by
an equation combining these observations into the form:
1 f £ HzL 1
J = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z = ÅÅÅÅÅÅÅÅÅ @ArgH f HzLLD = N - P (15.124)
2p C f HzL 2p C
We now write down the difference, N - M, and show that this is zero under the assump-
tions given:
N-M
1 f £ HzL + f £ HzL hHzL + f HzL h£ HzL 1 f £ HzL
= ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z - ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ z
2p C f HzL H1 + hHzLL 2p C f HzL
15 Residue calculus 331
Now we note that since hHzL < 1 on C the integrand of this last expression can be
expanded term by term:
1
N - M = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ h£HzL H1 - hHzL + h2 HzL - h3 HzL + …L „ z (15.128)
2p C
The series is uniformly convergent and can be integrated term by term, each term giving
zero. Hence N = M.
We can find out about the zeroes of this function in various ways, with or without
Mathematica. We can use Mathematica to work out directly the integral involved in the
argument principle. We can try to apply Rouché's theorem using ‘pen and paper’.
Finally, we can just ask Mathematica to tell us where the roots are, possibly symboli-
cally, and if necessary, numerically.
P@z_D := z ^ 8 - 4 z ^ 3 + 24;
q@z_D = D@P@zD, zD;
Q@z_D := q@zD
Let's define a function to investigate the argument principle applied over a circle. Note
that we will use numerical integration and then round the result. This is important
because if we used Integrate, this would try to find an analytical expression
(involving the logarithm in many examples) and this would not reliably pick up the
correct branch of the argument.
RootCount@r_D :=
Round@1 ê H2 Pi IL NIntegrate@Q@r Exp@I tDD ê P@r Exp@I tDD
I r Exp@I tD, 8t, 0, 2 Pi<DD
332 Complex Analysis with Mathematica
The following produces some warnings, which arise quite rightly because on the first
(inner) integral the correct result is zero:
80, 8<
So we know that all eight roots lie between the circles of radius one and two.
So by Rouché's theorem the sum f + g = P has the same number of roots as does f
inside the circle » z » = 1, i.e., none. Now consider the outer circle » z » = 2. This time we
choose f HzL = z8 and gHzL = 24 - 4z3 . On the outer circle we have
z ê. Solve@z ^ 8 - 4 z ^ 3 + 24 ã 0, zD
rootlist = z ê. NSolve@z ^ 8 - 4 z ^ 3 + 24 ã 0, zD
Map@Abs, rootlistD
81.53291, 1.53291, 1.39193, 1.39193, 1.5796, 1.5796, 1.45353, 1.45353<
15 Residue calculus 333
ü Ÿ A graphical representation
The results above can be summarized by the following Mathematica plot showing the
two circles and the roots:
circlesnroots = ParametricPlot@
882 Cos@tD, 2 Sin@tD<, 8Cos@tD, Sin@tD<<,
8t, 0, 2 Pi<, AspectRatio Ø 1,
Epilog Ø [email protected],
Map@Point@8Re@#D, Im@#D<D &, rootlistD< D
-2 -1 1 2
-1
-2
Needs@"Algebra`RootIsolation` "D;
? CountRoots
In other words, this function is already set up to do the work for us using rectangular
intervals!
0
334 Complex Analysis with Mathematica
Show@Graphics@
88RGBColor@0, 1, 0D, Rectangle@8-2, -2<, 82, 2<D<,
8RGBColor@0, 0, 1D, [email protected], -1<,
81.5, 1<D<, [email protected], RGBColor@0, 0, 0D,
Map@Point@8Re@#D, Im@#D<D &, rootlistD<<,
Frame Ø True, AspectRatio Ø 1DD
-1
-2
-2 -1 0 1 2
We can overlay this with the circles plot as well:
Show@%, circlesnrootsD
-1
-2
-2 -1 0 1 2
ü Projects
Write down some polynomials and investigate them using the techniques described
above. Two examples to start you off are given in Exercise 15.20.
15 Residue calculus 335
Exercises
15.1 Evaluate, for a and b real, with a > b > 0, the integral
2p
1
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ q
0 a + b cosHqL
and explain how the result can also be obtained using DeMoivre's Theorem.
¶
1
‡ ÅÅÅÅÅÅÅÅÅÅÅÅ „ x
ÅÅÅÅÅÅÅÅ
0 x5 + 1
Also show how these can be done using a wedge-shaped contour. To figure out where
the wedge should be, consider the angle about the origin over which the integrand is
periodic.
and integrating over the sequence of circles given in the statement of the theorem, prove
the Mittag-Leffler expansion theorem.
15.12 Assuming the Mittag-Leffler theorem, derive generalized partial fraction expan-
sions for cosecHzL, secHzL, tanHzL, cotHzL. How may these be used directly to infer their
equivalents for hyperbolic functions?
Ÿ In the following exercises with Mathematica please note the suggestions in the
introduction for cross-checking the output of Integrate. In all cases where there are
parameters with assumptions about them, try both the deafult setting of GenerateCon-
ditions -> True, and making use of Assumptions settings. Avoid the use of
GenerateConditions -> False.
15 Residue calculus 337
15.13 Ÿ Check the results of Exercises 15.1 through 15.5 using Mathematica. Note that
you may need to use algebra functions such as PowerExpand and Simplify to get
obvious agreement.
15.14 Ÿ Use Mathematica to directly evaluate the following integral without making
any assumptions about a, and then repeat the process with some suitable assumptions.
¶
1
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ „ x
0 Ha + x2 L
2
Simplify the results using Simplify, PowerExpand etc. as necessary, and compare
your answer with that obtained by residue methods.
15.16 Ÿ Use Mathematica to check the results obtained in exercise 9. You might find
the use of a combination of TrigExpand and Simplify to be helpful.
15.17 Ÿ Mathematica's built-in function Sum can treat a large set of infinite sums
symbolically. Use this function to confirm your answers to Exercise 15.10.
15.18 Ÿ Mathematica can also check results of Mittag-Leffler type. Use the Sum
function to evaluate, for example
¶ ¶
1 1
8 z „ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ and 8 z „ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
H2 n - 1L p - 4 z 2 2 2 H2 n - 1L p + 4 z2 2 2
n=1 n=1
15.19 Ÿ (More of an investigative project) Find out what happens when you try to sum
¶
1
‚ ÅÅÅÅÅ3ÅÅÅÅ
n=1
n
by the methods introduced in this chapter. Try looking up ‘Apery's constant’, and
‘Zeta(3)’ on the internet and in the literature to see what this question leads to. Mathemat-
ica is aware of these issues, and gives symbolic results, for example:
zH3L
15.20 Ÿ Using the principle of the argument, Rouché's theorem and Mathematica's root
isolation and find techniques, investigate the location of the zeroes of
pHzL = z4 - z3 + 4
qHzL = z8 - z3 + 2
16 Conformal mapping I: simple mappings
and Möbius transforms
Introduction
Complex functions have an elegant interpretation in terms of mappings of the complex
plane into itself. We explored this briefly in Chapter 8. Now we wish to study the
geometrical aspects in rather more detail. Our plan is as follows. First, we shall literally
play with Mathematica to get a feel for what some simple mappings do to simple
regions. Next we shall look at the property of ‘conformality’ – that holormorphic
functions, when interpreted as mappings, preserve angles between curves at most points.
Then we shall explore the relationship between the geometry of circles and lines and a
special class of mappings called Möbius transforms.
This chapter is the foundation for several that follow. In particular, in Chapter 19
we shall explore the application of conformal mapping to problems in physics in 2-dimen-
sional regions. Chapter 23 will explore how some of this material may be generalized to
higher dimensions. Chapter 21 will look at how conformal maps, and the Schwarz–Christ-
offel transformation in particular, can be managed numerically. Chapter 23 will also
reveal the real physics underlying the Möbius transform when it is seen in terms of
Einstein's theory of special relativity.
Needs@"Graphics`ComplexMap`"D;
? Graphics`ComplexMap`CartesianMap
CartesianConformal@func_,
xrange_, yrange_, options___D :=
Show@GraphicsArray@8
CartesianMap@# &, xrange, yrange,
options, DisplayFunction -> IdentityD,
CartesianMap@func, xrange, yrange,
options, DisplayFunction -> IdentityD
<D, DisplayFunction -> $DisplayFunctionD;
Needs@"Graphics`InequalityGraphics` "D;
? ComplexInequalityPlot
0.5
-1 -0.5 0.5 1
-0.5
-1
340 Complex Analysis with Mathematica
z ê. Solve@W@zD == w, zD
 Hw + 1L
9- ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ =
w-1
Let's look first at the images of four points under the mapping:
Consider also the real axis in z-space. Any real point is equidistant from +Â and -Â so
» w » = 1 if z is real. So the real axis gets mapped to the unit circle. If z is in the upper
half-plane the modulus of W@zD will be less than one, so the upper half-plane is mapped
into the interior of the unit circle. We can look at this in various ways using our func-
tions. First, let's check that the upper half-plane gets mapped to the unit circle:
5 1
4 0.5
3
2 -1-0.5 0.5 1
1 -0.5
-4 -2 2 4 -1
If we want to look at the Cartesian grid image, we can do that with CartesianCon-
formal. Note that this time we get, in the right-hand image, just that part of the unit
circle mapped to by the plotted rectangle:
5 1
4 0.5
3
2 -1-0.5 0.5
1 -0.5
-4 -2 2 4 -1
We can also view this using PolarConformal applied to the unit circle applied to the
inverse mapping:
2 2
1.5 1.5
1 1
0.5 0.5
1
2
0.5
-5 -4 -3 -2 -1 -1-0.5 0.5 1
-0.5
-2
-1
-4
‡ Power mappings
Let's take a look at the square and the cube mapping
0.8 1
0.8
0.6 0.6
0.4 0.4
0.2
0.2 -1 -0.5 0.5 1
0.8
1
0.6 0.8
0.6
0.4 0.4
0.2
0.2
-1 -0.5 0.5 1
0.2 0.4 0.6 0.8 1
ü Fractional powers
By taking suitable fractional powers the effect of a power mapping can be undone:
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
-1 -0.5 0.5 1 0.2
0.4
0.6
0.81
This gives us the idea of opening up a wedge to a half-plane, or vice-versa:
zFirstQuadrant =
ComplexInequalityPlot@ Re@zD ¥ 0 && Im@zD ¥ 0,
8z, -5 - 5 I, 5 + 5 I <, DisplayFunction Ø Identity D;
wOfzFirstQuadrant = ComplexInequalityPlot@
Re@w ^ 2D ¥ 0 && Im@w ^ 2D ¥ 0, 8w, -5 - 5 I, 5 + 5 I <,
DisplayFunction Ø Identity D;
Show@
GraphicsArray@8zFirstQuadrant, wOfzFirstQuadrant<D,
DisplayFunction Ø $DisplayFunction D
5
4
4
2
3
2 -4 -2 2 4
-2
1
-4
1 2 3 4 5
344 Complex Analysis with Mathematica
ü Rotations
PolarConformal@Exp@I Pi ê 6D * # &,
80, 1<, 8-Pi ê 6, Pi ê 6<, Lines -> 20,
PlotPoints -> 40, PlotRange -> AllD
0.4 0.8
0.2 0.6
0.4
0.20.4 0.60.8 1
-0.2 0.2
-0.4
0.2 0.4 0.6 0.8 1
‡ Exponential mappings
CartesianConformal@Exp, 80, 1<, 80, Pi ê 2<,
Lines -> 20, PlotPoints -> 40, PlotRange -> AllD
1.5
1.25 2.5
1 2
1.5
0.75
1
0.5 0.5
0.25
0.5 1 1.5 2 2.5
0.20.40.60.8 1
‡ Log mappings
PolarConformal@Log, 8E ^ 2, E ^ 4<,
80, Pi ê 2<, Lines -> 20, PlotPoints -> 40D
16 Conformal mapping I: simple mappings and Mobius transforms 345
50
1.5
40 1.25
1
30
0.75
20 0.5
0.25
10
2.5 3 3.5 4
10 20 30 40 50
Do@PolarConformal@Joukowski@x, 0, 2, #, 0D &,
82, 5<, 80, 2 Pi<, Lines -> 10, PlotPoints -> 40,
PlotRange -> 88-6, 6<, 8-6, 6<<D, 8x, 0.5, 0.0, -0.05<D
6 6
4 4
2 2
-6 -4 -2 2 4 6 -6 -4 -2 2 4 6
-2 -2
-4 -4
-6 -6
346 Complex Analysis with Mathematica
Do@PolarConformal@[email protected], y, 2, #, 0D &,
82, 5<, 80, 2 Pi<, Lines -> 10, PlotPoints -> 40,
PlotRange -> 88-6, 6<, 8-6, 6<<D, 8y, 1, -1, -0.1<D
6 6
4 4
2 2
-6 -4 -2 2 4 6 -6 -4 -2 2 4 6
-2 -2
-4 -4
-6 -6
6 6
4 4
2 2
-6 -4 -2 2 4 6 -6 -4 -2 2 4 6
-2 -2
-4 -4
-6 -6
16 Conformal mapping I: simple mappings and Mobius transforms 347
That is, they intersect at z0 , and we make the convenient choice that this corresponds to
t = 0 for both curves. Suppose that we apply a holomorphic mapping
w = f HzL (16.3)
such that y1 H0L = y2 H0L = w0 = f Hz0 L. The question that we wish to pose and answer is :
What is the angle between the curves f1 and f2 at t = 0, and how is it related to the
angle between the curves y1 and y2 at t = 0? To define the angle between the curves f1
and f2 , we must assume that the tangents to the curves exist at t = 0. A point, z1 , on
f1 in a neighbourhood of z0 is given by
° °
z1 = f1 HDtL = f1 H0L + Dt f1H0L + OHDt 2 L > z0 + +Dt f1 H0L (16.5)
so we can assert that provided f ' Hz0 L 0, the angles between the two set of curves are
identical. Matters go wrong when the derivative vanishes.
u = uHx, yL
(16.11)
v = vHx, yL
Exercise 16.3 encourages you to use the Cauchy–Riemann equations to show that this is
equal to
† f £ HzL§2 (16.13)
So areas are locally rescaled by a conformal mapping, and are squashed to zero where
the derivative vanishes, which is also where the angle-preserving property fails.
(1) translation by a: w = z + a;
(2) rotation by q: w = z‰Âq ;
(3) stretching by a (real): w = az;
(4) inversion: w = 1 ê z;
(5) the general linear transformation, for a, b complex: w = az + b.
By composing all of these maps, we get the Möbius transform, sometimes also called the
bilinear or fractional transform:
16 Conformal mapping I: simple mappings and Mobius transforms 349
az + b
w = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (16.14)
cz + d
Clear@z, w, WD;
W@zD = Ha z + bL ê Hc z + dL;
Simplify@D@W@zD, zDD
ad-bc
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ
Hd + c zL
z ê. Solve@W@zD == w, zD@@1DD
dw-b
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
a-cw
Let's define another Möbius transform as follows:
Q@z_D = Ha z + bL ê Hg z + dL;
Simplify@Q@W@zDDD
ba+aza+d b+cz b
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
bg+azg+d d+czd
To make it completely obvious what has happened, we group the terms with and without
a z in both numerator and denominator:
Collect@Numerator@%D, zD ê Collect@Denominator@%D, zD
b a + d b + z Ha a + c bL
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
b g + d d + z Ha g + c dL
So the composition of two Möbius transforms is also a Möbius transform, and the
inverse of a Möbius transform is also a Möbius transform. Given that there is an obvious
identity mapping that is also a Möbius transform, it is now clear that Möbius transforms
form a group under composition. (If you know precisely what a group is you should
check the remaining group requirement of associativity yourself.). This is a very interest-
350 Complex Analysis with Mathematica
ing group for all sorts of reasons, of both a mathematical and physical character. For
now we content ourselves with a few mathematical observations, but in Chapter 23 the
true significance is revealed as a complex representation of the Lorentz group of special
relativity.
zzê - azê - êê
a z + H†a§2 - r2 L = 0 (16.16)
B2 - AC
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅ (16.19)
A2
So the quadratic equation Eq. (16.17) with A and C real and B2 > AC represents a
circle. For a line, whose real description is
ax + by = c (16.20)
we just have to note that this may be rewritten in complex form as the condition
16 Conformal mapping I: simple mappings and Mobius transforms 351
êê
Bzê + Bz + C = 0 (16.21)
with C real. So combining the cases of A zero and non-zero we see that the set of circles
and lines is characterized by the single condition
êê
Azzê + Bzê + Bz + C = 0 (16.22)
where A and C are real and B2 > AC. It is a line if A = 0 and is a circle otherwise. This
is sometimes referred to as the equation of a circline.
ü Ÿ Mathematica implementation
Let's define the circline condition symbolically. For what follows we remind the reader
that complex conjugation is denoted in Mathematica InputForm by Conjugate and
in output by a star in recent versions. (We have used a bar in the text).
Let's take the equation of a circline and apply it to the Möbius transform of z:
Circline@Möbius@z, a, b, c, dD, A, B, CD
Hb + a zL B B Hb + a zL A Hb + a zL Hb + a zL
C + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
d+cz Hd + c zL Hd + c zL Hd + c zL
Simplify@%D
Denominator@%D
Hd + c zL Hd + c zL
†d + c z§2 (16.23)
Numerator@%%D
Let's make some checks. The coefficients not involving z, and multiplying zzê are real,
and the coefficent of z is the complex conjugate of that of zê . So we set:
ê ê ê êê
A' = a A a + B c a + c C c + a B c;
ê ê ê êê
B' = A b a + B d a + C d c + b B c;
êêêêê ê ê ê êê
B' = a A b + B c b + c C d + a B d;
ê ê ê êê
C' = A b b + B d b + C d d + b B d;
We need to check the sign of the primed version of B2 - AC . This is given by:
êêêêê
SimplifyAB ' B ' - A ' C 'E
êê êê êê
-Hb c - a dL HA C - B BL Hb êê
c - êê
a dL
This is B2 - AC times the square of the absolute value of bc - ad, so is positive if the
original B2 - AC was! So the circline equation is preserved in that z also satisfies a
circline equation. As an alternative, note that since a Möbius transformation is the
composition of various translations, rotations, rescalings and inversions, it is sufficient
to check that the circline equation is preserved by each of these separately.
MöbiusCreator@ z_,
8 za_, zb_, zc_<, 8wa_, wb_, wc_<D :=
Module@8soln<,
soln = Solve@8wa == Möbius@za, a, b, c, 1D ,
wb == Möbius@zb, a, b, c, 1D ,
wc == Möbius@zc, a, b, c, 1D <, 8a, b, c<D;
Möbius@z, a, b, c, 1D ê. soln@@1DDD
This works fine in Mathematica for finite points. If you know that particular values of z
must end up at zero or infinity, this makes the construction of the numerator and denomi-
nator straightforward, up to a scaling in each, and then a third point can be used to fix
the overall scale. Let's look at our initial example in this light, but now backwards.
Suppose we want the points
to map to
The numerator must be proportional to Hz + 1L, in order for -1 to map to zero. Similarly,
the denominator must be proportional to Hz - 1L. So the map must be of the form
aHz + 1L
w = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (16.26)
z-1
and we deduce that
a = -Â (16.27)
‡ Comments
A large number of transformations may be effected by combining Möbius transforms
with simple power functions and other elementary functions. The action of Möbius
transformations is best handled by understanding the circline property and exploring the
behaviour of particular points. When trying to map one region into one seemingly
unrelated, a good policy is to try to break down the mapping into a sequence of simple
mappings that get there step by step. Above all, practice is required to obtain a feeling
for what works! In the exercises below, this idea of composing several simpler mappings
is exploited several times – these questions should be attempted in order as more
complex questions may use the result of the one previous.
354 Complex Analysis with Mathematica
2
1.5
1
0.5
-1-0.5 0.5 1
If you need to combine bounds on different functions, you can use the logical AND
denoted && in Mathematica:
0.2
0.1
-1 -0.5 -0.1 0.5 1
-0.2
-0.3
-0.4
The logical OR, given in Mathematica by ||, can also be used:
ComplexInequalityPlot@
Abs@zD § 1 ê 2 »» Abs@z - 1D ¥ 2, 8z, -5 - 5 I, 5 + 5 I <D
-4 -2 2 4
-2
-4
16 Conformal mapping I: simple mappings and Mobius transforms 355
Exercises
In Exercises 16.3-10, you are encouraged to use the CartesianConformal and
ComplexInequalityPlot functions to verify any drawings you have made using
Mathematica, preferably after you have thought about them with pen and paper.
16.1 What happens to the angles between curves through the origin under the mapping
w = z2 ?
16.2 What happens to the angles between curves through the origin under the mapping
w = zn , for n = 3, 4, 5, ... etc.?
16.3 Use the Cauchy–Riemann equations to show that the Jacobian is given by
J = † f £ HzL§2
0bArgHzLb ÅÅÅÅp2
16.6 What is the image of the real axis under the mapping
z-Â
w = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
z+Â
and what is the image of the upper half-plane under the same mapping?
into the closed disk bounded by the unit circle. [Similar to Exercise 16.8]
Draw the region, and verify that the points +1 and -1 lie on its boundary, and that zero
is in its interior. Find a Möbius transform that takes the points 81, -1, 0< to 80, ¶, 1<.
Hence find a mapping that takes the given region into the interior of the unit circle.
[Uses Exercise 16.9]
16.13 Ÿ Find a Möbius transform that maps the cube roots of unity, 8w, w2 , 1<, into
81, 0, -1<, where
w = ‰2pÂê3
17 Fourier transforms
Introduction
In this chapter we shall explore the notion of a ‘transform’ of a function, where an
integral mapping is used to construct a ‘transformed’ function out of an original func-
tion. The continuous Fourier transform is one of a family of such mappings, which also
includes the Laplace transform and the discrete Fourier transform. The Laplace trans-
form will be discussed in Chapter 18. Numerical methods for the discrete Fourier
transform and for the inversion of Laplace transforms will be given in Chapter 21.
What is the point of such transforms? Perhaps the most important lies in the
solution of linear differential equations. Here the operation of a transform can convert
differential equations into algebraic equations. In the case of an ordinary differential
equation (ODE), one such transform can produce a single algebraic condition that can be
solved for the transform by elementary means, leaving one with the problem of inver-
sion – the means by which the transformed solution is turned into the function that is
desired. In the case of a partial differential equation (PDE), for example in two variables,
one transform can be used to reduce the PDE into an ODE, which may be solved by
standard methods, or, perhaps, by the application of a further transform to an algebraic
condition. Again one proceeds to a solution of the transformed problem. One or more
inversions is required to obtain the solution.
In probability theory the transform of a distribution is called the characteristic
function of the distribution. All the moments of the distribution are easily obtained from
this characteristic function (which is just a complex form of the moment-generating
function), and the Fourier inversion theorem guarantees that the density function can be
recovered from the characteristic function.
This chapter will not constitute a comprehensive investigation of Fourier trans-
form calculus. What we shall do is focus on the relevance of contour integration to
calculate transforms and their inverses – the material developed in Chapter 15 is critical
and should be reviewed now if you are not already familiar with it. Although this will be
our focus, along the way we shall give a brief tour of distributions and the delta-function
– enough to get a proper feel for the inversion theorem in its proper setting and explore
some of the applications to differential equations.
Another approach to managing Fourier transforms is simply to compile a list of
functions, transforms and their inverses, and some rules. The method of contour integra-
tion is then the method of last resort. Of course, contour integration has to be used to
compile some of these tables!
Finally, note that the focus here will be on the full complex form of the trans-
form, using the complex exponential function. Some elementary texts use sine and
cosine trasforms – the view here is that the use of the complex form is much cleaner, and
can always be re-expressed in sine/cosine terms when absolutely necessary, for those
functions posessing the necessary symmetry.
358 Complex Analysis with Mathematica
‡ Ÿ Mathematica implementation
The conventions used here are consistent with a large body of common use, particularly
in modern physics and also with Mathematica's defaults. Mathematica has a number of
Fourier-related functions. You can find out what is present by the following query:
? *Fourier*
If you execute that command you will see several functions to try out – what we want
here is to get at the details of the definition of immediate interest:
? FourierTransform
So let's ask about the options, thereby getting the default values:
Options@FourierTransformD
8Assumptions ß $Assumptions,
GenerateConditions Ø False, FourierParameters Ø 80, 1<<
¶
` »b »
f HwL = $%%%%%%%% %%%%%%%%%
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ
1-a ‡
f HtLeÂbwt „ t (17.2)
H2pL -¶
Some common choices for 8a, b< are {0, 1} (default; modern physics), {1, -1} (pure
mathematics; systems engineering), {-1, 1} (classical physics), {0, -2 Pi} (signal
processing).
Given a notion of distance in V, an explicit isomorphim between V and its dual can be
set up. The distance is usually expressed in terms of a metric function gi j –in Euclidean
space with a standard Cartesian basis it would be 1 if i = j and zero otherwise. The
mapping to obtained from a vector v and its metric-induced dual is
n n
‚ ‚ vi v j gi j (17.4)
i=1 j=1
What does all this have to do with functions? Now consider the set of all continous real
functions f HxL defined on some interval a b x b b, which is possibly infinite in extent.
Given a particular function f and another function gHxL, we can define an element of the
dual space associated with g by the mapping Lg , by the formula
360 Complex Analysis with Mathematica
b
Lg @ f D = ‡ gHxL f HxL „ x (17.6)
a
(It is not important here to consider the convergence issues when one or both of a, b are
infinite.) So any function can be associated with an element of the dual space by this
device – a function can be converted into a mapping from functions to the reals by the
use of integration. Does this mean that the dual space is equivalent to the set of func-
tions?
The answer is a resounding NO! The dual space is much bigger than the original
function space (which is already infinite in dimension), and it is called the set of
‘distributions’. How can we see that it is bigger? The answer takes us straight to the
notion of a ‘delta-function’, which is not really a function at all! Pick a point a in the
interval on which the functions are defined, and set
Da @ f D = f HaL (17.7)
This is a perfectly valid linear mapping that does not arise through the integration of f
against any other continuous function. What we do now is to invent a representation of
such distributions that looks like an ordinary function, and call it
dHx - aL (17.8)
d Hx - aL = 0 if x a (17.9)
b
‡ f HxLdHx - aL „ x = f HaL (17.10)
a
provided a < a < b. You can think of dHx - aL as being an ‘infinite spike’ located at a
that integrates to unity.
Hx-aL2
‰- ÅÅÅÅÅÅÅÅ
2e
ÅÅÅÅÅÅ ÅÅ
2
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!ÅÅÅÅÅÅ (17.11)
2p e
So this is just a Gaussian function. It integrates to unity provided e is real and positive:
Students of probability or statistics will recognize this as the density function associated
with a normal distribution with mean a and standard deviation e. The second function we
shall introduce is
Students of probability or statistics will recognize this as the density function associated
with a Cauchy distribution centred on a, parametrized by e. Both of these functions have
the property that they integrate to unity, and are peaked at a. (You might like to plot
these functions using Mathematica.) As the parameter e tends to zero, these functions
become more strongly peaked at a. The idea is that their limiting form is precisely that
of a d-function. You can get a better grip on this by considering integrating either
function against a ‘test-function’ f . We can write (from now on the integration range is
fixed as the entire real line):
¶
‡ f HxL Di He, x, aL „ x
-¶
¶ ¶
=‡ H f HxL - f HaLL Di He, x, aL „ x + ‡ f HaL Di He, x, aL „ x
-¶ -¶
¶ ¶ (17.13)
= f HaL‡ Di He, x, aL „ x + ‡ H f HxL - f HaLL Di He, x, aL „ x
-¶ -¶
¶
= f HaL + ‡ H f HxL - f HaLL Di @e, x, aD „ x
-¶
Now consider what happens as e Ø 0. The last integral has an integrand that is zero at
x = a, because of the factor f HxL - f HaL, but the D-function concentrates itself at this
point, becoming zero elsewhere. Some careful analysis shows that this latter term tends
to zero, leaving us with just f HaL when e = 0. So these D-functions do have a limit that
362 Complex Analysis with Mathematica
is a d-function, when all ‘limits’ are taken assuming an integration is being carried out.
Having got a grip on the d-function, we need to say what it has to do with
Fourier transforms. The concept we are after is to define the Fourier transform of unity,
i.e,
¶
1 Âwx
è!!!!!! ‡ 1 ‰ „ x
ÅÅÅÅÅÅÅÅ
Å ÅÅÅ
Å ÅÅÅÅ (17.14)
2p -¶
This does not exist at all in the usual sense, but it has a very simple interpretation once
distributions are introduced. The way to get at this is very simple. We replace ‘1’ in the
integral by a function whose limit is unity. There are several choices, but the one that is
most convenient is to consider, for e > 0,
¶
1
ÅÅÅÅÅÅÅÅ
Å
è!!!!!!!ÅÅÅ
Å ÅÅÅ
Å Å ‡ ‰-e†x§ ‰Âwx „ x (17.15)
2 p -¶
This can be done by pen-and-paper in two pieces, or we can get Mathematica to sort it
out. Note that we have said that the imaginary part of w mustg be less than e in magni-
tude. Think about why this must be true for the integral in Eq. H17.15L to converge.
1/Sqrt[2 Pi]Integrate[Exp[-e*Abs[x]]*Exp[I*w*x],
{x, -Infinity, Infinity}, Assumptions Ø {e>0, -e <
Im[w] < e}]
"##### ÅÅÅÅ
2
e
p
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅ
ÅÅÅÅ
e2 + w2
which is precisely
è!!!!!!
2p D2 He, w, 0L (17.16)
Under any subsquent integration over w, we can let e Ø 0, and hence assert that, as a
distribution,
¶
‡ ‰Âwx „ x = 2pdHwL (17.18)
-¶
Eq. (17.18) gives the fundamental link between the Fourier transform and the d-function.
‡ Ÿ Mathematica's d-function
In Mathematica the d-function is associated with the physicist P. Dirac, its key inventor.
Its definition is available within the kernel in version 4 or later. See the Calculus pack-
ages if you are using an older version of Mathematica.
17 Fourier transforms 363
? DiracDelta
DiracDelta@xD
dHxL
Mathematica understands the key link between Fourier transforms and the d- function:
FourierTransform@1, t, wD
è!!!!!!!
2 p dHwL
Assuming the distributional result from Eq. (17.18) and that some reordering of integrals
is possible, we can give a simple proof. We have:
¶ ¶ ¶
1 ` 1 i y
ÅÅÅÅÅÅÅÅÅ ‡ f HwL‰-Âwx „ w = ÅÅÅÅÅÅÅÅÅ ‡ jj‡ f HyL‰Âwy „ yzz ‰-Âwx „ w
ÅÅÅÅÅÅÅÅ
è!!!!!!
2p -¶ 2p -¶ k -¶ {
¶ ¶ ¶
(17.20)
i 1 y
= ‡ jj ÅÅÅÅÅÅÅÅÅ ‡ ‰ÂwHy-xL „ wzz f HyL „ y = ‡ dHy - xL fHyL „ y = f HxL
-¶ k 2p -¶ { -¶
364 Complex Analysis with Mathematica
ü Ÿ Mathematica inversion
? InverseFourierTransform
¶
` `
2p‡ „ pdHw - pL f HpLg̀HpL = 2p f HwLg̀HwL (17.27)
-¶
That is, the Fourier transform of the convolution is essentially (up to a normalization)
the product of the transforms. Similarly, if we have the product of two functions in x
terms, the Fourier transform of such a product can be written as the convolution of the
transforms.
then
` `
hHwL = f Ha + wL (17.30)
The proof is left to you as Exercise 17.1. Exercise 17.2 asks you to prove:
Theorem 17.4: the scaling theorem. This is the result that if
hHxL = f Hx ê aL (17.31)
then
` `
hHwL = a f HwaL (17.32)
then
` `
hHwL = - Âw f HwL (17.36)
366 Complex Analysis with Mathematica
To prove this, we note that this is a point at which we must be a little less cavalier about
the class of functions we are dealing with. From the definition
¶
` 1
hHwL = ÅÅÅÅÅÅÅÅ
Å
è!!!!!! ÅÅÅ
Å ÅÅÅÅ ‡ f £ HxL ‰Âwx „ x (17.37)
2p -¶
and use integration to kill the first term – this requires of course that f Ø 0 as x Ø ¶.
Then we obtain
¶
` 1 `
hHwL = - Â w ÅÅÅÅÅÅÅÅ
Å
è!!!!!! ÅÅÅ
Å ÅÅÅÅ ‡ f HxL‰Âwx „ x = - Âw f HwL (17.39)
2p -¶
Provided higher derivatives tend to zero at ±¶ and the derivatives of the function remain
integrable (continuous will do), repeated application of this result can be used to show
that the Fourier transform of the nth derivative is given by
` `
H f HnL L@wD = H-ÂwLn f HwL (17.40)
Note that if the opposite sign convention is employed for the exponent, the right side of
`
this becomes HÂwLn f HwL. There is a corresponding inverse result that multiplication by x
corresponds to differentiation with respect to w – see Exercise 17.3 for the details.
A key result for the evaluation of such integrals is Jordan's lemma, which gives very
useful conditions under which the integration region may be completed by a large
semicircle in the upper (or lower) half-plane (UHP or LHP), and hence evaluated by the
calculus of residues. Let's work with the upper half-plane version, where we assume that
w > 0.
Theorem 17.6: Jordan's lemma. Consider the semicircular path
FR @tD = R‰Ât
(17.41)
0§t§p
and let MR be the maximum (formally, the supremum) of » f HzL » on the image of FR in .
Suppose that w > 0 and that as R Ø ¶,
MR Ø 0 (17.42)
17 Fourier transforms 367
as R Ø ¶.
ü Comments
(1) The condition on f is very weak – we just need that the function tends to zero.
(2) If w > 0 then as the imaginary part of z becomes large the integrand is exponentially
damped – this is why we need to associate positive w with the upper half-plane. If w < 0
there is an obvious corresponding result for the lower half-plane.
(3) Once we have this result the answer for the integral for w > 0 is just
Note the additional minus sign in Eq. (17.44) – we traverse the LHP contour clockwise.
These can give quite different functional forms for the answer, and this is important.
ƒƒ ƒƒ (17.46)
ƒ FR ƒ 0
But
Ât
°‰ÂwR‰ ÂR‰Ât • = R†‰ÂwRHcosHtL+ sinHtLL § = R‰-wR sinHtL (17.47)
so that
ƒƒ ƒƒ p pê2
ƒƒ ƒ
ƒƒ ‡ FHzL‰Âwz „ z ƒƒƒ b RMR ‡ ‰-wR sinHtL „ t = 2RMR ‡ ‰-wRsinHtL „ t (17.48)
ƒƒ ƒƒ
ƒ FR ƒ 0 0
ƒƒ ƒƒƒ pê2
ƒƒ
ƒƒ ‡ FHzL‰Âwz „ z ƒƒƒ b 2RMR ‡ -2wR têp ij pH1 - ‰-Rw L yz
ƒƒ ƒƒ ‰ „ t = 2RM R j ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ z (17.50)
ƒ FR ƒ 0 k 2Rw {
ƒƒƒ ƒƒ
ƒƒ pMR H1 - ‰-Rw L pMR
ƒƒ
ƒƒ ‡ FHzL‰ „ z ƒƒƒ b ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
Âwz
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ b ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (17.51)
ƒƒ FR ƒƒ w w
This is best approached by writing the integrand in terms of pure exponential functions:
¶
` 1 i ‰Âa x - ‰-Âax y
f HwL = ÅÅÅÅÅÅÅÅ
è!!!!!!ÅÅÅÅÅÅÅÅÅ ‡ jj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ zz ‰Âwx „ x
2p -¶ k 2Â {
¶
1 1
ÅÅÅÅÅÅÅÅÅ ‡ H‰Â Hw+aL x - ‰Â Hw-aL x L „ x
= ÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅ
2Â è!!!!!! 2p -¶
(17.53)
1 p
ÅÅÅÅÅÅÅÅÅ Hd Ha + wL - d Hw - aLL = Â $%%%%%%
= -Â p ÅÅÅÅÅÅÅÅ
è!!!!!! ÅÅÅÅÅÅ Hd Hw - aL - d Ha + wLL
2p 2
FourierTransform@Sin@a tD, t, wD
p p
 $%%%%%%
ÅÅÅÅÅÅ dHw - aL - Â $%%%%%%
ÅÅÅÅÅÅ dHa + wL
2 2
We can now evaluate its transform very quickly, for this function tends to zero for large
z, and hence we can apply Jordan's lemma immediately. For w > 0 the transform is given
by
In the UHP there is only one pole, at z = Âe, and it is simple. So we cover up the one
singular factor and evaluate the remaining expression to obtain
1
ÅÅÅÅÅÅÅÅÅ ‰-ew
ÅÅÅÅÅÅÅÅ
è!!!!!! (17.56)
2p
For w < 0 a similar calculation can be done in the LHP (Exercise 17.5) to obtain ‰e w .
è!!!!!!
Thus the answer for all real w (it integrates to 1 ë 2p if w=0) is just
1
ÅÅÅÅÅÅÅÅÅ ‰-e†w§
ÅÅÅÅÅÅÅÅ
è!!!!!! (17.57)
2p
Note that now we are integrating over w and the parameter in Jordan's Lemma is -x.
The non-exponential part of the integral tends to zero at infinity so we can go ahead and
apply the lemma. For x > 0 we must complete in the lower half-plane. There is one
simple pole and we get the answer
 è!!!!!! -ax
ÅÅÅÅÅÅÅÅÅ H-2pÂL ‰-Â H-ÂaLx =
f HxL = ÅÅÅÅÅÅÅÅ
è!!!!!! 2p ‰ (17.60)
2p
But for x < 0 we must complete in the upper half-plane, where there are no poles at all!
Hence the answer is then zero.
370 Complex Analysis with Mathematica
ü Ÿ Computational check
Note that Mathematica gets all this straight, though it helps to be told the sign of a:
InverseFourierTransform@
I ê Hw + I a L, w, x, Assumptions Ø a > 0D
è!!!!!!!
‰-a x 2 p qHxL
InverseFourierTransform@
I ê Hw + I a L, w, x, Assumptions Ø a < 0D
è!!!!!!!
-‰-a x 2 p qH-xL
The function q, denoted in Mathematica by UnitStep, takes care of the two cases –
here is a plot of it:
0.8
0.6
0.4
0.2
-3 -2 -1 1 2 3
Note the following, which is often useful and follows from the definition of the
d-function:
D@UnitStep@xD, xD
dHxL
‰-Hx-mL êH2s L
2 2
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!! (17.61)
s 2p
17 Fourier transforms 371
We have written it this way in order to make the link with the characteristic function for
the normal distribution with mean m and standard deviation s. The Fourier transform of
this is
¶
` 1 2
f HwL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ‰-Hx-mL êH2s L ‰Â w x „ x
2
(17.62)
2 p s -¶
Hx - mL2 x2 m m2
Âwx - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅ ÅÅÅ
Å = - ÅÅÅÅÅÅÅÅ
Å ÅÅÅ
Å + J ÅÅÅÅ
Å ÅÅÅ
Å + ÂwN x - ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅ
2s2 2s2 s2 2s2
-x2 - m2 + 2xH m + Âs2 wL
= ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ
2s2
2 2
-Hx - Hm + Âs2 wLL - m2 + H m + Âs2 wL
= ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (17.63)
2s2
2
-Hx - Hm + Âs2 wLL s2 w2
= ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + Âmw - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
2
2s 2
- p2 s2 w2
= ÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ + Âmw - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
2s 2
where p is the complex shifted variable
p = x - HÂws2 + mL (17.64)
We can make a real change of variables to eliminate m, but what do we do about the
imaginary shift? We can write the result so far as
‰Âwm-s w2 ê2
2
J (17.65)
Now consider a rectangular contour obtained by taking the contour in the definition of J,
and adding a piece coming backwards along the real axis, joined at both ends, to form a
rectangle. We observe:
(1) there is no contribution from the vertical contours, as the integrand tends to zero;
(2) there are no poles inside the rectangle.
By Cauchy's theorem, the total integral must be zero. Hence we note that
¶ ¶
1 1 1 1
J = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ‰-q êH2s L „ x = ÅÅÅÅÅÅÅÅ ‰-q êH2s L „ x = ÅÅÅÅÅÅÅÅ
2 2 2 2
Å
è!!!!!! ÅÅÅ
Å ÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!! ÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅ
è!!!!!! (17.67)
2ps -¶ 2p 2p s -¶ 2p
` 1
ÅÅÅÅÅÅÅÅÅ ‰Âw m-s w ê2
2 2
f HwL = ÅÅÅÅÅÅÅÅ
è!!!!!! (17.68)
2p
This is almost the ‘characteristic function’ for the normal distribution, which omits the
è!!!!!!
factor 1 ë 2p .
FourierTransform@
1 ê HSqrt@2 PiD sL Exp@ -Hx - mL ^ 2 ê H2 s ^ 2LD,
x, w, Assumptions Ø 8s > 0, Im@mD == 0<D
s 2 w2
‰Â m w- ÅÅÅÅÅÅÅÅ2ÅÅÅÅÅÅ ÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ
è!!!!!! ! ÅÅÅÅÅÅÅÅ
2p
where we make no particular requirement on the sign of the real parameter a. The
Fourier transform is just
¶
1
ÅÅÅÅÅÅÅÅÅ ‡ ‰Ha+ÂwLt „ t
ÅÅÅÅÅÅÅÅ
è!!!!!! (17.70)
2p 0
This integral is given by evaluating the difference in the values at the limits of the
indefinite integral
1 ‰tHa+ÂwL
ÅÅÅÅÅÅÅÅ
Å ÅÅÅ
Å ÅÅÅÅ
è!!!!!! a + Âw ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ (17.71)
2p
17 Fourier transforms 373
Under what circumstances does the limit of this, for t Ø ¶, exist and equal zero? We
need the real part of
a + Âw (17.72)
for t > 0 and some real K > 0 and real a. Then the Fourier transform exists and is a
holomorphic function of w for ImHwL > a – the upper half-plane above a – see Dettman
(1984) for a discussion of this, and other related properties. The inversion takes place
along a horizontal contour in the half-plane above a. More generally still, for functions
that are not zero for t < 0, there will typically be a strip in which the transform is
holomorphic. See Exercise 17.7 for an example.
2 uHx, tL uHx, tL
ÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (17.76)
x2 t
with the initial condition that uHx, 0L = f HyL. We write the spatial Fourier transform as
¶
u` Hw, tL = ÅÅÅÅÅÅÅÅ
1
ÅÅÅÅÅÅÅÅÅ ‡ ‰Âwx uHx, tL „ x
è!!!!!! (17.77)
2p -¶
Now, as u satisfies the diffusion equation, u` satisfies the ordinary differential equation
u` Hw, tL
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + w2 u` Hw, tL = 0 (17.79)
t
This has the solution
Reorganizing gives
¶
uHx, tL = ‡ f HyLHHx - y, tL „ y (17.83)
-¶
where
¶
1
HHz, tL = ÅÅÅÅÅÅÅÅÅ ‡ ‰-Âwz-w t „ w
2
(17.84)
2p -¶
‰-z êH4tL
2
HHz, tL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!! ÅÅÅÅÅÅÅÅ (17.85)
2 tp
This can be checked in Exercise 17.8. So the answer is the convolution of the initial data
with this Gaussian function – the Green's function for the heat equation. See Exercises
17.9 and 17.10 for some further worked applications.
17 Fourier transforms 375
2 uHx, yL 2 uHx, yL
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
Å ÅÅÅ
Å + ÅÅÅÅÅÅÅÅÅÅÅÅÅ = 0
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (17.86)
x2 y2
with the boundary condition that uHx, 0L = f HyL and the requirement that u Ø 0 for large
è!!!!!!!!!!!!!!!
r = x2 + y2 . We write the spatial Fourier transform as
¶
1
u` Hw, yL = ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅ ‡ ‰Âwx uHx, yL „ x
è!!!!!! (17.87)
2p -¶
with the inversion relation
¶
ÅÅÅÅÅÅÅÅ!ÅÅ ‡ ‰-Âwx u` Hw, yL „ w
1
uHx, yL = ÅÅÅÅÅÅÅÅ
è!!!!!! (17.88)
2 p -¶
Now, as u satisfies the Laplace equation, u` satisfies the ordinary differential equation
2 u` Hw, yL
ÅÅÅÅÅÅ = w2 u` Hw, tL
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (17.89)
y2
With the condition that the answer tends to zero for large y, this has the solution
Reorganizing gives
¶
uHx, yL = ‡ f HtLHHx - t, yL „ t (17.93)
-¶
where now
¶
1 y
HHq, tL = ÅÅÅÅÅÅÅÅÅÅ ‡ ‰-Âwq-†w§y „ w = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (17.94)
2 p -¶ p Hq + y2 L
2
by our previous result for the transform of the Cauchy distribution. Hence
376 Complex Analysis with Mathematica
¶
y f HtL
uHx, yL = ÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ t (17.95)
p -¶ HHx - tL2 + y2 L
This formula is known as the Poisson integral formula for a half-plane. We shall discuss
it again in Chapter 19, where it arises from another approach. See Exercise 17.11 for a
simple application. The answer to Exercise 17.11 should look like:
1
0.75 2
0.5
0.25 1.5
0
-2
2 1
-1
0 0.5
1
2
? *Fourier*
System`
Fourier FourierSinTransform InverseFourierCosTransform
FourierCosTransform FourierTransform InverseFourierSinTransform
FourierParameters InverseFourier InverseFourierTransform
? FourierSinTransform
¶
2
$%%%%%%
ÅÅÅÅÅÅ ‡ f HtLsinHwtL „ t (17.96)
p 0
Such transforms are very useful in particular fields, but do not have the elegant simplic-
ity, in complex analytical terms, of the basic complex exponential form.
When one wishes to work numerically there is a package for doing so:
Needs@"Calculus`FourierTransform` "D
You can find out what is in it, in version 4 or later, by executing the following command:
? Calculus`FourierTransform`*
The long result is suppressed here, but the most important ones here are NFourier-
Transform and its inverse, which allow numerical estimation of the transform and its
imverse. We will be more interested in the kernel function Fourier, which will be
discussed in Chapter 20.
Needs@"Calculus`FourierTransform` "D
Let's find out what we have loaded (note that the returned list of functions is specific to
version 3):
? Calculus`FourierTransform`*
FourierCosSeriesCoefficient InverseFourierSinTransform
FourierCosTransform InverseFourierTransform
FourierExpSeries NFourierCosSeriesCoefficient
FourierExpSeriesCoefficient NFourierExpSeries
FourierFrequencyConstant NFourierExpSeriesCoefficient
FourierOverallConstant NFourierSinSeriesCoefficient
FourierSample NFourierTransform
FourierSinSeriesCoefficient NFourierTrigSeries
FourierSinTransform NInverseFourierTransform
FourierTransform $FourierFrequencyConstant
FourierTrigSeries $FourierOverallConstant
InverseFourierCosTransform
378 Complex Analysis with Mathematica
So we have a great many functions to try out – what we want here is to get at the details
of the definition:
? FourierTransform
The default settings actually defined, in earlier versions, are the following:
¶
`
f HwL = ‡ f HxL ‰Âwx „ x (17.97)
-¶
So let's ask about the options, thereby getting the default values:
Options@FourierTransformD
8FourierFrequencyConstant Ø 1,
FourierOverallConstant Ø 1,
DefiniteIntegral Ø False, Assumptions Ø 8<<
The first two of these gives is the old form of the list now entitled FourierParame-
ters. Agreement with the version 4 defaults can be obtained by putting a factor of
è!!!!!!!
1 ë 2 p in front of the integral. This can be set in Mathematica by setting an option
with:
The other main variation is to insert a minus sign in the exponent, which can be achieved
in Mathematica by setting an option
FourierFrequencyConstant -> -1
$FourierFrequencyConstant = -1
If both these variations were to be used, we would have, for example, the new definition
17 Fourier transforms 379
¶
` 1
ÅÅÅÅÅÅÅÅÅ ‡ f HxL ‰-Âwx „ x
f HwL = ÅÅÅÅÅÅÅÅ
è!!!!!! (17.99)
2p -¶
Exercises
In the following the use of Mathematica should be regarded as an optional extra useful
for verifying answers found by ‘pen and paper’.
then
` `
hHwL = f Ha + wL
hHxL = f Hx ê aL
then
` `
hHwL = af Hwê aL
xn f HxL
is given by
n `
J-Â ÅÅÅÅÅÅÅÅÅÅÅ N f HwL
w
17.4 Show that the Fourier transform of
cos HaxL
is given by
"#####
p
ÅÅÅÅ HdHw - aL + dHa + wLL
2
17.6 Use Jordan's lemma to calculate the inverse transforms of the following:
380 Complex Analysis with Mathematica
1 1 1
ÅÅÅÅÅ2ÅÅÅÅ ; ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ ; ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
a +w
2
Ha2 + w2 L Ha + w L Hb2 + w2 L
2 2
Calculate the answers for both x > 0 and x < 0. Ÿ In each case verify your answers
using Mathematica's InverseFourierTransform function.
17.7 (Care required!) Consider the function f HtL defined piecewise, for a, b real, but not
necessarly positive, by
l -a t
o‰ ; t>0
f HtL = m
o ‰+b t ; t < 0
n
For what values of a, b and w does the Fourier transform of this function exist? When it
exists, how must the inversion be done? Show that the inversion recovers the given
function when the transform exists.
‰-w t
2
17.9 At time zero (t = 0), an infinite rod is at temperate T0 dHxL. The temperature at later
times satisfies the heat equation
2 u u
k ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ = ÅÅÅÅÅÅÅÅÅ
x t
Find the temperature everywhere in the rod for t > 0. For physicists: If the speed of
light is c, evaluate the temperature at the point 2ct. What does this imply about the
speed of heat transfer compared to the speed of light? Does this make sense? What do
you think might be wrong, if anything, with the heat equation?
17.10 At time zero (t = 0), an infinite rod is at temperate T0 in the region -a < x < a,
and is at zero temperature elsewhere. The temperature at later times satisfies the heat
equation
2 u u
k ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ = ÅÅÅÅÅÅÅÅÅ
x t
Find the temperature everywhere in the rod for t > 0.
17.11 Ÿ A function u satisfies Laplace's equation in the region -¶ < x < ¶ and y > 0.
On the line y = 0 it is given by u = 1 if -a < x < a, and is zero elsewhere. Find the
solution for y > 0. Use Mathematica to plot the result for a = 1 and confirm that the
function looks like that given in Section 17.8.
18 Laplace transforms
Introduction
There is a transform that is closely related to a special case of the Fourier transform,
known as the Laplace transform. While the Laplace transform is very similar, histori-
cally it has come to have a separate identity, and one can often find separate tables of the
two sets of transforms. Furthermore, it is very appropriate to make a separate assessment
of both its inversion, and its applications to differential equations. In the latter context,
Laplace transforms are particularly useful when dealing with ODEs and PDEs defined
on a half-space – in this setting its differential properties are slightly different from the
Fourier transform due to the influence of the boundary.
The goal of this chapter is to define the Laplace transform and explain the basic
results and links to complex variable theory. It should be appreciated that there is an
extensive knowledge base of known transforms and their inverses. Sadly, many of the
excellent books of tables of transforms are old and hard to find if not actually out of
print. You might like to check if your library has copies of the old works by Erdelyi.
One notable exception is the extraordinarily comprehensive series of books by Prudni-
kov, Brychkov and Marichev, in which volumes 4 and 5 (Prudnikov et al, 1998, 2002)
give tables of transforms and their inverses. Although these are expensive, they are in
print, are a worthwhile addition to any library and a must for serious professional use.
For a further supply of problems and another friendly introduction to the theory, the text
by Spiegel (1965) is hard to beat and readily available. You should also note that you
can make quite extensive tables of your own with Mathematica!
tr0 (18.1)
è
The Laplace transform of f HtL, denoted f HsL, or @L f DHsL when we want to avoid any
confusion, is defined by the integral
¶
è
f HsL = ‡ f HtL ‰-ts „ t (18.2)
0
`
In terms of the Fourier transform f HwL, it is readily noted that on the class of functions
that are zero for t < 0, the Laplace transform satisfies the relationship
¶
è è!!!!!! `
f HsL = ‡ f HtL ‰ÂtHÂsL „ t = 2p f HÂsL (18.3)
0
382 Complex Analysis with Mathematica
and is therefore easily seen as the Fourier transform in complex coordinates rotated by a
right angle in the complex plane. Fortunately, everybody seems to agree about the
conventions for Laplace transforms so there are no further parameters to worry about.
The package definition of Laplace transforms that has to be used prior to version 4 is
consistent with the definition within the kernel in versions 4.x or later.
The class of functions that can be Laplace-transformed, as in the case of the
Fourier transform, depends on whether one regards s as a real variable (with complex
numbers only being introduced to interpret the inversion integral as a contour integration
problem), or as an essentially complex variable. The latter view is much more useful, so
we require that f is integrable on any finite interval, and that f is bounded by a simple
exponential function for t large; i.e. there are real constants M, s0 , T, such that for
t > T,
ü Example
To make the domain of definition clear, let us consider the exponential function itself, as
we did with the Fourier transform, where we found an upper half-plane (UHP) of
convergence. Since w = Âs, an upper-half-plane of convergence should translate to a
right half-plane (RHP) of convergence in the Laplace coodinate s. We can work this out
directly again for the Laplace transform. We set, for t r 0, f HtL = ‰at , so that
¶
è
f HsL = ‡ ‰tHa-sL „ s (18.6)
0
For higher derivatives, see Exercise 18.3. We shall find these results very useful in
building in initial conditions to the solution of ordinary differential equations.
384 Complex Analysis with Mathematica
so that if this differentiation can be carried out, we see that the required Laplace trans-
form of t f HtL is
è
f HsL
- ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (18.15)
s
If the Laplace transform is holomorphic, this procedure may be repeated as many times
as we like, so that the Laplace transform of tn f HtL is
è
n f HsL
H-1L ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
n
ÅÅÅÅÅ (18.16)
sn
But is the Laplace transform actually differentiable as a complex function? The answer
is yes, and now that we know what the derivative must look like, if it exists, we can
prove it. So consider
ƒƒ è è ¶ ƒƒ
ƒƒ f Hs + hL - f HsL ƒ
ƒƒ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ‡ t f HtL „ t ƒƒƒ (18.17)
ƒƒ ƒƒ
ƒƒ h 0 ƒƒ
If we can show that this tends to zero as h Ø 0 we will have shown that the transform is
differentiable. We can use the shift theorem to simplify this to
ƒƒ ¶ i ‰-ht - 1 y ƒƒ
ƒƒ ƒ
ƒƒ ‡ jj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + tzz ‰-st f HtL „ t ƒƒƒ (18.18)
ƒƒ ƒƒ
ƒ 0 k h { ƒ
But the exponential function has a series expansion, so we can write
¶
‰-ht - 1 H-htLn
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + t = ‚ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (18.19)
h n=2
hn !
This is of order h and so it is just a matter of tidying up on some analysis. Note that
18 Laplace transforms 385
ƒƒ ¶ -ht ƒƒ ƒƒ ¶ ¶ ƒƒ
ƒƒ ij ‰ - 1 yz -st ƒƒ ƒƒ H-htLn -st ƒƒ
ƒƒ ƒ ƒ ƒ
ƒƒ ‡ j ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + tz ‰ f HtL „ t ƒƒƒ b ƒƒƒ ‡ ‚ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ‰ f HtL „ t ƒƒƒ
ƒƒ 0 k h { ƒƒ ƒƒ 0 n=2 hn ! ƒƒ
ƒ ƒ ƒ ƒ (18.20)
¶
-st
b †h§‡ t ‰
2 t»h»
†‰ f HtL§ „ t
0
Now assuming that the transform exists for ReHsL > s0 , let m be the real positive constant
defined by
2m = ReHsL - s0 (18.21)
Then we have
and so
¶ ¶
†h§‡ t 2 ‰t»h» †‰-st f HtL§ „ t b †h§ ‡ t2 ‰-Hs0 + mLt † f HtL§ „ t (18.24)
0 0
The integral converges by virtue of Eq. (18.4), and so this term tends to 0 as h Ø 0. So
the Laplace transform is differentiable, and hence holomorphic in the right half-plane of
convergence.
Needs@"Calculus`LaplaceTransform` "D
before proceeding. Let's find out about the key function of interest:
? LaplaceTransform
LaplaceTransform@Exp@a tD, t, sD
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
s-a
LaplaceTransform@Sin@a tD,
t, s, Assumptions Ø Im@aD ã 0D
a
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ
a + s2
2
Several other standard calculations are given in Exercise 18.4. In each case you should
check your answers against those of Mathematica.
1 ÅÅÅÅ1s
t ÅÅÅÅ
s2ÅÅ
1
t2 ÅÅÅÅ
2
s3
ÅÅ
ta s-a-1 GHa + 1L
‰-a t t a Ha + sL-a-1 GHa + 1L
sinHa tL ÅÅÅÅÅÅÅÅ
a
ÅÅÅÅÅÅ
a 2 +s2
cosHa tL ÅÅÅÅÅÅÅÅ
s
ÅÅÅÅÅÅ (18.25)
a 2 +s2
‰-a t cosHb tL ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
a+s
b 2 +Ha+sL2
ÅÅÅÅÅÅÅÅ
‰-a t cosHb tL ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
a+s
b 2 +Ha+sL2
ÅÅÅÅÅÅÅÅ
sinhHa tL ÅÅÅÅÅÅÅÅ
a
s2 -a2
ÅÅÅÅÅÅ
coshHa tL ÅÅÅÅÅÅÅÅ
s
s2 -a2
ÅÅÅÅÅÅ
è!!
erfIa t M ņa§
ÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅ
è!!!!!!!! ÅÅÅÅÅ
2 !!!!
s a +s
18 Laplace transforms 387
where c > s0 . That is, we take a vertical infinite line within the right half-plane of
convergence (to the right of any singularities), and integrate along this contour. The
details of the derivation from the Fourier result are straightfoward and given in Exercise
18.5. You should try to understand now why Eq. (18.26) and the choice of c guarantee
that f HtL = 0 for t < 0. The explanation is given in Section 18.4.
How is one going to determine f HtL? Quite clearly the quickest answer is to consult the
table given by Eq. (18.25), from which the result may be deduced. A great many simple
cases may be deduced by such methods, and you should not hesitate to use such meth-
ods. You can of course also ask Mathematica:
InverseLaplaceTransform@Ha + sL ê Hb ^ 2 + Ha + sL ^ 2L, s, tD
‰-a t cosHb tL
InverseLaplaceTransform@19 ! ê Hs + I aL ^ 20, s, tD
1 c+¶
è
f HtL = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ f HsL ‰st „ s (18.28)
2p c-¶
When t < 0 the integrand decays strongly as the real part of s becomes large and positive
– this is a useful reminder that the rotated Jordan's lemma must be applied to a large
semicircle in the right-half-plane. Since the transform is holomorphic in this region, the
answer from integrating over the closed contour (obtained by joining this semicircle to
the Bromwich contour) is identically zero, by Cauchy's theorem. Hence f HtL ª 0 for
t < 0. When t > 0 matters are rather different. If f HsL contains only a finite number of
poles, we can add a large semicircle in the left half-plane and apply Jordan's lemma
again and use the calculus of residues to deduce that:
è
f HtL = ‚ Res@ f HsL ‰st D (18.29)
LHP
è
where the LHP is the region s < s0 < c. When f HsL has a branch cut, one of two situa-
tions apply. If the branch cut is made between two finite points, and Jordan's lemma can
be applied, we get a contribution from Eq. (18.29) plus a contribution from winding
around the branch cut, which may or may not be expressible in terms of simple func-
tions. If the branch cut goes off to infinity, the contour cannot be closed and one must
use special methods to obtain the answer, and numerical methods may be needed.
ü Inversion example 1
Consider again the function
è a+s a+s
f HsL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (18.30)
b + Ha + sL
2 Hs + a + ÂbL Hs + a - ÂbL
s = -a Âb (18.31)
and the transform has a simple pole at each point. Eq. (18.29) gives us
which simplifies to
1
ÅÅÅÅÅ ‰-Ha+bÂL t H1 + ‰2Âbt L = ‰-at cosHbtL (18.33)
2
as before. Some more examples of this type are given within Exercise 18.6. Although
they can be done by other methods, those examples are also valuable practice for the
application of the calculus of residues.
ü Inversion example 2
This is a much more subtle example. Suppose the transform is
18 Laplace transforms 389
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!! ÅÅÅÅÅÅÅÅ
ÅÅÅÅ!ÅÅ
!!!!!! (18.34)
a 2 + s2
This has no poles, but has a branch cut extending between Âa. But Jordan's lemma
applies, so we begin by adding a large semicircle in the left half-plane. Now we deform
this until it wraps completely around the branch cut. We split the integral into two pieces:
(1) piece one takes us from -Âa to +Âa on the right side of the branch cut. We write
s = Âu and write the contribution to the integral as
1 a
‰Âut
ÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ u (18.35)
2p -a a2 -!!!!!!!
è!!!!!!!!
u2
(2) piece two takes us from +Âa to -Âa down the left side of the branch cut. The signs of
the integrand need careful management. As we move around a small circle from the top
right of the right side of the full contour to the top left, to begin this second peice, we
pick up a minus sign from the square root. But we are also integrating downwards. So
we get another copy of Eq. (18.35) with the same overall sign. So we deduce that
1 a ‰Âut 1 a cosHutL
f HtL = ÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!! ! ÅÅÅÅÅÅ „ u = ÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ
!!!!!! ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ „ u (18.36)
p -a a2 - u2 p -a è!!!!!!!!a2 - u2
!!!!!!!
where the last step applies as the denominator of the integrand is even. What is this
function? For this you may need to consult a table of integrals related to special func-
tions. Here we can just ask Mathematica to tell us the answer in terms of Bessel
functions:
LaplaceTransform@BesselJ@0, a tD, t, sD
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!! ÅÅÅÅÅÅÅÅ
ÅÅÅÅ!ÅÅ
!!!!!!
a 2 + s2
ü Ÿ Inversion example 3
è è!!!
f HsL = ‰-x s (18.37)
InverseLaplaceTransform@Exp@-x Sqrt@sDD, s, tD
x2
‰- ÅÅÅÅ4ÅtÅÅ x
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!ÅÅÅÅÅÅÅÅÅÅÅÅÅ
2 p t 3ê2
The important point is to notice that the limits of the convolution in the definition of h
are not in fact infinite. Since f HtL vanishes for t < 0, and gHt - tL vanishes for t > t, the
integral for the convolution h is actually
t
hHtL = @ f * gD HtL = ‡ f HtL gHt - tL „ t (18.42)
0
The relevance of this to differential equations is that we can often think of the differen-
tial equation as having two components – a differential operator, and initial and/or
boundary conditions and sources. The same operator may be associated with many
different boundary conditions and sources, and the transform approach reveals that the
solution to the problem is a convolution of a function associated with the operator, and
functions associated with the particular sources and/or boundary conditions.
18 Laplace transforms 391
2 yHtL yHtL
ÅÅÅÅ + b ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + cyHtL = f HtL
a ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (18.43)
t 2 t
We Laplace-transform the entire equation, to obtain
è
aHs2 yè HsL - syH0L - y£ H0LL + bHsyè HsL - yH0LL + cyè HsL = f HsL (18.44)
We reorganize this to
è
Has2 + bs + cL yè HsL = f HsL + asyH0L + ay£ H0L + byH0L (18.45)
2 yHtL yHtL
ÅÅÅÅ + 2 ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + yHtL = 0
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (18.48)
t2 t
with yH0L = 0, y£ H0L = 1. Clearly,
1 1
yè HsL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ (18.49)
s +2s+1
2
Hs + 1L
There are many ways of checking the answer. Here is one direct alternative that uses the
Mathematica function DSolve:
392 Complex Analysis with Mathematica
‰-t t
y° = Ay + f (18.52)
When the matrix A consists of constants, clearly the same approach may be applied:
è
s yè HsL - yè H0L = Ayè HsL + f HsL (18.53)
This is a particularly elegant description as the poles in this function are given neatly as
the eigenvalues of the matrix A. Again, this observation is useful for developing general
theory, particularly in Control Theory applications. Sometimes, especially for small n,
we can proceed more directly. As an example, consider the system with
y1 HtL y2 HtL
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = y1 HtL - y2 HtL; ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = y2 HtL - y1 HtL; y1 H0L = 1; y2 H0L = 0 (18.56)
t t
Here we have f = 0, the matrix A is
1 -1
J N (18.57)
-1 1
s - 1 1 -1 1
J N J N (18.59)
1 s-1 0
18 Laplace transforms 393
which evaluates to
ij ÅÅÅÅÅÅÅÅ
s-1
ÅÅÅÅÅÅ yz
jj s2 -2 s zz
j z (18.60)
k - ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ
1
s2 -2 s {
This may be inverted piece by piece, using any of the methods, to obtain
‰
ij ÅÅÅÅ12 + ÅÅÅÅ
2t
y
jj 2ÅÅÅÅ zzz
jj 1 ‰2t z
z (18.61)
ÅÅÅÅ
k 2 - ÅÅÅÅ
Å
2 {
ÅÅÅ
H ÅÅÅÅ12 H1 + ‰2 t L ÅÅÅÅ12 H1 - ‰2 t L L
You should not be put off learning the analytical methods just because Mathematica can
do it directly more quickly – here we want to use Mathematica as a checking tool, so the
example given was simple enough to be done many different ways. Some examples of
the transform method applied to systems of ODEs are given in Exercise 18.9.
‡ The heat equation with zero initial data and a boundary condition
Let's consider the heat equation
2 uHx, tL uHx, tL
ÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (18.62)
x2 t
in the region
This type of problem has many interpretations. The simplest is that of a semi-infinite rod
whose temperature is initially zero, but where one end is subsequently as a temperature
gHtL. This is a good place to use a time-based Laplace transform, as the initial data are
zero, making the Laplace transform of the time-derivative simple. We set
¶
uè Hx, sL = ‡ uHx, tL ‰-st „ t (18.66)
0
394 Complex Analysis with Mathematica
2 uè Hx, sL
ÅÅÅÅ = s uè Hx, sL
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (18.67)
x2
The solution of this vanishing at infinity is
è!!! è!!!
uè Hx, sL = uè Ha, sL ‰- s Hx-aL = gè HsL ‰- s Hx-aL (18.68)
It follows that the solution is the convolution of gHtL with the inverse Laplace transform
è!!!!
of ‰- p Hx-aL , which we have already found. The solution is therefore just
Hx-aL2
t - ÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅ ÅÅÅ
1 ‰ 4 Ht-tL Hx - aL gHtL
uHx, tL = ÅÅÅÅÅÅÅÅ
Å ÅÅÅ
è!!!! ‡Å ÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ t
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (18.70)
2 p 0 Ht - tL3ê2
i x - a yz i x - a yz
erfcjjj ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅ zz = 1 - erf jjj ÅÅÅÅÅÅÅÅ
è!!! ÅÅÅÅÅÅÅÅÅ zz
è!!! (18.72)
k2 t { k2 t {
Note that erfH0L = 0 and erfH¶L = 1, so this solution is unity when x = a and vanishes
when t = 0, or x Ø ¶. The integral for a general g, in the form we have given, can be
extremely awkward to manage (see Exercise 18.10). Here is a plot of the result for a = 0.
18 Laplace transforms 395
1
0.75 1
0.5
0.25 0.8
0 0.6
0
0.5 0.4
1 0.2
1.5
2
where mHsL and GHsL are simple functions are commonplace. For example, in diffusion
theory and related financial applications it is very common to generate transforms where
m is a simple square root function.
then let
396 Complex Analysis with Mathematica
¶
HHtL = ‡ f HzL gHt, zL „ z (18.74)
0
Note that Eq. (18.75) contains the proof as well as the statement of the result.
ü An example
Chapter 1 of both volumes 4 and 5 of Prudnikov et al (1998, 2002) contain several
examples. Here is another example relevant to diffusion and finance theory.
è!!!!!!!! !!!!!!!!
mHsL = n2 + 2 s
1 (18.79)
GHsL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
s+g
i -z yz ij z yz i z yz
gHt, zL = 2 Fjjj ÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅ zz + 1 = 1 - erf jjj ÅÅÅÅÅÅÅÅ
è!!ÅÅÅÅÅ zz = erf jj- ÅÅÅÅÅÅÅÅ
è!!!!! è!!!!!ÅÅÅÅÅÅÅÅ zz (18.82)
k t { k 2t { k 2t {
è
and this times the inverse transform of f HsL, with the inverse considered as a function of
z, must be integrated with respect to z. But the inverse transform of
è Hx-aLs
- ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅ
f HsL = ‰ è!!!!2 (18.83)
is just
i x - a zy
d jjjz - ÅÅÅÅÅÅÅÅ
è!!! ÅÅÅÅÅÅÅÅ zz (18.84)
k 2 {
è!!!
so the integration reduces to setting z = Hx - aL ë 2 and we are led once again to the
solution of the PDE in the form
i x - a yz
1 - erf jjj ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅ zz
è!! (18.85)
k2 t {
f HasinhHtLL (18.87)
How does this come about? Let's see how by establishing a simple and closely related
result. Let f HtL be given with transform
398 Complex Analysis with Mathematica
¶
è
f HsL = ‡ ‰-st f HtL „ t (18.88)
0
Consider now the generalized convolution, with Laplace argument p, and where we
replace t by v:
¶ ¶ ¶
è
‡ f HsL ‰-s I p HsL „ s = ‡ f HvL „ v ‡ ‰-sv ‰-s I p HsL „ s (18.89)
0 0 0
If we let u = v + 1, this integral is equal to (using a standard result for the transform of a
modified Bessel function)
¶ ¶
‡ f HvL „ v ‡ ‰-su I p HsL „ s
0 0
¶ ¶ -1 (18.90)
f HvL f HvL ‰-s cosh HuL
= ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!! ! !!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!! ! ÅÅÅÅ
!!!! Å ÅÅÅÅ
s Å „ v = è!!!!!!!! !!!!!ÅÅÅÅÅÅÅÅÅÅÅÅÅ „ v
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
0 u2 - 1 Iu + u2 - 1 M 0 u2 - 1
and we can now carry out the inversion s Ø t, and obtain, writing u = v + 1 explicitly
now:
¶
f HvL d@t - cosh-1 Hv + 1LD
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!! !!!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ v
0 u2 - 1
¶
(18.91)
= ‡ f HvL d@coshHtL - Hv + 1LD „ v = f Hcosh@tD - 1L
0
f HcoshHtL - 1L (18.93)
and we have figured out how to invert a Laplace transform whose variable is given by
the index of a modified Bessel function, provided it appears under an integral with a
function that is the Laplace transform of another function. The exponential is in there for
technical reasons, as coshH0L = 1. The example with the Bessel function and the change
of variables involving sinhHtL can be proved in a similar way. This is left to you as
Exercise 18.11. Other examples can be worked out on a case by case basis.
Exercises
Those exercises containing a supplementary Mathematica component in addition to a
pen and paper exercise are denoted [Ÿ].
18 Laplace transforms 399
è
18.1 Prove the shift theorem, that if gHtL = ‰-at f HtL, then gè HsL = f Ha + sL.
è
18.2 Prove the scaling theorem, that if gHtL = f Ht ê aL, then gè HsL = a f Ha sL.
18.3 Show that the Laplace transform of the nth derivative of f satisfies:
è
@L f HnL D HsL = sn f HsL - sn-1 f H0L - ... - f Hn-1L H0L
(Hint: Use one integration by parts in the definition of @L f HnL D HsL, and use induction.)
18.4 [Ÿ] By direct integration, show that the Laplace transforms of the functions in the
left column are those in the right. You may assume that n is an integer for those cases
that involve it. In each case, don't forget to use the shift theorem whenever possible, and
check your answers with Mathematica.
1 ÅÅÅÅ1s
t ÅÅÅÅ
1
s2
ÅÅ
tn s-n-1 HG Hn + 1LL
‰-a t t n Ha + sL-n-1 HG Hn + 1LL
sin Ha tL ÅÅÅÅÅÅÅÅ
a
ÅÅÅÅÅÅ
a 2 +s2
cos Ha tL ÅÅÅÅÅÅÅÅ
s
ÅÅÅÅÅÅ
a 2 +s2
‰-a t Hcos Hb tLL ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
a+s
b 2 +Ha+sL2
ÅÅÅÅÅÅÅÅ
between the Laplace and Fourier transforms, explain the Laplace inversion formula
given by Equation (18.26).
18.6 Using the calculus of residues and Jordan's lemma, evaluate the inverse Laplace
transforms of
1 1 1 1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ ; ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ ; ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ ; ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
Hs + 1L
2 Hs + 1L
4 s Hs + 2L Hs + 4L Hs + 4L Hs2 + 9L
2
18.7 [Ÿ] (Harder) Evaluate, by contour integration, the inverse Laplace transform of
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!! ÅÅÅÅ!Å!ÅÅÅ
s+1
and check your answer with Mathematica. You need to consider carefully how to
modify the semicircular contour to treat the branch point at s = -1.
2 yHtL yHtL
ÅÅÅÅ + b ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + cyHtL = f HtL
a ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
t 2 t
400 Complex Analysis with Mathematica
18.9 Using the Laplace transform method as applied to matrix systems, find the solu-
tions of the following systems of ODEs:
18.10 [Ÿ] (Harder) Consider the transform inversion integral for the heat equation in the
form
c+Â ¶ è!!!!
1
qHx, tL = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ‰- p Hx-aL ‰ p t „ p
2p c- ¶
Deform the contour to wrap around the negative real axis and taking care of the branch
points, show that
¶
1 è!!!!
qHx, tL = ÅÅÅÅÅÅ ‡ ‰- pt sinI p Hx - aLM „ p
p 0
Use Mathematica to evaluate this integral and check that it agrees with inversion
example 3 of Section 18.4.
è
18.11 (Harder) Let f HtL have Laplace transform f HsL. Prove that
¶
è
‡ f HsLJ p HasL „ s
0
f Ha sinhHtLL
18.12 Ÿ Check your solutions to Exercise 18.8 using Mathematica's DSolve function.
18.13 Ÿ Check your solutions to Exercise 18.9 using Mathematica's DSolve function.
19 Elementary applications to
two-dimensional physics
Introduction
Many problems in applied mathematics reduce to a problem in potential theory, requir-
ing the solution, f, known as the potential, of Laplace's equation:
“2 f = 0 (19.1)
Holomorphic functions of a complex variable play a critical role in the solution of this
and related equations. In this chapter we shall explore the solution of Laplace's equation
in two dimensions, when the solution is particularly straighthforward, and solutions may
also be turned into other solutions via the use of conformal mapping. The matter will be
revisited in Chapters 23 and 24, whence we shall see how to manage Laplace's equation
and the Helmholtz equation in three dimensions, and the wave equation in four dimen-
sions. Solutions of Eq. (19.1) have applications to several areas, including:
Our first task will be to briefly review each of these topics, to see how the potential
arises. Students interested in one particular physical application may wish to focus on
the topic of most interest in Section 19.1. Then we shall look at the solution of Eq. (19.1)
by holomorphic methods and illustrate many of them with Mathematica. The last section
of this chapter looks briefly at generalizations of potential theory – in particular, the
biharmonic equation and its application to viscous flow.
Laplace's equation. The story with electromagnetism is a little more subtle. In the
time-independent case, Maxwell's equations reduce to (we are using simplified units):
“ êê = r
êê .E (19.3)
“ êê = 0
êê .B (19.4)
“
êê µ E
êê = ê0ê (19.5)
“
êê µ B
êê = êJê (19.6)
where r is the charge density and êJê is the current density (usually these source terms are
multiplied by appropriate electromagnetic constants, but these constants vary with
convention and are of no consequence here). For the electric field êEê , Eq. (19.5) holds
everywhere, so that we may always write
êê = “
E êê f (19.7)
for an electrostatic potential f. Then Eq. (19.3) implies that f satisfies Poisson's equation
“2 f = r (19.8)
and, in the absence of charges, Laplace's equation is obtained once more. The magnetic
case is a little more subtle. Eq. (19.6) says that, away from any current sources, the
magnetic field is curl-free and hence again the gradient, at least locally, of a potential,
and Eq. (19.4) then guarantees that this magnetostatic potential satisfies Laplace's
equation. However, the presence of currents at various points in space causes global
problems. Suppose for example we have a current-carrying wire located at the origin,
and consider the integral of êBê around a closed circle C centred on the origin, with
interior A. By Stoke's theorem, we have, from Eq. (19.6),
êê.„ rê = ‡ “
‡ B êê µ B
êê.„ êSê = ‡ êJê.„ êSê = I (19.9)
C A A
where I is the current in the wire. If the magnetic field was strictly the gradient of a
potential, this integral would have to be zero. What happens is that globally the potential
is multi-valued. We shall see how this is elegantly managed by the multi-valued nature
of certain complex functions!
The case of fluid dynamics is very rich in structure, and we shall explore this
topic in detail in a section of its own. To introduce the matter, we note that the conserva-
tion of fluid mass leads to the equation
r
ÅÅÅÅÅÅÅÅÅÅ + “
êê .Hr êvêL = 0 (19.10)
t
where êvê is the velocity field and r the fluid density. If the fluid is incompressible in the
sense that r must be independent of both position and time, we deduce that
“ êê = 0
êê .v (19.11)
19 Elementary applications to two-dimensional physics 403
in which case we can again write the velocity field as the gradient of a potential, which
by the incompressibility condition must then satisfy Laplace's equation. We shall look at
the special properties of fluids with regard to stream functions in Sections 19.3 and 19.7.
A fluid flow satisfying Eq. (19.12) is said to be irrotational.
Our goal in this Chapter is to explore various approaches to solving Laplace's
equation in two dimensions. This is not as silly as it sounds – although the physical
world is three-dimensional there may be cases of exact or approximate translational (or
other) symmetry that reduces the problem to one that is essentially two-dimensional.
then f and y may be differentiated twice. We also know (from real analysis) that the
mixed second derivatives are symmetric – for example,
2 f 2 f
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (19.14)
xy yx
and similarly for y. The Cauchy–Riemann equations then guarantee (Exercise 19.1
reminds you of this!) that
2 f 2 f
ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ = 0 (19.15)
x y
and similarly for y. So the real and imaginary parts of a holomorphic function satisfy
Laplace's equation.
2 f
“2 f = 4 ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅê (19.18)
z z
This makes it clear that if f is a function of a complex variable, then it satisfies Laplace's
equation if:
If you feel that this notational slickness might be hiding something, Exercise 19.2
encourages you to check in detail that an anti-holomorphic function satisfies the Laplace
equation.
z = gHwL (19.19)
2 f 2 f
2
ÅÅÅÅÅê = †g£ HwL§ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅê
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅêê (19.20)
w w z z
which means, using Eq. (19.18), that if f is a solution of Laplace's equation in terms of
x, y, it is also a solution of
2 f 2 f
ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅÅ = 0 (19.21)
u v
where w = u + Âv.
A common technique is to use a conformal mapping to transform the region of
interest into a disc or half-plane. (Quite how this is done in general is an issue in itself –
the Riemann mapping theorem, discussed in Chapter 21 guarantees that it can be done
under very general conditions, but does not tell you how!) There are then very explicit
solutions for the Dirichlet problem for the cases of the disc and the half-plane, which we
shall discuss presently. For now we need to introduce some terminology related to
boundary conditions.
The Dirichlet problem is one where the value of f is prescribed on the boundary,
whereas the Neumann problem is one where the normal derivative (i.e. in the direction
of the outward normal to the region) is specified on the boundary. For the Dirichlet
problem for the Laplace equation, the solution is unique, whereas for the Neumann
problem it is unique up to a constant. (See Exercise 19.3). Furthermore, the problems
where either the function, or its normal derivative, is zero on a given boundary are
19 Elementary applications to two-dimensional physics 405
invariant under conformal mapping. For the first case, if the function is zero and the
coordinates are changed, it clearly remains zero. For the latter observation, the conformal-
ity property guarantees that the differentiation direction remains normal to the boundary
under the conformal mapping, and hence it follows that if the normal derivative is zero
in one set of coordinates, it remains zero after a conformal mapping has been applied.
Note that such zero boundary conditions are typically only applied on the
exterior of a given region – otherwise, for interior solutions, the solution must be zero or
constant inside if it is non-singular inside, by the uniqueness result.
‡ Additional observations
There is some additional structure arising from the Cauchy–Riemann equations. The
relationship between f and y is of some signifiance. In the case of fluid theory the
relationship is of particular importance. Suppose that we identify f as the potential for
the velocity field êvê:
f f
êvê = J ÅÅÅÅÅÅÅÅÅÅ , ÅÅÅÅÅÅÅÅÅÅ N (19.22)
x y
and so if we consider the dot product of the velocity field with the gradient of y, we note
that
y y y y
êê y = J ÅÅÅÅÅÅÅÅÅÅ , - ÅÅÅÅÅÅÅÅÅÅ N.J ÅÅÅÅÅÅÅÅÅÅ , ÅÅÅÅÅÅÅÅÅÅ N = 0
êvê.“ (19.24)
y x x y
so that y is constant along the velocity field. We call y the ‘stream function’, and the
curves y = constant are literally the streamlines of the flow. This is a powerful visualiza-
tion tool, and we see that both parts of the holomorphic function are useful. For non-
fluid applications the curves f = constant are called equipotentials, and the curves
y = constant may be interpreted as ‘force field’ or ‘flux’ lines, but for fluids there is
additional signficance in that these latter curves are the paths followed by fluid particles.
This is not the case, for example, for a charged test-particle (i.e. one for which we ignore
its own field) in an electrostatic or gravitational field. In the case of heat flow, these two
sets of curves are sometimes called isothermal lines and flux lines.
406 Complex Analysis with Mathematica
1
2
3
4
1
0.75
0.5
0.25
-40
-2
0
2
4
19 Elementary applications to two-dimensional physics 407
since zê , the image of z in the real axis, lies outside D. Now we subtract these two results,
to obtain
1 1 1 1 f HwLHz - zêL
f HzL = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ f HwL J ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅêÅ N „ w = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅêÅÅÅÅÅ „ w (19.28)
2p C w-z w-z 2p C Hw - zLHw - zL
Now suppose that f is bounded in the sense that † f § b M, for large z, where M Ø 0, as
z Ø ¶. Then the contribution from the integral over C2 vanishes in the limit Rض,
leaving us with the contribution from Eq. (19.28) along the real axis. This gives us
1 ¶ f Hq + 0ÂL y
f Hx + Â yL = ÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ „ q (19.29)
p -¶ Hx - qL2 + y2
so that we obtain the half-plane result for both the real and the imaginary part of f . One
point to note is that one cannot just put y = 0 in this formula – you must evaluate the
integral before taking the limit of zero y.
408 Complex Analysis with Mathematica
‡ Dispersion relations
Another more subtle point, which we shall not pursue, is that a similar argument applied
to Eq. (19.26) alone allows you to extract the real part from the imaginary part integrated
along the real axis, and vice versa. This observation leads to the notion of Hilbert
transforms and dispersion relations in mathematical physics, the general idea being that
the notion of holomorphicity allows information about one process, characterizing the
real part, to be extracted from another that is related to the imaginary part. For an
illuminating discussion of this, see Jackson (1975), Chapter 7. Exercise 19.7 gives a hint
of what is happening. This concept has many applications.
The proof of this follows exactly the same route as the half-plane case, but where, if z
lies inside the boundary circle, the analogue of the image point is the point
R2
z` = ÅÅÅÅêÅÅÅÅÅ (19.32)
z
The details are left to you as Exercise 19.8. An example of the application of this result
is given in Exercise 19.9.
‡ Uniform fields
An important simple case is the elementary function
where U0 is a real constant. Let's find the real and imaginary parts of this function
ComplexExpand@Exp@-I aD Hx + I yLD
With this and the simple functions developed here, we shall take the time to interpret
each one in terms of fluid flow. If your particular interest lies in another application, you
should consider what these functions mean in that context. So if Eq. (19.34) gives the
potential for a fluid velocity field, the vector field giving the velocity is the gradient,
which is just
f = k logHrL (19.39)
‡ Vortices
We can build elementary swirling solutions corresponding to a point vortex at z = a.
This is just
z = a + r‰Âq (19.42)
f = kq (19.44)
Needs@"Graphics`PlotField`"D
? PlotGradientField
PlotGradientField@f, 8x, x0, x1, HxuL<, 8y, y0, y1, HyuL<, HoptionsLD
produces a vector field plot of the gradient vector field of the
scalar function f by calculating its derivatives analytically.
19 Elementary applications to two-dimensional physics 411
ComplexExpand@Exp@-I Pi ê 6D Hx + I yLD
è!!! i è!!! xy
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅ + Â jjjj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅ zzzz
3 x y 3 y
2 2 k 2 2{
PlotGradientField@
HSqrt@3D x + yL ê 2, 8x, -2, 2<, 8y, -2, 2<D
Here is the source field – note that some warning messages about the behaviour at the
origin have been suppressed in the printed text:
PlotGradientField@
Log@x ^ 2 + y ^ 2D ê 2, 8x, -3, 3<, 8y, -3, 3<D
To treat the vortex, we need to make an explicit conversion to polar coordinates – this is
best done using the two-argument form of the arctangent function:
Needs@"Graphics`PlotField3D` "D
PlotGradientField3D@ArcTan@x, yD,
8x, -3, 3, 0.5<, 8y, -3, 3, 0.5<,
8z, -3, 3, 0.5<, ViewPoint -> 81, 2, 10<D
19 Elementary applications to two-dimensional physics 413
The regions where this can be carried out particularly straightforwardly are:
(i) a half-plane;
(ii) a quadrant;
(iii) a wedge of interior angle 2pê k for some integer k.
z-a
gHzL = klogHz - aL - klogHz - êê
a L = klogJ ÅÅÅÅÅÅÅÅÅÅÅÅêêÅÅÅÅ N (19.46)
z-a
Let us write a = a + Â b, z = x + Ây. Then the real part of this function is just
x + Ây - a - Â b 1 i Hx - aL2 + Hy - bL2 zy
ÅÅÅÅÅÅÅÅÅÅÅÅÅ N À = ÅÅÅÅÅ k logjjjj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
fHx, yL = k log À J ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ zzz (19.47)
x + Ây - a + Â b 2 k Hx - aL + Hy + bL {
2
This manifestly vanishes when y = 0. For example, consider a source of strength unity at
H0, 1L. Here is a contour plot of the resulting potential:
ContourPlot[1/2*Log[(x^2+(y-1)^2)/(x^2+(y+1)^2)],
{x,-2,2},{y,0,4}, PlotPoints -> 30]
0
-2 -1 0 1 2
Here is the field of associated gradients:
PlotGradientField[1/2*Log[(x^2+(y-1)^2)/(x^2+(y+
1)^2)],{x,-2,2}, {y,0,4}]
ContourPlot[1/2*Log[(x^2+(y-1)^2)*(x^2+(y + 1)^2)],
{x,-2,2},{y,0,4}, PlotPoints -> 30]
0
-2 -1 0 1 2
Here is the field of associated gradients – note that the flow is horizontal at y = 0:
PlotGradientField[1/2*Log[(x^2 + (y - 1)^2)*(x^2 + (y
+ 1)^2)], {x, -2, 2}, {y, 0, 4}]
where f is the ordinary real potential, such that the velocity êvê of the fluid is given by
êvê = ê“ê f. The function y is the stream function, and the velocity field is tangent to the
any curve y = constant.
If we introduce solid boundary surfaces into the geometry under consideration,
there can be no flow normal to the boundary. This means that as a matter of course we
are considering a Neumann problem for f. In particular, we have already solved this
problem where the geometry consists of a half-plane and (if you have investigated
Exercises 19.11-19.12 sufficiently) quadrants and wedges. We can now plot the stream-
lines of these flows as well, by just using the imaginary parts of the functions already
considered. For the case of the half-plane Neumann problem the complex potential is
y = k ArgHHz - aL Hz - êê
a LL (19.51)
Now consider the case of a unit source at H0, 1L. We need to evaluate the argument of
x2 + 2 Â y x - y2 + 1
and this is best done using the ArcTan function. Here is the resulting plot, with some
options set to produce a reasonably clean picture (the thick line extending vertically is an
artifact):
ContourPlot@ArcTan@1 + x ^ 2 - y ^ 2, 2 x yD,
8x, -2, 2<, 8y, 0, 2<,
ContourShading -> False, PlotPoints -> 400,
ContourStyle Ø [email protected],
Contours -> Table@k ê 4, 8k, -15, 15, 1 ê 2<D,
AspectRatio -> 1 ê 2D
1.5
0.5
0
-2 -1 0 1 2
This makes the role of the boundary very clear. You might like to explore the
streamlines for point sources within quadrants and wedges in the same way. Other flows
within wedges can be obtained by elementary methods (see Exercise 19.13).
19 Elementary applications to two-dimensional physics 417
and so y = 0 along this boundary. That is, this boundary is a streamline! The Neumann
boundary condition on f is then guaranteed by the orthogonality relations between f and
y. Furthermore, the function we have added only has singularities in the lower half-
plane and so does not introduce any new fictitious sources in the upper half-plane. Using
this method it is easy to generate new solutions in a half-plane geometry (see e.g.
Exercise 19.14).
A similar trick can be used to calculate flows with boundary conditions on a
circle. Suppose that we wish to create a solid boundary on the circle » z » = a, with a real.
Suppose further that f HzL is the complex potential for a flow in the entire complex plane,
with any singularities located outside the circle » z » = a. Then the new complex potential
for the corresponding flow with a solid boundary on the circle is just
êêêêêêêêêê
i a2 y
gHzL = f HzL + f jj ÅÅÅÅêÅÅÅÅÅ zz (19.54)
k z {
Why this works is similar to the argument for a half-plane (see Exercise 19.15).
f HzL = HU - ÂVL z
a2
gHzL = HU - ÂVL z + HU + ÂVL ÅÅÅÅÅÅÅÅÅ (19.55)
z
418 Complex Analysis with Mathematica
i a2 y
gHzL = U jjz + ÅÅÅÅÅÅÅÅÅ zz (19.56)
k z {
In polar coordinates the corresponding potential and stream function are then given by
i a2 y
f = U cosHqL jj ÅÅÅÅÅÅÅÅÅ + rzz (19.57)
k r {
i a2 y
y = U sinHqL jjr - ÅÅÅÅÅÅÅÅÅ zz (19.58)
k r {
i a2 yz
y = U y jj1 - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ z (19.59)
k x2 + y2 {
We can now visualize this flow very easily, using the standard ContourPlot routine
to see the streamlines. Note that they are also shown for the interior of the circle, but the
solution we want is just for the exterior region.
ContourPlot@y * H1 - 1 ê Hx ^ 2 + y ^ 2LL,
8x, -4, 4<, 8y, -2, 2<, AspectRatio -> 1 ê 2,
ContourShading -> False, PlotPoints -> 400,
Contours -> 41, ContourStyle Ø [email protected]
-1
-2
-4 -2 0 2 4
a2 Âk
gHzL = HU - ÂVL z + HU + ÂVL ÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅ logHzL (19.60)
z 2p
If the flow is in the x-direction at infinity, this becomes just
19 Elementary applications to two-dimensional physics 419
i a2 y Âk
gHzL = U jjz + ÅÅÅÅÅÅÅÅÅ zz - ÅÅÅÅÅÅÅÅÅ logHzL (19.61)
k z { 2p
In polar coordinates, the corresponding potential and stream function are then,
i a2 y kq
f = UcosHqL jj ÅÅÅÅÅÅÅÅÅ + rzz + ÅÅÅÅÅÅÅÅÅÅ (19.62)
k r { 2p
i a2 y k
y = UsinHqL jjr - ÅÅÅÅÅÅÅÅÅ zz - ÅÅÅÅÅÅÅÅÅ logHrL (19.63)
k r { 2p
i a2 yz k
y = U y jj1 - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅ2ÅÅ z - ÅÅÅÅÅÅÅÅÅÅ logHx2 + y2 L (19.64)
k x 2 + y { 4 p
ContourPlot@
y * H1 - 1 ê Hx ^ 2 + y ^ 2LL + 5 ê H4 PiL Log@x ^ 2 + y ^ 2D,
8x, -4, 4<, 8y, -2, 2<, AspectRatio -> 1 ê 2,
ContourShading -> False, PlotPoints -> 400,
Contours -> Table@k ê 4, 8k, -15, 15, 1<D,
ContourStyle Ø [email protected]
-1
-2
-4 -2 0 2 4
The points where the streamlines hit the cylinder are an example of stagnation points.
You might like to explore what happens to these as the strength of the circulation term is
increased.
‡ Blasius' theorem
We shall not prove this here (it is an application of Bernoulli's theorem in fluid dynam-
ics), but there is an interesting result due to Blasius that gives the force exerted on an
object as a function of the complex potential gHzL. Suppose the fluid has density r and
the force (per unit length in the third dimension) is given by the complex constant
420 Complex Analysis with Mathematica
F = Fx - ÂFy (19.65)
Âr gHzL 2
F = ÅÅÅÅÅÅÅÅÅ ‡ J ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ N „ z (19.66)
2 C z
where C is the boundary of the body. Note that since the integrand is holomorphic, C
can be deformed in general, and the calculus of residues used to evaluate the integral.
Let's get Mathematica to work out the force on the cylinder in the flow with circulation
that we have considered:
 Hk U -  k VL r
Expand@%D
ÂkU r+kV r
i l2 y
z = ‰Â q jj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + w + z zz (19.67)
k w+z {
19 Elementary applications to two-dimensional physics 421
With l general this can be used to transform circles into ellipses. For example, here we
generate a rotated ellipse from a unit circle:
-2 -1 1 2
-1
-2
"################
#########
l= a2 - ImHwL2 - ReHwL; (19.68)
This generates the aerofoil family we considered earlier. We shall need the inverse of
this mapping with the right behaviour at infinity. Solving the associated quadratic
equation gives
1 1 è!!!!!!!!!!!!!!!!!!!!!!!!!!!!
z = -w + ÅÅÅÅÅ ‰-Âq z + ÅÅÅÅÅ z2 ‰-2Âq - 4l2 (19.69)
2 2
The mapping zö z transforms the region exterior to an aerofoil to that exterior to a
circle. The complex potential for a flow with circulation is then just
i a2 y  k
gHzL = U jjz + ÅÅÅÅÅÅÅÅÅ zz - ÅÅÅÅÅÅÅÅÅÅ logHzL (19.70)
k z { 2p
Let's look at the cases of ellipses first. Here is the complex potential. Note that Mathemat-
ica does not always manage the branch points in the right way, so we write the inverse
mapping in this particular way to try to force the issue.
We now extract the real potential and stream function by taking real and imaginary parts:
422 Complex Analysis with Mathematica
As our first example, we can now visualize the flow around an ellipse given by
x2 y2
ÅÅÅÅÅÅÅÅ2Å + ÅÅÅÅÅÅÅÅÅ
Å =1 (19.71)
A B2
and as an example we take A = 2, B = 1. The Joukowski mapping takes the ellipse to
è!!!!!!!!!!!!!!!
the exterior of a circle of radius HA + BL ê 2, which is 3 ê2 here, with l = a2 - b2 ë 2,
è!!!
which here is 3 ë 2. Here we show the streamlines associated with this ellipse in a
flow with velocity at infinity H1, 0.5L and k = -4. We make a separate copy of the
ellipse in order to superimpose the boundary clearly.
EllipseGraphic@A_, B_D :=
ParametricPlot@8A Cos@sD, B Sin@sD<,
8s, 0, 2 Pi<, PlotStyle -> [email protected]
ell = EllipseGraphic@2, 1D
0.5
-2 -1 1 2
-0.5
-1
In this and the other examples in this chapter, the value of PlotPoints has been set
quite high (400) to obtain a clean graphic – on an older computer you might wish to
lower the value.
myplot = ContourPlot@JoukowskiPsi@
x, y, 0, 3 ê 2, 0, 0, 1, 0.5, -4, Sqrt@3D ê 2D,
8x, -4, 4<, 8y, -2, 2<, ContourShading -> False,
AspectRatio -> 1 ê 2, PlotPoints -> 300,
Contours -> Table@k ê 4, 8k, -20, 20, 1<DD
19 Elementary applications to two-dimensional physics 423
-1
-2
-4 -2 0 2 4
Show@myplot, ellD
-1
-2
-4 -2 0 2 4
If we keep A = 2 but set B = 0 the ellipse collapses to a flat plate, as shown in the
following streamline plot:
ellb = EllipseGraphic@2, 0D
0.5
-2 -1 1 2
-0.5
-1
424 Complex Analysis with Mathematica
myplotb = ContourPlot@
JoukowskiPsi@x, y, 0, 1, 0, 0, 1, 0.5, -4, 1D,
8x, -4, 4<, 8y, -2, 2<, ContourShading -> False,
AspectRatio -> 1 ê 2, PlotPoints -> 400,
Contours -> Table@k ê 4, 8k, -20, 20, 1<DD
-1
-2
-4 -2 0 2 4
Show@myplotb, ellbD
-1
-2
-4 -2 0 2 4
Finally, we recall that aerofoils with pointy ends can be created using the same transfor-
mation but with l constrained according to Eq. (19.68). Here is one example of how to
implement it – you are encouraged to explore this further in Exercise 19.17.
AeroJoukowskiPhi@x_, y_,
q_, a_, a_, b_, U_, V_, k_D :=
Re@AeroJoukowskiFlow@x + I y, q, a, a + I b, U, V, kDD
19 Elementary applications to two-dimensional physics 425
AeroJoukowskiPsi@x_, y_,
q_, a_, a_, b_, U_, V_, k_D :=
Im@AeroJoukowskiFlow @x + I y, q, a, a + I b, U, V, kDD
ContourPlot@
AeroJoukowskiPsi@x, y, 0, 3 ê 2, 0.5, 0.0, -1, 0.0, 0D,
8x, -4, 4<, 8y, -2, 2<, ContourShading -> False,
AspectRatio -> 1 ê 2, PlotPoints -> 200,
Contours -> Table@k ê 4, 8k, -20, 20, 1<DD
-1
-2
-4 -2 0 2 4
“ êê = 0
êê .v (19.74)
In general, fluid mechanics involves the solution of the Navier–Stokes equations. Rather
than assuming, as before, zero vorticity, we now define the vorticity as
w
êê = “
êê µ êvê (19.75)
In what follows we retain incompressibility but allow for non-zero vorticity. We now
need to use some vector identities. We define the scalar field H as
r 1
H = p + ÅÅÅÅÅ êvê.vêê = p + ÅÅÅÅÅ r êvê2 (19.76)
2 2
and note that if “ êê = 0, then “ êvê = -“
êê .v
2
êê µ êwê . We also recall the vector calculus identity
1
“J ÅÅÅÅÅ êvê.vêêN = Hv êê Lêêvê + êvê µ w
êê.“ êê (19.77)
2
Putting this all together allows us to recast the Navier–Stokes equations as
êvê
rJ ÅÅÅÅÅÅÅÅÅÅ - êvê µ êwê N + “
êê H = - m “
êê µ w
êê (19.78)
t
Taking the curl of this, and noting that the divergence of the viscosity is identially zero,
we get the vorticity equation
w êê
rJ ÅÅÅÅÅÅÅÅÅÅÅ + Hv êê L w
êê.“ êê - Hw êê L êêvêN = n“ w
êê .“
2
êê (19.79)
t
where the kinematic viscosity n = m ê r. We note that setting the vorticity to zero is
consistent with the vorticity equation, leading us back to potential flow.
19 Elementary applications to two-dimensional physics 427
In the time-independent or steady case, the vorticity equation (18.79) then reduces to the
scalar equation
1 Hy, “2 yL
“4 y = ÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (19.81)
n Hx, yL
where the right hand side is the usual Jacobian. Note that it is consistent to demand that
“2 y = 0 in this equation, taking us back to potential flow, but now there are many other
interesting cases to consider. We also note that in the various forms of the momentum
(Navier–Stokes) or vorticity equation (18.79) or the 2-D stream form (18.81), and for
problems where one can identify a unique length scale L and speed scale U that character-
izes the problem at hand, it makes sense to perform a further non-dimensionalization of
the variables and introduce the Reynolds number
UL rUL
Re = ÅÅÅÅÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (19.82)
n m
so that, for example, Eq. (19.81) becomes, after suitable rescalings of all the variables,
Hy, “2 yL
“4 y = Re ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (19.83)
Hx, yL
“4 y = 0 (19.84)
which is the biharmonic equation, also well known for its applications to elasticity. This
is easily written in terms of complex variables. As usual, we let, z = x + Ây. Using the
notation introduced in Section 10.9
1
ÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅ J ÅÅÅÅÅÅÅÅÅÅ - Â ÅÅÅÅÅÅÅÅÅÅ N (19.85)
z 2 x y
1
ÅÅÅÅÅÅÅÅêÅ = ÅÅÅÅÅ J ÅÅÅÅÅÅÅÅÅÅ +  ÅÅÅÅÅÅÅÅÅÅ N (19.86)
z 2 x y
428 Complex Analysis with Mathematica
we note that
2 4
“2 = 4 ÅÅÅÅÅÅÅÅÅÅÅÅÅêÅÅÅ ; “4 = 16 ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅêÅÅÅÅ2ÅÅ (19.87)
zz z2 z
So the biharmonic equation is the condition
4 y
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅêÅÅÅÅ2ÅÅ = 0 (19.88)
z2 z
It is simple to integrate this equation to obtain, for y real,
y = ReHzê fH zL + gH zL L (19.89)
where f and g are holomorphic. The potential flow case arises when f = 0.
4 y Re i y 3 y y 3 y yz
 ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅêÅÅÅÅ2ÅÅÅÅ - ÅÅÅÅÅÅÅÅÅ jj ÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
Å ÅÅÅ
Å - ÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ z = 0 (19.90)
z2 z 2 k z zzê2 zê z2 zê {
This can be reorganized as follows. We first note that Eq. (19.90) can be written as
2
ÅÅÅÅÅÅÅÅ
ÅÅÅÅ jij ÅÅÅÅÅÅÅÅ
2 y Re y 2 y 2 i 2 y Re y 2 y
Å2ÅÅÅÅ - ÅÅÅÅÅÅÅÅÅ J ÅÅÅÅÅÅÅÅÅÅ N zzzz + ÅÅÅÅÅÅÅÅÅ2ÅÅÅ jjjj ÅÅÅÅÅÅÅÅêÅ2ÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ J ÅÅÅÅÅÅÅÅêÅÅ N zzzz = 0
jj (19.91)
zê2 k z 2 z { z k z 2 z {
2 f 2 y Re y 2
ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ = Â ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ - ÅÅÅÅÅÅÅÅÅ J ÅÅÅÅÅÅÅÅÅÅ N (19.92)
z z 2 z
and its complex conjugate
2 f 2 y Re y 2
Åê2ÅÅÅÅ = - ÅÅÅÅÅÅÅÅêÅ2ÅÅÅÅ - ÅÅÅÅÅÅÅÅÅ J ÅÅÅÅÅÅÅÅêÅÅ N
ÅÅÅÅÅÅÅÅ (19.93)
z z 2 z
Then elimination of f from Eq. (19.92) and Eq. (19.93) by differentiation leads to Eq.
(19.91). This pair of complex equations is the representation of Legendre (1949), and is
the basis for the complex solution techniques developed by Ranger (1991, 1994).
19 Elementary applications to two-dimensional physics 429
‡ Ÿ Projects
A general investigation of the complex equations for general viscous or Stokes flow is
rather outside the scope of this text. There are many examples in the references below
that merit detailed investigation, using Mathematica as a visualization tool, and you are
encouraged to pursue this. As an example to illustrate this approach, the following
example from Finn and Cox (2001) is interesting in that it makes use of the method of
images with respect to a circular boundary. The following stream function is that for a
"stokeslet" placed inside a circle of radius a. The strength of the stokeslet is A + Â B, and
the image is at s = a2 ê s. Finn and Cox calculate the resulting stream function (we let
zb denote zê) and in Mathematica input form it is given by
 B Hs - sL H†z§2 - a2 L Hz - zê L
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ +
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
4 s †z - s§2
ê
1 i s †z - s§2 y A H†z§2 - a2 L H ÅÅÅÅ ÅÅÅÅÅÅ + ÅÅÅÅ
s+z
ÅÅÅÅÅÅ L
s+z
zê -s
ÅÅÅÅÅ logjjjj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ zzzz HA Hz + zê L - Â B Hz - zê LL + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
z-s
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
4 k s †z - s§ { 4s
1 1
0.5 0.5
0 0
-0.5 -0.5
-1 -1
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
1 1
0.5 0.5
0 0
-0.5 -0.5
-1 -1
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
You are encouraged to pursue the work of Finn and Cox further, as the basic object
described here is then built up to describe a more complex geometry. Another interesting
source of examples, this time of free boundary problems, is the paper by Garabedian
(1966).
Exercises
19.1 Show that the Cauchy–Riemann equations imply that both the real and imaginary
parts of a holomorphic function satisfy Laplace's equation.
19.2 What are the analogues of the Cauchy–Riemann equations for a differentiable
function of zê? Show that both the real and imaginary parts of such an anti-holomorphic
function satisfy the Laplace equation.
19.3 Suppose that f1 and f2 are each solutions of Laplace's equation in a region D, and
that on the boundary of D,
19 Elementary applications to two-dimensional physics 431
f1 = f2 = g
“ êê hL = “ h + †“
êê .Hh “
2
êê h§
2
Integrate this identity over D and apply the divergence theorem. What does this tell you
about
êê h§ „ x
‡ †“
2
Deduce that h must be identically zero and that f1 = f2 . What happens if a Neumann
boundary condition is applied instead?
Note: in Exercises 19.4 and 19.5, you may work out the answer using pen and paper or
Mathematica (preferably both, to check).
19.4 [Ÿ] Find the solution of Laplace's equation in the upper half-plane that, along the
real axis, takes the values +1 if x > 0 and -1 if x < 0.
19.5 [Ÿ] Find the solution of Laplace's equation in the upper half-plane that, along the
real axis, takes the values +1 if x < -1, 0 if -1 < x < 1 and -1 if x > 1.
19.6 Ÿ Use Mathematica to visualize the solutions to Exercises 19.4 and 19.5.
directly to the semicircular region considered in Section 19.4, and, by taking real and
imaginary parts, show how the real and imaginary parts of f can be computed from each
other.
19.8 Using Cauchy's integral formula applied to a circle, and subtracting Cauchy's
theorem as applied to the image point in Eq. (19.32), derive Poisson's formula as given
by Eq. (19.31).
19.9 [Ÿ] Work out the solution u of Laplace's equation on the interior of the unit disk if
uH1, fL = 1 for 0 < f < p and uH1, fL = -1, for p < f < 2 p. Visualize the answer using
Mathematica.
19.10 [Ÿ] A source of strength k is located in the quadrant x > 0, y > 0 at the point
Ha, bL and Neumann boundary conditions apply along the boundaries x = 0, y = 0. Use
the method of images to find the appropriate complex function for this case, and check
432 Complex Analysis with Mathematica
19.11 [Ÿ] A source of strength k is located in the quadrant x > 0, y > 0 at the point
Ha, bL and Dirichlet boundary conditions apply along the boundaries x = 0, y = 0. Use
the method of images to find the appropriate complex function for this case, (be careful
with the signs of the image sources, i.e. are they sources or sinks), and check your
answer by using the Mathematica functions ContourPlot and PlotGradient-
Field to visualize the results.
19.12 [Ÿ] A Wedge of interior angle 2 p ê n with vertex at the origin has Neumann
boundary conditions imposed along its edges. A source is located inside the wedge at the
point Ha, bL. What distribution of image sources will guarantee that the Neumann
condition is satisfied? Find the resulting potential, and check your answer by using the
Mathematica functions ContourPlot and PlotGradientField to visualize the
results. For what values of n is the corresponding Dirichlet problem easily solved in this
way?
19.13 Ÿ Use Mathematica to investigate the fluid flows given by the complex potential
f HzL = zn for various choices of n. (You may find the cases n = 1 ê 2, 2 ê 3, 1, 2, 3
interesting).
19.14 By defining a vortex using Eq. (19.41), find the flow field corresponding to a
vortex at H0, 1L, subject to a solid half-plane at y = 0.
19.15 Explain why Eq. (19.54) gives the complex potential for the flow outside a circle.
(Hint: Do this in two stages: first explain why the circle is a streamline; second, locate
the singularities of the new flow.)
19.16 Show that by setting z = r ‰Â q , the complex potential given by Eq. (19.56) implies
the potential and stream function given by Eq. (19.57) and Eq. (19.58).
Write a function to draw in the aerofoil outline (for example, using the methods of
Chapter 16), and superimpose this on your plots (as with the examples we have given,
there may not be a contour that conveniently outlines the shape of interest, and it is
helpful to distinguish the exterior and interior clearly).
20 Numerical transform techniques
Introduction
In real-world applications if is often the case that a purely analytical approach to trans-
form calculus is insufficient. This chapter explores two techniques that extend the utility
of transform methods by allowing a purely numerical treatment. We can explore numeri-
cal methods for both Fourier and Laplace transforms – in principle any method could be
applied to either type of transform, since one is a rotation of the other. However, in
practice, two types of problem appear to be of most importance:
An entire book could be written about the first topic, which is at the heart of many
problems in applied mathematics, physics and engineering. It is of particular importance
for signal and image processing. We shall briefly explore Mathematica's Fourier and
InverseFourier functions. It should also be clear than any Fourier transform could
be worked out numerically by the use of NIntegrate. In this chapter this approach
will be explored in detail only for Laplace transforms.
The second topic is particularly important for generating solutions to partial
differential equations. As we have seen in Chapters 18 and 19, certain partial differential
equations may be simplified by transforming with respect to one or more of the indepen-
dent variables, leading to a solvable algebraic or ordinary differential equation. It is
necessary to then invert the solution of the transformed problem, and this is where
difficulties may arise. We shall explore this issue, and, as an example, apply Mathemati-
ca's numerical capabilities to some contemporary problems in financial engineering. We
shall see that Mathematica's easy management of complex contour integration rather
simplifies the matter.
wn = ‰2pÂên (20.1)
Now suppose that we have a list ar , for 1 b r b n. Its discrete Fourier transform is given
as a new list bs , given by (with default settings)
434 Complex Analysis with Mathematica
n
1 Hs-1L Hr-1L
bs = ÅÅÅÅÅÅÅÅ
è!!!ÅÅÅÅÅ ‚ wn ar (20.2)
n r=1
These are perhaps most easily thought of as being distinct operations from their continu-
ous counterparts, though it can be shown that the continuous Fourier transform does
indeed result from the discrete transform when a suitable limiting process is performed.
The implementation in Mathematica is very straightforward.
? Fourier
? InverseFourier
Fourier@81, 1, 1<D
81.73205 + 0. Â, 0. + 0. Â, 0. + 0. Â<
InverseFourier@%D
Note that it is not ncessary that the length of the list be a power of 2. It is particularly
efficient when this is the case.
ü Parameter settings
With the setting FourierParameters Ø {a, b} the discrete Fourier transform
computed by Fourier is
n
1
ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ ‚ ur e2pÂbHr-1LHs-1Lên (20.5)
nH1-aLê2 r=1
20 Numerical transform techniques 435
noisyplot =
ListPlot@noisy, PlotStyle Ø [email protected]
-2
Now let's transform it, and plot the result – it is convenient to rotate the data around to
reveal the peaks:
noisytfm = Fourier@noisyD;
ListPlot@Abs@RotateRight@noisytfm, 500DD,
PlotRange -> All, PlotJoined -> TrueD
15
12.5
10
7.5
5
2.5
200 400 600 800 1000
Let's get rid of what we think is the garbage, and have another look at it. Bearing in
mind the vertical scale of this last plot, we shall cut out all transformed data less than
unity in scale:
436 Complex Analysis with Mathematica
ListPlot@Abs@RotateRight@filtertfm, 500DD,
PlotRange -> All, PlotJoined -> TrueD
15
12.5
10
7.5
5
2.5
200 400 600 800 1000
Now we invert and plot what we hope is the cleaned up transformed data:
cleanplot = ListPlot@
Chop@InverseFourier@filtertfmDD, PlotJoined -> TrueD
-2
Show@cleanplot, noisyplotD
-2
So this has clearly removed the noise. Note also that we have used Chop twice in
slightly different ways. First we used it as the filter to clean up the transform. Then we
used it to remove any small imaginary parts from the inverted data.
20 Numerical transform techniques 437
CentredFourier@x_ListD :=
Module@8len = Floor@Length@xD ê 2D<,
Transpose@RotateRight@
Transpose@RotateRight@Fourier@xD, lenDD, lenDDD;
CentredInverse@x_ListD :=
Module@8len = Floor@Length@xD ê 2D<,
InverseFourier@ Transpose@
RotateLeft@Transpose@RotateLeft@x, lenDD, lenDDDD;
chare@x_, y_D := Which@-30 < x < -20 && -40 < y < 40,
0, -20 § x § 30 && -40 < y < -30,
0, -20 § x § 30 && -5 < y < 5, 0,
-20 § x § 30 && 30 < y < 40, 0, True, 1D
120
100
80
60
40
20
0
0 20 40 60 80 100120
438 Complex Analysis with Mathematica
fourierddata = CentredFourier@edataD;
ListDensityPlot@Abs@fourierddataD,
Mesh -> False, PlotRange -> 80, 0.5<D
120
100
80
60
40
20
0
0 20 40 60 80 100120
We wish to blur the ‘E’ by convolving it with this function. We use the convolution
theorem – the observed blurred ‘E’ is the inverse of the product of the transform of the
sharp ‘E’ with the transform of the blurring function:
observede = Chop@CentredInverse@
CentredFourier@blurD * CentredFourier@edataDDD;
ListDensityPlot@observede, Mesh -> False,
PlotRange -> AllD
120
100
80
60
40
20
0
0 20 40 60 80 100120
20 Numerical transform techniques 439
If we were to define the blurring function differently, we can increase the blurring effect:
120
100
80
60
40
20
0
0 20 40 60 80 100120
What we have shown here is how to implement the so-called ‘Gaussian blur’ with two
different radii. This is one of a host of filters now commonplace in affordable commer-
cial image processing programs, and available for operation on full colour imagery.
Fourier transforms play a role in many of these filters. A delightful exercise on the
relative importance of amplitude and phase in the tansform, in determining the shapes of
letters, was given by Skotton (1994). This article also contains some handy tips for
generating data associated with characters in a more elegant fashion than was considered
here.
Rizzardi (1995), who extends Talbot's method in a very useful way. Talbot's original
approach was to use the inversion formula over a cleverly chosen contour in the com-
plex plane. Rizzardi has made the point that Talbot's method has the drawback that the
contour chosen depends on the value of t of interest, so that recomputation is required
for new values of t. He has extended the method so that the same contour can be used
for an entire range of values of t. (It would be a very interesting exercise to use Mathe-
matica to compare Rizzardi's methods, the work by Cheng et al, and the direct method
introduced below.)
However, we have to confront the issue that any method that relies on a particu-
lar type of contour deformation may become useless if the transform under consideration
has a structure that renders such a deformation impossible. For example, branch cuts
extending to infinity along the imaginary axis can wreak havoc. At the same time, we
wish to exploit the capabilities built in to Mathematica for numerical integration in the
complex plane. So the approach taken here will be incredibly simple. We shall perform
numerical inversion of the Laplace transform by using NIntegrate along the Bro-
mwich contour! So we let the cunning integration routines built in to NIntegrate take
care of the problems.
Needs@"Calculus`LaplaceTransform` "D;
Most users can proceed straight to asking about the key inversion function.
? InverseLaplaceTransform
FullSimplify@
InverseLaplaceTransform @1 ê HHs + 2L ^ 2 + 1L, s, tDD
‰-2 t sinHtL
Now we define the direct numerical inversion formula. In the following expression the
intersection of the Bromwich contour with the real axis is given by the parameter
contour. The truncation of the integration is given by the parameter range.
20 Numerical transform techniques 441
Chop@%D
0.113881
N@fninverse@1D, 6D
0.113881
V V 1 2 V
ÅÅÅÅÅÅÅÅÅÅ + S Hr - qL ÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅ s2 S2 ÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ - r V = 0 (20.6)
t S 2 S
where V is the value of the option, S is the value of the underlying asset (the price of one
share), s is the volatility of the asset, q is a measure of the dividend yield from the asset,
and r is the interest rate. We shall assume that s, r and q are constants. The differential
equation is essntially the time-reversed diffusion equation with some extra terms, and it
442 Complex Analysis with Mathematica
is to be solved (in the case of a call option) with a final condition (being a backwards
diffusion this takes the place of an initial condition) that at time t = T
V = Max@S - K, 0D (20.7)
where FHxL is the cumulative normal distribution function. This is easily implemented in
Mathematica. In this definition t is the time remaining to expiry of the option (T - t
above):
A great many generalizations can be given where the final conditions are modified, or
where additional boundaries are introduced. We shall look at two cases that have been
considered recently from the point of view of Laplace transforms:
(i) A call option that becomes worthless if the underlying price reaches either of two
values (a double-barrier option).
(ii) A call option where the final condition has the asset price replaced by its average
value between t = 0 and t = T (the continuously and arithmetically averaged Asian
option).
The option becomes worthless if the stock price hits either barrier between the initiation
and expiry of the option. Otherwise the payoff at t = T is given by Eq. (20.7). This
problem can be solved by series methods, and a paper by Kunitomo and Ikeda (1992)
20 Numerical transform techniques 443
where CBS is the standard Black–Scholes value, given above, and f is a normalized
measure of the decrease in the value due to the double barrier. The interest rate is r and
the stock price at t = 0 is S. The barrier term f can be written as a function of the time to
expiry T and the scaled variables:
K L U
h = ÅÅÅÅÅÅ ; m = ÅÅÅÅÅ ; M = ÅÅÅÅÅÅÅ (20.11)
S S S
The barrier term is Laplace-transformed to define
¶
yHlL = ‡ ‰-l t fHt, h, m, ML „ t (20.12)
0
Geman and Yor (1996) have found an exact closed-form solution for YHqL. First, we
define (positive) quantities a and b by
m = ‰-a M = ‰b (20.14)
h-m+n+1 ‰-m a
f Ha, h, m, nL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (20.17)
m Hm - nL Hm - n - 1L
A closed-form inversion of this is not at present known, but one can use a variety of
numerical methods to invert it. You might also like to consider the methods of Cheng et
al. (1994) applied to the following.
h-m+n+1 Exp@-m aD
f@a_, h_, m_, n_D := ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
m Hm - nL Hm - n - 1L
We now need to invert this transform, evaluated at s2 T, and subtract its discounted and
normalized value from the Black–Scholes value. Now we define the Laplace inversion
by integration along a vertical line in the complex plane (the Bromwich integral), with
real part given by the parameter contour. The integration works, but Mathematica
may warn us about the oscillatory nature of the integration. If you get irritating mes-
sages, you might like to turn it off, using
Off@NIntegrate::slwconD
However, if you choose parameters that result in the integration yielding strange
answers, you should not turn off such messages, and possibly explore the options to
20 Numerical transform techniques 445
NIntegrate. Now we define the valuation by the use of the Bromwich integral. In the
following function we compute the Black–Scholes value, the correction for a unit stock
price, and the full value:
The range {{contour - 1500 * I}, {contour + 1500 * I}} has been found to be useful for
several practical cases. The truncation at 1500 may need to be modified for other
situations.
ü Examples
The following numerical examples were considered by Geman and Yor (1996). If you
consult their paper you can check that our model agrees with their numerical simulations:
DoubleBarrierCall@2, 2, 1.5,
2.5, 0.2, 0.02, 0, 1, 10, 1500D
0.0410889
DoubleBarrierCall@2, 2, 1.5,
3.0, 0.5, 0.05, 0, 1, 10, 1500D
0.0178568
DoubleBarrierCall@2, 1.75,
1.0, 3.0, 0.5, 0.05, 0, 1, 10, 1500D
0.0761723
This section gives a brief summary of the exact solution for the Asian call given by
Geman and Yor (1993), ‘GY’, also discussed by Eydeland and Geman (1995). Suppose
that the current time is t, and that the option matures at a time T > t. The averaging is
arithmetic, continuous, and began at a time t0 b t. Suppose that the known average value
of the underlying over the time interval @t0 , tD is ES. GY define the following changes of
variables:
1
t = ÅÅÅÅÅ s2 HT - tL (20.22)
4
2 Hr - qL
ÅÅÅÅÅÅÅÅÅ - 1
n = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (20.23)
s2
s2 HK HT - t0 L - Ht - t0 L ESL
a = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (20.24)
4S
They also define a function of a transform variable p as
è!!!!!!!!
!!!!!!!!!
mHpL = n2 + 2 p (20.25)
The remaining function C@n, t, aD is not given explicitly, but GY give its Laplace
transform,
¶
UHp, n, aL = ‡ CHt, n, aL ‰- p t „ t (20.27)
0
as an integral:
1
ÅÅÅÅ
ÅÅÅÅ m-n
ÅÅÅÅ
ÅÅÅÅÅÅ -2
m+n
ÅÅÅÅ
ÅÅÅÅÅÅ +1 -x
Ÿ0 x 2 H1 - 2 a xL 2
2a
‰ „x
UHp, n, aL = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (20.28)
m-n ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
p Hp - 2 n - 2L GH ÅÅÅÅ2ÅÅÅÅÅÅ - 1L
where m is a function of p and n, as given above. Geman and Yor develop a series
description of the transform and show how it can be inverted. We shall now explore how
this can be managed and simplified in Mathematica.
20 Numerical transform techniques 447
Now we enter the definition of the integral that is part of the transform, and request
immediate evaluation:
1
ÅÅÅÅÅÅ
2a
Å
m-n m+n
F@p_, m_, n_, a_D = ‡ x ÅÅÅÅÅÅÅ
2
Å -2
H1 - 2 a xL ÅÅÅÅÅÅÅ
2
Å +1
Exp@-xD „ x
0
G@p, m, n, aD
U@p_, m_, n_, a_D = SimplifyA ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅ E;
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
m-n
p Hp - 2 n - 2L Gamma@ ÅÅÅÅÅÅÅ 2
- 1D
In standard mathematical notation, the transform is just (the output style has been
converted here)
448 Complex Analysis with Mathematica
TraditionalForm@U@p, m, n, aDD
1 1
2 ÅÅ2ÅÅ H-m+n+2L a ÅÅ2ÅÅ H-m+n+2L GH ÅÅÅÅ12 Hm + n + 4LL 1 F1 H ÅÅÅÅ12 Hm - n - 2L; m + 1; - ÅÅÅÅ 2 ÅaÅÅÅ L
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ (20.29)
p Hp - 2 Hn + 1LL GHm + 1L
We now have the ingredients to build the Mathematica model of the arithmetical
average price Asian call. In the following the Laplace transform inversion is again done
by direct numerical integration along the truncated Bromwich contour, whose location is
determined in terms of the parameter n. An explicit truncation parameters is supplied,
and we also exploit some symmetry to do the integration over half the contour:
Off@NIntegrate::slwconD
Here is an example to show it working. The asset price is currently 1.9 currency units,
the strike is at 2.0 units, and so on:
0.193174
This example shows the power of Mathematica very nicely. In lower level program-
ming, in C/C++ in particular, one has to work extremely hard to work out such contour
integrals. In using this result, one should note that the integration has to be taken over a
larger value of the range variable if the volatility s or the time to maturity T - t is
small. When this is done carefully this method can be used as a benchmark calculational
tool for pricing this type of option, and has been used as such. See, for example, Vecer
(2002).
Exercises
20.1 Ÿ The square wave function is given by (evaluate to see the shape)
Sample this function over 1000 points and investigate the effect of applying Chop with
various parameters to the transformed data.
20.2 Ÿ Explore the operation of Chop on the Fourier transform of the letter ‘E’.
20.3 Ÿ Explore the operation of convolutions based on non-Gaussian filters, making use
of color to plot the results. The following is a useful template, using
J1 Hx2 + y2 L
instead of a Gaussian:
20.4 Prove the discrete Fourier inversion theorem. (Hint: Use Eq. (20.24).)
20.5 Work out the first and second partial derivatives with respect to S of the double-bar-
rier transform function Y, and hence compute
V
D = ÅÅÅÅÅÅÅÅÅÅ
S
2 V
G = ÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ
S
for the double barrier call option. (Don't forget to include the derivatives of the ordinary
Black–Scholes piece!)
20.7 Ÿ Look up Rizzardi's (1995) paper and implement the Talbot and modified Talbot
methods in Mathematica – how well do these methods work on the double barrier call
option inversion problem?
20.8 Identify the two poles in the transform of the solution of the Asian call option, and
compute the residues there. Show that the contribution from these two poles alone to the
value of the option is given by
450 Complex Analysis with Mathematica
i ES Ht - t0 L H‰Hr-qL HT-tL - 1L S y
‰-r HT -tL jj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - K zz
k T - t0 Hr - qL HT - t 0 L {
Compare the results of this calculation with the two examples given at the very end of
Section 20.4, for larger values of S.
20.9 Ÿ Work out a formula for the D of the Asian call option, and show that when
S = 2; ES = 0; K = 2;
r = 0.05; q = 0; s = 0.5;
t = 0; t0 = 0; T = 1;
20.10 Where are the branch points of the transform function involved in the Asian call
option? Why does this make inversion awkward when some of the standard approximate
methods are used?
21 Conformal mapping II: the
Schwarz–Christoffel mapping
Introduction
In Chapter 16 we explored some of the geometrical properties of holomorphic functions,
and in particular looked at the behaviour of the Möbius transformation. The key geometri-
cal feature was that the mapping is conformal (where the derivative is non-zero) in the
sense that it is locally angle-preserving. In Chapter 19 we highlighted the importance of
conformal mapping to the solution of Laplace's equation in two dimensions. We pro-
duced several types of solution to Laplace's equation, including several examples where
the region of interest was bounded by a circle or a line in the complex plane.
A question that arise naturally is how to manage matters when the region is not a
half-plane or interior/exterior of a circle. Here we must draw a sharp distinction between
issues of general principle and practicalities of implementation. We shall begin by
stating without proof an important, but non-constructive, theorem that addresses the
general principle. Then we shall introduce the Schwarz–Christoffel (SC) mapping that
gives an explicit construction for polygonal regions.
There are very few examples of the SC mapping that can be worked out in
closed-form in terms of ‘simple’ functions. A novel use of Mathematica is to use its
advanced built-in special-function capabilities, and their linkage to the symbolic integra-
tor, to give evaluations of several expressions usually left as complicated integrals in
more traditional treatments. We can use such evaluations to facilitate the visualization of
the mappings, and hence to confirm the correctness of the answer. As such this chapter
contains an informal introduction to hypergeometric functions and elliptic functions,
which arise naturally from SC mappings associated with triangles and rectangles.
Mathematica's symbolic integrator also allows the results for triangles to be extended to
regular n-gons, again in terms of hypergeometric functions. In more recent versions of
Mathematica the implementation of hypergeometric functions of two variables permits a
still larger category of mappings to be explored. It should be emphasized that this is a
purely analytical treatment, best used as a teaching tool.
For full professional use there is an extensive and highly developed numerical
treatment already available. We shall also comment briefly at the numerical implementa-
tion of the SC mapping. Gratitude is expressed to Professor L. N. Trefethen F.R.S. for
supplying background material on this topic. Readers interested in pursing SC mapping
in more detail, whether analytical or numerical, are encouraged to see Section 2.17 and
to consult the definitive and up-to-date text on the matter: Driscoll and Trefethen (2002).
This chapter is best regarded as an educational bridge between the older and very limited
analytical discussions in textbooks and the full numerical approach developed by
Trefethen, Driscoll and co-workers. Our bridge is constructed using the advanced
analytical tools in Mathematica.
452 Complex Analysis with Mathematica
w5 w
5
z
D U
3
4
w4
w3
1
w1 2
w2
x1 x2 x3 x4 x5
This is a very explicit constructive method for finding mappings that will cope with
regions with polygonal boundaries. We can work with various base regions, such as the
upper half-plane or interior of a circle, and to state the basic results we shall consider a
mapping from the upper half-plane.
Suppose that we have a polygon in the w-plane with vertices at w1 , w2 , …, wn
and interior angles at those vertices f1 , f2 , …, fn . Suppose that these points map onto
points x1 , x2 , …, xn on the real axis of the z-plane. Let D denote the interior of the
polygon and U the interior of the upper half-plane. Then a transformation that maps U
onto D is given by the Schwarz–Christoffel (SC) formula:
w
ÅÅÅÅÅÅÅÅÅÅ = A Hz - x1 LHf1 êpL-1 Hz - x2 LHf2 êpL-1 …Hz - xn LHfn êpL-1 (21.2)
z
ArgHdwL
f1 fn (21.3)
= ArgHd zL + ArgHAL + J ÅÅÅÅÅÅÅÅÅ - 1N ArgHz - x1 L + … + J ÅÅÅÅÅÅÅÅÅ - 1N ArgHz - xn L
p p
As z moves along the real axis in the positive direction, when z lies strictly between two
of the xi , (here i is an integer subscript labelling a point in the sequence) all the terms in
Eq. (21.3) are constant, so that w moves in a straight line. This is why the image in the w
plane is polygonal. Now we need to see what happens at the corners. When z passes
through xi , all the terms except those involving xi remain constant, but the factor
ArgHz - xi L (21.4)
jumps from a value of p, when z < xi , to a value of 0, when x > xi . The term
fi
J ÅÅÅÅÅÅÅÅ - 1N ArgHz - xi L (21.5)
p
therefore jumps from the value fi - p to the value 0. The direction in which w is travel-
ling therefore rotates in a positive sense (i.e. anti-clockwise), by p - fi . A change in
direction by this amount corresponds to the introduction of a corner in the polygon with
interior angle fi .
What this discussion establishes is that the real axis maps to the boundary of a
polygonal region. This will be sufficient for our purposes. One can go further and
establish that the mapping is one-to-one and indeed takes the upper half-plane to the
interior of a polygon. We can always check this latter point by working out sample
values of particular mappings, such as the image of Â.
Now we take the limit xn Ø ¶, keeping A' finite and the last factor drops out, leaving us
with
w
ÅÅÅÅÅÅÅÅÅÅ = A£ Hz - x1 LHf1 êpL-1 Hz - x2 LHf2 êpL-1 …Hz - xn-1 LHfn-1 êpL-1 (21.8)
z
Hp - f1 L + Hp - f2 L + … + Hp - fn L = 2 p (21.9)
Now the constants B and C can be fixed by looking at the locations of the corners.
Considering the first vertex, this gives us
Cp
-a = B + C sin-1 H-1L = B - ÅÅÅÅÅÅÅÅÅÅÅÅ (21.15)
2
The other vertex gives us
Cp
a = B + C sin-1 H1L = B + ÅÅÅÅÅÅÅÅÅÅÅÅ (21.16)
2
from which it follows that B = 0, and K = 2 a ê p, i.e.
2 a sin-1 HzL pw
w = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ; z = sinJ ÅÅÅÅÅÅÅÅÅÅÅÅ N (21.17)
p 2a
This is one of the very few simple analytical outcomes of the SC formula. We can have
a more detailed look at what this mapping does using the visualization tools we have
already introduced.
Needs@"Graphics`ComplexMap`"D;
456 Complex Analysis with Mathematica
CartesianConformal@func_,
xrange_, yrange_, options___D :=
Show@GraphicsArray@8
CartesianMap@# &, xrange, yrange,
options, DisplayFunction -> IdentityD,
CartesianMap@func, xrange, yrange,
options, DisplayFunction -> IdentityD
<D, DisplayFunction -> $DisplayFunctionD;
Let's look at this first example with a = 1. Recall that CartesianConformal shows
the images of the real and imaginary coordinate lines under the mapping.
15
12.5 2
10 1.5
7.5
1
5
2.5 0.5
‡ The step
There are other examples similar in style to this one, where there are just two vertices to
be considered. An important case, left for you to investigate in detail in Exercise 21.1, is
where the polygon has two right-angled turns of opposite sense – this leads to a mapping
from the upper half-plane to one with a step-shaped boundary.
Show@Graphics @88GrayLevel @0.6D, Polygon @880, 0<, 81, 0<, 80.3, 1<<D<,
8PointSize @0.03D, Point @80, 0<D<,
8PointSize @0.03D, Point@81, 0<D<,
8PointSize @0.03D, Point @80.3, 1<D<,
Line@88-1 ê 2, 0<, 81.5, 0<<D, Line @880, -1 ê 2<, 80, 1.5<<D,
Text@"A", 80.1, -0.1<D,
Text@"B", 81.1, -0.1<D, Text@"C", 80.3, 1.2<D,
Text@"a", 80.1, 0.1<D, Text@"b", 80.85, 0.1<D<DD;
a b
A B
We wish to build a mapping wHzL such that this triangle is the image of the upper
half-plane, with A the image of the origin z = 0, and B is the image of z = 1. Here we
shall make use of the fact that C can be set to be the image of infinity, so that the SC
formula still only involves two terms:
w
ÅÅÅÅÅÅÅÅÅÅ = A£ zHaêpL-1 Hz - 1LH bêpL-1 = C zHaêpL-1 H1 - zLH bêpL-1 (21.18)
z
So the mapping is given by integrating this result:
z
w = C ‡ z HaêpL-1 H1 - zLH bêpL-1 „ z + B (21.19)
0
Now we can get Mathematica to do some work (which can be done by pen and paper if
you know about Gamma and Beta functions):
458 Complex Analysis with Mathematica
Integrate@z ^ Ha ê Pi - 1L H1 - zL ^ Hb ê Pi - 1L,
8z, 0, 1<, Assumptions Ø 8a > 0, b > 0<D
GH ÅÅÅÅapÅ L GH ÅÅÅÅpbÅ L
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
a+ b
GH ÅÅÅÅÅÅÅÅ
p
ÅÅ L
Integrate@z ^ Ha ê Pi - 1L H1 - zL ^ Hb ê Pi - 1L,
8z, 0, z<, Assumptions Ø 8a > 0, b > 0<D
a b
IfAImHzL 0 fi ReHzL § 1, Bz J ÅÅÅÅÅ , ÅÅÅÅÅÅ N,
p p
b a
IntegrateAH1 - zL ÅÅpÅÅ -1 z ÅÅpÅÅÅ -1 , 8z, 0, z<, Assumptions Ø z > 1EE
Clearly for a range values of z, the answer is given by the middle term of this expression
multiplied by C. We augment the Assumptions accordingly:
a+b
GH ÅÅÅÅÅÅÅ
p
L
w = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ *
a b
GH ÅÅÅp
Å L GH ÅÅÅ p
ÅL
Integrate@z ^ Ha ê Pi - 1L H1 - zL ^ Hb ê Pi - 1L, 8z, 0, z<,
Assumptions Ø 8Im@zD 0 »» Re@zD § 1, a > 0, b > 0<D
To explain this output, we present the full form of the input that generates it:
TraditionalForm@Beta@z, a, bDD
Bz Ha, bL
21 Conformal mapping II: the Schwarz–Christoffel mapping 459
? Beta
Mathematica has now given us a result in terms of the incomplete beta function. The
theory of analytic continuation then can be used to argue that this holds everywhere. A
proper discussion of this is rather beyond the scope of this text, but, basically, if two
holomorphic functions agree on a suitable region, they are equal everywhere, so we can
use the formula in terms of a beta function, which is holomorphic, for other values of z
besides those suggested by the output from the integrator. In any case, we can check this
formula by using our visualization tool. We consider an equilateral triangle, with
p
a = b = ÅÅÅÅÅÅ (21.23)
3
The formula for w is then:
g@z_D = Simplify@%D;
Now let us take a look at the result (this needs a fast machine to compute reasonably
quickly):
8 0.6
0.5
6
0.4
4 0.3
0.2
2
0.1
-7.5 -5 -2.5 2.5 5 7.5 0.2 0.4 0.6 0.8 1
Slight numerical plotting effects at end-points aside, this confirms the validity of the
closed-form answer.
Another interesting exercise is to consider the region in the upper half plane
above a related triangle and the real axis – this is left for you to explore in Exercise 21.2.
460 Complex Analysis with Mathematica
? Hypergeometric2F1
Hypergeometric2F1@a, b, c, zD
is the hypergeometric function 2F1Ha, b; c; zL.
More useful is the series expansion, which extrapolates the pattern shown here for the
first few terms:
abz a Ha + 1L b Hb + 1L z2 a Ha + 1L Ha + 2L b Hb + 1L Hb + 2L z3
1 + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + OHz4 L
c 2 c Hc + 1L 6 c Hc + 1L Hc + 2L
The beta function arises from the following special case where c = a + 1:
FullSimplify@
Hz ^ a ê aL Hypergeometric2F1@a, 1 - b, a + 1, zDD
Bz Ha, bL
The reader may well ask how the author knew how to dream up this particular form of
the hypergeometric function! Traditionally this sort of identity would have been found in
one of the classic books of results about special functions. A more modern approach is
to consult an on-line database, such as http://functions.wolfram.com . This is a
Mathematica based collection of results, approaching 100,000 formulae at the time this
book was edited. It is quote common for SC integrals to evaluate to a hypergeometric
function – we shall see some more in later sections. With any of these results it may be
useful to check the integral by differentiating it. Here, for example, we obtain
D@Beta@z, a, bD, zD
H1 - zLb-1 za-1
w
ÅÅÅÅÅÅÅÅÅÅ = A Hz + aL-1ê2 Hz + 1L-1ê2 Hz - 1L-1ê2 Hz - aL-1ê2
z
(21.24)
A
= - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!!!!!!2! è!!!!!!!! ÅÅÅÅÅÅÅÅ
!!!!!!!
1 - z a2 - z2
It is a little more convient to write this in terms of a = 1 ê a and a new overall constant
A£ as
w A£
ÅÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!!!!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
! è!!!!!!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅ
!!!!!!!!!! (21.25)
z 1 - z2 1 - a2 z2
The integral of this is only moderately exotic, in that it defines one of the well known
family of elliptic functions. We now set A£ = 1 and evaluate the integral with some
suitable Assumptions:
FHsin-1 HzL » a2 L
To figure out what that output really means, we ask for it in InputForm:
InputForm@%D
EllipticF[ArcSin[z], a^2]
So we define:
D@SCRect@z, aD, zD
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
è!!!!!!!!!!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
! è!!!!!!!! ÅÅÅÅÅÅÅÅÅÅÅÅÅ
!!!!!!!!!!
1-z 2 1 - a 2 z2
? EllipticF
CartesianConformal@HSCRect@#, 1 ê 2D &L,
8-16, 16<, 810 ^ H-8L, 16<, Lines -> 40,
PlotPoints -> 200, PlotRange -> AllD
15 2
12.5
10 1.5
7.5 1
5
2.5 0.5
b @a_D = SCRect@1, aD
KHa2 L
InputForm@%D
EllipticK[a^2]
b@1 ê 2D êê N
1.68575
To extract the right value of c we need to be slightly careful with the branching proper-
ties (also see Wolfram (1993)) of the EllipticF function – to this end we define:
c@1 ê 2, 0D êê N
If we nudge the point slightly into the upper half-plane, which is, after all, where we are
working, we get:
21 Conformal mapping II: the Schwarz–Christoffel mapping 463
c@1 ê 2, 10 ^ H-12LD êê N
Im@%D
2.15651
normfactor = Integrate@
z ^ Ha ê Pi - 1L H1 - zL ^ Hb ê Pi - 1L Hg - zL ^ Hg ê Pi - 1L,
8z, 0, 1<, Assumptions Ø 8g > 1, a > 0, b > 0<D
g
g ÅÅpÅÅ -1 GH ÅÅÅÅapÅ L GH ÅÅÅÅpbÅ L 2 F1 I ÅÅÅÅapÅ , 1 - ÅÅÅÅ g a+ b
p ; ÅÅÅÅÅÅÅÅp ÅÅ ; ÅÅÅÅ gM
1
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
a+ b
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅ
GH ÅÅÅÅÅÅÅÅ
p
ÅÅ L
We will restrict attention to the situation where unity maps to unity, as in the case of the
triangle, so we assert that C is given by the reciprocal of the central term, i.e.
norm = 1 ê normfactor
g
a+ b
g1- ÅÅÅÅpÅ GH ÅÅÅÅÅÅÅÅ p ÅÅ L
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅ
GH ÅÅÅÅpÅ L GH ÅÅÅÅpÅ L 2 F1 I ÅÅÅÅpÅ , 1 - ÅÅÅÅgp ; ÅÅÅÅÅÅÅÅ
a b a a+ b
p
ÅÅ ; ÅÅÅÅ1g M
What about the remaining integral? This is best described by introducing another
hypergeometric function. Consider the following Mathematica function:
464 Complex Analysis with Mathematica
? AppellF1
We will set:
new =
Hg ^ c * z ^ H1 + aL * AppellF1@1 + a, -b, -c, 2 + a, z, z ê gDL ê
H1 + aL
FullSimplify@D@new, zDD
z c
gc H1 - zLb za J1 - ÅÅÅÅÅ N
g
We can now work with more general quadrilaterals. The following takes some consider-
able time to compute, but nicely illustrates the construction of a trapezoidal region:
CartesianConformal@
HAppellMap@#, Pi ê 2, Pi ê 2, 5 * Pi ê 8, 2D &L,
8-6, 6<, 80.05, 8<, Lines -> 10,
PlotPoints -> 30, PlotRange -> AllD
21 Conformal mapping II: the Schwarz–Christoffel mapping 465
8 1
6 0.8
0.6
4
0.4
2
0.2
-6 -4 -2 2 4 6 0.20.40.60.8
In principle, the Appell function could be made the basis of a semi-analytical treatment
of general quadrilaterals. Note that the value of g has been specified in the example
given. In general, one would need to find g given a specification of the target shape. This
is an example of the ‘pre-vertex’ problem.
Integrate@
z ^ Ha ê Pi - 1L H1 - z ^ 2L ^ Hb ê Pi - 1L Hg - z ^ 2L ^ Hg ê Pi - 1L,
8z, 0, 1<, Assumptions Ø 8g > 1, a > 0, b > 0<D
1 g a b è a g a+2 b 1
ÅÅÅÅÅ g ÅÅpÅÅ -1 GJ ÅÅÅÅÅÅÅÅÅÅ N GJ ÅÅÅÅÅ N 2 F 1 J ÅÅÅÅÅÅÅÅÅÅ , 1 - ÅÅÅÅÅ ; ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ; ÅÅÅÅÅ N
2 2p p 2p p 2p g
ü Project
Explore the use of the Appell and 2 F1 hypergeometric function for these mappings.
Show how to produce a mapping of the upper half-plane into a (symmetric) L-shaped
region, by taking a = b = g = p ê 2 and g = 2.
We can actually construct a very simple mapping from the interior of the unit circle to a
polygon by composing this Möbius mapping with the SC formula. Suppose that the
points xi map into points pi on the unit circle. Then, for each i, we have
 Hp + 1L  Hpi + 1L 2  Hp - pi L
z - xi = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅ (21.31)
1- p 1 - pi H1 - pL H1 - pi L
We now subsitute all of this into the SC formula (21.1) and make use of the exponent
formula (21.10), which simplifies the result to
è
w = A ‡ Hp - p1 LHf1 êpL-1 Hp - p2 LHf12 êpL-1 …Hp - pn LHfn êpL-1 „ p + B (21.33)
where A is a new arbitrary constant. This result is of course structurally identical to the
half-plane result, but now the pn are points on the unit circle.
‡ Regular polygons
It is evident from Eq. (21.29) that matters simplify if all the exponents are identical.
Furthermore, if we exploit symmetry to consider points pi that are evenly spaced around
the unit circle, we can go further still. We take the points wk to be the n nth roots of
unity, in the form
pk = wkn (21.34)
wn = ‰2pÂên (21.35)
The product
pn - 1 (21.37)
With our target a regular n-gon, the interior angles are all equal and given by:
2
fk = p J1 - ÅÅÅÅÅ N (21.38)
n
and it follows that the exponents are all equal to -2 ê n. Therefore the desired mapping
takes the form
è 1
ÅÅÅÅÅÅÅÅ „ p + B
w = A ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅnê2 (21.39)
Hp - 1L
n
In fact, slightly cleaner results will be obtained from the integration, which will run from
p = 0 to p = z, by redefining A so that this is written as a linear transformation of
z
1
ÅÅÅÅÅÅÅÅ „ p
w = ‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅnê2 (21.40)
0 H1 - p L
n
To check what this function is doing we plot the result. To visualize this mapping from
the circle we now recall, from Chapter 16, the polar version of our mapping viewer:
PolarConformal@
H# * Hypergeometric2F1@1 ê 6, 1 ê 3, 7 ê 6, # ^ 6D &L,
80, 1<, 80, 2 Pi<, Lines -> 20,
PlotPoints -> 40, PlotRange -> AllD
468 Complex Analysis with Mathematica
1 1
0.5 0.5
-0.5 -0.5
-1 -1
1 1.5
1
0.5
0.5
-1 -1.5
1 1
0.5 0.5
-0.5 -0.5
-1 -1
Of course, any of these mappings can be composed with the half-plane to circle Mobius
mapping to show the effect of the mapping when applied to the coordinate lines within
the upper half-plane. This gives less coverage of the target region for any given finite
rectangular subset of the upper half-plane. For example, for the pentagon and square, we
have:
5 1
4
0.5
3
2 -0.75
-0.5
-0.25
0.25
0.5
0.75
1 -0.5
-4 -2 2 4 -1
5
1
4
0.5
3
2 -1-0.5 0.5
1 -0.5
-1
-4 -2 2 4
Note that these rather exotic mappings are the composition of a Mobius transform with a
carefully chosen hypergeometric mapping! See Driscoll and Trefethen (2002, Section
4.4) for an approach to regions exterior to a polgon, also with hypergeometric functions.
470 Complex Analysis with Mathematica
The first part of this is called the pre-vertex problem. I have resisted the temptation to
implement some of this in Mathematica, as there are very efficient and mature implemen-
tations already available in FORTRAN and MATLAB. Indeed, Mathematica's strength
in this area is probably in the routine management of the simpler examples we have cited
using advanced analytics.
Much of the recent work in this area has been done by L.N. Trefethen and
co-workers. A FORTRAN implementation, SCPACK, suitable for a class of problems
was given by Trefethen (1980), and its successor, the Schwarz–Christoffel Toolbox
(Driscoll, 1996), is now available for use within the MATLAB system, and contains
many enhancements. This is available for download over the World-Wide Web at:
http://www.math.udel.edu/~driscoll/SC/ . Some key references are as follows.
An extensive survey of developments up to about 1985 is given by Trefethen (1986).
Some particular approaches for treating elongated structures are given by Howell and
Trefethen (1990). A more recent but compact survey is given by Trefethen and Driscoll
(1998). The text ‘Schwarz-Christoffel Mapping’ (Driscoll and Trefethen, 2002) is
probably the best entry point.
The numerical approach involves many interesting features. The solution of the
pre-vertex problem involves some cunning transformations to eliminate the constraints
associated with ordering of the xi . The integration also requires an approach that takes
care of the singularities of the integrand at the pre-images of the vertices. This requires
an enhancement of the Gauss–Jacobi method. Often the xi crowd together in an awk-
ward fashion, and this must also be managed. Those interested should see the references
for information on the management of these matters. A supply of other analytical
problems set in the interesting context of fluid dynamics is given by Milne-Thomson
(1938).
Exercises
21.1 Ÿ Consider the polygon in the w plane consisting of the negative real axis, the line
from 0 to  a, and the horizontal line from  a to  a + ¶. Use the SC formula to show
that this can be obtained from the upper half-plane in the z plane by the mapping
21 Conformal mapping II: the Schwarz–Christoffel mapping 471
Show@Graphics@
[email protected], Polygon@88-2, 0<, 8-1, 0<, 80, 1<, 81, 0<, 82, 0<, 82, 2<, 8-2, 2<<D<,
8PointSize @0.03D, Point@8-1, 0<D<, [email protected], Point@81, 0<D<,
8PointSize @0.03D, [email protected], 1.0<D<,
Line@88-2, 0<, 82, 0<<D, Line@880, -1 ê 20<, 80, 2<<D,
Text@"A:w=-b", 8-1, -0.2<D,
Text@"B:w=+b", 81.1, -0.2<D, Text@"C:w=Âa", 80.4, 1<D,
Text@"a", 8-0.8, 0.1<D, Text@"a", 80.8, 0.1<D<DD;
C:w=Â a
a a
A:w=-b B:w=+b
Construct an SC mapping with the properties that:
and express your answer in terms of an integral. What constraint relates a, b and a?
Using the Mathematica integrator, determine the arbitrary constants A and B. By consid-
ering the Mathematica evaluation of the expression
find a closed form for the mapping. Now consider the form of your answer with
p p
a = ÅÅÅÅÅÅ ; b = ÅÅÅÅÅÅ ; a = b = 1
4 4
472 Complex Analysis with Mathematica
By making a construction similar to that given for the interior of the triangle, build the
analogue of the function g[z] in the text, and visualize the results. You should be able
to obtain a plot identical to the following, with the given parameters:
CartesianConformal@Hg@#D &L,
8-1.5, 1.5<, 80.00001, 1.5<, Lines -> 30,
PlotPoints -> 40, PlotRange -> AllD
1.4 2.5
1.2
1 2
0.8 1.5
0.6 1
0.4
0.2 0.5
-1.5 -1 -0.5 0.5 1 1.5 -2 -1 1 2
21.3 Using the SC formula for a square, establish a relationship between a special case
of the hypergeometric function and a special case of an elliptic function.
21.4 Ÿ What is the length of the size of the regular hexagon generated by the mapping
PolyMap@z_, n_D =
Integrate@1 ê H1 - z ^ nL ^ H2 ê nL, 8z, 0, z<D
21.5 Ÿ The images of very small circles in the unit disk look at lot like circles in the
image n-gon, in the examples given in Section 21.6. Explain this by considering the
power series for PolyMap. You might like to consider the form of
21.6 Ÿ (Reverse engineering) For each of the following mappings, use the Cartesian-
Conformal function to establish the image region, and then explain how to derive the
mapping from the SC formula:
1
ÅÅÅÅÅÅ cosh-1 HzL ; logHzL ; z1ê3
p
22 Tiling the Euclidean and hyperbolic
planes
Introduction
In our studies so far we have been concerned with the complex plane interpreted as a
two-dimensional Euclidean plane – when the concept of distance has been needed, it has
always been the standard Euclidean notion expressed by Pythagoras' theorem. There are
concepts of distance other than the standard Euclidean one. Indeed, this notion is at the
heart of modern geometrical physics, and finds expression in both the non-positive-defi-
nite notions of distance of special relativity, and the non-flat metrics of general relativity.
In this chapter we shall meet the hyperbolic plane, which is perhaps the simplest
non-Euclidean geometry. We shall not be able, in one chapter, to do full justice to this
concept – indeed, excellent entire books have already been written about it (Coxeter,
1965; Stahl, 1993). What we shall do is explore a little of the geometry through the
process of tiling the hyperbolic plane (see the Bibliography for papers by Coxeter and
Levy on this particular matter also).
This chapter is based substantially (the sections on triangles and the ‘ghosts and
birdies’ tiling) on a project carried out by a former colleague, V. Thomas, for the BBC
Open University Production Centre. Gratitude is expressed to A.M. Gallen and, latterly,
the Open University for permission to use this material, to Professor R. Penrose F.R.S.
(‘R. Penrose’ for short) for several helpful suggestions, and to V. Thomas for permission
to use her work in this text. Later sections (22.6–7) on the projective representations and
tilings by squares were inspired by some suggestions by R. Penrose in connection with
illustrations for his beautiful book (Penrose, 2004). Gratitude is again expressed to R.
Penrose for his guidance on the development of some of the algorithms described here.
This chapter develops techniques for a process that, when given any suitable
triangle, will tile the Euclidean plane using that shape. This then leads to a procedure for
adapting such triangular shapes to produce Escher-like tilings of the Euclidean plane.
These methods are then extended to hyperbolic tilings, represented on the Euclidean
plane by the Poincaré disc, more properly known as Beltrami's conformal representation.
This is illustrated with specific triangles and an Escher-like pattern. Then a look is taken
at Beltrami's projective representation, and tilings by hyperbolic squares in both the
conformal and projective representations. An extension of the technique provides a
hyperbolic tiling using heptagons. This chapter also illustrates yet another role for the
Möbius transformation!
22.1 Background
The familiar geometry of the plane, Euclidean geometry, is only one of many different
geometries that describe the various intrinsic structures of different surfaces. Most of
474 Complex Analysis with Mathematica
these geometries do not have as much symmetry as Euclidean geometry, but there are
two geometries that do: the geometry of the surface of a sphere, and another geometry
called hyperbolic geometry. Hyperbolic geometry shares many of the properties of
Euclidean geometry but differs in certain significant respects. Most importantly, the
ordinary Euclidean notion of parallel lines does not hold. (In Euclidean geometry there
is a unique line through a given point parallel to a given line.) Also the angles in a
hyperbolic triangle do not add up to 180 degrees but always to something less than 180,
the difference being a measure of the area of the triangle. This is a geometry that cannot
be directly represented by any diagram we could draw on paper. However, we can
perform a transformation and obtain a picture of how the geometry would look if we
were to embed it into a Euclidean world in which the whole of the infinite hyperbolic
plane is mapped onto an open unit disc in the Euclidean plane. This particular transforma-
tion can be achieved so that the angular measurements made on this ‘Euclidean’ picture
of the hyperbolic plane (called the Poincaré disc) will be the same as the angles mea-
sured in the actual hyperbolic plane. The Dutch artist M. C. Escher made several wood-
cuts illustrating this representation of hyperbolic geometry.
For a Euclidean space we intuitively know what it would be like to move around
in a space defined by that geometry, and can define transformations that describe these
movements. If we think of the Euclidean plane as the complex plane then these transfor-
mations can be described in terms of functions applied to the complex number z as
z Ø az+b
(22.1)
†a§ = 1
z Ø a zê + b
(22.2)
†a§ = 1
where
êê êê
a êê êê
a=dd > b b=gg
êê êê (22.4)
ag = b d
22 Tiling the Euclidean and hyperbolic planes 475
These are the self-transformations of the disc that preserve orientation. There are also
orientation-reversing transformations. These are the same as above but composed with
z Ø zê , so we can write them as
a zê + b
z Ø ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ
g zê + d
(22.5)
Haêê b - êê b aL + Ha - bL êê c
c£ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
êê ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
êê ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (22.6)
a-b
We can use this to produce a general function that will reflect the point r, in the line
joining points p1 and p2. In the following function r, p1, p2 are all lists of length two
representing coordinates in the plane:
x£
a
x
b
Now we can extend this to produce the reflection of a triangle in one of its sides, as
illustrated. For this it will be useful to have a standard function defined that will join the
three points of a triangle and also show the vertices as points. Now we introduce the
general reference triangle, which carries the information about the vertices and the
colour of the triangle:
triangleANDpoints@
triangle@color_: GrayLevel@0D, 8r_, p1_, p2_<DD :=
88Line@8p2, r, p1, p2<D<,
[email protected], Point@rD,
Point@p1D,
Point@p2D<<
To illustrate the reflection of a triangle abc in one of its sides bc we can write the
function reflectedtriangle and apply that to some set of three vertices, the labels
only being added for clarity:
22 Tiling the Euclidean and hyperbolic planes 477
a' c
b
However, instead of only reflecting one of the points of the triangle in one of the sides,
to tile the plane quickly with these triangular tiles it will be useful to be able to reflect all
three points of the triangle in their opposite sides. Here we will want to apply the
function reflection to the cyclic permutation of the points of the triangle:
cyclicPermutations@x_ListD :=
NestList@RotateLeft, x, Length@xD - 1D
The function reflectTriangles will return the set of three triangles that are the
reflections of the original triangle in each of its sides and the colour of these triangles
will have been changed:
478 Complex Analysis with Mathematica
reflectTriangles@
triangle@color_: GrayLevel@0D, 8a_, b_, c_<DD :=
Map@triangle@
If@Head@colorD == Hue,
ReplacePart@#,
Switch@
#@@1DD, 0.15, 0.72, 0.72, 0.15D,
1D, #, #D &@colorD, #D &,
MapThread@H8a, b, c< ê. #2 -> reflection@#1DL &,
8cyclicPermutations@8a, b, c<D,
8a, b, c<<D
D
Now we can obtain the first step towards tiling the Euclidean plane by applying this
reflecting function to our base triangle once:
Show@Graphics@
Map@triangleANDpoints,
reflectTriangles@
triangle@886, 1<, 80, 0<, 85, 6<<DDD,
AspectRatio -> AutomaticDD
The next stage in this process will be to reflect each of the three new triangles in each of
their three sides. As we come to deal with larger and larger lists of triangles we will
want reflectTriangles to perform this same procedure on each triangle that
makes up that list. We therefore need it to have the attribute of being Listable:
SetAttributes@reflectTriangles, ListableD
In order for this process to produce a larger and larger grouping of triangles it will be
useful to be able to apply the reflectTriangles function over and over again to
the results obtained at each stage. For this we can use the NestList function, which
will give the set containing the triangles produced after applying the reflecting function a
certain number of times.
22 Tiling the Euclidean and hyperbolic planes 479
triangleTilingTry@triangle_, n_D :=
Show@Graphics@
Map@triangleANDpoints,
Flatten@NestList@
reflectTriangles,
triangle,
nDDDD, AspectRatio -> AutomaticD
Let's see this process carried out for an example where we reflect from a base triangle
twice:
At this stage of the process one of the main problems of the whole procedure begins to
come to light. It will get more complicated the more iterations are performed. Each set
of reflections of a single triangle will produce the triangles surrounding the original
triangle. This means, first, at any given level there is likely to be some overlapping of
triangles and, second, that triangles already produced at an earlier level in the process
are all going to be re-obtained (this is obvious as in our original reflection of the point c
in ab, reflecting c£ in ab will get us back to c). There is a great deal of duplication of
triangles taking place.
Rather than being a problem, the fact that triangles produced at an earlier stage
are re-obtained when the next reflection is performed means that it is not necessary to
carry around information relating to all the triangles of the pattern but only the last two
set of triangles obtained by the iterative process. It is therefore only necessary to use the
Nest function and add in a holder that will keep the last set of triangles acted upon
stored. This can then be joined onto the current set produced for production of the
graphic. This is done using the following code (this is not for actual evaluation – it is to
illustrate the structure):
480 Complex Analysis with Mathematica
Join@Nest@
Htemp = #; refelction procedure @#DL &,
starting triangle ,
number of iterations D,
tempD
The removal of duplicates within any single level of reflections can, at least at this stage,
be done by just asking for duplicates to be removed using the Union function. Later we
will need to take more care over this process. So, the reflections can be performed and
duplicates removed using the following procedure:
Flatten@Union@reflectTriangles@#DDD &
triangleTiling@triangle_, n_D :=
Module@8temp<,
Show@Graphics@
Map@triangleANDpoints,
Join@Nest@Htemp = #;
Flatten@Union@reflectTriangles@#DDDL &,
triangle, nD, tempDD,
AspectRatio -> AutomaticDDD;
22 Tiling the Euclidean and hyperbolic planes 481
triangleTiling@
triangle@88-1, 0<, 81, 0<, 80, N@Sqrt@3DD<<D, 6D
Clear@wD;
Show@Graphics@Line@
pointsBC = 81, 0.7 - 0.1 * I, 0.34 - 0.24 * I, -0.4 * I,
0, 0.4 * I, -0.34 + 0.24 * I, -0.7 + 0.1 * I, -1< ê.
w_ ? NumberQ -> 8Re@wD, Im@wD<DD,
AspectRatio -> AutomaticD
and
Show@Graphics@Line@pointsAB =
8-1, -0.8 - 0.08 * I, -0.6 - 0.15 * I,
-0.4 - 0.19 * I, -0.3 - 0.21 * I,
-0.3 - 0.03 * I, -0.29 + 0.14 * I,
-0.26 + 0.28 * I, -0.18 + 0.4 * I,
-0.09 + 0.3 * I, 0.04 + 0.14 * I, 0.14,
0.24 - 0.19 * I, 0.5 - 0.13 * I,
0.66 - 0.1 * I, 0.82 - 0.07 * I,
1< ê. w_ ? NumberQ -> 8Re@wD, Im@wD<DD,
AspectRatio -> AutomaticD
When these two line shapes are used for particular sides of a triangle, they form
a shape that at least somewhat resembles a bird. However, to get these lines to join any
three points that form a triangle, we need to be able to transform the lines that join the
points -1 and 1 to lines that will join any two points, say a and b. The transformation
a+b 1
z Ø ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅ Ha - bL z (22.7)
2 2
indeed takes the line @-1, 1D into @a, bD, where a and b are the complex numbers repre-
senting the points a and b. So now we can define a function that will join any pair of
general points by a line taking the form of one of our curves, employing the transforma-
tion defined in Eq. (22.7):
22 Tiling the Euclidean and hyperbolic planes 483
We can define a similar function for the other set of points but this time we must take
care over the two forms it will appear in. Though we reflect to change black triangles to
white triangles and vice-versa, we don’t actually reflect the curves. Theses are simply
transported by (non-reflective) Euclidean motions (or, later, by hyperbolic motions) to
the places that they need to be in order to join the required points.
So the second line we are going to use is equivalent to drawing the curve from b
to a, which is why we reverse the order of pointsAB, but we must then remember to
adjust the transformation function to be one that takes the interval @1, -1D into @a, bD.
This is all done by using the marker type to take the value 1 or -1:
A function that will take any three points and join them to form a bird will therefore take
the form:
Show@Graphics@birdyTriangleLine@
triangle@RGBColor@1, 0, 0D,
88-1, 0<, 81, 0<, 80, N@Sqrt@3DD<<D
DD, AspectRatio -> AutomaticD
484 Complex Analysis with Mathematica
These line birds can be changed to coloured birds by swapping Polygon for Line in
the definition of birdyTriangle:
So now we are ready to combine these two processes. First, create the series of points
that give the vertices of the shapes that tile the plane and then join them using the bird
pattern:
birdTiling@shape_, n_D :=
Module@8temp<, Show@Graphics@
Map@birdyTriangle, Join@
Nest@Htemp = #;
Flatten@Union@reflectTriangles@#DDDL &,
8shape<, nD, tempDD
D, AspectRatio -> AutomaticDD
birdTiling@triangle@[email protected],
88-1, 0<, 81, 0<, 80, N@Sqrt@3DD<<D, 6D
22 Tiling the Euclidean and hyperbolic planes 485
Similarly, we need to define the form of the hyperbolic line that joins any two points to
be able to construct the geometric shapes that will make up the tiling of the hyperbolic
plane. The hyperbolic lines in the Poincaré disc are represented by Euclidean circles that
meet the bounding unit circle at right angles, and where, as a limiting case, the diameters
of that unit circle also represent hyperbolic straight lines. A way of obtaining the curves
representing the hyperbolic straight line joining two points, let us say a and b, is to think
of the Euclidean straight line running from -1 to 1 (in the complex plane) and define a
transformation that will take that line to the hyperbolic line joining a and b. Such a
transformation takes the form
486 Complex Analysis with Mathematica
z Ha - la b bL - Ha + la b bL
z Ø ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅ (22.9)
z H1 - la b L - H1 + la b L
where
êê
H1 - a b L 1 - a êê a
la b ÅÅÅÅÅÅ $%%%%%%%%
= ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅêê %%%%%%%%%
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅ
êêÅÅ (22.10)
†1 - a b § 1-bb
This technique can be used to define the function hyperbolicLine, which will join
any two points, a and b, by transforming the set of points on the straight line running
from -1 to 1, under the transformation as defined above:
hyperbolicLine@8a_List, b_List<D :=
Module@8aC, bC, points, lamdaAB, pointsAB<,
8aC, bC< = Map@HFirst@#D + I Last@#DL &, 8a, b<D;
points = Range@-1, 1, 0.1D;
lamdaAB =
HH1 - aC Conjugate@bCDL ê Abs@1 - aC Conjugate@bCDDL *
Sqrt@H1 - aC Conjugate@aCDL ê H1 - bC Conjugate@bCDLD;
pointsAB = Map@
HH# HaC - lamdaAB bCL - HaC + lamdaAB bCLL ê
H# H1 - lamdaABL - H1 + lamdaABLLL &,
pointsD ê. x_ ? NumberQ -> 8Re@xD, Im@xD<D
To allow us to follow the same technique as used for the Euclidean tiling we need to
define a function to produce a graphic form of, let us say, a hyperbolic triangle, using the
function that will join any two points with a hyperbolic line. As the function hyperbol-
icLine returns a list of points making up the line, we can join the different lists that
define the three lines of the triangle to obtain a sequence of points that define the
perimeter and create a Polygon of that shape:
hyperbolicTriangle@
triangle@color_: GrayLevel@0D, 8a_, b_, c_<DD :=
Join@8color<,
8Polygon@
Apply@Join,
Map@hyperbolicLine,
Partition@8a, b, c, a<, 2, 1D
DDD<D
The function reflectHyptTri defines the function that will produce the next level of
triangles obtained by reflecting a single triangle in each of its sides:
22 Tiling the Euclidean and hyperbolic planes 487
This function similarly alters the colouring of the triangles after each reflection. This
function also needs to have the attribute Listable:
SetAttributes@reflectHypTri, ListableD
Finally, to produce the hyperbolic tiling, just as with the Euclidean case, we can define a
function hypTriangleTiling1 (this is provisional – hence the ‘1’ affix) and apply
that to a set triangle:
hypTriangleTiling1@triangle_, n_D :=
Module@8temp<,
Show@Graphics@
Map@hyperbolicTriangle,
Join@
Nest@Htemp = #; Flatten@Union@reflectHypTri@#DDDL &,
triangle, nD, tempDD
D, AspectRatio -> AutomaticDD
hypTriangleTiling1@triangle@[email protected],
880, 0<, 80.266077, 0<, 80, 0.140626<<D, 8D
An example of one method by which one calculates the details of the starting shape is
given in Section 22.6.
488 Complex Analysis with Mathematica
removeDuplicates@list_ListD :=
Module@8removelist, listnew, i, n, diff<,
listnew = Sort@Flatten@listDD;
For@n = 1, n <= Length@listnewD, n ++,
removelist = 8<;
For@m = n + 1, m <= Length@listnewD, m ++,
If@Min@Flatten@diff = Map@
Flatten@Map@Abs, Hlistnew@@n, 2DD - #LDD &,
Join@#, Map@Reverse, #DD &@
cyclicPermutations@listnew@@m, 2DDD
DDDD > 0.001H*0.1, for heptagons*L,
Break@D,
For@l = 1, l <= Length@diffD, l ++,
If@Apply@Plus, diff@@lDDD < 10 ^ -8,
If@
! MemberQ@Map@H# < 10 ^ -9L &, diff@@lDDD,
FalseD, AppendTo@removelist, listnew@@mDDD;
Break@D
DDDDD;
listnew = Complement@listnew, removelistD
D; listnewD
22 Tiling the Euclidean and hyperbolic planes 489
You will notice that the list of structures to be checked for duplicates is first sorted and
then, within the loops, which pick their way through pairs of triangles (or whatever
shape is being compared), the value of diff is calculated, which holds the differences
between each of the coordinates defining the shape. If the minimum value here is greater
than 0.001, then we can safely say that these shapes are far enough apart that we would
have moved away from the region containing shapes near to the shape we are checking,
and can move on to check the next shape. Otherwise the process for actually checking
whether two shapes are the same continues and any repeated shapes are removed as
necessary.
Having this function now allows us to repeat the reflection process for many
iterations and approach the point where we can fill the unit disc. To do this we can
define a general function that, given any hyperbolic triangle, will perform the specified
number of reflections to produce the tiling.
hypTriangleTiling@
shape_ ? HHMatchQ@Head@#D, triangleDL &L, n_D :=
Module@8temp<,
Show@Graphics@
8Circle@80, 0<, 1D,
Map@hyperbolicTriangle,
Join@
Nest@Htemp = #; Print@Length@tempDD;
Flatten@
removeDuplicates@reflectHypTri@#DDDL &,
8shape<, nD,
tempDD
<
D,
AspectRatio -> Automatic,
PlotRange -> 88-1, 1<, 8-1, 1<<DD
Here we have carried out this process for a many reflections (n = 40). You should check
that this works on your system and get a feel for timings by trying, for example, n = 20
first. The n = 20 test calculation takes under a minute to caclulate and render on a Power
Macintosh G4 at 1.4 GHz. Note that running the following calculation will take rather
longer! It will also produce progress output that is suppressed here.
hypTriangleTiling@triangle@[email protected],
880, 0<, 80.2660772453, 0<, 80, 0.14062593<<D, 40D
490 Complex Analysis with Mathematica
H# Hb - aL ê 2 + Ha + bL ê 2L &
goes to
22 Tiling the Euclidean and hyperbolic planes 491
In addition, we can add some lines that will allow us to create more characterful shapes.
Here we add lines to characterize the basic shape into either a ghost or a raven (time to
get the graph paper out again!):
ghost@8x_, y_<D :=
Module@8a, b, lamdaAB, face1<,
8a, b< = Map@HFirst@#D + I Last@#DL &, 8x, y<D;
face1 = 880.23, 0.21 + 0.03 * I, 0.17 + 0.04 * I, 0.14,
0.15 - 0.04 * I, 0.205 - 0.045 * I, 0.24<,
80.09, 0.07 + 0.03 * I, 0.03 + 0.04 * I, 0.,
0.01 - 0.04 * I, 0.065 - 0.045 * I, 0.09<,
8-0.1 + 0.08 * I,
-0.08 + 0.12 * I, -0.04 + 0.16 * I, 0.19 * I,
0.06 + 0.2 * I, 0.1 + 0.2 * I, 0.16 + 0.19 * I,
0.2 + 0.15 * I<<;
8GrayLevel@0D, [email protected] * Abs@a - bDD,
lamdaAB =
HH1 - a Conjugate@bDL ê Abs@1 - a Conjugate@bDDL *
Sqrt@H1 - a Conjugate@aDL ê H1 - b Conjugate@bDLD;
Map@Line, Map@HH# Ha - lamdaAB bL - Ha + lamdaAB bLL ê
H# H1 - lamdaABL - H1 + lamdaABLLL &,
face1D ê. w_ ? NumberQ -> 8Re@wD, Im@wD<D<D
The raven not only has a face, but tails and wing feathers. These are defined separately
as each set of characteristics is connected with one of the three lines of the triangle that
forms the basis of our raven shape:
birdLineHyp1@8x_, y_<D :=
Module@8a, b, lamdaAB, pointsBC<,
8a, b< = Map@HFirst@#D + I Last@#DL &, 8x, y<D;
pointsBC =
8-1, -0.7 + 0.08 * I, -0.34 + 0.16 * I, 0.2 * I, 0,
-0.2 * I, 0.34 - 0.16 * I, 0.7 - 0.08 * I, 1<;
lamdaAB =
HH1 - a Conjugate@bDL ê Abs@1 - a Conjugate@bDDL *
Sqrt@H1 - a Conjugate@aDL ê H1 - b Conjugate@bDLD;
Map@HH# Ha - lamdaAB bL - Ha + lamdaAB bLL ê
H# H1 - lamdaABL - H1 + lamdaABLLL &,
pointsBCD ê. w_ ? NumberQ -> 8Re@wD, Im@wD<
D
492 Complex Analysis with Mathematica
raven@8x_, y_<D :=
Module@8a, b, lamdaAB, face2<,
8a, b< = Map@HFirst@#D + I Last@#DL &, 8x, y<D;
face2 = 88-0.12 + 0.3 * I, -0.11 + 0.28 * I, -0.1 + 0.2 * I,
-0.1 + 0.04 * I,
-0.16 + 0.09 * I, -0.2 + 0.12 * I, -0.28 + 0.14 * I<,
8-0.04 + 0.21 * I, -0.04 + 0.2 * I, -0.06 + 0.14 * I,
-0.07 + 0.1 * I, -0.1 + 0.04 * I<,
8-0.2 - 0.09 * I, -0.18 - 0.06 * I, -0.14 - 0.06 * I,
-0.12 - 0.09 * I, -0.13 - 0.13 * I, -0.16 - 0.14 * I,
-0.19 - 0.13 * I, -0.2 - 0.09 * I<,
8-0.28 - 0.34 * I, -0.285 - 0.3 * I, -0.3 - 0.22 * I<,
80.22 - 0.2 * I, 0.2 - 0.21 * I, 0.16 - 0.22 * I,
0.1 - 0.24 * I<<;
8GrayLevel@0D, [email protected] * Abs@a - bDD,
lamdaAB =
HH1 - a Conjugate@bDL ê Abs@1 - a Conjugate@bDDL *
Sqrt@H1 - a Conjugate@aDL ê H1 - b Conjugate@bDLD;
Map@Line, Map@HH# Ha - lamdaAB bL - Ha + lamdaAB bLL ê
H# H1 - lamdaABL - H1 + lamdaABLLL &,
face2D ê. w_ ? NumberQ -> 8Re@wD, Im@wD<D<D;
rightFeather@8x_, y_<D :=
Module@8a, b, lamdaAB, feathers1<,
8a, b< = Map@HFirst@#D + I Last@#DL &, 8x, y<D;
feathers1 = 88-0.13 - 0.24 * I, -0.1 - 0.23 * I,
-0.02 - 0.2 * I<,
22 Tiling the Euclidean and hyperbolic planes 493
leftFeather@8x_, y_<D :=
Module@8a, b, lamdaAB, feathers2<,
8a, b< = Map@HFirst@#D + I Last@#DL &, 8x, y<D;
feathers2 = 880.68, 0.56 + 0.05 * I, 0.42 + 0.08 * I,
0.31 + 0.1 * I<,
80.56 - 0.12 * I, 0.48 - 0.09 * I, 0.4 - 0.07 * I,
0.31 - 0.06 * I<, 80.47 - 0.24 * I, 0.38 - 0.21 * I,
0.3 - 0.2 * I<, 80.36 - 0.34 * I, 0.26 - 0.3 * I<,
80.29 - 0.44 * I, 0.2 - 0.4 * I<,
8-0.37 + 0.135 * I,
-0.325 + 0.06 * I, -0.22 - 0.1 * I,
-0.14 - 0.2 * I<, 8-0.575 + 0.1 * I, -0.56 + 0.06 * I,
-0.48 - 0.04 * I, -0.38 - 0.16 * I, -0.28 - 0.275 * I<,
8-0.78 + 0.06 * I, -0.72,
-0.66 - 0.06 * I, -0.6 - 0.12 * I<<;
8GrayLevel@0D, [email protected] * Abs@a - bDD,
lamdaAB =
HH1 - a Conjugate@bDL ê Abs@1 - a Conjugate@bDDL *
Sqrt@H1 - a Conjugate@aDL ê H1 - b Conjugate@bDLD;
Map@Line, Map@HH# Ha - lamdaAB bL - Ha + lamdaAB bLL ê
H# H1 - lamdaABL - H1 + lamdaABLLL &,
feathers2D ê. w_ ? NumberQ -> 8Re@wD, Im@wD<D<D
Null
The function ghostsANDravens will produce the two basic tiles with which we will
fill the Poincaré disc. To show the difference between the two shapes we are employing,
we will change the function reflectHypTri so that under reflection not only the
colour of a shape is reversed but also the type from ghost to raven. So we define the
function ghostsANDravens to act differently depending on whether the argument is
a ghost or a raven:
494 Complex Analysis with Mathematica
Show@Graphics@ghostsANDravens@
ghost@[email protected], 880, 0<, 80.448288, 0.258819<,
80.448288, -0.258819<<D
DD,
AspectRatio -> AutomaticD
Before checking the graphic for the raven, let us define a new reflection function that
will swap between the raven and the ghost at each reflection:
22 Tiling the Euclidean and hyperbolic planes 495
reflectHypShape@
shape_ ? HHMatchQ@#, ravenD »»
MatchQ@#, ghostDL &L@
color_, 8a_, b_, c_<DD :=
Map@Switch@shape, ghost, raven, raven, ghostD@
If@Head@colorD == Hue,
ReplacePart@#,
Switch@#@@1DD, 0.15, 0.72, 0.72, 0.15D, 1D &@
colorD
D, #D &,
MapThread@
H8a, b, c< ê. #2 -> hyperbolicReflection@#1DL &,
8cyclicPermutations@8a, b, c<D,
8a, b, c<<D
D
SetAttributes@reflectHypShape, ListableD
Now with the raven we must take care. The outline of this shape is the same as the
original ghost shape, but the triangle is given with the opposite orientation. This, as you
will recall, was the reason for using the specific lines for birdline1 and
birdline2. However now we have introduced to the shapes elements that do not have
these properties we must take care how they are used. If we are to start the tiling with the
ghost then the shape as displayed is quite acceptable. The raven outlines will appear as
the gaps between the ghosts, but unreflected, whereas the triangles themselves have been
obtained by reflection. This is taken care of by the symmetry of one curve and the
repetition of the other. We must take care that the orientation of the edges is consistent
so that the two shapes emerge as they are supposed to.
Show@Graphics@ghostsANDravens@reflectHypShape@
ghost@[email protected], 880, 0<, 80.448288, 0.258819<,
80.448288, -0.258819<<DD@@1DDDD,
AspectRatio -> AutomaticD
496 Complex Analysis with Mathematica
If we had looked at the raven shape in its unreflected form, it would have looked a little
odd, since the ordering of the vertices defining the shape determine whether the shading
of the polygon will occur on one side or the other of any one line defining our shape.
Now we have all the tools to define the function that will produce a hyperbolic
tiling of some specified shape up to a certain number of reflections:
hyperbolShapes@shape_, n_D :=
Module@8temp<,
Show@Graphics@8Circle@80, 0<, 1D,
Map@ghostsANDravens,
Join@Nest@Htemp = #; Print@Length@#DD;
Flatten@
removeDuplicates@reflectHypShape@#DDDL &,
8shape<, nD, tempDD<
D, AspectRatio -> AutomaticDD
Try the following, which should take just a few seconds on a GHz-class machine:
hyperbolShapes@
ghost@[email protected], 880, 0<, 80.4482877361, 0.2588190451<,
80.4482877361, -0.2588190451<<D, 8D
The following takes a few minutes to compute and render on a GHz-class machine:
hyperbolShapes@
ghost@[email protected], 880, 0<, 80.4482877361, 0.2588190451<,
80.4482877361, -0.2588190451<<D, 14D
22 Tiling the Euclidean and hyperbolic planes 497
Projective@8x_, y_<D :=
Module@8rsq = x ^ 2 + y ^ 2<, 8x, y< * 2 ê H1 + rsqLD
That is,
498 Complex Analysis with Mathematica
Projective@8x, y<D
2x 2y
9 ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ , ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ =
x + y + 1 x + y2 + 1
2 2 2
We could re-engineer all of our tilings based on the conformal representation, but it is
easier just to insert the function Projective at various places in our existing Mathe-
matica functions. For the triangles, all we need to do is the following:
PhyperbolicTriangle@
triangle@color_: GrayLevel@0D, 8a_, b_, c_<DD :=
Join@8color<,
8Polygon@Map@Projective@#D &,
Apply@Join,
Map@hyperbolicLine,
Partition@8a, b, c, a<, 2, 1D
DDDD<D
PhypTriangleTiling@
shape_ ? HHMatchQ@Head@#D, triangleDL &L, n_D :=
Module@8temp<,
Show@Graphics@
Map@PhyperbolicTriangle ,
Join@
Nest@Htemp = #;
Flatten@
removeDuplicates@reflectHypTri@#DDDL &,
8shape<, nD,
tempDD
D,
AspectRatio -> Automatic,
PlotRange -> 88-1, 1<, 8-1, 1<<DD
We do not need quite so many iterations to appear to fill out the geometry to the edge of
the circle:
PhypTriangleTiling@triangle@[email protected],
880, 0<, 80.2660772453, 0<, 80, 0.14062593<<D, 20D
22 Tiling the Euclidean and hyperbolic planes 499
This figure illustrates the key difference between the conformal and projective representa-
tions. The latter conveys the impression of being drawn on a sphere. The circles implicit
in the tiling in the conformal representation are now straight lines in the projective
representation. Another beautiful example of this, based on the work of M.C. Escher in
his woodcut Circle Limit I, is given in Sections 2.4 and 2.5 of Penrose (2004).
hyperbolicSquare@
square@color_: GrayLevel@0D, 8a_, b_, c_, d_<DD :=
Join@8color<,
8Polygon@
Apply@Join,
Map@hyperbolicLine,
Partition@8a, b, c, d, a<, 2, 1D
DDD<D
PhyperbolicSquare@
square@color_: GrayLevel@0D,
8a_, b_, c_, d_<DD :=
Join@8color<,
8Polygon@Map@Projective@#D &,
Apply@Join,
Map@hyperbolicLine,
Partition@8a, b, c, d, a<, 2, 1D
DDDD<D
reflectHypSqu@
square@color_: GrayLevel@0D,
8a_, b_, c_, d_<DD :=
MapThread@square,
8Table@color, 84<D,
lines = Partition@8a, b, c, d, a<, 2, 1D;
refl@8x__<D := H# :> hyperbolicReflection@8#, x<DL &;
MapThread@8a, b, c, d< ê. HMap@refl@#1D, #2DL &,
8#, Map@Complement@8a, b, c, d<, #D &, #D<
D &@linesD<D
SetAttributes@reflectHypSqu, ListableD;
SetAttributes@hyperbolicSquare, ListableD;
SetAttributes@PhyperbolicSquare, ListableD
Note how odd it is that we can even ask the first question! This would not make any
sense in the usual Euclidean plane. These two questions are related. We need to write
down equations governing the intersection Ha, aL of two circles centred at points H0, bL
and H b, 0L, each of which interesects the unit circle at a right angle, and which intersect
each other at an angle of 2p ê n, where n is prescribed. If you do this (I leave this as a
worthwhile exercise!) you find that a is governed by the quartic (effectively quadratic)
equation
22 Tiling the Euclidean and hyperbolic planes 501
1 2p
a2 + ÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅ = secJ ÅÅÅÅÅÅÅÅÅÅ N (22.11)
4a n
n = 6;
Solve@a ^ 2 + 1 ê 4 ê a ^ 2 ã 1 ê Cos@2 Pi ê nD, aD
1 è!!! 1 è!!!
99a Ø ÅÅÅÅÅ I-1 - 3 M=, 9a Ø ÅÅÅÅÅ I1 - 3 M=,
2 2
1 è!!! 1 è!!!
9a Ø ÅÅÅÅÅ I-1 + 3 M=, 9a Ø ÅÅÅÅÅ I1 + 3 M==
2 2
N@%, 20D
88a Ø -1.3660254037844386468<, 8a Ø -0.36602540378443864676<,
8a Ø 0.36602540378443864676<, 8a Ø 1.3660254037844386468<<
The value we want is the one that is real and positive and less than one, i.e.
0.36602540378443864676
Having worked out our starting value, we can have a look at the results. This will take
some time.
Note that we can move to the projective representation just as before. This time the
impact is not quite so dramatic!
Here we have employed a two-colour (or rather black and white) representation. This
does require that n is of course even. With a bit of tidying up we can semi-automate the
production of graphics for other even n. Let's look at n = 8:
n = 8;
size =
N@Select@a ê. Solve@a ^ 2 + 1 ê 4 ê a ^ 2 ã 1 ê Cos@2 Pi ê nD,
aD, 0 < # < 1 &D, 20D@@1DD;
Show@Graphics@8Circle@80, 0<, 1D,
Map@hyperbolicSquare,
Nest@
Flatten@removeDuplicates@reflectHypSqu@#DDD &,
8square@88size, size<, 8-size, size<,
8-size, -size<, 8size, -size<<D<, 8D
D<
D, AspectRatio -> AutomaticD
22 Tiling the Euclidean and hyperbolic planes 503
With a larger value of n we need to do even more reflections just to get the right basic
picture at the vertices of the original square. This one, with n = 14, takes a while but is
worth the wait!
504 Complex Analysis with Mathematica
n = 14;
size =
N@Select@a ê. Solve@a ^ 2 + 1 ê 4 ê a ^ 2 ã 1 ê Cos@2 Pi ê nD,
aD, 0 < # < 1 &D, 20D@@1DD;
Show@Graphics@8Circle@80, 0<, 1D,
Map@hyperbolicSquare,
Nest@
Flatten@removeDuplicates@reflectHypSqu@#DDD &,
8square@88size, size<, 8-size, size<,
8-size, -size<, 8size, -size<<D<, 8D
D<D, AspectRatio -> AutomaticD
For larger values of n the corresponding projective picture approaches that of a square
inscribed in the circle with very little edge detail. The following does not try to fill in all
the edge detail as it is not visible on this scale, but you can just see the meeting of 14
squares at the vertices of the central square:
22 Tiling the Euclidean and hyperbolic planes 505
n = 14;
size =
N@Select@a ê. Solve@a ^ 2 + 1 ê 4 ê a ^ 2 ã 1 ê Cos@2 Pi ê nD,
aD, 0 < # < 1 &D, 20D@@1DD;
Show@Graphics@8Circle@80, 0<, 1D,
Map@PhyperbolicSquare,
Nest@
Flatten@removeDuplicates@reflectHypSqu@#DDD &,
8square@88size, size<, 8-size, size<,
8-size, -size<, 8size, -size<<D<, 6D
D<D, AspectRatio -> AutomaticD
hyperbolicSquareL@
square@color_: GrayLevel@0D, 8a_, b_, c_, d_<DD :=
Join@8color<,
8Line@
Apply@Join,
Map@hyperbolicLine,
Partition@8a, b, c, d, a<, 2, 1D
DDD<D
506 Complex Analysis with Mathematica
PhyperbolicSquareL@
square@color_: GrayLevel@0D,
8a_, b_, c_, d_<DD :=
Join@8color<,
8Line@Map@Projective@#D &,
Apply@Join,
Map@hyperbolicLine,
Partition@8a, b, c, d, a<, 2, 1D
DDDD<D
SetAttributes@hyperbolicSquareL, ListableD;
SetAttributes@PhyperbolicSquareL, ListableD
n = 5;
size =
N@Select@a ê. Solve@a ^ 2 + 1 ê 4 ê a ^ 2 ã 1 ê Cos@2 Pi ê nD,
aD, 0 < # < 1 &D, 20D@@1DD;
Show@Graphics@8Circle@80, 0<, 1D,
Map@hyperbolicSquareL,
Nest@
Flatten@removeDuplicates@reflectHypSqu@#DDD &,
8square@88size, size<, 8-size, size<,
8-size, -size<, 8size, -size<<D<, 7D
D<
D, AspectRatio -> AutomaticD
22 Tiling the Euclidean and hyperbolic planes 507
n = 5;
size =
N@Select@a ê. Solve@a ^ 2 + 1 ê 4 ê a ^ 2 ã 1 ê Cos@2 Pi ê nD,
aD, 0 < # < 1 &D, 20D@@1DD;
Show@Graphics@8Circle@80, 0<, 1D,
Map@PhyperbolicSquareL,
Nest@
Flatten@removeDuplicates@reflectHypSqu@#DDD &,
8square@88size, size<, 8-size, size<,
8-size, -size<, 8size, -size<<D<, 6D
D<
D, AspectRatio -> AutomaticD
hyperbolicHeptagon@
heptagon@color_: GrayLevel@0D,
8a_, b_, c_, d_, e_, f_, g_<DD :=
Join@8color<,
8Line@
Apply@Join,
Map@hyperbolicLine,
Partition@
8a, b, c, d, e, f, g, a<, 2, 1D
DDD<D
PhyperbolicHeptagon@
heptagon@color_: GrayLevel@0D,
8a_, b_, c_, d_, e_, f_, g_<DD :=
Join@8color<,
8Line@Map@Projective@#D &,
Apply@Join,
Map@hyperbolicLine,
Partition@
8a, b, c, d, e, f, g, a<, 2, 1D
DDDD<D
We also define a function that will reflect a given heptagon in each of its sides and
return the resulting set of seven heptagons:
reflectHypHept@
heptagon@color_: GrayLevel@0D,
8a_, b_, c_, d_, e_, f_, g_<DD :=
MapThread@heptagon,
8Table@color, 87<D,
lines = Partition@8a, b, c, d, e, f, g, a<, 2, 1D;
refl@8x__<D := H# :> hyperbolicReflection@8#, x<DL &;
MapThread@8a, b, c, d, e, f, g< ê. HMap@refl@#1D, #2DL &,
8#,
Map@Complement@8a, b, c, d, e, f, g<, #D &, #D<
D &@linesD<
D
Now each of these functions needs to be Listable in order for the procedure of
continually reflecting and then the drawing process to work:
SetAttributes@reflectHypHept, ListableD;
SetAttributes@hyperbolicHeptagon, ListableD;
SetAttributes@PhyperbolicHeptagon, ListableD
22 Tiling the Euclidean and hyperbolic planes 509
The same technique for removing duplicated shapes is used as for removing duplicated
triangles. The only change is that checking for the duplicates only stops when individual
elements are more than 0.1 units apart rather than the previous 0.001 units. This arises
since the ordering of vertices of these heptagons is not regular and so ordering sets of
them does not mean that all shapes within a certain region will be as close to each other
in the ordered set as was the case with triangles. Now we can produce a graphic that will
start with a central hyperbolic heptagon (the coordinates being calculated using the same
technique as for the hyperbolic triangles) and by reflection fill the whole of the unit
circle:
It is possible to colour this figure so that the colouring scheme is consistent across the
whole figure using nine different colours. This has not been implemented algorithmi-
cally at the time of publication and any ideas on elegant methods for this would be most
welcome!
We can define an analogue of the map Projective, which we call ToUHP, as follows:
re = ComplexExpand@Re@I H1 + x + I yL ê H1 - x - I yLDD;
im = Simplify@
ComplexExpand@Im@I H1 + x + I yL ê H1 - x - I yLDDD;
ToUHP@8x, y<D
2y x2 + y2 - 1
9- ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅ , - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ =
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
H1 - xL2 + y2 x2 - 2 x + y2 + 1
UHPhyperbolicTriangle@
triangle@color_: GrayLevel@0D, 8a_, b_, c_<DD :=
Join@8color<,
8Polygon@Map@ToUHP@#D &,
Apply@Join,
Map@hyperbolicLine,
Partition@8a, b, c, a<, 2, 1D
DDDD<D
UHPhypTriangleTiling@
shape_ ? HHMatchQ@Head@#D, triangleDL &L, n_D :=
Module@8temp<,
Show@Graphics@8Line@88-5, 0<, 85, 0<<D,
Line@880, 0<, 80, 10<<D,
Map@UHPhyperbolicTriangle ,
Join@
Nest@Htemp = #;
Flatten@
removeDuplicates@reflectHypTri@#DDDL &,
8shape<, nD, tempDD< D, AspectRatio -> Automatic,
PlotRange Ø 88-5, 5<, 80, 12<<DD
We can now obtain another famous representation, best shown by example, with the
lower boundary also shown.
UHPhypTriangleTiling@triangle@[email protected],
880, 0<, 80.2660772453, 0<, 80, 0.14062593<<D, 40D
512 Complex Analysis with Mathematica
Exercises
22.1 Ÿ Re-visualize all these tilings by mapping the tilings of the unit disc into the
upper half-plane, using a suitable Möbius transformation.
22.2 Ÿ Investigate the transformation of other tilings into the projective representation.
22.3 Ÿ Investigate the tiling of the unit disc by n-gons for values of n > 5.
Comment: the author recognizes that his own contributions here are somewhat ad hoc!
Anyone interested in developing a systematic and optimized package to do these kinds
of graphics, for general n-gons, unfilled or filled, general colouring schemes and confor-
mal, projective or half-plane representations, is encouraged to do so and contact the
author!
23 Physics in three and four dimensions I
Introduction
When we come to explore real dimensions greater than two, matters become consider-
ably more interesting. Indeed, in my own undergraduate studies, the question as to how
to solve Laplace's equation in three or more dimensions using methods analogous to
those presented here went unanswered, and remains unanswered in most undergraduate
curricula the world over. I did not see the answer until my postgraduate studies, studying
twistor methods in Oxford, and did not fully understand many of the geometrical aspects
until my own post-doctoral work on twistor descriptions of minimal surfaces and strings.
However, this author at least is convinced that many of the concepts are easily under-
stood using only the elementary complex analysis already presented here, and this
chapter is in part an attempt to get the message across in such a fashion. Another goal of
this chapter and the subsequent one is to persuade some of you that, as well as being a
basis for research in fundamental theoretical physics, there are also some interesting
problems in basic and very applied mathematics that might well be solved with such
methods, if only more people worked on it!
In some ways the presentation is easier if we make the jump straight to four
dimensions, and treat the relativistic case. Results for three dimensions can then be
obtained by constraining matters to a hyperplane t = 0. This is also more elegant as our
starting point is then a detailed investigation of the ‘celestial spehere’, and the interpreta-
tion of Möbius transforms as relativistic Lorentz transformations, which was promised
earlier, then emerges naturally. So we shall dwell at length on a relativistic interpretation
of stereographic projection to begin with. This is all very necessary, as clearly it is no
longer possible to associate real and complex spaces through simple associations such as
w = x + Ây (23.1)
as there as now a third space coordinate, which we shall term z, and a time coordinate, t.
The relativistic interpretation of stereographic projection is in fact the key to understand-
ing how to make the jump to four dimensions. In this chapter we shall avoid the use of z
as denoting a complex number, for obvious reasons! One might wonder if further
extensions of the number system are needed to deal with three and four dimensions, but
it will turn out (just as for dealing with polynomials) that complex numbers are enough!
The discussion here is intended to be relatively informal and accessible to
anyone who has progressed thorugh the basic material on complex analysis discussed
previously in this text. In particular, familiarity with the material of Chapter 16 is
assumed. However, there is a large body of advanced work in mathematical physics and
pure mathematics related to these topics. A good place to go for a thorough discussion
and a detailed exposition of spinor theory is that of Penrose and Rindler (1984a, b), the
material of which is the basis of a large portion of this chapter.
514 Complex Analysis with Mathematica
X 2 = h mn X m X n = c2 t 2 - x2 - y2 - z2 (23.3)
We use the summation convention introduced by Einstein, which states that the appear-
ance of a repeated index implies summation over its possible values. A vector X is said
to be timelike if has positive length, null if it has zero length, and spacelike if it has
negative length. This convention, that ordinary Euclidean three-vectors have negative
length, may seem rather bizarre to a beginner in relativity, but it is just a convention, and
does avoid many irritating factors of -1 later. The null vectors are especially important,
as they represent the directions of light rays. If we fix an origin O in , the set of null
position vectors with origin at O is given by the family of points satisfying
rê 2 = x2 + y2 + z2 = c2 t2 (23.4)
which represent the locus of points moving at speed c towards or away from the origin.
If we fix the time-scale (so that we consider only the directions of vectors based at the
origin) so that
†ct§ = 1 (23.5)
x2 + y2 + z2 = 1 (23.6)
The sphere with ct = +1 is denoted S+ and that with ct = -1 is denoted S- . These two
spheres represent the directions of light rays emanating from the origin, in the case of
S+ , and arriving at the origin, in the case of S- . For this reason S- is often called the
celestial sphere. It represents the field of vision for an observer located at O – every-
thing that he or she sees is represented in its direction by a point on S- . This is very
important for our understanding of how our observer's view of the world shifts when
they acquire a velocity.
23 Physics in three and four dimensions I 515
x2 + y2
êêê = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ 1 - z2 1+z
ww ÅÅÅÅ2ÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (23.8)
H1 - zL H1 - zL 1-z
Note that the point at infinity is given by the North pole (z = 1) of the sphere S+ . We can
also use polar coordinates in the form
q
w = ‰Â f cotJ ÅÅÅÅÅ N (23.10)
2
What do we do about S- ? There is a natural mapping between S+ and S- known as the
antipodal mapping. A light ray passing through O and arriving at the point Hx, y, zL on
S+ must have passed through the point H-x, -y, -zL, on S- so that the natural mapping
is to associate antipodal points on the two spheres. On the complex coordinates, the
antipodal map is given by
1
wö - ÅÅÅÅ
êêÅÅ (23.11)
wê
so that the polar coordinate representation is
q
w = -‰Â f tanJ ÅÅÅÅÅ N (23.12)
2
This pair are projective or homogeneous coordinates for the sphere(s) – the pairs Hz, hL
and Hl z, l hL represent the same point, provided l œ and l 0. The point at infinity is
then given by setting h = 0. These projective coordinates also play another role. To see
this most straightforwardly, we first make some adjustments to the scaling of the
êê
relations characterizing stereographic projection. If we let b = z z + h êê h , then Eq.
(23.9) can be recast as
êê êê êê
z êê
h + hz z êê
h - hz zz - hh êê
x = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ; y = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ; z = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ; (23.14)
b Âb b
The persistent appearance of b is an inconvenience, and so, rather than working with a
è!!!
sphere of radius unity, we shall work with a sphere of radius b ë 2 . This gives us the
four relations
1 êê êê 1 êê êê
ct = ÅÅÅÅÅÅÅÅ
è!!!ÅÅÅÅÅ Hzz + hh L; x = ÅÅÅÅÅÅÅÅ
è!!!ÅÅÅÅÅ Hz h + hz L;
2 2
(23.15)
1 êê 1 êê
è!!! ÅÅÅÅÅÅ Hz êê
y = ÅÅÅÅÅÅÅÅ êê
è!!!ÅÅÅÅÅ Hzz - hh L;
h - hz L; z = ÅÅÅÅÅÅÅÅ
 2 2
This leads directly to an elegant matrix characterization of this relationship, in the form
êê
1 ct + z x + Ây ij zz z êê
h yz z êê êê A êêA
£
ÅÅÅÅÅÅÅÅ
Å ÅÅÅÅ J
è!!! x - Ây ct - z N = j êê êê z = J h NHz , h L = S S (23.16)
2 k hz hh {
and the index A, labelling the rows, runs from zero to one. (This is just a convention
linked to the fact that the time coordinate is often the zero component of the four-dimen-
sional vector X m .) The index A£ is attached to the complex conjugate vector and labels
the columns of the matrices.
These two-component vectors play a very special role in relativistic physics and
are given a special name – they are called spinors. (Physicists often refer to four-compo-
nent, or Dirac, spinors that are made up of a pair of the more fundamental ones dis-
cussed here.) What we have done is to show that spinors, up to a scale factor, character-
ize the (real) null directions emanating from a point. When we attach the scale factor, a
two-component spinor characterizes a null (real) four-vector.
We have assumed that the coordinates Hct, x, y, zL are themselves real. If we
allow them to be complex we can still use these algebraic characterizations of null
four-vectors. Inspection of the matrix
£ 1 ct + z x + Ây
X AA = ÅÅÅÅÅÅÅÅ
è!!!ÅÅÅÅÅ J x - Ây ct - z N (23.18)
2
23 Physics in three and four dimensions I 517
£
shows that it corresponds to a zero-length vector if and only if the determinant of X A A
is zero. This occurs if and only if the rows are linearly dependent, and, as there are only
two rows, this means that this matrix can be factorized in the form
£ £
X AA = S A pA (23.19)
for some pair of spinors S and p. In the special case when X corresponds to a real vector
p is the complex conjugate of S, but in the complex setting this is relaxed.
You may well ask, what about the case when X m is not zero-length? Not all
points arise as points separated from the origin by a null direction. We shall return to this
presently. But already we have enough mathematics at our disposal to investigate some
very interesting effects to do with the appearance of objects to an observer that is
moving rapidly, and the link between Möbius transforms and relativistic physics. We
begin with the latter.
ad - bc = 1 (23.24)
The set of complex matrices of this form is given a name, it is SLH2, L, and algebra-
ically gives a multiplicative group. So far we have thought about it only in terms of its
action on the two-component spinors. But it also acts on matrices of the form given by
Eq. (23.18), and indeed this action will have the same form whether or not X AA' is a null
518 Complex Analysis with Mathematica
where L* is the transposed complex conjugate. From this relation we can deduce the
action on the determinants of X:
è
det X Ø det X = detHLXL* L = det L det X det L* = det X (23.26)
So the determinant is invariant. For a general X this determinant is, from Eq. (23.18),
one half of
c2 t2 - x2 - y2 - z2 (23.27)
This issue was not properly appreciated until quite recently – see Terrell (1959)
and Penrose (1959). In particular, we shall look at what happens to our perceptions of
spheres. To a stationary observer, a stationary sphere will present a circular outline on
that observer's celestial sphere. Let's explore this and see what happens when that
observer accelerates.
The first observation we need is that if an object presents a circular outline on
S , then its outline corresponds also to a circle in the Argand plane. To see this, note that
a circle outlined on S corresponds to the intersection of a plane with S . So let the
equation of the plane be characterized by the direction cosines Hl, m, nL of its unit
normal. Then the intersection of S with this plane is given by those points on S
satisfying
lx + my + nz = d (23.28)
with d 2 < 1. If we scale, for example, the sphere S+ so that ct = 1, then we can parame-
trize points on it by Eq. (23.9), to obtain
lHw + êê
wêL - ÂmHw - êê
wêL + nHww
êêê - 1L = dHww
êêê + 1L (23.29)
ds2 = d x2 + d y2 + d z2 (23.31)
We need to know what form this takes when restricted to the Riemann sphere, for
example S+. It is straightforward to show (see Exercise 23.1) that if we use the parametri-
zation given by Eq. (23.9), then
520 Complex Analysis with Mathematica
ds2 = fHw, êê
wêL dwdw
êêê (23.32)
where
4
f = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
êêêÅLÅÅÅ2ÅÅ (23.33)
H1 + ww
(1) the apparent shape of small objects is invariant under changes of observer velocity;
(2) the circular outline of an object of arbitrary size is also invariant under changes of
observer velocity.
These two results, due, respectively, to Terrell (1959) and Penrose (1959), constitute
what is known as the ‘invisibility of the Lorentz contraction’. As we have seen, these
results follow directly from the conformality and circle-preserving properties of the
Möbius (Lorentz) transformation. So now we know that objects do not get anisotropi-
cally squashed. Next we need to get a better grip on the detail of what does happen.
‡ Distinct Roots
It is immensely helpful to analyse this case by picking appropriate coordinates. We are
assuming that there are two distinct complex numbers w1 and w2 that are left invariant
by the Möbius transformation under consideration. These correspond to two distinct
points on each of the spheres S+ or S- . As discussed in Section 16.8, we can construct a
second Möbius transformation, say G, to send each of these two points to any given new
pair of points. We shall choose the new pair of points to be zero and infinity. So let
23 Physics in three and four dimensions I 521
è
x = GHwL; x = GHwè L (23.34)
Inspection of the formula for the fixed points reveals that there is a fixed point at infinity
if and only if C = 0. So the possession of a fixed point at infinity is equivalent to being
able to write N in the form
NHxL = A£ x + B£
for complex contants A£ , B£ . Clearly the origin is then also a fixed point if and only if
B£ = 0. Thus we obtain the following result. A Möbius/Lorentz transformation with a
pair of distinct fixed points is equivalent (under a change of coordinates expressed by
Eq. (23.35)) to the simple complex rescaling:
è
x Ø x = A£ x (23.37)
‡ Equal Roots
We have also done most of the work to analyse the case of a unique fixed point. We
apply a transformation of the form of Eq. (23.35) to place the single fixed point at
infinity. So the transformation must be equivalent to
è
x Ø x = A£ x + B£ (23.38)
Now how do we ensure that there are no other fixed points? If we write down the
equation
x = A£ x + B£ (23.39)
we see that there is a second finite solution unless A£ = 1. So the case of equal roots is
equivalent to
è
x Ø x = x + B£ (23.40)
which is a simple complex translation. This classification will be sufficient for our needs
here. A much more detailed exposition is given by Needham (1997).
522 Complex Analysis with Mathematica
‡ Physical interpretations
What we have shown is that any Möbius/Lorentz transformation is equivalent to either a
multiplication of the form of Eq. (23.37) or a translation of the form of Eq. (23.40).
What do these observation mean physically? We need to do two things: (a) interpret the
imposition of infinity, and optionally, zero, as the fixed points, and (b) interpret the
transformations then given by Eqs. (23.37) and (23.40).
Suppose first that we impose zero and infinity as fixed points. This means that
both B and C are zero. The matrix of the transformation with respect to these coordinates
is then just
il 0 yz
L = jj z (23.41)
k 0 l-1 {
l = r‰Ây (23.42)
So the use of zero and infinity as fixed points corresponds to making the choice of ct z
as an invariant pair of directions (they are not absolutely invariant, being rescaled by
reciprocal factors). The form of the set of equations (23.43) suggests that we split this
case into two further special cases. The first is where r = 1. The t, z pair are then left
invariant, and we observe that the effect of the transformation is a rotation of the x, y
plane by an angle 2y. The second case is perhaps a little more interesting. We set y to
zero. The x, y pair are then left invariant, and we have new formulae expressing the
mapping from the pair z, t to the new pair z£ , t£ . This is most easily expressed by
introducing new and rather suggestive parameters as follows. First we set
r = ‰m (23.44)
and define g r 1 by
g = coshH2 mL (23.45)
1
g = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (23.46)
"########
1 - #ÅÅÅÅ v#####
2
ÅÅ
c2
This is perhaps the most famous form of the Lorentz transformation. The plane given by
setting zè = 0 is equivalent to the constraint z = -vt. The effects of time dilation and the
Lorentz contraction can now be derived with care from these relations. However, our
interest is in the appearance of objects. This is most easily expressed by use of the
Möbius transformation
è
x Ø x = r2 x (23.49)
v 1 + v ê c 1ê2
A£ = r2 = ‰2 m = coshH2 mL + sinhH2 mL = gJ ÅÅÅÅÅ + 1N = J ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ N (23.50)
c 1 - vêc
Now all of this analysis has been worked out on coordinates adapted to S+ . The corre-
sponding action on S- can be deduced by applying the antipodal map to Eq. (23.49),
which gives the effect as the real rescaling factor
è = ÅÅÅÅwÅÅÅÅÅ
wØw (23.51)
r2
q£ 1 - vê c 1ê2 q
tanJ ÅÅÅÅÅÅÅÅ N = J ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ N tanJ ÅÅÅÅÅ N (23.53)
2 1 + vê c 2
This is a very important formula. It tells us how the apparent direction of a light ray
changes as we adjust the velocity of the observer at the origin. It is sometimes called the
angular abberation formula. This relation also helps us to fix the sense of v in our minds
– if a stationary obsever perceives a star or other object at an angle q to the North pole,
then an obsever heading to the North pole with speed v > 0 perceives that same object to
be located at an angle q' to the North pole, at that instant when he/she is instantaneously
co-located with the stationary observer.
524 Complex Analysis with Mathematica
The second case – that of one fixed point at infinity – is left as an exercise for
you to explore the details. For now we wish to explore the effects of Eq. (23.53) in a
little more detail.
PointCube@origin_List, n_D :=
Module@8xpts = xside@nD,
ypts = yside@nD,
zpts = zside@nD<,
Flatten@8move@origin, xptsD,
move@origin + 80, 1, 0<, xptsD,
move@origin + 80, 0, 1<, xptsD,
move@origin + 80, 1, 1<, xptsD,
move@ origin, yptsD,
move@ origin + 81, 0, 0<, yptsD,
move@ origin + 81, 0, 1<, yptsD,
move@ origin + 80, 0, 1<, yptsD,
move@origin, zptsD,
move@origin + 81, 0, 0<, zptsD,
move@origin + 80, 1, 0<, zptsD,
move@origin + 81, 1, 0<, zptsD
<, 1DD
Now we define a function that projects the points onto the unit sphere. The idea is that
our observer will sit in the centre of the nose cone of a spaceship, and the cone has an
observation window that is the cap of a sphere. The observer therefore sees the outside
world entirely in terms of a ‘painting’ on his window – this window forms a section of
his or her celestial sphere. We will draw the window also as part of a sphere – we
actually do the painting slightly inside. The following function takes points in space and
paints them onto the inside surface of the observation window:
Here is the painting carried out with the angular abberation factor derived above:
abbernewcubea@warp_D :=
Map@AbberateProjectToUnitSphere @Append@#, warpDD &,
testaD;
abbernewcubeb@warp_D :=
Map@AbberateProjectToUnitSphere @Append@#, warpDD &,
testbD;
In order to calculate the graphics effectively, we shall load a package that makes the
computation of scaled coordinates slightly easier. This is from Wickham-Jones (1994).
We shall exhibit the relevant settings, however – you do not need to get this package,
but it is very useful to have, and is available from http://library.wolfram.com (if
you get a warning about a CrossProduct object on loading this package ignore it).
Needs["ExtendGraphics`View3D`"]
526 Complex Analysis with Mathematica
?ViewPointFromUser
{MyBoxRatios, MyViewPoint}
2.2 2.2 0.7
J N
0. 0. -0.340909
HemiSphere = ParametricPlot3D@
1.1 * 8Sin@qD Cos@fD, Sin@qD Sin@fD, Cos@qD<,
8q, 0, Pi ê 2<, 8f, 0, 2 Pi<,
Boxed -> False, BoxRatios -> MyBoxRatios,
Axes -> False, Shading -> False,
PlotRange -> MyPlotRange,
ViewPoint -> MyViewPoint,
PlotPoints -> 810, 30<D
Now we shall view this window painted with the external scene:
23 Physics in three and four dimensions I 527
Here is the zero velocity scene. There are limitations in the way Mathematica projects
this, but you certainly perceive the cubes as having straight sides. This will change when
we boost the observer's speed.
abberplota@warp_D :=
Show@Graphics3D@Map@Point, abbernewcubea@warpDD,
Boxed -> False, BoxRatios -> MyBoxRatios,
Axes -> False, Shading -> False,
PlotRange -> MyPlotRange, ViewPoint -> MyViewPoint,
DisplayFunction -> IdentityDD
abberplotb@warp_D :=
Show@Graphics3D@Map@Point, abbernewcubeb@warpDD,
Boxed -> False, BoxRatios -> MyBoxRatios,
Axes -> False, Shading -> False,
PlotRange -> MyPlotRange, ViewPoint -> MyViewPoint,
DisplayFunction -> IdentityDD
528 Complex Analysis with Mathematica
Now let's look at the same scene from an observer moving at half the speed of light:
At Warp Factor 9, i.e. 90 per cent of c the effect is even more dramatic:
You might like to make a movie of the process of ‘going to warp’ – here is one to try
(see also the exercises – the output is not shown here):
Finally, if you have, or can obtain, the add-on application Dynamic Visualizer, try using
this to obtain still more realistic results.
23 Physics in three and four dimensions I 529
SA lA = S0 l0 + S1 l1 œ (23.54)
and similarly for their complex conjugates. The most obvious question from a linear
algebra point of view is to ask whether there is a natural mapping from a spinor to a dual
spinor. This as usual relies on the existence of a natural inner product on spinors. There
is indeed one, but it takes a rather unusual form that is induced by the relativistic concept
of distance embodied in Eq. (23.3). We have already observed that this norm on vectors
corresponds to the operation of taking determinants of matrices of the form given by Eq.
(23.18), which were
£ 1 ct + z x + Ây
X AA = ÅÅÅÅÅÅÅÅ
è!!!ÅÅÅÅÅ J x - Ây ct - z N
2
and the inner product of any spinor with itself is identically zero. (This takes some
getting used to.) Furthermore, we can use this eAB quantity to define dual spinors from
spinors:
lB = lA eA B (23.57)
and the corresponding inverse mapping eAB exists and we can extract spinors from dual
spinors thus:
lA = eAB lB (23.58)
The new index a runs from 0 to 3. It is not to be confused with the space-time index
which also runs from 0 to 3. The introduction of such objects gives us enough structure
to properly define a relationship between general points in Minkowski space and the
associated complex space known as twistor space. This relationship is that of incidence
between a space-time point and a twistor, and in Minkowski space it is given by the
relationship
£
wA = Â X A A pA£ (23.60)
The nature of this relationship is extraordinarily subtle. First, we note that it only
involves the coordinates Z a in a projective sense – there is no scaling implicit in this
£
relationship. Second, given a space-time point x expressed by the matrix X A A , we can
obtain a two-dimensional family of twistors (or, projectively, a one-dimensional family)
that are incident with x. Finally, given a twistor Z a there are an entire family of space-
time points that are incident with it. Indeed, if x0 is any one solution, so will that given
by
£ £ £
X AA = X0A A + lA pA (23.61)
for all values of the spinor l. This, geometrically, represents a null 2-plane in (complex)
Minkowski space.
So how do we define a point in Minkowski space in twistor terms? Since a point
corresponds to a one-dimensional family in projective terms – a line in projective twistor
space, it is now straightforward to specify a point as corresponding to a pair of twistors
(two points on the line). Algebraically this should come as no surprise. The incidence
relation (23.60) corresponds to two equations. To specify the four coordinates embedded
£
in X A A we need four equations – so incidence with two distinct twistors will suffice. So
a point can be characterized by a pair of incidence relations:
23 Physics in three and four dimensions I 531
£
w1A = ÂX A A p1A£ ;
£ (23.62)
w2A = ÂX A A p2A£
Such coordinates are often called isothermal coordinates. The differential equations
governing the minimal surface then become the set
ij 2 2 y
j ÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅ zz xa = 0 (23.65)
k u2 v2 {
but there are additional constraints associated with Eq. (23.3), which take the form that
the tangent vectors to the surface along the u and v directions are of the same length and
orthogonal, i.e. if the metric function is hab (not necessarily of the signature of Eq.
(23.3), nor necessarily in four dimensions, but composed of a dimension-d diagonal
matrix of 1 down the diagonal), then
532 Complex Analysis with Mathematica
xa xb xa xb
hab ÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅ = hab ÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅ (23.66)
u u v v
xa xb
hab ÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅ = 0 (23.67)
u v
For a detailed discussion of the differential geometry associated with these surfaces, and
on isothermal coordinates, see Chapter 23 of Gray (1993), which contains many applica-
tions of Mathematica to differential geometry, and the references therein.
The constraints (23.66), (23.67) are then equivalent to demanding that X a HzL has a
tangent that is null:
Xa Xb
hab ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = 0 (23.69)
w w
So we see that the differential equation has been essentially eliminated, leaving us with a
holomorphic system satisfying a simple geometrical condition given by Eq. (23.69).
This is a good point for a pause for thought on what has been accomplished. The
equations characterizing a minimal surface constitute a set of non-linear differential
equations. We have simplified these by introducing isothermal coordinates. The differen-
tial equation states that each component of the position vector characterizing a point on
the surface must be a harmonic function of the isothermal coordinates, and so can be
managed in terms of holomorphic functions. We are left with a nullity constraint.
£
XA A
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ pA£ = 0 (23.70)
w
This spinor field is only defined projectively by this equation. We define an associated
twistor field by requiring incidence everywhere:
£
wA HwL = ÂX A A HwLpA£ HwL (23.71)
Now we differentiate both sides with respect to w, using a dot to denote differentiation.
Since Eq. (23.70) holds we deduce that
so that the point is also incident with the derivative twistor. But now we can extract X
from the twistor, as two incidence relations serve to define the point in general. That is,
This gives us a formula for a null curve in terms of an arbitrary differentiable twistor
curve. There is a great deal of freedom in this formula. First, we note that it is invariant
under w-dependent rescalings of the twistor curve. (You might like to check this.) So
only the proective components matter. We exploit this and choose the complex parame-
ter such that
£
w = p0£ êp1£ ; pA£ = p1£ Hw, 1L ; pA = p1£ H1, -wL (23.74)
It is now a matter of unravelling Eq. (23.73) using the variables in Eqs. (23.74) and
(23.75). For example
£ è!!! £
ÂX 00 = 2 Â f HwL (23.76)
ct = f £ + g - wg£
x = g£ + f - w f £
(23.78)
Ây = f - w f £ - g£
z = f £ - g + wg£
These formulae are actually rather old! The representation of null curves and minimal
surfaces by these formulae were first given in a series of papers by Montcheuil (1905)
and Eisenhart (1911, 1912). However, their understanding in terms of complex relativistic
geometry emerged relatively recently (Shaw, 1985). The corresponding results for dimen-
sion three are older still – we shall look at this right away.
534 Complex Analysis with Mathematica
f £ = -g + wg£ (23.79)
f = wG£ - 2G (23.80)
This is a very important formula. It gives the general solution for a holomorphic null
curve in complex Euclidean three-space. Its real part is a minimal surface in real Euclid-
ean three-space. Note that neither this formula nor its four-dimensional counterpart
contain any integration – we have solved the problem completely in terms of free
holomorphic functions.
Note that the result for three dimensions can also be derived by an intrinsically
three-dimensional argument. This has been given by Hitchin (1982), and gives the
Weierstrass (1866a) parametrization for minimal surfaces, in its integral-free form. The
paper by Weierstrass is available on the internet (Weierstrass 1866b).
‡ Degeneration to points
Before we look at the surfaces generated by these formulae, let's take a quick look at
degenerate situations. It will be evident that if we take f and g to be both linear func-
tions of w, Eq. (23.78) will give constant values for Hct, x, y, zL. Similarly, if G is
quadratic, Eq. (23.81) will also give constant values for Hx, y, zL. Let's explore this a
little, and suppose that
G = a + bw + cw2 (23.82)
It follows that
G£ = b + 2cw;
(23.83)
G = 2c
or inverting this
23 Physics in three and four dimensions I 535
1
G = - ÅÅÅÅÅ HHx + ÂyL + 2zw - Hx - ÂyLw2 L (23.85)
4
This is a simple way of observing that points in Euclidean three-space correspond to
quadratic functions of w. We shall need this in Chapter 24. Similarly, we can give an
explicit coordinate representation of the fact that points in Minkowski space correspond
to a pair of linear functions of w. What we need to observe for now is that adding a
linear term to f and/or g, or adding a quadratic term to G, will not materially alter the
form of the null curve or associated minimal surface – it will just translate it.
NullCurve[G_][w_] :=
Module[{ww, temp, one, two},
one = D[G[ww], ww];
two = D[G[ww], {ww, 2}];
temp = {-2*G[ww]+2*ww*one + (1-ww^2)*two,
I*(2*G[ww]-2*ww*one+(1+ww^2)*two),
2*ww*two - 2*one};
Simplify[temp /. ww->w]
]
Let's check it is working by giving it a trivial quadratic – we should get a point back:
8x, y, z<
Next we wish to write out the real part of these null curves, based on a convenient
parametrization:
Next we wish to generate some automatic plotting routines. We also want the flexibility
to use either Cartesian or Polar coodinates, or possibly a hybrid. Let's do a Cartesian
version first:
536 Complex Analysis with Mathematica
Here, for example, we find Enneper's surface corresponds to the simple choice w3 :
100
50
0 200
-50
-100
0
-200
0
-200
200
23 Physics in three and four dimensions I 537
1
0
-1
4
-2
-3 2
-4 0
-2
0 -2
2
-4
4
ExponentialMinimalSurface[#*Log[#]&, w, {-2, 2}, {0, 2
Pi}, PlotPoints -> 30]
2
0
-2 5
-4
0
-5
0
-5
5
The exploration of these surfaces is left to you – some suggestions are given in Exercise
23.6. Here is one more to get you started:
538 Complex Analysis with Mathematica
0.2
-0.2
0.1
-0.1
-1.2
-1.1
-1
-0.9
Exercises
23.1 [Ÿ] Suppose that we have a curve on the sphere S+ paramterized by wHsL as s
varies, with Eq. (23.9). Show that
°
4 w° êê wê
x° 2 + y° 2 + z° 2 = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
êêêÅÅÅÅL2ÅÅÅÅ
H1 + w w
where the dot denotes differentiation with respect to s. Confirm your results by repeating
the calculation using Mathematica.
23.2 Show that if the mapping defined by Eq. (23.25) in the special form of Eq. (23.41)
is applied to a matrix of the form of Eq. (23.18), then the result is as expressed by Eq.
(23.43).
23.3 Derive Eq. (23.48) from Eq. (23.43) by using the parametrizations expressed by
Eqs. (23.45-23.47).
23.4 Elucidate the effect of a transformation such as that given by Eq. (23.40), with one
fixed point at infinity, by deriving the equations analogous to Eq. (23.43).
23 Physics in three and four dimensions I 539
23.5 Ÿ There are many ways of extending the warping observer example given in
Section 23.8. Try extending this to include:
23.6 Ÿ There are many issues in the theory of minimal surfaces that you can explore.
Some suggestions are:
23.7 Given the explicit formulae in Eq. (23.78) and Eq. (23.81), in each case work out
the complex tangent vector to the curve, and verify that it has zero length with respect to
the appropriate measure of distance.
24 Physics in three and four dimensions II
Introduction
The goal of this Chapter is to provide you with a very basic understanding of how
Laplace's equation (in three space variables) and the scalar wave equation (in three space
and one time dimension) can be solved using holomorphic methods. This chapter will
build on the methods developed in Chapter 23 in a very direct way, and you are recom-
mended to read that chapter now before proceeding further here.
The material on dimension three is, in part, a much simplified version of part of
a series of lectures given by Nigel Hitchin (now Professor, F.R.S.) in Oxford in the early
1980s. The picture presented here will not give you anything like the full geometrical
picture underlying the results, which we shall develop by elementary methods. Part of
the theory of the intrinsic three-dimensional approach is developed in a paper published
by Hitchin (1982). The four-dimensional picture is covered most comprehensively by its
principle architect, Professor Sir Roger Penrose, F.R.S., in Penrose and Rindler (1984a,
b).
G = Hx + Â yL + 2 z w - Hx - Â yL w2 (24.1)
This quadratic function of the complex variable w plays a very special role, and we shall
give it a name: hêêx HwL, where êxê = Hx, y, zL. For a proper discussion of the geometrical
significance of hêxê HwL you should see Hitchin (1982). Now suppose that f Hh, wL is
holomorphic in both of its arguments h and w. What can we say about f Hhêxê HwL, wL? As
it is holomorphic, we can certainly work out its second derivatives:
2 2
ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ f Hhx H wL, wL = H1 - w2 L fhh (24.2)
x
2 2
ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ f Hhx H wL, wL = -H1 + w2 L fhh (24.3)
y
2
ÅÅÅÅÅÅÅÅÅ2ÅÅÅ f Hhx H wL, wL = 4w2 fhh (24.4)
z
24 Physics in three and four dimensions II 541
w Ø ‰Ây w (24.7)
x + Ây Ø ‰Â y Hx + ÂyL (24.8)
It follows that
So the induced action on the h variable is also multiplication by ‰Ây . We also note that
„ w Ø ‰Ây „ w (24.10)
542 Complex Analysis with Mathematica
1 i hêxê HwL y 1
F = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ gjj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ zz ÅÅÅÅÅÅ „ w (24.12)
2p k w { w
This formula is equivalent to that given by Whittaker and Watson (1984, note 18.3). Its
geometrical characteristics in twistor terms have been uncovered in a series of articles
by, amongst others, by Ward (1981, 1990) and Mason (1990). It was originally written
down, in trigonometric form, by Whittaker (1903).
To elucidate the structure of this formula, we assume that g has a Laurent series
about the origin, and the contour is deformable to a circle containing the origin. We can
now consider components of g that are just powers of its argument. That is, we are
interested in evaluating
1 i hêxê HwL y 1
n
1 hn êxê HwL
Fn = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ jj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ zz ÅÅÅÅÅÅ „ w = ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ÅÅÅÅÅÅÅÅÅn+1
ÅÅÅÅÅÅÅÅÅÅÅÅ „ w (24.13)
2p k w { w 2p w
where the integration is over a circle. To evaluate Eq. (24.13), let us set y = 0,
z = r cosHqL, x = r sinHqL. Then Eq. (24.13) simplifies to
n
rn 1 1
ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ J2 cosHqL + J ÅÅÅÅÅÅ - wN sinHqLN ÅÅÅÅÅÅ „ w (24.14)
2p w w
0
p
(24.16)
= ‡ HcosHqL + Â cosHxL sinHqLL-n-1 „ x
0
= p Pn @cosHtLD
where Pn is the nth Legendre polynomial. Making some simple changes of variable, we
obtain, for Eq. (24.15), if n r 0,
2n rn Pn @cosHqLD (24.17)
Pk @cosHqLD
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (24.18)
2k+1 rk+1
Thus we obtain the well-known family of solutions in terms of Legendre polynomials.
This contour integral approach can also lead to other interesting representations of the
Legendre polynomials (see exercise 24.1.) Exercise 24.2 invites you to explore similar
solutions with the property that
F Ø ‰Âmy F (24.19)
2 F 2 F
ÅÅÅÅÅÅÅÅÅÅÅÅ2 Å + ÅÅÅÅÅÅÅÅÅÅÅÅ2 Å + l2 F = 0 (24.22)
x y
where h is general (holomorphic apart from some poles). What types of field does this
give us? We now need to evaluate expressions that boil down to contour integrals of the
form
‰l z 1
ÅÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ‰ ÅÅÅÅ2Å lHHx+ÂyLêw-Hx-ÂyLwL hHwL „ w (24.25)
2pÂ
where h (we assume) has a Laurent series. Under this assumption, we may as well
consider expressions of the form
544 Complex Analysis with Mathematica
1 1
ÅÅÅÅÅÅÅÅÅÅÅÅ ‡ ‰ ÅÅ2ÅÅ lHHx+ÂyLêw-Hx-ÂyLwL w-Hn+1L „ w (24.26)
2pÂ
for n an integer. To evaluate this we make use of the generating function for Bessel
functions in the form
¶
1
‰ ÅÅ2ÅÅ p Ht-1êtL = ‚ tk Jk HpL (24.27)
k=-¶
Hx - ÂyLw
t = - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = -‰-Âf w (24.29)
r
to construct solutions of the scalar wave equation in a natural holomorphic way. We are
now interested in the interpretation of holomoprhic functions of twistors f HZ a L in
space-time terms. Now by splitting the argument up into its spinor pairs:
it then becomes natural to consider space-time fields obtained by imposing the incidence
relation thus:
£
f HÂxAA pA£ , p A£ L (24.34)
and carrying out a suitable integration over possible values of pA£ . Now because the
incidence relation is really a relationship between space-time points and twistors consid-
24 Physics in three and four dimensions II 545
ered projectively – the scale being irrelevant, we need to work this out in projective
terms. In our standard coordinates, we have
è!!! 0
2 w = ÂHct + zL p0£ + ÂHx + ÂyL p1£ (24.35)
è!!! 1
2 w = ÂHx - ÂyL p0£ + ÂHct - zL p1£ (24.36)
Now we set
è!!! è!!!
p 0£ -Â 2 w0 -Â 2 w1
w = ÅÅÅÅÅÅÅÅÅÅ ; p = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ; q = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ; (24.37)
p 1£ p1£ p1£
Now working projectively with the scale factor p1£ removed, we wish to consider
contour integrals of the form
‡ gH p, q, wL „ w (24.40)
1 2 Y 2 Y 2 Y 2 Y
ÅÅÅÅÅ2ÅÅÅ ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅ2 Å - ÅÅÅÅÅÅÅÅÅÅÅÅ2 Å - ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ = 0 (24.42)
c t x y z
The fact that Eq. (24.41) satisfies Eq.(24.42) can be hammered out by direct differentia-
tion, but it is rather more transparent if more suitable coordinates are chosen. We
introduce
êê
u = ct - z; v = ct + z; z = x + Ây; z = x - Ây (24.43)
and note that (see Exercise 24.3) Eq. (24.42) is equivalent to the condition
546 Complex Analysis with Mathematica
i 2 Y 2 Y y
4 jj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅêêÅÅÅÅ zz = 0 (24.44)
k u v z z {
and satisfaction of Eq. (24.44) is immediate, since each term in Eq. (24.44) is the
contour integral of w times the mixed second derivative of g with respect to its first and
second arguments, and they cancel!
p = x + Ây + wHct + zL
(24.48)
q = ct - z + wHx - ÂyL
This first-order partial differential equation can be solved in a variety of ways. Perhaps
the simplest is to remove the right-hand side by use of an integrating factor based on the
second argument, q, of g. So we write
where
h h
w ÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅ = 0 (24.52)
p q
24 Physics in three and four dimensions II 547
p - wq
= x + Ây - wHwHx - ÂyL + Hct - zLL + wHct + zL
(24.54)
= Hx + ÂyL + 2zw - w2 Hx - Â yL
= hx H wL
where
2 F 2 F 2 F
ÅÅÅÅÅÅÅÅÅÅÅÅ2 Å + ÅÅÅÅÅÅÅÅÅÅÅÅ2 Å + ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ + k2 F = 0 (24.57)
x y z
Note also that when k = 0 this formula also reduces naturally to that we have already
given for the Laplace equation in 3-D. This is one of the ways in which the formulae for
three dimensions emerge as special cases of the relativistic result. Another approach
makes use of the freedom in the detailed choice of the integrating factor. If we balance it
symmetrically between the two arguments of g we obtain an equivalent representation:
-Â k
gHp, q, wL = ‰ ÅÅÅÅ2ÅÅÅÅÅÅÅ Hpêw+qL HHp - wq, wL (24.58)
This leads to the formula for solutions of the Helmholtz equation in the form
1
F = ‡ ‰- ÅÅ2ÅÅ ÂkHwHx-ÂyL+Hx+ÂyLêwL HHhx HwL, wL„ w (24.59)
Exercise 24.44 guarantees that any solution of Eq. (24.50) can be written in this form.
p
p ö pè = ÅÅÅÅÅÅ = w
è p
(24.61)
w
q
qö qè = ÅÅÅÅÅÅ = wè q (24.62)
w
If we now follow through the argument above for time-independent fields, we find that
the analogous formula for h is given (up to a sign) by
è - Hx + ÂyLwè 2 = - ÅÅÅÅhÅÅÅÅÅ
hè = qè - pè wè = Hx - ÂyL - 2zw (24.63)
w2
(1) The form of the axis-symmetry constraint is preserved under such an inversion;
(2) The only vector fields that are holomorphic everywhere has h a quadratic in w.
So far so good. But are these contour integral expressions really the appropriate generali-
zation of the simple formula for two dimensions? In two dimensions we usually just
write down
24 Physics in three and four dimensions II 549
One way to explore this is to see what happens when we reduce dimensions from three
to two, and seek solutions of Laplace's equation in three dimensions, but which satisfy
Now inspection of Eqs. (24.20–23) reveals that the procedure outlined there fails if l = 0
We only get functions that are independent of h. So this is a matter of some subtlety.
This is the point where we must get a better grip on the fact that our holomorphic
functions represent spatial fields only once the contour integration has been carried out.
We cannot just impose the condition
f Hh + t w, wL = f Hh, wL (24.70)
and we must take better account of the contour integration. Let us simplify matters and
assume that the contour of integration C is deformable to the unit circle. Suppose that
instead of Eq. (24.62) we demand that
where g0 is holomorphic on a region containing all of the interior of the unit circle, and
g1 is holomorphic on all of the exterior region, including infinity. Remember that this
means that we set z = 1 ê w and demand that g1 is holomorphic at z = 0. Now when we
integrate Eq. (24.63) over C, we obtain, by Cauchy's Theorem, the result that
which is what is actually required. We must take account of (63) when imposing transla-
tional symmetry. Now, differentiating Eq. (24.71) with respect to t, and then setting
t = 0, we obtain
f
w ÅÅÅÅÅÅÅÅÅÅ = g° 0 - g° 1 = G0 @h, wD - G1 @h, wD (24.73)
h
where the dot denotes t-differentiation, and G0 is holomorphic on the interior region, G1
on the exterior region. Now we integrate this relation with respect to h to obtain
where H0 is holomorphic on the interior region, H1 on the exterior region. Let us look at
the contribution of H0 to the remaining contour integration. The contribution is of the
form
H0 @hx HwL, wD
‡ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
w
ÅÅÅÅÅÅÅÅ „ w (24.75)
C
550 Complex Analysis with Mathematica
but since H0 is holomorphic on the interior of C we can evaluate this using the calculus
of residues at the manifest simple pole at w = 0. The answer is just
which is just a holomorphic function of x + Ây. A detailed analysis of the exterior peice
requires some more analysis, based on the change of global coordinate given in the
previous section. Inspection of Eq. (24.63) shows that the corresponding calculation
leads to a contribution that is a holomorphic function of hè x H0L, i.e. x - Ây. In other
words, the contour integrals that are translation invariant reduce to expressions of the
form
24.6 Comments
Chapters 23 and 24 were intended to be only the briefest of introductions to what is
possible in higher dimensions. You should be aware that this is just a rather blinkered
glimpse at the full power of twistor methods. In this chapter we have just been discuss-
ing the Laplace equation, scalar Helmholtz equation, and scalar (massless) wave equa-
tion, and using very simple ideas about contour integration.
The pure mathematicians among you should appreciate that we have glossed
over a proper treatment of the holomorphic functions and the contour integration. The
right setting for all of this is within sheaf cohomology. A good place to start in under-
standing how to set this up is Chapter 6 of Penrose and Rindler (1984b).
The theoretical/mathematical physicists among you should be aware that the
treatment of the scalar massless wave equation is a very special case. There are analo-
gous contour integral solutions on Minkowski space-time of the source-free:
Indeed, massless fields of arbitrary helicity are easily handled by twistor methods, as is
also discussed in Chapter 6 of Penrose and Rindler (1984b). The methods extend, rather
remarkably, to Yang–Mills fields and at least part (so far) of the way to the full Einstein
equations in General Relativity. These are essentially non-linear systems – in some ways
the solution of the minimal surface problem discussed in Chapter 23 is a model for the
management of such non-linear systems – Plateau's problem for minimal surfaces starts
off as a hard non-linear problem. It only becomes easy when viewed in the right
(holomorphic) way. Recent work includes clearer management of sources and currents.
A collection of useful recent entry points to work in twistor theory including these issues
is given, for example, by Bailey and Baston (1990), Mason and Hughston (1990),
Mason et al. (1990).
Those of you interested in applied mathematics in more of an engineering
context may wonder what these methods have to offer you. At the time of writing, this is
less clear, but there are some fascinating unexplored aspects. The contour integral
methods introduced here were first made widely known (albeit without a clear geometri-
cal picture, the non-cohomological aspects of which have been presented here) by
Whittaker and Watson (1984 in its current available form), in a text first published much
earlier. They have not (yet) become part of the standard undergraduate presentation,
probably because approaches based on repeated separation of variables (SOV) are easier
to teach, and, more importantly, because the imposition of boundary conditions is easy
within the SOV approach, provided the boundaries lie on coordinate surfaces. This is an
important provision. For example, exact solutions for scattering of time-harmonic plane
waves by objects are only available for simple structures such as spheres, cylinders and
so on. (A good catalogue is given by Bowman et al. 1987.) The computation of scatter-
ing by general objects is now a huge industry, remains difficult, and is still well beyond
the scope of numerical methods for a general two-dimensional boundary surface for
frequency domains of common interest. Yet there are tantalising sporadic appearances of
contour integral methods, from the ‘Watson transformation’ to the ‘Sommerfeld inte-
grals’ (see Bowman et al., 1987, for some examples). So far as this author is aware,
there is no systematic appreciation of whether and how such occasional appearances are
related to the general twistor formulae. Ph.D. project recommendation no. 1 is to sort
this out (hard) – a lesser and more practical Ph.D. proposition would be to try to under-
stand how specific boundary conditions influence the choice of twistor function and
contour. The author would be delighted to hear of progress in this area, and in applica-
tions of twistor methods to fields such as fluid dynamics, as well as scalar and electro-
magnetic scattering.
Exercises
24.1 The fact that each Legendre polynomial corresponds to a certain power of h ê w
makes it easy to add up series of such polynomials using the formula for a geometric
series. Using the calculus of residues and the integral representation for
552 Complex Analysis with Mathematica
2n rn Pn @cosHqLD
to show that
¶
1
‚ 2n rn Pn @cos qD = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
"################################ ##############
n=0 1 - 2H2rL cosHqL + H2rL2
Look up the definition of the associated Legendre functions and try to relate them to
your expressions. See also Note 18.31 of Whittaker and Watson (1984).
êê
24.3 Suppose that u = ct - z; v = ct + z; z = x + Ây; z = x - Ây. Show, by using the chain
rule for partial derivatives, that
1 2 Y 2 Y 2 Y 2 Y
ÅÅÅÅÅ2ÅÅÅ ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅ2 Å - ÅÅÅÅÅÅÅÅÅÅÅÅ2 Å - ÅÅÅÅÅÅÅÅÅ2ÅÅÅÅ = 0
c t x y z
is equivalent to:
i 2 Y 2 Y y
4 jj ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅêêÅÅÅÅ zz = 0
k u v z z {
a = p - wq
b = p + qw
Show, using the chain rule, that the PDE of Eq. (24.78) becomes
g Âkg
ÅÅÅÅÅÅÅÅÅÅ = - ÅÅÅÅÅÅÅÅÅÅÅÅ
b 2w
R. Maeder (1995). Function iteration and chaos. The Mathematica Journal, 5 (2), p.
28-40.
R. Maeder (1997). Programming in Mathematica. Third Edition. Addison Wesley.
L.J. Mason (1990). Sources and currents; relative cohomology and non-Hausdorff
twistor space. In Further Advances in twistor theory Vol. I: The Penrose transform and
its Applications. Pitman Research Notes in Mathematics 231. Longman.
L.J. Mason and L.P. Hughston (ed.) (1990). Further advances in twistor theory, Vol. 1:
The Penrose transform and its Applications. Pitman Research Notes in Mathematics 231.
Longman.
L.J. Mason, L.P. Hughston P.Z. and Kobak (ed.) (1990). Further advances in twistor
theory, Vol. 2: Integrable systems, conformal geometry and gravitation. Pitman Research
Notes in Mathematics 232. Longman.
Mathematica Applications Package – Dynamic Visualizer (1999). See the web site at:
http://www.wolfram.com/products/applications/visualizer/
R. May (1976). Simple mathematical models with very complicated dynamics. Nature,
261, p. 459-469.
L.M. Milne-Thomson (1937). On the relation of an analytic function of z to its real and
imaginary parts. Mathematical Gazette, 244 (21), p. 228-229.
L.M. Milne-Thomson (1938). Theoretical Hydrodynamics, first edition. See also second
edition (1949), third Edition (1955), fourth Edition (1962). The fifth edition remains
available as a Dover reprint.
M. Montcheuil (1905). Résolution de l'équation ds2 = d x2 + d y2 + d z2 , Bulletin de la
Société Mathématique de France, 33, p. 170-171.
T. Needham (1997). Visual Complex Analysis. Clarendon Press.
H. Ockendon and J.R. Ockendon (1995). Viscous Flow. Cambridge texts in applied
mathematics, Cambridge University Press.
J.R. Ockendon, S.D. Howison, A. Lacey and A. Movchan (2003). Applied Partial
Differential Equations, revised edition, Oxford University Press.
H-0. Peitgen and P.H. Richter (1986). The Beauty of Fractals: images of complex
dynamical systems, Springer.
R. Penrose (1959). The apparent shape of a relativistically moving sphere. Proceedings
of the Cambridge Philosophical Society, 55, p. 137-9.
R. Penrose (1999). The Emperor's New Mind. Oxford University Press.
R. Penrose (2004). The Road to Reality. Jonathan Cape.
R. Penrose and W. Rindler (1984a). Spinors and space-time, Vol. 1: Two-spinor calcu-
lus and relativistic fields. Cambridge University Press.
R. Penrose and W. Rindler (1984b). Spinors and space-time, Vol. 2: Spinor and twistor
methods in space-time geometry. Cambridge University Press.
W.H. Press, S.A. Teukolsky, W. T. Vetterling and B.P. Flannery (1992). Numerical
Recipes in C, The Art of Scientific Computing, Second Edition. Cambridge University
Press.
A.P. Prudnikov, Yu.A. Brychkov and O.I. Marichev (1998). Integrals and Series, Vol 4:
Direct Laplace Transforms, (second printing). Gordon and Breach.
A.P. Prudnikov, Yu.A. Brychkov and O.I. Marichev (2002). Integrals and Series, Vol 5:
Inverse Laplace Transforms, (digital edition). Gordon and Breach.
556 Complex Analysis with Mathematica
K.B. Ranger (1991). A complex variable integration technique for the two-dimensional
Navier–Stokes equations. Quarterly of Applied Mathematics, XLIX (2), p. 555-562.
K.B. Ranger (1994). Parametrization of general solutions for the Navier–Stokes equa-
tion., Quarterly of Applied Mathematics, LII, p. 335-41.
M. Rizzardi (1995). A modification of Talbot's method for the simultaneous approxima-
tion of several values of the inverse Laplace transform. ACM Transactions on Mathemati-
cal Software, 21 (4), p. 347-371.
W. Rudin (1976). Principles of Mathematical Analysis. McGraw-Hill.
W.T. Shaw (1985). Twistors, minimal surfaces and strings, Classical and Quantum
Gravity, 2, L113-119.
W.T. Shaw and J. Tigg (1993). Applied Mathematica. Addison-Wesley.
W.T. Shaw (1995). Symmetric chaos in the complex plane. The Mathematica Journal, 5
(3), p. 85-89.
W.T. Shaw (1995b). MathLive and the virtual dynamics lab. The Mathematica Journal,
5 (2), p. 14-20.
W.T. Shaw (1998). Modelling Financial Derivatives with Mathematica, Cambridge
University Press.
W.T. Shaw (2004). Recovering holomorphic unctions from their real or imaginary parts
without the Cauchy-Riemann equations. SIAM Review, 46 (4), p. 717-728.
W.T. Shaw and L.P. Hughston (1990). Twistors and strings. In Twistors in mathematics
and physics, eds. T.N. Bailey and R. Baston. London Mathematical Society Lecture
Notes, no. 156. Cambridge University Press.
B.C. Skotton (1994). On amplitude and phase in printed characters. The Mathematica
Journal, 4 (2), p. 83-86.
M.R. Spiegel (1965). Laplace Transforms. Schaum's Outlines series, McGraw-Hill.
M.R. Spiegel (1981). Theory and Problems of Complex Variables. Schaum's outline
series, McGraw-Hill.
S. Stahl (1993). The Poincaré half-plane: a gateway to modern geometry. Jones and
Bartlett.
R.A. Struble (1979). Obtaining analytic functions and conjugate harmonic functions.
Quarterly of Applied Mathematics, 37 p.79-81.
A. Talbot (1979). The accurate numerical inversion of Laplace transforms. Journal of the
Institute of Mathematics and its Applications, 23, p. 97-120.
J. Terrell (1959). Invisibility of the Lorentz contraction, Physical Review D, 116 (4), p.
1041-5.
L.N. Trefethen (1980). Numerical computation of the Schwarz–Christoffel transforma-
tion. SIAM Journal of Scientific and Statistical Computing, 1, p. 82-102.
L.N. Trefethen (ed.) (1986). Numerical Conformal Mapping. North-Holland.
L.N. Trefethen and T.A. Driscoll (1998). Schwarz–Christoffel mapping in the computer
era, Oxford University Computing Laboratory report 98/08.
J. Vecer (2002). Unified Asian pricing. RISK Magazine, June.
L.I. Volkovyskii, G.L. Lunts, I.G. Aramanovich (1960). (Russian original edition) A
Collection of Problems on Complex Analysis. English translation (1965) Pergamon Press.
Currently available as Dover reprint (1991).
S. Wagon (1991). Mathematica in Action. W.H. Freeman.
Bibliography 557
R.S. Ward, R.S (1981). Axissymmetric stationary fields. In Twistor Newsletter 11.
Reprinted (1990) In Further Advances in twistor theory Vol. I: The Penrose transform
and its Applications. Pitman Research Notes in Mathematics 231. Longman.
K. Weierstrass (1866a). Über die Flächen derren mittlere Krümmung überall gleich null
ist. Monatsberichte der Königlich Preußischen Akademie der Wissenschaften zu Berlin,
p. 612-625.
K. Weierstrass (1866b). (1866a via the world-wide web):
http://bibliothek.bbaw.de/bibliothek-digital/digitalequellen/schri
ften/anzeige/index_html?band=09-mon/1866&seite:int=628
E.T. Whittaker (1903). On the partial differential equations of mathematical physics.
Mathematische Annalen, 57, p. 333-355.
E.T. Whittaker and G.N. Watson (1984). A course of modern analysis. Cambridge
University Press.
T. Wickham Jones (1994). Mathematica Graphics, Techniques and Applications.
Springer.
S. Wolfram (2003). The Mathematica Book, 5th Edition. Wolfram Media.
Index