Retrieval of Timewise Coefficients in the Heat Equation from Nonlocal Overdetermination Conditions

This paper investigates the simultaneous recovery for two time-dependent coefficients for heat equation under Neumann boundary condition. This problem is considered under extra conditions of nonlocal type. The main issue with this problem is the solution unstable to small contamination of noise in the input data. The Crank-Nicolson finite difference method is utilized to solve the direct problem whilst the inverse problem is viewed as nonlinear optimization problem. The later problem is solved numerically using optimization toolbox from MATLAB. We found that the numerical results are accurate and stable.


1
Introduction The field of inverse problems has been existed for a long time. Which concerned with the problems that can not be solved directly. Due to the wide applications in various fields of physics, chemistry, engineering and mathematics [1]. Inverse problems attracted many researchers. For instance, in the case of heat diffusion in melting ice, the boundary of the ice is in a constant state of motion, and the latent heat is absorbed or given out by the thermodynamic setting without any modifications in temperature [2]. The theory of inverse problems has been extensively developed over the last decade, partly due to its importance and real applications [3].

Anwar and Hussein
Iraqi Journal of Science, 2022, Vol. 63, No. 3, pp: 1184-11991185 Parameters identification problem consist of using the input noise-contaminated observation or indirect calculation to infer the parameter values characterizing the device under inquiry [4]. These inverse problems are frequently ill-posed in the view of Hadamard definition, which is: if there is no solution, or if it is not unique, or whether it contradicts the continuous dependency on input data. The first two conditions satisfy most identity concerns and violate the third one, which is stability [5]. Solving an inverse problem is concerned with identifying unknown causes based on observing their effects. This gives, in complementary form, the corresponding definition of the corresponding direct problem, the solution of which is to find the effects based on a complete description of their causes [6]. The inverse problem is much more difficult to solve analytically than the direct problem. So, we are going to employ the numerical methods [7]. The numerical solutions to such problems require vast computations and also reliable numerical scheme [1]. An iterative process for solving the inverse problem has been proposed by [8,9,10].
The simultaneous determination for two timewise heat equation coefficients under the Neumann boundary condition is investigated in this paper. The outline of this research is as follows. We give the mathematical formulation of the inverse problem under investigation in Section 2. The computational method for solving the forward problem based on the finite-difference method is described in Section 3, while Section 4 introduces the constrained regularized minimization problem to be solved using the lsqnonlin MATLAB routine. The numerical results are presented and discussed in Section 5. Finally, conclusions of the paper are given in Section 6. 2 Mathematical formulation Consider the 1-D inverse time-dependent heat equation . a(t), and b(t) are unknown timewise coefficients, the domain Q T = {(x, t) : 0 < x < h, 0 < t < T } subject to the initial condition and Neumann boundary conditions are ; and overspecified conditions of the tempreature at (x = 0), and heat moment of zero order/ energy /mass specification, [11], respectively.
This model has been investigated theoretically in [12], and no numerical solution is attempt undertaken. The aim of the paper is to find the numerical solution based on reliable algorithm. The existence and uniqueness theorems for inverse problem are established in [12]. Definition 1 ([12]). Consider a solution to the inverse problem (1)-(5), the triplet , that satisfies equations (1)-(5). Theorem 1 (Existence of the solution, [12]). Assume the following conditions hold:  Numerical solution of direct problem In this section, we consider the direct Neumann boundary value problem (1)- (3). Where the functions a(t), b(t), (x) and µ i (t), i = 1, 2 are known and the solution u(x, t) is to be computed. In addition for some required information (4)-(5) in order to solve the problem we employ the Crank-Nicolson finite difference scheme which is unconditionally stable and second order accurate in time and space [13]. The discrete form of the direct problem is as follows. Take two positive integer M and N and assume ∆x = and ∆t = is to be step lengths in space and time directions ,respectively .We subdivided the domain where u 1,j and u M+1,j for j = ̅̅̅̅̅ , are fictitious values at points located outside the computational domain. Equation (6) can be rewritten in the form of difference equation as foll ows ; For i= , J= where At each time step t j+1 for j = using the Neumann boundary conditions (8), we obtain a (M × M ) system of linear equations of the form; where u j+1 = (u 1,j+1 , u 2,j+1 , ...., u M,j+1 ) tr and u j = (u 1,j , u 2,j , ...., u M,j ) tr , A, and E are (M × M ) matrices as follows:

Example for direct problem
The exact solution is given by u(x, t) = x 2 + 4(t + 1).
(12) The numerical and exact solution for the temperature u(x, t) at various mesh size M = N ∈ {10, 20, 40, 80} are shown in Figure 1. From this figure one can clearly notice that an accurate and stable solution are obtained. Also as the number of mesh is increased the more accurate solution obtained revels the mesh independent is achieved. Table 1, and 2 show the numerical result for desired output for various mesh sizes. From these tables it can be seen an excellent agreement is obtained. The trapezoidal rule is employed to compute the integral in 5 based on the following formula,

