using Plots, ApproxFun, SingularIntegralEquations, DifferentialEquations, ComplexPhasePortrait
gr();
Dr Sheehan Olver
Take as an initial guess ϕ1(z)=√z−1√z+12i(1+z2)
Further, as z→∞, ϕ1(z)∼zi(1+z2)→0
The catch is that it has poles at ±i: ϕ1(z)=−√i−1√i+141z−i+O(1)ϕ1(z)=√−i−1√−i+141z+i+O(1)
By Plemelj II, this must be the Cauchy transform.
Demonstration We will see experimentally that it correct. First we do a phase plot to make sure we satisfy (Analyticity):
φ = z -> sqrt(z-1)sqrt(z+1)/(2im*(1+z^2)) +
sqrt(im-1)sqrt(im+1)/4*1/(z-im) -
sqrt(-im-1)sqrt(-im+1)/4*1/(z+im)
phaseplot(-3..3, -3..3, φ)
We can also see from the phase plot (Regularity): we have weaker than pole singularities, otherwise we would have at least a full,counter clockwise colour wheel. We can check decay as well:
φ(200.0+200.0im)
0.0005177682933717976 + 0.000517765612545622im
Finally, we compare it numerically it to cauchy(f, z)
which is implemented in SingularIntegralEquations.jl:
φ(2.0+2.0im)
0.05303535516221752 + 0.05036581190871381im
x = Fun()
cauchy(sqrt(1-x^2)/(1+x^2), 2.0+2.0im)
0.0530353551622175 + 0.050365811908713795im
Recall that ψ(z)=log(z−1)−log(z+1)2πi
φ = z -> (log(z-1)-log(z+1)) / ((2π*im)*(2+z)) - log(3)/(2π*im*(2+z))
phaseplot(-3..3, -3..3, φ)
φ(2.0+2.0im)
0.0416136101650096 + 0.04191488519537722im
cauchy(1/(2+x), 2.0+2.0im)
0.041613610165009585 + 0.04191488519537721im
We first calculate the Cauchy transform of f(x)=x/√1−x2: ϕ(z)=iz2√z−1√z+1−i2
f = x/sqrt(1-x^2)
π*hilbert(f, 0.1)
3.141592653589793
C = randn()
φ = z -> -z/(2*sqrt(z-1)*sqrt(z+1))+1/2 + C/(sqrt(z-1)*sqrt(z+1))
#11 (generic function with 1 method)
φ(0.1+0.0im)+φ(0.1-0.0im)
1.0 + 0.0im
φ(1E8)
2.1249130872220166e-8
ψ(z)=ϕ(z)−1 satifies ψ+(x)+ψ−(x)=−2,ψ(∞)=0
C = randn()
φ = z -> z/(sqrt(z-1)*sqrt(z+1)) + C/(sqrt(z-1)*sqrt(z+1))
#13 (generic function with 1 method)
φ(0.1+0.0im)+φ(0.1-0.0im)
0.0 + 0.0im
φ(1E9)
0.9999999983329383
For f(x)=√1−⋄2, we use the formula ϕ(z)=i√z−1√z+1C[√1−⋄2f](z)+C√z−1√z+1=i√z−1√z+1C[1−⋄2](z)+C√z−1√z+1
Demonstration Here we see that the Cauchy transform of x2 has the correct formula:
z = 2.0+2.0im
cauchy(x^2, z)
0.028322293739596095 + 0.024377589786690298im
(z^2*(log(z-1)-log(z+1))+2z)/(2π*im)
0.028322293739596032 + 0.02437758978669024im
We now see that ϕ has the right jumps:
C = randn()
φ = z -> im/(sqrt(z-1)*sqrt(z+1)) * ((1-z^2)*(log(z-1)-log(z+1))-2z)/(2π*im) + C/(sqrt(z-1)sqrt(z+1))
#15 (generic function with 1 method)
φ(0.1+0.0im) + φ(0.1-0.0im) - sqrt(1-0.1^2)
1.1102230246251565e-16 + 0.0im
Finally, it vanishes at infinity:
φ(1E5)
-1.0949779687205364e-6 - 0.0im
Let f(x)=11+x2. From Problem 1.1 part 1 we know C[√1−⋄2]f(z)=√z−1√z+12i(1+z2)+√i−1√i+141z−i−√−i−1√−i+141z+i
But we want something stronger: that ϕ(z)=O(z−2). To accomplish this, we need to choose C. Fortunately, I made the problem easy as every term apart from the last one is already O(z−2), so choose C=0:
φ = z -> 1/(2*(1+z^2)) +
sqrt(im-1)sqrt(im+1)*im/(4sqrt(z-1)sqrt(z+1))*1/(z-im) -
sqrt(-im-1)sqrt(-im+1)*im/(4sqrt(z-1)sqrt(z+1))*1/(z+im)
φ(1E5)*1E5^2
-0.2071067812011923 + 0.0im
We see also that it has the right jump:
φ(0.1+0.0im) + φ(0.1-0.0im)
0.9900990099009901 + 0.0im
1/(1+0.1^2)
0.9900990099009901
Plugging in f(x)=x/√1−x2 means we need to calculate H[⋄](x)
t = Fun()
z = 2.0+2.0im
cauchy(t, z), z*(log(z-1)-log(z+1))/(2π*im) + 1/(im*π)
(0.013174970881571598 - 0.00098617598822645im, 0.013174970881571569 - 0.0009861759882264232im)
Therefore, we have H[⋄](x)=i(C++C−)⋄(x)=xlog(1−x)−log(1+x)π+2π
x = 0.1
hilbert(t,x), x*(log(1-x)-log(1+x))/(π) + 2/π
(0.6302322257442835, 0.6302322257442834)
Therefore, we get u(x)=−x(log(1−x)−log(1+x))+2π√1−x2−C√1−x2
NIntegrate[-((
x (Log[1 - x] - Log[1 + x]) +
2)/(π Sqrt[1 - x^2] (x - 0.1))), {x, -1, 0.1, 1},
PrincipalValue -> True]/π
t = Fun()
z = 2.0+2.0im
cauchy(sqrt(1-t^2)/(2+t), z), (sqrt(z-1)sqrt(z+1)-z)/(2im*(2+z)) + (sqrt(3)-2)/(2im*(z+2))
(0.03230545315801244 + 0.032449695183223826im, 0.032305453158012455 + 0.032449695183223784im)
Therefore, calculating i(C++C−) we find that H[√1−⋄22+⋄](z)=−x2+x+√3−22+x
x = 0.1
hilbert(sqrt(1-t^2)/(2+t), x), -x/(2+x)+(sqrt(3)-2)/(2+x)
(-0.17521390115767732, -0.17521390115767752)
Thus the general solution is u(x)=1√1−x2(x2+x−√3−22+x+C)
u = (t/(2+t)-(sqrt(3)-2)/(2+t)+(sqrt(3)-3)/3)/sqrt(1-t^2)
plot(u; ylims=(-5,5))
x = 0.1
hilbert(u,x) , 1/(2+x)
(0.4761904761904754, 0.47619047619047616)
Doing the change of variables ζ=bs we have log(ab)=∫ab1dζζ=∫a1/bdss
a = 1.0+2.0im
b = -1.0-2.0im
@show log(a*b)
@show log(a) + log(b)
scatter([real(1/b)], [imag(1/b)]; label="1/b")
scatter!([real(a)], [imag(a)]; label="a")
scatter!([0.0], [0.0]; label="0")
plot!(Segment(1, 1/b) ∪ Segment(1/b, a) ∪ Segment(a, 1); label="contour")
log(a * b) = 1.6094379124341003 - 0.9272952180016122im log(a) + log(b) = 1.6094379124341003 - 0.9272952180016123im
If it surrounds the origin counbter-clockwise, that is, it has positive orientation, we have 2πi=∮γdss, which shoes that log(ab)=2πi−[∫1a+∫1/b1]dss=loga+logb+2πi
a = 1.0+2.0im
b = -2.0+2.0im
@show log(a*b)
@show log(a) + log(b) - 2π*im
scatter([real(1/b)], [imag(1/b)]; label="1/b")
scatter!([real(a)], [imag(a)]; label="a")
scatter!([0.0], [0.0]; label="0")
plot!(Segment(1, 1/b) ∪ Segment(1/b, a) ∪ Segment(a, 1); label="contour")
log(a * b) = 1.8444397270569681 - 2.819842099193151im (log(a) + log(b)) - (2π) * im = 1.844439727056968 - 2.819842099193151im
If the contour passes through the origin, there are three possibility:
1. In the case where a<0 and b<0 (and hence ab>0), perturbing a above and b below or vice versa avoids γ winding around zero, so we have log(ab)=log+a+log−b=log−a+log+b=log+a+log+b−2πi=log−a+log−b+2πi
a = -2.0
b = -3.0
@show log(a*b)
@show log(a+0.0im) + log(b-0.0im)
@show log(a-0.0im) + log(b+0.0im)
@show log(a-0.0im) + log(b-0.0im) + 2π*im
@show log(a+0.0im) + log(b+0.0im) - 2π*im;
log(a * b) = 1.791759469228055 log(a + 0.0im) + log(b - 0.0im) = 1.791759469228055 + 0.0im log(a - 0.0im) + log(b + 0.0im) = 1.791759469228055 + 0.0im log(a - 0.0im) + log(b - 0.0im) + (2π) * im = 1.791759469228055 + 0.0im (log(a + 0.0im) + log(b + 0.0im)) - (2π) * im = 1.791759469228055 + 0.0im
In the case where a<0 and b>0, then ab<0, but we can perturb a above/below to get log±(ab)=log±a+logb
a = -2.0
b = 3.0
@show log(a*b +0.0im)
@show log(a+0.0im) + log(b);
@show log(a*b -0.0im)
@show log(a-0.0im) + log(b);
log(a * b + 0.0im) = 1.791759469228055 + 3.141592653589793im log(a + 0.0im) + log(b) = 1.791759469228055 + 3.141592653589793im log(a * b - 0.0im) = 1.791759469228055 - 3.141592653589793im log(a - 0.0im) + log(b) = 1.791759469228055 - 3.141592653589793im
In the case where a<0, if ℑb>0 we can perturb a below so that γ does not contain zero, giving us log(ab)=log−a+logb
a = -2.0
b = 3.0 + im
@show log(a*b)
@show log(a-0.0im) + log(b);
b = 3.0 + im;
@show log(a*b)
@show log(a+0.0im) + log(b);
log(a * b) = 1.8444397270569681 - 2.819842099193151im log(a - 0.0im) + log(b) = 1.8444397270569683 - 2.819842099193151im log(a * b) = 1.8444397270569681 - 2.819842099193151im log(a + 0.0im) + log(b) = 1.8444397270569683 + 3.4633432079864352im
2. In this case, swap the role of a and b and use the answers for a<0.
3. Finally, we have the case ab<0 and neither a nor b is real. Note that ab=(ax+iay)(bx+iby)=axbx−ayby+i(axby+aybx)
a = 1.0 + 1.0im
b = 1.0 + 1.0im
@show log(a*b + eps()im)
@show log((a+eps()im)*b)
log(a * b + eps() * im) = 0.6931471805599453 + 1.5707963267948966im log((a + eps() * im) * b) = 0.6931471805599453 + 1.5707963267948968im
0.6931471805599453 + 1.5707963267948968im
a = 1.0 + 1.0im
b = -1.0 + 1.0im
@show log(a*b + eps()im)
@show log((a-eps()im)*b)
log(a * b + eps() * im) = 0.6931471805599453 + 3.141592653589793im log((a - eps() * im) * b) = 0.6931471805599452 + 3.141592653589793im
0.6931471805599452 + 3.141592653589793im
We can use this perturbation to reduce to the previous cases. For example, if a=1+i and b=−1+i, pertubing ab above causes a to be perturbed above, which causes the contour to surround the origin clockwise, hence we have log+(ab)=log(a)+b=logab−2πi
a = 1.0 + 1.0im
b = -1.0 + 1.0im
@show log(a*b - eps()im)
@show log(a)+log(b)-2π*im;
log(a * b - eps() * im) = 0.6931471805599453 - 3.141592653589793im (log(a) + log(b)) - (2π) * im = 0.6931471805599453 - 3.141592653589793im
Use the contour γ(t)=1+t(1−z) to reduce it to a normal integral: ¯logz=¯∫z11ζdζ=¯∫10(z−1)1+(z−1)tdt=∫10(ˉz−1)1+(ˉz−1)tdt=∫ˉz1dζζ=logˉz.
We first show that it is analytic on (−∞,0). To do this, we need to show that the limit from above equals the limit from below: for x<0 we have log+1x−log−1x=log+x−log−x+2πi=0
Demonstration Here we see that the following is the analytic continuation:
log1 = z -> begin
if imag(z) > 0
log(z)
elseif imag(z) == 0 && real(z) < 0
log(z + 0.0im)
elseif imag(z) < 0
log(z) + 2π*im
else
error("log1 not defined on real axis")
end
end
#19 (generic function with 1 method)
phaseplot(-3..3, -3..3, log1)
log1(-2.0+0.0im)
0.6931471805599453 + 3.141592653589793im
log1(-2.0-0.0im)
0.6931471805599453 + 3.141592653589793im
log1(-2.0)
0.6931471805599453 + 3.141592653589793im
log1(2.0+eps()im)
0.6931471805599453 + 1.1102230246251565e-16im
log1(2.0-eps()im)
0.6931471805599453 + 6.283185307179586im
Therefore C+f(ζ)−C−f(ζ)=f(ζ)(C+1(ζ)−C−1(ζ))
Similarly, for C−f(ζ) with any radius r<1 but inside the annulus. Therfore, C+f(ζ)−C−f(ζ)=12πi[∮|z|=R−∮|z|=r]f(ζ)ζ−zdζ
Suppose we have another solution ϕ and consider ψ(z)=ϕ(z)−Cf(z). Then on the circle we have ψ+(ζ)−ψ−(ζ)=ϕ+(ζ)−C+f(ζ)−ϕ−(ζ)+C+f(ζ)=f(ζ)−f(ζ)=0
When k≥0, we have from 3.1 and 3.2 C[⋄k](z)={zk|z|<00|z|>0
Therefore, ℑC−[⋄k](ζ)={0k≥0−ζk−ζ−k2ik<0
Express the solution outside the circle as v(x,y)=ℑ(e−iθz+Cf(z))
θ = 0.1
v = (x,y) -> x^2 + y^2 < 1 ? 0 : imag(exp(-im*θ) * (x+im*y) + exp(im*θ) * (x+im*y)^(-1))
#21 (generic function with 1 method)
xx = yy = -5:0.01:5
contour(xx, yy, v.(xx', yy); nlevels=100)
plot!(Circle(); color=:black, legend=false)
zα has the limits zα±=e±iπα|z|α, thus choose α=−θ2π where if we take 0<θ<2π we have 0<α<1 (the case θ=0 and θ=π are covered by the Cauchy transform, that is ). Then consider κ(z)=(z−1)−α(z+1)α−1
We need to show this times a constant spans the entire space. Suppose we have another solution ˜κ and consider r(z)=˜κ(z)κ(z). Note by construction that κ has no zeros. Then r+(x)=˜κ+(x)κ+(x)=˜κ−(x)κ−(x)=r−(x)
θ =2.3
α = -θ/(2π)
κ = z -> (z-1)^(-α)*(z+1)^(α-1)
κ(0.1+0.0im) - exp(im*θ)*κ(0.1-0.0im)
0.0 + 1.1102230246251565e-16im
κ(100.0)
0.00982876598532333
phaseplot(-3..3, -3..3, κ)
We want to mimic the solution of ϕ+(x)+ϕ−(x). So take ϕ(z)=κ(z)C[fκ+](z)=e−iθ/2(z−1)−α(z+1)α−1C[f(1−x)α(1+x)1−α](z)
Thus the general solution is ϕ(z)+Cκ(z).
θ =2.3
α = -θ/(2π)
κ = z -> (z-1)^(-α)*(z+1)^(α-1)
x = Fun()
κ₊ = exp(im*θ/2)*(1-x)^(-α)*(x+1)^(α-1)
f = Fun(exp)
z = 2+im
φ = z -> κ(z)*cauchy(f/κ₊, z)
φ(0.1+0.0im)-exp(im*θ)*φ(0.1-0.0im) - f(0.1)
8.881784197001252e-16 - 2.220446049250313e-16im
β = 2.3;
x = -2.0
(x+0.0im)^(im*β) - exp(-2π*β)*(x-0.0im)^(im*β)
-3.3881317890172014e-21 + 1.0842021724855044e-19im
We actually have bounded (oscillatory) growth near zero since |eiβlogz|=|eiβlog|z|e−βargz|=e−βargz
xx = yy = -1:0.01:1
contourf(xx, yy, abs.((xx' .+ im.*yy).^(im*β)))
Thus if we write c=reiθ for 0<θ<2π and define α=−θ2π+ilogr2π we can write the solution to 4.1 as κ(z)=(z−1)−α(z+1)α−1
The same arguments as before then proceed. and the solution to 4.3 is ϕ(z)=κ(z)C[fκ+](z)+Cκ(z)
θ =2.3
α = -θ/(2π)
κ = z -> (z-1)^(-α)*(z+1)^(α-1)
κ(0.1+0.0im) - exp(im*θ)*κ(0.1-0.0im)
0.0 + 1.1102230246251565e-16im
r = 2.4
θ = 2.1
c = r*exp(im*θ)
α = -θ/(2π) + im*log(r)/(2π)
κ = z -> (z-1)^(-α)*(z+1)^(α-1)
κ(0.1+0.0im)-c*κ(0.1-0.0im)
2.220446049250313e-16 + 2.220446049250313e-16im
and for −a<x<a we have κ+(x)=1i2√1−x√x+1√a−x√x+a=1(−i)2√1−x√1+x√a−x√−a−x=κ−(x)
Ah, this is a trick question! Note that zκ(z)∼z−1=O(z) and satisfies all the other properties. Thus consider any other solution ˜κ(z) and write r(z)=˜κ(z)κ(z)
Here we mimick the usual solution techniques and propose: ϕ(z)=κ(z)C[fκ+](z)+(A+Bz)κ(z)
Let's first do a plot and histogram. Here we see the right scaling is N1/4:
V = x -> x^4
Vp = x -> 4x^3
N = 100
λ⁰ = randn(N) # initial location
prob = ODEProblem((λ,t,_) -> Float64[sum(1 ./(λ[k] .- λ[[1:k-1;k+1:end]])) - Vp(λ[k]) for k=1:N], λ⁰, (0.0, 10.0))
λ = solve(prob; reltol=1E-6);
@gif for t=0.0:0.05:7.0
scatter(λ(t)/N^(1/4) ,zeros(N); label="charges", xlims=(-2,2), title="t = $t")
end
┌ Info: Saved animation to │ fn = /Users/sheehanolver/Documents/Teaching/Imperial/M3M6 Methods of Mathematical Physics/2018/tmp.gif └ @ Plots /Users/sheehanolver/.julia/packages/Plots/rmogG/src/animation.jl:90
The limiting distribution has the following form:
histogram(λ(10.0)/N^(1/4); nbins=30, normalize=true, label="histogram of charges")
We want to solve dλkdt=N∑j=1j≠k1λk−λj−4λ3k
Our equation is equivalent to H[−b,b]w(x)=−4x3π
b = 5
x = Fun(-b .. b)
(2im)cauchy(x^3*sqrt(b^2-x^2),z)
71.6687198577313 + 40.090510492433154im
Therefore, u(x)=4iπ√b2−x2(C++C−)[⋄3√b2−⋄2](x)−C√b2−x24π√b2−x2(−x4+b2x22+b48)−C√b2−x2
u = 4/(π*sqrt(b^2-x^2))*(-x^4 + b^2*x^2/2 + b^4/2)
hilbert(u, 0.1)
-0.0012732395447351292
-4*0.1^3/π
-0.001273239544735163
At least it looks right, we just need to get the right b:
plot(u; label = "b = $b")
We want to choose b now so that this integrates to 1. For example, this choice of b is horrible:
sum(u)
937.5
There's a nice trick: If −2πiCu(z)∼1z then ∫b−bu(x)dx=1. We know since 1√1+z=1−z2+3z28−5z316+O(z4)
cauchy(u, z)
40.55106915762885 + 9.075717966750503im
z =100.0im;
2im/π*z^3 + 2im/π*(-z^4 + b^2*z^2/2 +b^4/2)/(sqrt(z-b)sqrt(z+b))
1.4908359390683472 - 0.0im
taking this one term further we find
−z4+b2z22+b42√z−b√z+b=−z3+3b48z+O(z−2)
b = (2/3)^(1/4)
x = Fun(-b .. b)
u = 4/(π*sqrt(b^2-x^2))*(-x^4 + b^2*x^2/2 + b^4/2)
sum(u)
0.9999999999999997
And it worked!
histogram(λ(10.0)/N^(1/4); nbins=25, normalize=true, label="histogram of charges")
plot!(u; label="u",xlims=(-2,2))