1 Introduction

Cauchy problems, which arise in diverse science areas such as wave propagation, nondestructive testing, and geophysics have been intensively studied in the past decades [1, 7, 13, 33]. On account of the incomplete boundary conditions, Cauchy problems are classified as inverse problems and ill-posed, i.e., the solutions do not depend continuously on the Cauchy data. In order to get a stable solution, various numerical methods have been proposed to solve Cauchy problems [23, 31, 36]. The method of fundamental solutions (MFS) is a popular and frequently used method for the solution of such problems.

The MFS is a meshless method which expands the solution utilizing fundamental solutions [8, 16, 19, 20, 22, 28, 30, 39, 40]. It is a boundary collocation method which belongs to the family of Trefftz methods, see [14] for a link to Trefftz methods, boundary element methods, and MFS. It is applicable to boundary value problems in which the fundamental solution of the operator in the governing equation is known. Since then, it has been successfully applied to a large variety of physical problems, an account of which can be found in the survey paper [16]. In [26], Liu et al. introduce a novel concept to construct Trefftz energy bases based on the MFS for the numerical solution of the Cauchy problem in an arbitrary star plane domain. The Trefftz energy bases used for the solution not only satisfy the Laplace equation but also preserve the energy. In [32], the authors give a meshless method based on the MFS for the three-dimensional inverse heat conduction problems. In [27], Marin investigates both theoretically and numerically the so-called invariance property of the solution of boundary value problems associated with the anisotropic heat conduction equation in two dimensions. In [9], Fu et al. investigate the thermal behavior inside skin tissue with the presence of a tumor and use the method of approximate particular solutions to simulate a tumor in 3D. Following Fichera’s idea, Chen et al. [5] enriched the MFS by an added constant and a constraint. This enrichment condition ensures a unique solution of the problems considered. They also explained that this enrichment should be used when there is a degenerate scale. In [41], Zhang and Wei give two iterative methods for a Cauchy problem for an elliptic equation with variable coefficients in a strip region, the convergence rates of two algorithms are obtained by an a-priori and an a-posteriori selection rule for the regularization parameter. Other methods for the conduction problems can be found in [21, 37].

Cauchy problems have been investigated using the MFS because of the ease with which it can be implemented, particularly for the problems in complex geometries [10, 11, 25, 34]. Most of the studies consider Cauchy problems on the whole plane, but sometimes we should consider the problems in a half-plane [2, 3, 15, 24]. In [2], Chapko and Johansson consider a Cauchy problem for the Laplace equation in a two-dimensional semi-infinite domain by a direct integral equation method. Later, they give a generalization of the situation to three-dimensions with the Cauchy data only partially given. Compared with their previous work [2], they not only generalize that work to higher dimensions but also consider the more realistic case when the Cauchy data is only partially known, i.e., the Neumann/Dirichlet data measurements are specified throughout the plane bounding the upper half-space, and the Dirichlet/Neumann data is given only on a finite portion of this plane.

In this paper, we consider another Cauchy problem in a half-plane. Let D be a bounded and connected domain with piecewise smooth boundary \(\partial D=\varGamma_{1}\cup\varGamma_{2}\cup\overline{AB}\), the upper boundary be \(\varGamma=\varGamma_{1}\cup\varGamma _{2}\). Define the half-plane \(\mathbb{R}_{+}^{2}:=\{(x_{1},x_{2}):x_{2}\geqslant 0\}\) and the boundary \(\mathbb{R}_{0}^{2}:=\{(x_{1},x_{2}):x_{2}= 0\}\). As is shown in Fig. 1, denote by

$$\varGamma:=\bigl\{ \boldsymbol{x}=\bigl(\rho(\theta)\cos\theta,\rho(\theta)\sin \theta\bigr), 0\leq\theta\leq\pi\bigr\} $$

