Define \begin{equation} G(t,s) := - \frac{1}{2\pi} \left[\ln \left(4 \sin^2 \frac{t-s}{2}\right) -1 \right] \quad (t \neq s) \end{equation} and \begin{equation} K_0 \Psi := \int^{2\pi}_0 G(t,s) \Psi(s) ds, \quad t \in (0,2\pi) \end{equation} It is a classical result in singular boundary integral equation (SBIE) that, \begin{equation} K_0 \hat \psi_n = \frac{1}{\vert n \vert} \quad \textrm{for} \ n \neq 0 \end{equation} \begin{equation} K_0 \hat \psi_0 = \hat \psi_0 \end{equation} where the functions \begin{equation} \hat \psi_n = e^{int} , \quad t \in [0,2\pi], \quad n \in \mathbb{Z} . \end{equation} However, when we operate it in MATLAB, we will see, for example, (Notice: the following programs are provided by a friend.)
1.
clear all clc t1 = 0; t2 = 2 * pi; s1 = 0; s2 = 2 * pi; c = -1/(2*pi); fun = @(t,s)c*(log(4 * (sin((t-s)./2)).^2 )- 1 ).*(exp(i*s).*exp(i*t)); A = integral2(fun,t1,t2,s1,s2) The result read
A = NaN + NaNi 2.
clear all clc t1 = 0; t2 = 2 * pi; s1 = 0; s2 = 2 * pi; c = -1/(2*pi); fun = @(t,s)c*(log(4 * (sin((t-s)./2)).^2 )- 1 ).*(exp(2*i*s).*exp(i*t)); A = integral2(fun,t1,t2,s1,s2) The result also read
A = NaN + NaNi According to the classical result in (SBIE) and orthogonal expansion theory, the numerical results of 1,2 should be 1,0, respectively. This gives a contradiction.
Question: Is there any wrong in the program? If the program is right, how can we explain the contradiction between numerics and theory?
My Guess: Since the logarithmic singularities exist at $ t = s $ in $ G(t,s) $, the MATLAB break down when it begin calculating the double integral near the diagonal line $ t =s $.
Notice that the calculation of double integral above is necessary in Petrov-Galerkin method approximately solving Symm's integral equation of one dimension with Fourier basis. If my guess is right, then we must not obtain a good numerical realization for Petrov-Galerkin method with Fourier basis into Symm's integral equation?
Edit:
We test the example by dividing the square into two triangles, that is, the logarithmic singularities at $ t =s $ is seperating to the boundary. Now
1.
clear all clc t1 = 0; t2 = 2 * pi; s1 = 0; s2 = 2 * pi; c = -1/(2*pi); fun = @(t,s)c*(log(4 * (sin((t-s)./2)).^2 )- 1 ).*(exp(i*s).*exp(i*t)); A = integral2(fun,t1,t2,s1,@(t) + t); B = integral2(fun,t1,t2,@(t) + t ,s2); C = A + B The result read
C = 6.8971e-11 + 7.8594e-16i 2.
clear all clc t1 = 0; t2 = 2 * pi; s1 = 0; s2 = 2 * pi; c = -1/(2*pi); fun = @(t,s)c*(log(4 * (sin((t-s)./2)).^2 )- 1 ).*(exp(2*i*s).*exp(i*t)); A = integral2(fun,t1,t2,s1,@(t) + t); B = integral2(fun,t1,t2,@(t) + t ,s2); C = A + B The result read
C = 2.6390e-09 + 2.4980e-16i We can see that, there exist big deviation between numerical results and answer. The domain decomposition can only provide a bad result.