using Plots, ComplexPhasePortrait, ApproxFun, SingularIntegralEquations
gr();
Dr. Sheehan Olver
Office Hours: 3-4pm Mondays, Huxley 6M40
The motivation behind this lecture is to calculate electrostatic potentials. An example is the Faraday cage: imagine a series of metal plates connected together so that they have the same charge. If configured to surround a region, this configuration will shield the interior from an external charge:
Here, the coloured lines are equipotential lines, and there is a point source at x=2, which corresponds to a forcing of log‖(x,y)−(2,0)‖=log|z−2|
From the Green's function of the Laplacian, it is natural to consider logarithmic singular integrals, and we focus yet again on [−1,1]:
v(z)=1π∫1−1f(t)log|z−t|dtNote that off [−1,1], v(z) solves Laplace's equation, and is continuous on [−1,1]:
t = Fun()
f = sqrt(1-t^2)*exp(t)
v = z -> logkernel(f, z) # logkernel(f,z) calculates 1/π * \int f(t)*log|t-z| dt
xx = yy = -2:0.01:2
V = v.(xx' .+ im*yy)
contour(xx, yy, V)
plot!(domain(t); color=:black, label="contour")
surface(xx, yy, V)
Continuity follows since log|x−t| is integrable for −1≤x≤1 provided f(t) has weaker than pole singularities.
For z∉(−∞,1] this can also be seen since v is the real part of an analytic function: v(z)=ℜ1π∫1−1f(t)log(z−t)dt
z = 2.0 +3.0im
@show v(z)
@show sum(f*log(abs(z-t)))/π
@show sum(f*log(z-t))/π
@show sum(f*log(t-z))/π;
v(z) = 0.7068168642791222 sum(f * log(abs(z - t))) / π = 0.7068168642791223 sum(f * log(z - t)) / π = 0.7068168642791222 + 0.5923597267719309im sum(f * log(t - z)) / π = 0.7068168642791222 - 1.1831399624402499im
How can we actually evaluate Lu(z)=1π∫1−1u(t)log(z−t)dt
For z away from the branch cut our integrand is "nice" (assuming u itself is "nice") and we can exchange integration and differentiation to determine ddzLu(z)=1π∫1−1u(t)1z−tdt=−2iCu(z)
Example If u(x)=1√1−x2, then recall Cu(z)=−12i√z−1√z+1
Demonstration We want to calculate the log kernel of 1/√1−x2:
x = Fun()
u = 1/sqrt(1-t^2)
z = 1+im
sum(u*log(z-x))/π
0.3681278813450904 + 0.9045568943023814im
We saw that its derivative is given in terms of the Cauchy transform, here we test it using finite difference approximation:
h = 0.0001;
(sum(u*log(z+h-x))/π - sum(u*log(z-x))/π)/h , sum(u/(z-x))/π, -2im*cauchy(u,z)
(0.3515911336637867 - 0.5688482444998755im, 0.35157758425414287 - 0.5688644810057831im, 0.3515775842541429 - 0.568864481005783im)
But we already know the Cauchy transform in closed form:
Cu = z -> -1/(2im*sqrt(z-1)sqrt(z+1))
-2im*Cu(z)
0.3515775842541429 - 0.568864481005783im
This we can integrate in closed form to determine:
Lu = z -> 2*log(sqrt(z-1) + sqrt(z+1)) - 2*log(2)
Lu(z)
0.36812788134509056 + 0.9045568943023812im
The representation is not ideal as it involves indefinite integration in the complex plane. However, we will see that we can actually express Lu(z) as a Cauchy transform of ∫1xu(t)dt.
Lemma (Log kernel as Cauchy transform) Suppose u is "nice" (as in Plemelj). Then Lu(z)=log(z−a)π∫bau(x)dx+2iCU(z)
Proof
We use Plemelj to prove this result (of course!) and assume [a,b]=[−1,1]. Note that Lu satisfies the following Riemann–Hilbert problem:
The first part follows immediately by noting for z→+∞ we have log(z−x)=log(z(1−x/z))=logz+log(1−x/z)=logz+o(1)
We now see where the jumps come from. Since Lu′(z)=−2iCu(z) and This let's us think of Lu(z) as (2 is arbitrary here) Lu(z)=Lu(2)+∫z2Cu(ζ)dζ
Consider x<−1. Given an ellipse γ surrounding [−1,1] we can write the integral representations and exchange orders to get: Lu+(x)−Lu−(x)=−2i∮γCu(ζ)dζ=−2i∫1−1u(t)12πi∮γ1t−zdtdζ=2i∫1−1u(t)dt
For −1<x<1, note that Lu(1) is well-defined as there is only a logarithmic singularity times an algebraic one. Thus deforming the contour onto the interval we have L±u(x)=−2i∫x1C±u(t)dt+Lu(1),
Example For the problem above, we have that ∫1x1√1−t2dt=arccosx, which gives us:
x = Fun()
u = 1/sqrt(1-x^2)
U = acos(x)
Lu = z -> 2*log(sqrt(z-1) + sqrt(z+1)) - 2*log(2)
sum(u) * log(z+1)/π + sum(U/(x-z))/(π), Lu(z)
(0.36812788134509017 + 0.9045568943023812im, 0.36812788134509056 + 0.9045568943023812im)
Now consider 1π∫bapk(x)w(x)log|z−x|dx, which we write in terms of the real part of Lk(z)=L[pkw](z)=1π∫bapk(x)w(x)log(z−x)dx
For k>0 we have ∫bapk(x)w(x)dx=0 due to orthogonality, and hence we actually have no branch cut:
T₅ = Fun(Chebyshev(), [zeros(2);1])
w = 1/sqrt(1-x^2)
L₅ = z->cauchyintegral(w*T₅, z)
phaseplot(-3..3, -3..3, L₅)
For classical orthogonal polynomials we can go a step further and relate the indefinite integrals to other orthogonal polynomials.
For example, recall that ddx[√1−x2Un(x)]=−n+1√1−x2Tn+1(x)
T₅ = Fun(Chebyshev(), [zeros(5);1])
U₄ = Fun(Ultraspherical(1), [zeros(4);1])
x = Fun()
L₅ = z->sum(T₅/sqrt(1-x^2) * log(z-x))/π
L₅(z), 2im*cauchy(sqrt(1-x^2)*U₄,z)/5
(0.00018695792399762436 - 0.0009741971129007227im, 0.0001869579239976236 - 0.000974197112900722im)
As we saw last lecture, Cauchy transforms of OPs satisfy simple recurrences, and this relationship renders log transforms equally calculable.
Oddly enough, it is easier to solve a singular integral equation involving the logarithmic kernel than to actually calculate the logarithmic singular integral, so we begin here. Consider the problem of calculating u(x) such that 1π∫1−1u(t)log|x−t|dt=f(x)for−1<x<1
To tackle this problem we first need to understand the additive jump ReL±(x)=L+(x)+L−(x)2. Thinking in terms of integrals of Cauchy transforms we see that L+u(x)+L−u(x)=−2i(2∫12Cu(x)dx+∫x1[C+u(t)+C−u(t)]dt)=D−2i∫x1(−iHu(t))dt=D+2∫1xHu(t)dt
Let's do a numerical example:
x = Fun()
f = exp(x)
C = randn()
u₁ = hilbert(sqrt(1-x^2)*f')/sqrt(1-x^2)
u = u₁ + C/sqrt(1-x^2)
@show hilbert(u, 0.1) + f(0.1)
@show logkernel(u,0.1) - f(0.1) # didn't work 😩
@show logkernel(u,0.2) - f(0.2); # but we are only off by a constant
hilbert(u, 0.1) + f(0.1) = -4.440892098500626e-16 logkernel(u, 0.1) - f(0.1) = -0.18115023187927326 logkernel(u, 0.2) - f(0.2) = -0.18115023187927304
Remember: for inverting the Hilbert transform we had a degree of freedom: every solution plus C/√1−x2 was also a solution. But here, since we differentiated, we use that degree of freedom to ensure that we have arrived at the right solution.
To choose C, we use the fact that f(0)=1π∫1−1u(t)log|t|dt
# choose C so that
# logkernel(u₁, 0) + C*logkernel(1/sqrt(1-x^2), 0) == f(0)
C = (f(0) - logkernel(u₁, 0))/logkernel(1/sqrt(1-x^2), 0)
u = u₁ + C/sqrt(1-x^2)
@show hilbert(u, 0.1) + f(0.1)
@show logkernel(u,0.1) - f(0.1) # Works!
@show logkernel(u,0.2) - f(0.2); # And at all x!
hilbert(u, 0.1) + f(0.1) = -4.440892098500626e-16 logkernel(u, 0.1) - f(0.1) = 0.0 logkernel(u, 0.2) - f(0.2) = 2.220446049250313e-16
Example We now do an example which can be solved by hand. Find u(x) so that: ∫1−1u(t)log|x−t|dt=1.
Thus we have C=−1πlog2
x = Fun()
C = -1/(log(2))
u = C/sqrt(1-x^2)
logkernel(u, 0.2)
1.0
Physically, this solution gives us the potential field ∫1−1u(t)log|z−t|dt
v = z -> π*logkernel(u, z)
xx = yy = -2:0.01:2
V = v.(xx' .+ im*yy)
contour(xx, yy, V)
plot!(domain(x); color=:black)
surface(xx, yy, V)
Now imagine we put a point source at x=2, and a metal plate on [−1,1]. We know the potential on the plate must be constant, but we don't know what constant. This is equivalent to the following problem (see e.g. [Chapman, Hewett & Trefethen 2015]): vxx+vyy=0foroff [−1,1] and 2v(z)∼log|z−2|+O(1)forz→2v(z)∼log|z|+o(1)forz→∞v(x)=κfor−1<x<1
We can calculate the solution numerically as follows:
x = Fun()
u₀ = SingularIntegral(0) \ (-log(2-x)) # solution with κ = 0
u = u₀ - sum(u₀)/(π*sqrt(1-x^2)) # ensure correct asymptotics
v = z -> logkernel(u, z) + log(abs(2-z))
xx = yy = -4:0.011:4
V = v.(xx' .+ im*yy)
contour(xx, yy, V)
plot!(domain(x); color=:black, legend=false)
We can solve this equation explicitly. By differentiating we see that u satisfies the following: Hu(x)=−f′(x)=1x−2
Demonstration We first check that differentiation reduces to the Hilbert transform:
t = Fun()
f = -log(2-t)
hilbert(u, 0.1) ≈ -f'(0.1) ≈ 1/(0.1-2)
true
In the inverse Hilbert transform we calculated the following Cauchy transform:
z = 1+im
cauchy((-f')*sqrt(1-t^2), z) ≈ sqrt(z-1)sqrt(z+1)/(2im*(z-2)) - sqrt(3)/(2im*(z-2)) - 1/(2im)
true
Which means that:
hilbert((-f')*sqrt(1-t^2), 0.1), -sqrt(3)/(0.1-2) - 1
(-0.08839431180585401, -0.08839431180585411)
Thus we have the inverse Hilbert transform:
D = randn()
ũ = sqrt(3)/((x-2)*sqrt(1-x^2)) + D/sqrt(1-x^2)
hilbert(ũ,0.1) ≈ -f'(0.1)
true
We still need to determine the constant D. What goes wrong if we have the wrong choice is that we don't tend to precisely logz near ∞:
z = 200000
logkernel(ũ,z), log(z)
(-24.76573192820616, 12.206072645530174)
We determined the integral
sum(1/((x-2)*sqrt(1-x^2))) ≈ -2π/(2*sqrt(3))
true
Therefore:
sum(u)
1.743934249004316e-16
We thus found u:
x = 0.1; u(x), sqrt(3)/((x-2)*sqrt(1-x^2)) + 1/sqrt(1-x^2)
(0.08883962601869715, 0.08883962601869722)