using Plots, ComplexPhasePortrait, ApproxFun
gr();
Definition (Domain) A domain is a non-empty, open and connected set D⊂C.
Definition (Homotopic) Two closed contours γ1:[a,b]→D and γ2→D in a domain D are homotopic if they can be continuously deformed to one-another while remaining in D.
Theorem (Deformation of contours) Let f(z) be holomorphic in a domain D. Let γ1 and γ2 be two homotopic contours. Then ∫γ1f(z)dz=∫γ2f(z)dz
Definition (Simply connected) A domain is simply connected if every closed contour is homotoic to a point.
Corollary (Deformation of contours on simply connected domains) Let f(z) be holomorphic in a simply-connected domain D. If γ1 and γ2 are two contours in D with the same endpoints, then
∫γ1f(z)dz=∫γ2f(z)dzDemonstration We can test this experimentally: in the following, the integral (implemented as sum
) over two different contours returns the same vaule (up to numerical precision)
f = Fun( z -> exp(z), Arc(0.,1.,(0,π/2))) # Holomorphic!
f̃ = Fun( z -> exp(z), Segment(1,im)) # Holomorphic!
sum(f) , sum(f̃)
(-2.1779795225909058 + 0.8414709848078968im, -2.1779795225909053 + 0.8414709848078966im)
Here is a depection of the two contours:
plot(domain(f); ratio=1.0, legend=false, arrow=true)
plot!(domain(f̃), arrow=true)
Contours are oriented: there is a notion of "left" and "right" inherited from [a,b]. For closed contours, there is as notion of positive/negative orientation:
Definition (Positive/negative orientation) Let γ be a simple closed contour and z in the interior of γ. We say that γ is positively oriented if 12πi∮γdζζ−z=1
Demonstration Here we see numerically that 1/z is positively oriented:
sum(Fun(z -> 1/z, Circle()))/(2π*im)
1.0 + 1.2545118101832475e-16im
Cauchy's integral formula allows us to recover a function from knowlerdge of its values on a surrounding contour:
Theorem (Cauchy integral formula) Suppose f is holomorphic inside and on a positively oriented, simple, closed contour γ. Then f(z)=12πi∮γf(ζ)ζ−zdζ
Demonstration This shows numerically that we can calculate e0.1 by integrating over a circle that surrounds z=0.1:
γ = Circle()
ζ = Fun(γ)
z = 0.1
sum(exp(ζ)/(ζ-z)) /(2π*im) - exp(z)
0.0 - 0.0im
Not only do we know f, we also know that f is infinitely-differentiable, and we know all its values:
Corollary (Cauchy integral formula for derivatives) Suppose f is holomorphic inside and on a positively oriented, simple, closed contour γ. Then f is infinitely-differentiable at z and f(k)(z)=k!2πi∮γf(ζ)(ζ−z)k+1dζ
Demonstration Here we show that we can recover ez using any of the derivatives:
k=10
factorial(1.0k)*sum(exp(ζ)/(ζ-z)^(k+1))/(2π*im) - exp(z)
1.7801382590221237e-10 - 0.0im
z = 0.1
k = 5
factorial(1.0k)*sum(exp(ζ)/(ζ-z)^(k+1))/(2π*im) - exp(z)
4.218847493575595e-15 - 0.0im
Theorem (Taylor) Suppose f is holomorphic in a ball B(z0,r). Then inside this ball we have f(z)=∞∑k=0f(k)(z0)k!(z−z0)k
Examples
here we plot the n-term Taylor approximation of ez:
expⁿ = (n,z) -> sum(z^k/factorial(1.0k) for k=0:n)
phaseplot(-20..20, -20..20, z -> expⁿ.(10,z))
And now the n-term Taylor approximation to 1/(1−z):
geometricⁿ = (n,z) -> sum(z^k for k=0:n)
phaseplot(-2..2, -2..2, z -> geometricⁿ.(20,z))
And here the n-term Taylor approximation of √z near z0:
function sqrtⁿ(n,z,z₀)
ret = sqrt(z₀)
c = 0.5/ret*(z-z₀)
for k=1:n
ret += c
c *= -(2k-1)/(2*(k+1)*z₀)*(z-z₀)
end
ret
end
z₀ = 0.3
n = 40
phaseplot(-2..2, -2..2, z -> sqrtⁿ.(n,z,z₀))