a simple piecewise smooth arc in \(\mathbb{R}_{+}^{2}\) with two endpoints A and B on \(\mathbb{R}_{0}^{2}\). The curve

$$\varGamma_{1}:=\{\boldsymbol {x}\in\varGamma, 0\leq\theta\leq\beta\pi\} $$

is the accessible part of Γ with \(\beta\leq1/2\).

Figure 1
figure 1

Sketch of the Cauchy problem in \(\mathbb{R}_{+}^{2}\)

Consider the following Cauchy problem for the Laplace equation: Given Cauchy data \(f\in H^{1}(\varGamma_{1})\) and \(g\in L^{2}(\varGamma_{1})\) on \(\varGamma_{1}\) and the homogeneous boundary condition \(u(\boldsymbol{x})=0\) on AB, find the solution u satisfying

$$\begin{aligned}& \Delta u(\boldsymbol{x})=0, \quad \boldsymbol{x}\in D, \end{aligned}$$
(1)
$$\begin{aligned}& u(\boldsymbol{x})=f(\boldsymbol{x}), \quad \boldsymbol{x}\in\varGamma _{1}, \end{aligned}$$
(2)
$$\begin{aligned}& \frac{\partial u}{\partial\nu}(\boldsymbol{x})=g(\boldsymbol {x}), \quad \boldsymbol{x}\in\varGamma_{1}, \end{aligned}$$
(3)

where Δ is the Laplacian in \(\mathbb{R}^{2}\) and ν is the unit outward normal to \(\varGamma_{1}\).

The Cauchy problem in a half-plane is novel since the solution of the problem should satisfy a Dirichlet boundary condition on part of the boundary AB and the Cauchy data on the accessible boundary \(\varGamma _{1}\). We should note that a Dirichlet boundary condition on part of the boundary is an essential condition in the physical meaning. In this paper, for simplicity, we give a homogeneous boundary condition on the interface, i.e., the temperature is zero on the interface for a physical phenomenon.

In what follows, we describe a MFS for the numerical solution of the corresponding Cauchy problem. To prove the feasibility of the method, we use a single layer representation of the solution [18, 35]. Via the analysis of the single layer potentials, jump relations, and the Green’s function in the half-plane, the solution given by the MFS is proved to be an approximation of the genuine solution. An “auxiliary” curve is involved in the definition of the single layer potential to avoid singularity.

This paper is organized as follows. In Sect. 2, we describe the MFS in a half-plane and give some theoretical results for this method. In Sect. 3, we solve the equations by the Tikhonov regularization method with Morozov’s principle. Finally, four numerical examples, including a smooth boundary, a boundary with a corner, and a boundary with a jump, are presented to show the effectiveness of the presented method.

2 Formulation of the MFS

For \(\boldsymbol{s}=(s_{1},s_{2})\in\mathbb{R}_{+}^{2}\), denote by \(\boldsymbol {s}_{r}:=(s_{1},-s_{2})\) the reflection of s about the \(x_{1}\)-axis. The Green’s function of the Laplacian in the half space \(\mathbb{R}_{+}^{2}\) with a Dirichlet boundary condition [29] is

$$ G(\boldsymbol{x},\boldsymbol{s})=\frac{1}{2\pi}\ln|\boldsymbol {x}- \boldsymbol{s}|-\frac{1}{2\pi}\ln|\boldsymbol{x}-\boldsymbol{s}_{r}|, $$
(4)

where s is the source point and

$$|\boldsymbol{x}-\boldsymbol{s}|=\sqrt{(x_{1}-s_{1})^{2}+(x_{2}-s_{2})^{2}}. $$

Note that the Green’s function \(G(\boldsymbol{x},\boldsymbol{s})\) is the solution of

