1 Introduction

In the process of transportation, diffusion, and conduction of natural materials, the following heat equation is induced:

$$\begin{aligned} u_t-a^2\Delta u=f(x,t;u),\quad (x,t)\in \Omega \times (0,T], \end{aligned}$$
(1)

where u represents state variable, a represents the diffusion coefficient, \( \Omega \) represents a bounded domain in R, and f denotes physical laws, which means source terms here. Since the characteristics of sources in practical problems are always unknown, there are many researches on such inverse problems of determining source terms from 1970s. For example, the inverse problem of determining an unknown heat source function in the heat conduction equation has been considered in many papers[4, 5, 8, 10, 15, 16, 22]. The inverse problems are unstable in nature because the unknown solutions have to be determined from indirect observable data which contain measurement errors. The major difficulty in establishing any numerical algorithm to approximate the solution is the ill-posedness of the problem and the ill-conditioning of the resultant discretized matrix. Therefore, in this paper, in order to overcome the instability of the solution, the RBF combined with the Tikhonov regularization and the GCV criterion for the choice of the regularization parameter is developed. Radial basis functions are used actively for solving partial differential equations. For example, see [1, 17, 18].

The organization of this paper is as follows: In Sect. 2, we briefly introduce a meshless scheme based on thin plate spline (TPS) radial basis function method. The mathematical formulation and method of our interest problem is presented in Sect. 3. The results of a numerical experiment are presented in Sects. 4, and 5 concludes the paper.

2 Radial Basis Function Approximation

The approximation of a distribution u(x), using radial basis functions, may be written as a linear combination of N radial functions; usually it takes the following form:

$$\begin{aligned} u(x) \simeq \sum _{j=1}^N\lambda _j\phi (x,x_j)+\psi (x),\quad x\in \Omega \subset R^{d}, \end{aligned}$$
(2)

where N is the number of points, \(x=(x_{1},x_{2},\ldots ,x_{d}),\) d is the dimension of the problem, \(\lambda _{j}\)’s are coefficients to be determined, and \(\phi \) is the radial basis function. Equation (2) can be written without the additional polynomial \(\psi \). In this case \(\phi \) must be unconditionally positive definite to guarantee the solvability of the resulting system (e.g., Gaussian or inverse multiquadrics). However, \(\psi \) is usually required when \(\phi \) is conditionally positive definite, i.e., when \(\phi \) has a polynomial growth towards infinity. Examples are thin plate splines and multiquadrics. We will use the thin plate splines for the new numerical scheme introduced in Sect. 3. The reason is that previous analyses have shown that the multiquadrics and thin plate splines give the most accurate results for scattered data approximations [9]. However, the accuracy of the multiquadrics method depends on a shape parameter, and as yet there is no mathematical theory about how to choose its optimal value. Hence, most applications of the multiquadrics use experimental tuning parameters or expensive optimization techniques to evaluate the optimum shape parameter [6], while the thin plate spline method gives good agreement without requiring such additional parameters and based on sound mathematical theory [7]. Therefore, the TPS radial basis function is widely used for the numerical solution of partial differential equations [1921].

The generalized thin plate splines defined as

$$\begin{aligned} \phi (x,x_j)=\phi (r_j)=r_j^{2m}\log (r_j), \quad m=1,2,3,\ldots , \end{aligned}$$
(3)

where \( r_j=\parallel x-x_j\parallel \) is the Euclidean norm. Since \(\phi \) in Eq. (3) is \(C^{2m-1}\) continuous, a higher-order TPS must be used, for higher-order partial differential operators. The advection–diffusion equation is of second order, and thus, \(m=2\) is used to ensure at least \(C^2\) continuity for u (i.e., second-order thin plate splines) [13].

If \(\mathcal {P}^d_q\) denotes the space of d-variate polynomials of order not exceeding q, and letting the polynomials \(P_1,\ldots ,P_m\) be the basis of \(\mathcal {P}^d_q\) in \(\mathbb {R}^d\), then the polynomial \(\psi (x)\), in Eq. (2), is usually written in the following form:

$$\begin{aligned} \psi (x)=\sum _{i=1}^m\varsigma _iP_i(x), \end{aligned}$$
(4)

where \(m=(q-1+d)!/(d!(q-1)!)\). Also \((\lambda _1,\ldots ,\lambda _N)\) and \((\varsigma _1,\ldots ,\varsigma _m)\) are unknown scalars. We collocate (2) at the N points. However, an extra m equations are required for obtaining unknown coefficients. This is insured by the conditions for (2) as

