# Detecting Inverse Boundaries by Weighted High-Order Gradient Collocation Method
## 4 Numerical Implementation
### Convergence Study  
The convergence of the weighted collocation method is closely related to the weights imposed on the boundary conditions. According to the weights estimated in the inverse analysis of Cauchy problems, the following weights are suggested [12]:  
\[\sqrt{\alpha_{h}}\approx O(1),\,\sqrt{\alpha_{g}}\approx O\Big{(}\sqrt{N_{s}} \Big{)} \tag{24}\]  
Nevertheless, in the gradient approximation, the following weights are suggested [15]:  
\[\sqrt{\alpha_{h}}\approx O(1),\,\sqrt{\alpha_{g}}\approx O\Big{(}\frac{1}{a} \Big{)} \tag{25}\]  
where \(p=q=2\) is assumed; \(a\) is the RK support size. To determine the most suitable weights in the higher-order gradient approximation in the inverse analysis, an inhomogeneous Helmholtz problem is considered, which is given by  
\[\
abla^{2}u+2u=\cos x\text{ in }\Omega=(0,1)\times(0,1) \tag{26}\]  
The boundary conditions are  
\[\begin{array}{ll}u=\big{[}\sin(y)+1\big{]}\Big{(}1+\frac{s}{100}\times rand \Big{)}&\text{on}&x=0\\ u=\cos(1)\big{[}\sin(y)+1\big{]}\Big{(}1+\frac{s}{100}\times rand\Big{)}&\text {on}&x=1\\ u=\cos(x)\big{[}\sin(1)+1\big{]}\Big{(}1+\frac{s}{100}\times rand\Big{)}&\text {on}&y=1\end{array} \tag{27}\]  
and  
\[\begin{array}{ll}u_{x}=0+\frac{s}{100}\times rand&\text{on}&x=0\\ u_{x}=-\sin(1)\big{[}\sin(y)+1\big{]}\Big{(}1+\frac{s}{100}\times rand\Big{)}& \text{on}&x=1\\ u_{y}=\cos(x)\cos(1)\big{(}1+\frac{s}{100}\times rand\Big{)}&\text{on}&y=1 \end{array} \tag{28}\]  
where \(s\) is the noise applied to the boundary conditions, and \(rand\) is a random number in the interval \(0\sim 1\). The analytical solution along \(y=0\) is given by the infinite-order polynomial by setting \(s=0\):  
\[u(x,y)=\cos x\sin y+\cos x \tag{29}\]  
In this square domain, four sets of uniformly discretized source points and collocation points are adopted in the convergence study: \(N_{s}=N_{c}=\left\{10^{2},20^{2},30^{2},40^{2}\right\}\). The support size of the RK shape function is \(4.6d\) with \(d\) representing the average nodal distance between two adjacent source points. The error norms are defined as  
\[\left\|v-u\right\|_{0}=\sqrt{\int_{\Omega}\left(v-u\right)^{2}d\Omega} \tag{30}\]  
\[\left\|v_{\alpha}-u_{\alpha}\right\|_{0}=\sqrt{\int_{\Omega}\left[\left(v_{x }-u_{x}\right)^{2}+\left(v_{y}-u_{y}\right)^{2}\right]d\Omega} \tag{31}\]  
in which \(v\) denotes the approximation of \(u\). As depicted Figure 2, a similar trend of convergence behavior is observed for \(\sqrt{\alpha_{g}}=10\) and \(\sqrt{\alpha_{g}}=\frac{1}{a}\) while \(\sqrt{\alpha_{g}}=\frac{1}{a}\) exhibits higher convergence rates among the two weights. Since the expression of \(\sqrt{\alpha_{g}}\approx O\Big{(}\frac{1}{a}\Big{)}\) is implicitly related to the discretization via RK  
Figure 4: Contour plot of absolute error (%): (**a**) uniform discretization; (**b**) non-uniform discretization.  
Figure 5: Comparison of numerical solutions along missing boundary obtained by various \(s\) on the boundary conditions: (**a**) uniform discretization; (**b**) non-uniform discretization.  
Figure 6: Comparison of CPU time by different methods in the square domain.