Exact solution Numerical solution
Error graph ×10 -15   4 Solution of the inverse problem We aim to find the numerically stable reconstructions for inverse problem which is described in Section 2. The one-dimensional heat equation together with temperature distribution u(x, t) satisfying the problem is given by equations (1)-(5). At initial time; i.e, at t = 0, we can use the input data to obtain values for a(0) and b(0) which will be described in next subsection. These values will be considered as initial guess in iterative process of solving the inverse problem. In order to solve this problem, we recast the inverse problem as nonlinear minimization problem. In other word, we minimize the gab between measured data and computed solution. Since the problem is ill-posed we adapt Tikhonov regularization method to find stable and smooth solution. The Tikhonov regularization functional can be constructed from overdetermination conditions (4) and (5) as follows : F(a,b):=||u(0,t) -1 (t)|| 2 +||∫ ( ) 2 (t)|| 2 +β 1 ||a(t)|| 2 +β 2 ||b(t)|| 2 , (14) Or ,in discredited form F(a,b)=∑ ( (0,t j ) -1 (t j )) 2 +∑ (∫ (x,t j )dx -2 (t j )) 2 +β 1 ∑ where, β i ≥ 0, i = 1, 2, are regularization parameters and should be determined according to suitable selection strategy. The norm is taken in the space L 2 [0, T ]. Also, u(x, t) solves (1)-(5) for given a and b. The minimization of the objective functional (15), subject to simple physical bound constrain b > 0 is accomplished using lsqnonlin routine from MATLAB optimization toolbox, for more details see [14]. During the simulation, we use the parameters of the routine lsqnonlin, by default as, follows: • Maximum number of iteration (MaxIter) = 10 4 × (number of variables).
• Objective function tolerance (FunTOL)= 10 −10 . The inverse problem(1)-(5) is solved subject to both exact and noisy measurements (4) and (5). The noisy data is numerically simulated by adding random errors as follows: where 1 ,and 2 are random vectors generated from a Gaussian normal distribution with mean zero and standard deviations σ 1 and σ 2 w h i c h a r e given by where p is the percentage of noise. We use the MATLAB bulletin function normrnd to generate the random variables 1 = ( 1,j )and j = and 2 = ( 2,j ), j = as follows: Solving the above system we obtain , evaluating the last equations at t =0 using the compatibility conditions we have; (25)

Results and discussion
In this section, we present numerical solutions for the recovery of timewise coefficients a(t), b(t), and the temperature u(y, t), in the case of noisy and exact data (4)- (5). To assess the accuracy of the numerical solution we utlize the root mean square error (rmse) which is defined as: In our simulation we fix T = 1

Example for inverse problem
Consider the inverse problem (1)-(5) with the input data in the example of direct problem except the coefficients a(t) and b(t) are unknown. One can notice that the conditions of Theorems 1, and 2 are satisfied hence, a solution exists, and it is unique.

Case 1: no noise and no regularization
We start the numerical investigation with case of no noise included in the measurements equations (4) and (5) . One can notice that if the number of mesh size is increased then the number of iterations required to reach the minimum value is also increased. The corresponding numerical results for time-dependent coefficients are presented in Figure  3. From Figure 3 we notice that an accurate and stable reconstruction for unknowns are obtained as the number of mesh size increased shows that the results are mesh independent   (t) and (b) b(t) where no noise and various mesh sizes applied.

Case 2: with noise and no regularization
In this case we will study the inversion of the problem where the input data contaminated with p = 0.1% noise as in equations (18) via (16) and (17) for µ 1 and µ 2 , respectively. Figure 4, presents the regularized objective function as a function of the number of iterations. From Figure 4 it can be seen that unstable and oscillatory retrievals are obtained. Which indicates that the problem under investigation is ill-posed and small error in the input data (µ 1 , µ 2 ) causes a huge errors in the outputs solutions (a, b). Commonly, the naive least squares minimizations produce such results for ill-posed problems.

Case 3: with noise and Tikhonov regularization
Next, to restore the stability and obtain stable and accurate results we have to apply Tikhonov regularization method by adding penalty term of the form β 1 ǁaǁ 2 + β 2 ǁbǁ 2 to the naive least squares errors functional as it placed in equations (14) and the discrete form in (15). In the first stage, we select the regularization parameters β 1 and β 2 to be equal and belong to the set {10 −7 , 10 −6 , 10 −5 , 10 −4 , 10 −3 , 10 −2 , 10 −1 }. That means we look diagonally to the Table 3. From Table 3 one can clearly observe that the best selection for regularization parameters is β 1 = β 2 = 10 −3 , that the rmse(a), and rmse(b) have the lowest value. We Justify the selection of this value , if we use the L-curve criterion by Hansen, [15]. The method is based on a plotting, in a suitable scale, the solution norm versus the corresponding residual norm for all valid regularization parameters. Figure 6 indicates that the so-called corner of the L-curve gives a regularization parameter which provides an acceptable compromise between the data gap and regularization terms in the objective functional (14),  Table 3. Each cell of Table 3

Conclusions
An inverse problem finding a couple of timewise coefficients has been investigated numerically under over specified Dirichlet boundary data and energy/mass specification for one-dimensional heat equation. The forward (direct) solver based on a Crank-Nicolson finite difference scheme has been developed. Minimization of the nonlinear leastsquares functional is applied in order to render accurate solutions. This problem solved iteratively using trust-region algorithm which encapsulated in lsqnonlin routine from MATLAB. This problem has been investigated under exact/noisy data and with/without regularization. The L-curve method is used to determine the optimal choice of regularization parameter. The numerically obtained results is shown that an stable, and oscillation free retrievals are obtained.