$$\begin{aligned}& \Delta G(\boldsymbol{x},\boldsymbol{s})=\delta(\boldsymbol {x}-\boldsymbol{s}), \quad \boldsymbol{x}\in\mathbb{R}_{+}^{2}, \end{aligned}$$
(5)
$$\begin{aligned}& G(\boldsymbol{x},\boldsymbol{s})=0, \quad \boldsymbol{x}\in\mathbb{R}_{0}^{2}, \end{aligned}$$
(6)

where δ is the Dirac delta function.

To get the solution \(u(\boldsymbol{x})\) of the Cauchy problem, we use the MFS approximation

$$ u_{N}(\boldsymbol{x})=\sum_{j=1}^{N}c_{j}G( \boldsymbol{x},\boldsymbol {s}_{j}), \quad \boldsymbol{s}_{j} \in D_{e}, $$
(7)

where, for \(j=1,2,\ldots,N\), \(\boldsymbol{s}_{j}\) are the chosen source points in \(D_{e}:=\mathbb{R}^{2}_{+}\setminus(\mathbb{R}^{2}_{0}\cup\overline {D})\) and \(c_{j}\) are unknown coefficients, which can be computed using the Cauchy data on \(\varGamma_{1}\).

For theoretical analysis, the single layer potential representation is involved, which can be seen as a continuous version of the MFS.

Denote by \(\varGamma':=\partial\varOmega\setminus\mathbb{R}^{2}_{0}\) the source curve (see Fig. 1), where ∂Ω is the boundary of the region \(D\subset\varOmega\) in \(\mathbb{R}^{2}_{+}\). In fact, if the source points \(\boldsymbol{s}_{j}\) are chosen on the curve \(\varGamma'\) with certain roles, approximation (7) can be viewed as a discrete version of the single layer potential in the half-plane

