using Plots, ComplexPhasePortrait, ApproxFun
References:
Definition (Complex-differentiable) Let D⊂C be an open set. A function f:D→C is called complex-differentiable at a point z0∈D if f′(z0)=limz→z0f(z)−f(z0)z−z0
Definition (Holomorphic) Let D⊂C be an open set. A function f:D→C is called holomorphic in D if it is complex-differentiable at all z∈D.
Definition (Entire) A function is entire if it is holomorphic in C
Examples
We can usually infer the domain where a function is holomorphic from a phase portrait, here we see that arcsinhz has cuts on [i,i∞) and [−i,−i∞), and a zero (red–green–blue–red) at zero, hence we can infer that it is holomorphic in C∖([i,i∞)∪[−i,−i∞)).
phaseplot(-4..4, -4..4, z -> asinh(z))
The following example √z−1√z+1 is analytic in C∖[−1,1] and will be returned to:
phaseplot(-4..4, -4..4, z -> sqrt(z-1)sqrt(z+1))
Definition (Contour) A contour is a continuous & piecewise-continuously differentiable function γ:[a,b]→C.
Definition (Simple) A simple contour is a contour that is 1-to-1.
Definition (Closed) A closed contour is a contour such that γ(a)=γ(b)
Examples of contours
Here's an example of a closed contour that is not simple:
a,b = -π, π
tt = range(a, stop=b, length=1000)
γ = t -> exp(im*t) +exp(2im*t)
plot(real.(γ.(tt)), imag.(γ.(tt)); ratio=1.0, legend=false, arrow=true)
Definition (Contour integral) The contour integral over γ is defined by ∫γf(z)dz:=∫baf(γ(t))γ′(t)dt
f = Fun( z -> real(exp(z)), Arc(0.,1.,(0,π/2))) # Not holomorphic!
plot(domain(f); legend=false, ratio=1.0, arrow=true)
sum(f) # this means contour integral
-1.2485382363935424 + 1.949326343919058im
g = im*Fun(t-> f(exp(im*t))*exp(im*t), 0 .. π/2)
sum( g ) # this is standard integral
-1.2485382363935429 + 1.9493263439190578im
An important property of a contour is its arclength:
Definition (Arclength) The arclength of γ is defined as L(γ):=∫ba|γ′(t)|dt
A very useful result is that we can use the maximum and arclength to bound integrals:
Proposition (ML) Let f:γ→C and M=supz∈γ|f(z)|
f = Fun( z -> exp(z), Arc(0.,1.,(0,π/2))) # Not holomorphic!
sum(f) , f(im)-f(1)
(-2.1779795225909058 + 0.8414709848078968im, -2.177979522590906 + 0.8414709848078968im)
f = Fun( z -> exp(z), Arc(0.,1.,(0,π/2))) # Holomorphic!
sum(f) , f(im)-f(1)
(-2.1779795225909058 + 0.8414709848078968im, -2.177979522590906 + 0.8414709848078968im)
f = Fun( z -> exp(z), Segment(1,im)) # Holomorphic!
sum(f) , f(im)-f(1)
(-2.1779795225909053 + 0.8414709848078966im, -2.177979522590907 + 0.8414709848078968im)
Theorem (Cauchy) If f is holomorphic inside and on a closed contour γ, then ∮γf(z)dz=0
f = Fun( z -> real(exp(z)), Circle()) # Not holomorphic!
sum(f)
-3.3420237696193494e-16 + 3.141592653589793im
f = Fun( z -> exp(z), Circle()) # Holomorphic!
sum(f)
2.9644937254112756e-17 - 1.4872544363724962e-16im