$$\begin{aligned} \sum _{j=1}^N\lambda _jP_i(x_j)=0, \quad i=1,2,\ldots ,m. \end{aligned}$$
(5)

3 Statement of the Problem

Consider the one-dimensional problem in which the source term f(xtu) can be written in the form \(f(x,t;u)=\varphi (t)f(x)\)

$$\begin{aligned}&u_t-a^2u_{xx}=\varphi (t)f(x),\quad 0<x<1,~0<t<T, \end{aligned}$$
(6)
$$\begin{aligned}&u(x,0)=v(x),\quad 0\le x\le 1,\nonumber \\&u(0,t)=g(t),\quad \ \, 0\le t\le T,\nonumber \\&u(1,t)=k(t),\quad \ \, 0\le t\le T, \end{aligned}$$
(7)

with the overspecified condition

$$\begin{aligned} u(x,T)=h(x),\quad 0\le x\le 1, \end{aligned}$$
(8)

where T is a positive constant, \(\varphi (t), g(t),v(x),\) and k(t) are considered known functions, while f(x) and u(xt) are unknown functions which remain to be determined. We assume that the functions appearing in the data are measurable and satisfy the following conditions:

$$\begin{aligned}&\mid \varphi (t)\mid \le K_{\varphi }, \quad \mid \acute{\varphi }(t)\mid \le K^{*}_{\varphi },~~\mid \varphi (T)\mid \ge \varphi _0>0, \\&\big \{h(x),v(x)\big \}\in W^2_2([0,1])\cap W^{1^\circ } _2, \quad \parallel v\parallel _{W_2^2}\le M_0, \quad \parallel h\parallel _{W_2^2}\le K_h, \end{aligned}$$

where \(K_{\varphi },\varphi _0\) are positive constants, \(K^*_\varphi ,M_0,K_h\) are nonnegative constants, and the spaces \(W^2_2([0,1]),W^{1^\circ } _2\) with the corresponding norms are understood in the usual sense[14].

Under assumptions given above and some additional conditions, Kamynin demonstrated the existence and uniqueness of the solution in [13]. From (6) and (8), one may obtain

$$\begin{aligned} u_{xx}(x,T)=h^{\prime \prime }(x)=\frac{1}{a^2}\big (u_t(x,T)-\varphi (T)f(x)\big ). \end{aligned}$$
(9)

Hence,

$$\begin{aligned} f(x)=\frac{u_t(x,T)-a^2 h^{\prime \prime }(x)}{\varphi (T)}. \end{aligned}$$
(10)

Substituting (10) into (6) yields

$$\begin{aligned} u_{xx}(x,t)-\frac{u_t(x,t)}{a^2}+\frac{\varphi (t)u_t(x,T)}{a^2\varphi (T)}-\frac{\varphi (t) h^{\prime \prime }(x)}{\varphi (T)}=0. \end{aligned}$$
(11)

Now we use the RBF’s for discretization of both time and space variables. Let \(\Delta =\{(x_i,t_i), 0\le x_i\le 1, 0\le t_i\le T,i=1,\ldots ,N-3\}\) be a set of scattered nodes. Then the solution of the problem (11) and (7) is considered as follows:

$$\begin{aligned} \tilde{u}(x,t)=\sum _{i=1}^{N-3}\lambda _i\phi _i(x,t)+\lambda _{N-2}x+\lambda _{N-1}t+\lambda _N, \end{aligned}$$
(12)

where \(\phi _i(x,t)=\phi (\parallel (x,t)-(x_i,t_i)\parallel _2)\) for a radial function \(\phi \) and \(\lambda _i,i=1,\ldots ,N\), are unknown constants must be identified.

The collocation technique is used for determining unknowns \(\lambda _i,i=1,\ldots ,N.\) Let

$$\begin{aligned} \Delta =\Delta _1\cup \Delta _2\cup \Delta _3\cup \Delta _4, \end{aligned}$$
(13)

where

$$\begin{aligned} \Delta _1= & {} \big \{(x_i,t_i), \quad 0\le x_i\le 1,\,t_i=0,i=1,\ldots ,N_1\big \}, \end{aligned}$$
(14)
$$\begin{aligned} \Delta _2= & {} \big \{(x_i,t_i), \quad x_i=0, \,0<t_i\le T,i=1,\ldots ,N_2\big \}, \end{aligned}$$
(15)
$$\begin{aligned} \Delta _3= & {} \big \{(x_i,t_i), \quad x_i=1, \,0<t_i\le T,i=1,\ldots ,N_3\big \}, \end{aligned}$$
(16)
$$\begin{aligned} \Delta _4= & {} \big \{(x_i,t_i), \quad 0<x_i<1, \,0<t_i\le T,i=1,\ldots ,N_4\big \}. \end{aligned}$$
(17)

