using Plots, ComplexPhasePortrait, ApproxFun, DualNumbers, SpecialFunctions
gr()
Plots.GRBackend()
Dr. Sheehan Olver
Office Hours: 4-5pm Mondays, Huxley 6M40
with applications to PDEs, airfoil design, etc. 2. Weiner–Hopf method with applications to integral equations with integral operators ∫∞0K(x−y)u(y)dy
Central themes:
Applications (not necessarily discussed in the course):
There is a project worth 10%. This project is open ended: you propose a topic. This could be computational based (possibly based on the slides), theoretical based (possibly looking at material from Ablowitz & Fokas), or otherwise. If you are having difficulty coming up with a proposal, please attend the office hours for advice.
Timeline:
The first few lectures will review the basics of complex analysis. We will use plots to help explain the material, and so this first lecture will focus on getting comfortable with plots of analytic functions.
Consder a complex-valued function f:D→C where D⊂C. To help understand such functions it is useful to plot them. But how?
Every complex-valued function can be written as f(z)=u(z)+iv(z) where u:D→R and v:D→R are real-valued. These are easy to plot separately. We can do a surface plot:
f = z -> exp(z)
u = z -> real(f(z))
v = z -> imag(f(z))
# set up plotting grid
xx = range(-2 ; stop=2, length=100)
yy = range(-10; stop=10, length=100)
plot(surface(xx, yy, u.(xx' .+ im.*yy); title="real"),
surface(xx, yy, v.(xx' .+ im.*yy); title="imag"))
Or a heat plot:
plot(contourf(xx, yy, u.(xx' .+ im.*yy); title="real"),
contourf(xx, yy, v.(xx' .+ im.*yy); title="imag"))
Every complex number z can be written as reiθ for 0≤r and −π<θ≤π. r=|z| is called the absolute value and θ is called the phase or argument (or in Julia, angle). We can plot these:
xx = -2:0.01:2
yy = -10:0.01:10
f = z -> exp(z)
r = z -> abs(f(z))
θ = z -> angle(f(z))
plot( contourf(xx, yy, r.(xx' .+ im.*yy); title="abs"),
contourf(xx, yy, θ.(xx' .+ im.*yy); title="phase"))
This method is essentially the same, as before, but to only plot the phase, and use a "colour wheel" to reflect the topology of θ.
phaseplot(-3..3, -8..8, z -> exp(z))
This is seen most clearly with f(z)=z: in this case, letting z=reiθ we are simply plotting θ:
phaseplot(-3..3, -3..3, z -> z)
In other words, the colour red corresponds to argf(z)≈0, green to argf(z)≈2π3 aqua to argf(z)≈π and so on.
Note that multiplying z by a complex number Reiφ will rotate the wheel, but the colours still appear in the same order when read counter clockwise:
phaseplot(-3..3, -3..3, z -> exp(1.0im)*z)
Therefore, if f(z) has a zero at z0, since it behaves like f(z)=f′(z0)(z−z0), we will have the full colour wheel always in the counter clockwise order red–green–blue–red:
phaseplot(-20..20, -3..3, z -> sin(z))
In the case of a double root like f(z)=z2=re2iθ, we have the wheel appearing twice, but still in the same order. Thus the order of a zero can be seen by the number of times we go around the colour wheel: here we see that the function has a triple root at zero since it goes red–green–blue–red–green–blue–red–green–blue–red:
phaseplot(-5..5, -3..3, z -> z^2*sin(z))
On the other hand, if we plot f(z)=z−1=r−1e−iθ the wheel is reversed to be red–blue–green–red:
phaseplot(-3..3, -3..3, z -> 1/z)
Thus we can see from a phase plot where the poles and zeros are, and the order of the poles and roots: the following function has a double pole at 0 (red–blue–green–red–blue–green), a zero at −π2 (red–green–blue–red) and a double zero at π2 (red–green–blue–red–green–blue–red) :
phaseplot( -3..5, -3..3, z -> cot(z)/z*(π/2-z))
Functions with more complicated singularities do not have such nice phase plots (these are what we will call essential singularities):
phaseplot(-3..3, -3..3, z -> exp(1/z))
The jumps of functions like logz or √z also appear naturally in the phase plot: here we see logz has a zero at 1 (red–green–blue–red) and a jump along (−∞,0]
phaseplot( -3..3, -3..3, z -> log(z))
Often, singularities are in the complex plane. can you determine where the zeros and roots, and their orders, of the following function are from the picture?
phaseplot(-3..3, -3..3, z -> z^5 / (1 + z^2)^3)
phaseplot(-3..3, -3..3, z -> erfc(z))
Here's the Gamma function. Are they poles or zeros at 0, -1, -2, ...?
phaseplot(-3..3, -3..3, z -> gamma(z))
Something strange is happening at -1/2, -3/2, .... What if we differentiate? Here dual(z,1)
is a dual number, which provides a convenient way to implement automatic differentiation: gammap(z)
is derivative of gamma(z)
w.r.t. z
.
gammap = z -> epsilon(gamma(dual(z,1)))
phaseplot(-3..3, -3..3, gammap)
Finally, the Riemann Hypothesis: Here is a plot of the Riemann zeta function near the critical line z=0.5+it:
phaseplot(0:0.011:2, -2:0.011:40, zeta)