$$ \bigl[S^{h}_{\varGamma'}\phi\bigr](\boldsymbol{x}):= \int_{\varGamma'}G(\boldsymbol {x},\boldsymbol{y})\phi(\boldsymbol{y}) \, \mathrm{d}s_{\boldsymbol{y}},\quad \boldsymbol{x}\in\mathbb{R}^{2}_{+} \setminus\varGamma'. $$
(8)

Notice that we involve an “auxiliary” curve \(\varGamma'\) in (8) instead of directly defining the single layer potential on ∂D. Then singularities caused by the integral equation in the single layer potential are avoided since \(\varGamma'\) is apart from . Another thing to notice is that the single layer potential (8) is related to the Green’s function in the half-plane instead of that in the free space. Further analysis is needed to get the properties of the single layer potential.

Firstly, we recall the classical single layer potential in the free space. Assume that the endpoints of \(\varGamma'\) are \(A'=(a',0)\) and \(B'=(b',0)\) with \(a'< b'\). Denote the unbounded region \(\varOmega^{e}:=\{ \mathbb{R}^{2}_{+}\setminus\overline{\varOmega}\}\) with the lower boundary \(\varLambda:=\varGamma'_{-}\cup\varGamma'\cup\varGamma'_{+}\), where \(\varGamma'_{-}:=\{ \boldsymbol{x}=(x_{1},0):x_{1}\leq a'\}\) and \(\varGamma'_{+}:=\{\boldsymbol {x}=(x_{1},0):x_{1}\geq b'\}\). Then the classical single layer potential on Λ is usually defined as

$$ [S_{\varLambda}\phi](\boldsymbol{x}):= \int_{\varLambda}\varPhi(\boldsymbol {x},\boldsymbol{y})\phi( \boldsymbol{y})\, \mathrm{d}s_{\boldsymbol{y}},\quad \boldsymbol{x}\in \mathbb{R}^{2}_{+}\setminus\varLambda, $$
(9)

where \(\varPhi(\boldsymbol{x},\boldsymbol{y})\) is the fundamental solution given by

$$ \varPhi(\boldsymbol{x},\boldsymbol{y})=\frac{1}{2\pi}\ln|\boldsymbol {x}- \boldsymbol{y}|. $$

Apparently we have

$$ G(\boldsymbol{x},\boldsymbol{y})=\varPhi(\boldsymbol{x},\boldsymbol {y})-\varPhi(\boldsymbol{x},\boldsymbol{y}_{r}). $$
(10)

Denote by ν the unit outward normal vector to Λ, where \(\varOmega^{e}\) is the exterior of the boundary Λ. For a curve Γ and a function u, denote by \(\gamma_{\varGamma}^{+}u\) and \(\gamma_{\varGamma}^{-}u\) the restrictions of u to Γ from exterior and interior, respectively. Denote by \(\partial_{\nu,\varGamma }^{+} u\) and \(\partial_{\nu,\varGamma}^{-} u\) the normal derivatives on Γ from exterior and interior, respectively.

We recall the jumps of a function on a curve. Denote by

$$[\!\![\gamma u]\!\!]_{\varGamma}=\gamma_{\varGamma}^{-}u- \gamma _{\varGamma}^{+}u $$

and

$$[\!\![\partial_{\nu}u]\!\!]_{\varGamma}= \partial_{\nu,\varGamma}^{-} u-\partial_{\nu,\varGamma}^{+} u $$

the jumps of u and \(\partial_{\nu}u\) on Γ, respectively.

A symmetric continuation discussion shows that the Cauchy problem (1)–(3) is equivalent to the classical Cauchy problem with symmetric structure [3], which is well known to be uniquely solvable (for details, see [18]). Thus the Cauchy problem (1)–(3) also has a unique solution \(u\in H^{3/2}(D)\).

Note that we only care about \(u(\boldsymbol{x})\) for \(\boldsymbol{x}\in \varOmega\). Thus we can set

$$[\!\![\gamma u]\!\!]_{\varGamma'}=0. $$

Then we have the following lemma about the single layer representation.

Lemma 1

The solution of

$$\begin{aligned}& \Delta u(\boldsymbol{x})=0,\quad \boldsymbol{x}\in\mathbb{R}^{2}_{+} \setminus \varGamma', \\& [\!\![\gamma u]\!\!]_{\varGamma'}=0,\quad \boldsymbol{x}\in\varGamma ', \\& u(\boldsymbol{x})=0,\quad \boldsymbol{x}\in\mathbb{R}_{0}^{2} \end{aligned}$$

has the representation

$$u(\boldsymbol{x})=\bigl[S^{h}_{\varGamma'}\phi\bigr]( \boldsymbol{x}),\quad \boldsymbol {x}\in\mathbb{R}^{2}_{+}\setminus \varGamma', $$

where the density function satisfies

$$\phi=[\!\![\partial_{\nu}u]\!\!]_{\varGamma'}. $$

Proof

Since the single layer potential \([S^{h}_{\varGamma'}\phi](\boldsymbol{x})\) is formally an integral with the kernel \(G(\boldsymbol{x},\boldsymbol {y})\), it is clear that \([S^{h}_{\varGamma'}\phi](\boldsymbol{x})\) satisfies the Laplace equation in \(\mathbb{R}^{2}_{+}\setminus\varGamma'\). Moreover, \(G(\boldsymbol{x},\boldsymbol{y})=0\) for \(y\in\mathbb{R}^{2}_{0}\) implies

$$u(\boldsymbol{x})=0,\quad \boldsymbol{x}\in\mathbb{R}_{0}^{2}. $$

The jump relation [15] implies that the density function satisfies

$$\phi= \bigl[\!\!\bigl[\partial_{\nu}\bigl(S^{h}_{\varGamma'} \phi\bigr) \bigr]\!\!\bigr]_{\varGamma'}. $$

The proof is completed. □

Although Lemma 1 gives the representation of the density function ϕ with the jump relation, ϕ is usually computed using boundary integral equations. Equations (2)–(3) imply that \(S^{h}_{\varGamma'}\phi\) should satisfy

$$\begin{aligned}& \bigl[S^{h}_{\varGamma'}\phi\bigr](\boldsymbol{x})=f( \boldsymbol{x}),\quad \boldsymbol{x}\in\varGamma_{1}, \end{aligned}$$
(11)
$$\begin{aligned}& \frac{\partial[S^{h}_{\varGamma'}\phi]}{\partial\nu}(\boldsymbol {x})=g(\boldsymbol{x}),\quad \boldsymbol{x}\in\varGamma_{1}. \end{aligned}$$
(12)

We have the following proposition about the solution of the Cauchy problem.

Proposition 1

Assume that \(\phi\in L^{2}(\varGamma')\) is the solution of the boundary integral equations (11)(12). Then the unique solution \(u\in H^{3/2}(D)\) of the Cauchy problem (1)(3) has the single layer representation

$$ u(\boldsymbol{x})= \int_{\varGamma'}G(\boldsymbol{x},\boldsymbol{y})\phi (\boldsymbol{y}) \, \mathrm{d}s_{\boldsymbol{y}}, \quad \boldsymbol{x}\in D. $$
(13)

Proof

As we have discussed, \(u=S^{h}_{\varGamma'}\phi\) satisfies the Laplace equation (1) and the Dirichlet boundary condition \(u=0\).

Since \(\phi\in L^{2}(\varGamma')\) is the solution of the boundary integral equations (11)–(12), \(u\in H^{3/2}(\varOmega)\) satisfies the Cauchy boundary conditions (2)–(3) (for details of the spaces, see [18]). Thus \(u|_{D}\) solves the Cauchy problem (1)–(3). The unique solvability of the Cauchy problem implies that the solution has representation (13).

This completes the proof. □

Finally, we give the following theorem for the MFS.

Theorem 1

The MFS solution

$$ u_{N}(\boldsymbol{x})=\sum _{j=1}^{N}c_{j}G(\boldsymbol{x},\boldsymbol {s}_{j}),\quad \boldsymbol{s}_{j}\in\varGamma' $$
(14)

is an approximation of the solution u to the Cauchy problem (1)(3), where \(\boldsymbol{s}_{j}\) are chosen as N equidistant discrete points on \(\varGamma'\) and

$$ c_{j}=\frac{\operatorname{Len}(\varGamma')}{N}\phi(\boldsymbol{s}_{j}), \quad j=1,2,\ldots,N, $$

in which \(\operatorname{Len}(\varGamma')\) is the length of \(\varGamma'\).

Proof

Proposition 1 implies that the solution of the Cauchy problem (1)–(3) has representation (13). The discretization of the integral in (13) implies

$$u(\boldsymbol{x})\approx\sum_{j=1}^{N} \frac{\operatorname{Len}(\varGamma ')}{N}G(\boldsymbol{x},\boldsymbol{s}_{j})\phi( \boldsymbol{s}_{j}), $$

where \(\boldsymbol{s}_{j}\) are N equidistant discrete points on \(\varGamma '\) and \(\operatorname{Len}(\varGamma')\) is the length of \(\varGamma'\). Thus (14) is the approximation of the solution to (1)–(3). □

The coefficients \(c_{j}\) will be determined by a collocation method from the interpolation conditions at \(N_{c}\) collocation points. In fact, the coefficients \(c_{j}\), \(j=1,2,\ldots,N\), are determined by solving a linear system of \(2N_{c}\) equations, which consist of the boundary conditions at the N collocation points

$$ Ac=b. $$
(15)

The matrix A, the unknown vector c, and the right-hand side b will be given by the following form:

$$\begin{aligned}& {A}_{l,j}=G(\boldsymbol {x}_{l},\boldsymbol {s}_{j}), \qquad {A}_{N_{c}+l,j}=\frac {\partial G(\boldsymbol {x}_{N_{c}+l},\boldsymbol {s}_{j})}{\partial \nu(\boldsymbol {x})}, \\& b_{l}=f(\boldsymbol {x}_{l}),\qquad b_{N_{c}+l}=g( \boldsymbol {x}_{l}),\quad l=1,\ldots,N_{c}, j=1,\ldots,N. \end{aligned}$$

In order to guarantee enough information to get a numerical solution, we need to choose \(N_{c}\) such that \(N_{c}\geq\frac{N}{2}\).

3 Regularization method

In this section, we give a brief introduction to the Tikhonov regularization and Morozov’s discrepancy principle, which are used to solve system (15). In general, the right-hand side vector b of system (15) consists of noise denoted by \(b^{\delta}\), so we should solve the following equation:

$$ {A}c^{\delta}=b^{\delta}. $$
(16)

The vector \(b^{\delta}\) is the measured noisy data satisfying

$$b_{i}^{\delta}=b_{i}+\delta\operatorname{rand}(i)b_{i}, $$

where δ is the percentage noise and the number rand(i) is a pseudo-random number drawn from the standard uniform distribution on the interval \([-1,1]\) generated by the Matlab command \(-1+2 \operatorname{rand}(i,1)\).

The formally Tikhonov regularized solution of system (16) is given by

$$ \bigl(\alpha I + {A}^{\top}{A}\bigr)c^{\delta}_{\alpha}={A}^{\top}b^{\delta}. $$
(17)

From equation (17), we can see that the solution accuracy depends on the regularization parameter α, and hence how to choose an optimal regularization parameter α is crucial. There are some methods to choose a regularization parameter, such as the L-curve [12], the Cesàro mean in conjunction with the L-curve [6], Morozov’s discrepancy principle [17], the multi-parameter Tikhonov regularization [38], the Gaussian window together with L-curve [4], etc. Especially when there is a priori information about the amount of noise available, we also use Morozov’s discrepancy principle. We will choose the regularization parameter α by Morozov’s discrepancy principle, which was developed in [33]. The computation of α can be carried out with Newton’s method as follows:

  1. 1.

    Set \(n=0\), and give an initial regularization parameter \(\alpha_{0}>0\);

  2. 2.

    Get \(c_{\alpha_{n}}^{\delta}\) from \(({A}^{*}{A}+\alpha_{n} I)c_{\alpha_{n}}^{\delta}={A}^{*}b^{\delta}\);

  3. 3.

    Get \(\frac{\mathrm{d}}{\mathrm {d}\alpha}c^{\delta}_{\alpha_{n}}\) from \((\alpha_{n}I+{A}^{*}{A})\frac{\mathrm {d}}{\mathrm{d}\alpha}c^{\delta}_{\alpha_{n}}=-c^{\delta}_{\alpha_{n}}\);

  4. 4.

    Get \(F(\alpha_{n})\) and \(F'(\alpha_{n})\) by

    $$F(\alpha_{n})= \bigl\Vert {A}c_{\alpha_{n}}^{\delta}-b^{\delta} \bigr\Vert ^{2}-\delta^{2} $$

    and

    $$F'(\alpha_{n})=2\alpha_{n} \biggl\Vert {A} \frac{\mathrm{d}}{\mathrm{d}\alpha}c^{\delta}_{\alpha_{n}} \biggr\Vert ^{2} +2 \alpha_{n}^{2} \biggl\Vert \frac{{\mathrm{d}}}{{\mathrm{d}}\alpha}c^{\delta}_{\alpha_{n}} \biggr\Vert ^{2}, $$

    respectively.

  5. 5.

    Set \(\alpha_{n+1}=\alpha_{n}-\frac{F(\alpha_{n})}{F'(\alpha_{n})}\). If \(\Vert {\alpha_{n+1}-\alpha_{n}} \Vert <\varepsilon\) (\(\varepsilon\ll1\)), end. Else, set \(n=n+1\) and return to 2.

When the regularization parameter \(\alpha^{*}\) is fixed, we can obtain the regularized solution.

4 Numerical experiments

In this section, we provide some numerical examples to show the effectiveness of the proposed method.

Example 1

The boundary is smooth, and the exact solution is chosen as

$$u(x_{1},x_{2})=e^{x_{1}}\sin x_{2}+x_{2}^{3}-3x_{2}x_{1}^{2}. $$
  • Case 1: Γ is chosen as \(\boldsymbol{x}_{1}=(0.6+0.1\cos 3t)(\cos t,\sin t)\), \(t\in[0,\pi]\).

  • Case 2: Γ is chosen as \(\boldsymbol{x}_{2}=(\cos t+0.65\cos 2t-0.65, 1.5\sin t)\), \(t\in[0,\pi]\).

  • Case 3: Γ is chosen as \(\boldsymbol{x}_{3}=0.6\sqrt {4.25+2\cos3t}(\cos t,\sin t)\), \(t\in[0,\pi]\).

First, we investigate the influence of the noise level on the numerical solution in case 1. The source curve \(\varGamma'\) is chosen as

$$\boldsymbol{x}'_{1}=3(0.6+0.1\cos3t) (\cos t,\sin t), \quad t\in[0,\pi]. $$

Choose \(N=50\), \(N_{c}=100\), and \(\beta=0.5\). The sketch can be seen in Fig. 2(a). Figure 2 shows the numerical solutions with different noise levels \(\delta=0.05\), \(\delta=0.1\), and \(\delta=0.15\), whilst it shows that our algorithm is effective and robust to random noise since the algorithm provides a smooth approximation of the solution.

Figure 2
figure 2

The exact solution and the numerical solutions on \(\varGamma_{2}\) with \(\delta\in\{0.05, 0.1, 0.15\}\)

Second, we consider the influence of β in case 2. Choose \(N=50\), \(N_{c}=100\), and \(\delta=0.05\). The source curve \(\varGamma'\) is chosen as

$$\boldsymbol{x}'_{2}=2(\cos t+0.65\cos2t-0.65, 1.5\sin t), \quad t\in[0,\pi]. $$

The sketch can be seen in Fig. 3(a). Figure 3 shows the numerical solutions with \(\beta=0.3\), \(\beta=0.4\), and \(\beta=0.5\). From Fig. 3, it can be seen that the algorithm is effective with different choices of β and the error increases as β decreases, which is reasonable since the information of the Cauchy data is limited with small β.

Figure 3
figure 3

The exact solution and the numerical solutions on \(\varGamma_{2}\) with \(\beta\in\{0.3, 0.4, 0.5\}\)

To this end, the influence of the number \(N_{c}\) is investigated in case 3. Choose \(N=50\), \(\beta=0.5\), and \(\delta=0.05\). The source curve \(\varGamma'\) is chosen as

$$\boldsymbol{x}'_{3}=1.2\sqrt{4.25+2\cos3t}(\cos t,\sin t),\quad t\in[0,\pi]. $$

The sketch can be seen in Fig. 4(a). Figure 4(b) shows the relative errors with different choices of \(N_{c}\in [25,985]\). A decreasing trend of the error can be seen in Fig. 4(b) as \(N_{c}\) increases. The trend in the figure is unsharp since the noise added to the Cauchy data is random, which means that the errors may change as we redo the experiment. Fortunately, the error changes within a limit and the decreasing trend of the errors can be observed from Fig. 4(b).

Figure 4
figure 4

(a) Sketch of case 3. (b) The relative errors on \(\varGamma_{2}\) with different choices of \(N_{c}\in[25,985]\)

Example 2

In this example, Γ is continuous but with a “corner”. The exact solution is chosen as

$$u_{2}(\boldsymbol{x})=\mathrm{e}^{x_{1}}\sin x_{2}. $$

The curve Γ is chosen as the combination of

$$\boldsymbol{x}_{4}=\frac{0.5}{\cos(0.25\pi-t)}(\cos t,\sin t),\quad t\in \biggl[0,\frac{\pi}{2} \biggr] $$

and

$$\boldsymbol{x}_{5}=\frac{0.5}{\cos(0.75\pi-t)}(\cos t,\sin t),\quad t\in \biggl[\frac{\pi}{2},\pi \biggr]. $$

The source curve \(\varGamma'\) is chosen as

$$\boldsymbol{x}'_{4}=1.5(\cos t,\sin t),\quad t\in[0, \pi]. $$

Choose \(N=50\), \(N_{c}=100\), and \(\beta=0.5\). The sketch of Example 2 can be seen in Fig. 5(a).

Figure 5
figure 5

Example 2: The exact solution and the numerical solutions on \(\varGamma_{2}\)

Figure 5 shows the numerical solutions with different noise levels \(\delta=0.01\), \(\delta=0.03\), and \(\delta=0.05\). As is shown in Fig. 5, the computation of \(\frac{\partial u}{\partial\nu }\) is more sensitive to the error in this case.

Example 3

In this case, Γ has a jump at \(t=\frac{\pi}{2}\). The exact solution is chosen as

$$u_{3}(\boldsymbol{x})=\cosh x_{1}\sin x_{2}. $$

The curve Γ is chosen as the combination of

$$\boldsymbol{x}_{6}=\frac{0.5+0.4\cos t+0.1\sin2t}{1+0.7\cos t}(\cos t,\sin t),\quad t\in \biggl[0,\frac{\pi}{2} \biggr] $$

and

$$\boldsymbol{x}_{7}=(0.6+0.1\cos3t) (\cos t,\sin t),\quad t\in \biggl[ \frac{\pi }{2},\pi \biggr]. $$

The source curve \(\varGamma'\) is chosen as \(\boldsymbol{x}'_{4}\). Choose \(N=50\), \(N_{c}=100\), and \(\beta=0.5\). The sketch of Example 3 can be seen in Fig. 6(a). Figure 6 shows the numerical solutions with different noise levels \(\delta=0.01\), \(\delta=0.03\), and \(\delta=0.05\). It can be seen from Fig. 6 that the algorithm is still effective when \(\varGamma_{1}\) is apart from \(\varGamma_{2}\).

Figure 6
figure 6

Example 3: The exact solution and the numerical solutions on \(\varGamma_{2}\)

Example 4

In the previous examples, an analytic solution is available. We consider that the curve Γ is chosen by

$$\boldsymbol{x}_{1}=(0.6+0.1\cos3t) (\cos t,\sin t),\quad t\in[0,\pi]. $$

Consider the following boundary value problem:

$$\begin{aligned}& \Delta u(\boldsymbol{x})=0, \quad \boldsymbol{x}\in D, \end{aligned}$$
(18)
$$\begin{aligned}& u(\boldsymbol{x})=x_{2}e^{x_{1}},\quad \boldsymbol{x}\in \partial D. \end{aligned}$$
(19)

In this case, an analytic solution is not available. The input Cauchy data \(f = x_{2}e^{x_{1}}|_{\varGamma_{1}}\) and \(g = \partial_{n} u|_{\varGamma_{1}}\), in which \(g = \partial_{n} u|_{\varGamma_{1}}\) can be obtained numerically by solving the direct problem (18).

Figure 7 shows the numerical solutions for this case. It can be seen that the numerical solutions are stable approximations.

Figure 7
figure 7

Example 4: The exact solution and the numerical solutions on \(\varGamma_{2}\)

5 Conclusion

In this paper, we have dealt with a Cauchy problem connected with the Laplace equation in a half-plane. With the Green’s function of the Laplacian in the half-plane, we have proposed a method of fundamental solutions to solve the Cauchy problem. Numerical experiments have also been given to show the effectiveness of the algorithm.