Also we assume \(\Delta _i\ne {\varnothing }\) for \(1\le i\le 4.\) Now (7) and (11) are approximated by using (12). We obtain

$$\begin{aligned}&\sum _{i=1}^{N-3}\lambda _i\phi _i(x_k,t_k)+\lambda _{N-2}x_k+\lambda _{N-1}t_k+\lambda _N=v(x_k), \quad (x_k,t_k)\in \Delta _1, \end{aligned}$$
(18)
$$\begin{aligned}&\sum _{i=1}^{N-3}\lambda _i\phi _i(x_k,t_k)+\lambda _{N-2}x_k+\lambda _{N-1}t_k+\lambda _N=g(t_k), \quad (x_k,t_k)\in \Delta _2, \end{aligned}$$
(19)
$$\begin{aligned}&\sum _{i=1}^{N-3}\lambda _i\phi _i(x_k,t_k)+\lambda _{N-2}x_k+\lambda _{N-1}t_k+\lambda _N=k(t_k), \quad (x_k,t_k)\in \Delta _3, \end{aligned}$$
(20)
$$\begin{aligned}&\sum _{i=1}^{N-3}\lambda _i\big [a^2\varphi (T)\frac{\partial ^2}{\partial x^2}\phi _i(x_k,t_k)-\varphi (T)\frac{\partial }{\partial t}\phi _i(x_k,t_k) +\varphi (t_k)\frac{\partial }{\partial t}\phi _i(x_k,T)\big ]\nonumber \\&\quad +\lambda _{N-1}\big [\varphi (t_k)-\varphi (T)\big ] = a^2 \varphi (t_k)\ {h^{\prime \prime }}(x_k), \quad (x_k,t_k)\in \Delta _4, \end{aligned}$$
(21)

and the additional conditions due to (5) are written as

$$\begin{aligned} \sum _{i=1}^{N-3}\lambda _i=\sum _{i=1}^{N-3}\lambda _ix_i=\sum _{i=1}^{N-3}\lambda _it_i=0. \end{aligned}$$
(22)

Equations (18)–(22) result in a linear system of equations. By solving this linear system the approximate solution of the transformed problem (7) and (11) will be obtained. The values of the unknown coefficients \(\lambda _i\) can be obtained by solving the following matrix equation:

$$\begin{aligned} A\lambda =b. \end{aligned}$$
(23)

Due to ill-posedness of the original inverse problem, the linear system (23) is ill-conditioned. Now, we use the Tikhonov regularization method with the GCV criterion described in [11, 12]. Denoting the regularized solution of (23) by \(\lambda ^{\alpha ^*}\), the approximate solution \(u_\alpha ^*\) for the problems (11) and (7) is given as

$$\begin{aligned} u_{\alpha }^*(x,t)=\sum _{i=1}^{N-3}\lambda _i^{\alpha ^*}\phi _i(x,t)+\lambda _{N-2}^{\alpha ^*} x+\lambda _{N-1}^{\alpha ^*} t+\lambda _N^{\alpha ^*}. \end{aligned}$$
(24)

Then f(x) may be estimated as

$$\begin{aligned} f^*(x)=\frac{u_\alpha ^*(x,T)-a^2 h^{\prime \prime }(x)}{\varphi (T)}. \end{aligned}$$
(25)

4 Numerical Examples

It should be noted that in many practical situations, the measured data are unavoidably contaminated by inherent measurement errors. Thus, we will replace exact data by noise data given by

$$\begin{aligned} b=b+\sigma .\mathrm{randn}(i), \quad i=1,\ldots ,N, \end{aligned}$$
(26)

where the magnitude \(\sigma \) indicates the percentage error level and randn(i) is a normal distribution function with zero mean and unit standard deviation, and it is realized using the Matlab function randn. For numerical verification, we assume that the diffusion coefficient \(a=1\).

The values for the accuracy errors, the root mean square error (RMS), and the relative root mean square error (RES) are defined as

