using Plots, ComplexPhasePortrait, ApproxFun gr(); z = -2 + 1.0im phaseplot(-3..3, -3..3, ζ -> 1/ζ) t = 0:0.1:1 γ = 1 .+ (z-1)*t plot!(real.(γ), imag.(γ); color=:black, label="contour", arrow=true) phaseplot(-3..3, -3..3, z -> log(z)) log(-1+0.0im), log(-1-0.0im) θ = range(0, stop=0.9π, length=100) a = exp.(im*θ) z = exp(0.9*π*im) γ = 1 .+ (z-1)*t phaseplot(-3..3, -3..3, ζ -> 1/ζ) plot!(real.(γ), imag.(γ); color=:black, label="contour", arrow=true) plot!(real.(a), imag.(a), color=:black, linestyle=:dash, label="deformed", arrow=true) sum(Fun(ζ -> 1/ζ, Arc(0.,1.,(0.,π)))), sum(Fun(ζ -> 1/ζ, Arc(0.,1.,(0.,-π)))) log(-1.0+0im) - log(-1.0-0im), sum(Fun(ζ -> 1/ζ, Circle())) phaseplot(-3..3, -3..3, z -> log(z)) z = -2 + 2im γ = (z,t) -> 1 + t*(z-1) tt = range(0,stop=1,length=100) plot!(real.(γ.(z,tt)), imag.(γ.(z,tt)); color=:black, label="contour", arrow=true) plot!(real.(1 ./ γ.(z,tt)), imag.(1 ./ γ.(z,tt)); color=:black, linestyle=:dash, arrow=true, label="change of variables contour") plot!(real.(γ.(1/z,tt)), imag.(γ.(1/z,tt)); color=:black, linestyle=:dashdot, arrow=true, label="deformed contour") phaseplot(-3..3, -3..3, z -> -log(1/z)) α = 0.5 phaseplot(-3..3, -3..3, z -> z^α) sqrt(-1-0.0im) , -sqrt(-1 + 0.0im) x = -2 (x+0.0im)^α - (x-0.0im)^α, 2im*(-x)^α*sin(π*α) x = -1 (x+0.0im)^α + (-1-0.0im)^α, 2*(-x)^α*cos(π*α) sqrt(x+0.0im) - sqrt(x-0.0im) == 2im*sqrt(-x) sqrt(x+0.0im) + sqrt(x-0.0im) φ = z -> sqrt(z-1)*sqrt(z+1) phaseplot(-3..3, -3..3, φ) x = 0.1 φ(x + 0.0im) + φ(x - 0.0im) x = 0.1 φ(x + 0.0im) - φ(x - 0.0im), 2im*sqrt(1-x^2) φ = z -> sqrt(z-1)sqrt(z+1) x = -3.0 φ(x+0.0im), φ(x-0.0im) z = 0.2+0.2im x = 0.1 ε = 0.001 scatter([x],[0.]; label="x", xlims=(-1.5,1.5), ylims=(-0.5,0.5)) scatter!([real(z)],[imag(z)]; label="z") plot!(-1..1; label="Unit interval", linestyle=:dot) Γₓ = Arc(z, 0.1, (-π/2,π)) ∪ Segment(0.2+0.1im,0.2 +0.0im) ∪ Segment(0.2 +0.0im, -0.9 +0.0im) ∪ Circle(-1.0, 0.1) ∪ Segment(-0.9 -0.0im, 0.2 -0.0im) ∪ Segment(0.2-0.0im, 0.2 - 0.2im) ∪ Segment(0.2 - 0.2im, -1.2-0.2im) ∪ Segment(-1.2 -0.2im, -1.2+ 0.2im) ∪ Segment(-1.2+ 0.2im, 0.1+0.2im) plot!(Γₓ; label="Contour") z = 0.2+0.2im x = 0.1 ε = 0.001 scatter([x],[0.]; label="x", xlims=(-1.5,1.5), ylims=(-0.5,0.5)) scatter!([real(z)],[imag(z)]; label="z") plot!(-1..1; label="Unit interval", linestyle=:dot) Γ̃ₓ = Arc(z, 0.1, (-π/2,π)) ∪ Segment(0.2+0.1im,0.2 -0.2im) ∪ Circle(-1.0, 0.1) ∪ Segment(0.2 - 0.2im, -1.2-0.2im) ∪ Segment(-1.2 -0.2im, -1.2+ 0.2im) ∪ Segment(-1.2+ 0.2im, 0.1+0.2im) plot!(Γ̃ₓ; label="Contour") z₀ = 0.2 +0.2im z = 0.4 +0.2im scatter([real(z₀)],[imag(z₀)]; label="z_0") scatter!([real(z)],[imag(z)]; label="z") plot!(Circle(z₀, 0.1); label="gamma_r") plot!(Circle(z₀, 0.3); label="gamma_R") κ = z -> 1/(sqrt(z-1)sqrt(z+1)) phaseplot(-3..3, -3..3, κ) x = 0.1 κ(x + 0.0im) - κ(x - 0.0im) , -2im/sqrt(1-x^2) x = -2.3 κ(x + 0.0im) - κ(x - 0.0im) μ = z -> (log(z-1) - log(z+1))/(2π*im) phaseplot(-3..3, -3..3, μ) x = 0.3 μ(x + 0.0im) - μ(x - 0.0im) x = -4.3 μ(x + 0.0im) - μ(x - 0.0im)