$$\begin{aligned} \mathrm{RMS}(u)= & {} \sqrt{\frac{1}{N}\sum _{i=1}^N{(u_i-u_i^*)^2}}, \end{aligned}$$
(27)
$$\begin{aligned} \mathrm{RES}(u)= & {} \sqrt{\frac{\sum _{i=1}^N{(u_i-u_i^*)^2}}{\sum _{i=1}^N{(u_i)^2}}}, \end{aligned}$$
(28)

where N is the total number of test points, distributed in the domain \([0,1]\,{\times }\,[0,T]\). Also \(u_i\) and \(u_i^*\) are the exact and approximated values of u(xt) at these points, respectively.

Table 1 The values of cond(A), RMS(u), RES(u), RMS(f), RES(f) for various values of \(T, \sigma =0.1\,\%, N=32\) for Example 1
Fig. 1
figure 1

The GCV function obtained for levels of noise added into the measured data, namely \(\sigma =0.1\,\% (\ldots ), \sigma =1\,\%(-)\) with \(N=32, T=0.6\) for Example 1

Fig. 2
figure 2

The analytical f(x) and its approximation \(f^*(x)\) with \(N=32, T=0.6\) and levels of noise added into the measured data, namely \(\sigma =0.1,1\,\%\) for Example 1

Fig. 3
figure 3

The analytical f(x) and its approximation \(f^*(x)\) with \(N=48, T=0.3\) and levels of noise added into the measured data, namely \(\sigma =10,20\,\%\) for Example 2

Example 1

Let \(\varphi (t)=e^{2 t },\) \(v(x)=x,\) \(h(x)=e^{2 }x,\) \(g(t)=0\) and \(k(t)=e^{2 t }\). With these assumptions, the exact solution of problem (6)–(8) is given by \(u(x,t)=xe^{2t}\) and \(f(x)=2x\). The obtained results for various values of T and \(\sigma =0.1\,\%\) are shown in Table 1. Also in Fig. 1 it can be seen that the minimum of \(G(\alpha )\) occurs approximately at \(\alpha =4.8854\times 10^{-4}\) and \(1.1409\times 10^{-7}\) for \(\sigma =1\) and \(0.1\,\%\), respectively. Similar results have been obtained for the other problems investigated in this study, and therefore, they are not presented here. In Fig. 2 we do the comparison between the exact and approximate solutions f(x) and \(f^*(x)\). From this figure, the numerical results are satisfactory. Even with the noise level up to \(\sigma =1\,\%\), the numerical solutions are still in good agreement with the exact solutions. The condition number of the matrix A seems too large to obtain accurate solutions. However, from Table 1, it can be easily observed that the Tikhonov regularization method works well. Similar conclusions can be drawn from the results for Example 2. From Table 2 it can be seen that increase of N has an increasing effect on the errors. Furthermore, the values of RES(f) decrease as the level of noise \(\sigma \) added into the input temperature data decreases.

Table 2 RES(f) for various values of \(\sigma \) and N, \(T=0.6\) for Example 1
Fig. 4
figure 4

The approximate u(xt) for Example 2

Table 3 The values of cond(A), RMS(u), RES(u), RMS(f), RES(f) for various values of \(T, \sigma =10\,\%, N=48\) for Example 2

Example 2

Let us consider \(\varphi (t)=e^{t},v(x)=\sin (x),h(x)=\mathrm{sin}(x)e,g(t)=0\) and \(k(t)=\mathrm{sin}(1)e^t\). With these assumptions, the inverse problem (6)–(8) has the unique solution given by \(u(x,t)=\textit{sin}(x)e^t\) and \(f(x)=2\textit{sin}(x)\). The function f(x) and the approximation \(f^*(x)\) are displayed in Fig. 3. Also the obtained results for various values of T and \(\sigma =10\,\%\) are shown in Table 3.

Tables 1 and 3 show that the RMS(f) and RES(f) increase with increasing value of T in Examples 1 and 2. The numerical results for u(xt) is shown in Fig. 4 where \(T=0.1\).

5 Conclusions

In this paper, an inverse source problem is considered by using the thin plate spline radial basis functions and Tikhonov regularization method with the GCV criterion. Two unknown functions in this heat source problem are estimated simultaneously. Numerical results show the accuracy and ability of the proposed method. Employing a similar procedure for solving the heat source \(f(x,t;u)=\varphi (t)f(x)\), while \(\varphi (t)\) is unknown function, with transient temperature overspecification can be a nice investigation and is the subject of research work proposed by the authors of this paper. In concluding, the proposed scheme can be easily adapted to two- and three-dimensional inverse source problem.