Abstract

A singularly perturbed reaction-diffusion problem with a discontinuous source term is considered. A novel rational spectral collocation combined with a singularity-separated method for this problem is presented. The solution is expressed as , where is the solution of corresponding auxiliary boundary value problem and is a singular correction with direct expressions. The rational spectral collocation method combined with a sinh transformation is applied to solve the weakened singularly boundary value problem. According to the asymptotic analysis, the sinh transformation parameters can be determined by the width and position of the boundary layers. The parameters in the singular correction can be determined by the boundary conditions of the original problem. Numerical experiment supports theoretical results and shows that compared with previous research results, the novel method has the advantages of a high computational accuracy in singularly perturbed reaction-diffusion problems with nonsmooth data.

1. Introduction

Singular perturbation problems arise in mathematical modeling of physical and engineering problems, such as the boundary layer of fluid mechanics, the turning point of quantum mechanics, and the flow of large Reynolds numbers. In recent decades, the singular perturbation problem has received extensive attention. Detailed theories and analysis of the singular perturbation problem can be found in the literature [1, 2]. These problems have steep gradients in narrow layers, which is a serious obstacle in calculating classical numerical methods.

Many studies of singularly perturbed problems with nonsmooth data have been researched. The first-order Schwarz method with uniform parameters on Shishkin’s mesh was proposed for a singularly perturbed reaction-diffusion problem with a nonsmooth source term [3].Chandru and Shanthi applied a boundary value technique and hybrid difference scheme for singularly perturbed boundary value problem of reaction-diffusion type with discontinuous source term in [4, 5], respectively. The second-order finite element method was presented on a Bakhvalov–Shishkin’s mesh for singularly perturbed problems with the interior layer [6]. A uniformly convergent difference scheme was employed for singularly perturbed semilinear problems with a discontinuous source term and proved that this scheme was the first-order convergence [7]. A uniformly numerical convergence scheme based on piecewise-uniform Shishkin’s meshes was developed for a reaction-diffusion equation with a discontinuous diffusion coefficient and proved to have second-order convergence [8]. A hybrid difference scheme on a Shishkin’s mesh was introduced for a singularly perturbed reaction-diffusion problem with one and two parameters [9] with interior layers.

The second-order singularly perturbed reaction-diffusion boundary value problem with discontinuous source term is considered: where is a small positive parameter, . Assuming the function is sufficiently smooth in , a jump discontinuity is expected at denoted by . In general, this discontinuity of gives rise to interior layers in the first derivative of the exact solution. Here, .

The rational spectral collocation method was proposed in the literature [10]. A conformal map maps the collocation points clustered near the poles of , which means more points are near the poles. The parameters of the mapping depend on the position and width of the boundary layer. A rational spectral collocation in a barycentric form with sinh transform (RSC-sinh method) is applied to solve a coupled system of singularly perturbed problems and third-order singularly perturbed problems [11, 12].

To weaken the singularity and improve the accuracy of numerical simulation, the singularity-separated method (SSM) for the singular perturbation problem with constant coefficients was proposed by Chen and Yang [13]. Finite element methods with SSM were used to solve a singular perturbation problem with a single boundary layer. A novel rational spectral collocation method is presented combined with the singularity-separated technique for a system of singularly perturbed boundary value problems [14].

A novel numerical method based on the rational spectral collocation in a barycentric form with a singularly-separated method (RSC-SSM) is proposed for solving the second-order singularly perturbed reaction-diffusion problem with nonsmooth source term.

This paper is organized as follows. The asymptotic analysis and sinh transform is outlined in Section 2. The algorithmic details of RSC-SSM for second-order singularly perturbed boundary value problem are considered, and the error estimates for the method are discussed in Section 3. The singularly perturbed reaction-diffusion problem with discontinuous source term is solved in Section 4, which supports theoretical results and provides a favorable comparison with existing methods. Finally, the conclusions are drawn in Section 5.

2. Preliminaries

In this section, some useful lemmas are given, which provide information about the boundary and interior layers occurring in the solution of singularly perturbed problem (1).

Theorem 1. The problem (1) has a solution .

Proof. This theorem is proved constructively. Let and be particular solutions of the following differential equations, respectively:Consider the function where and are the solutions of the boundary value problems:and and are constants to be chosen so that . Using the fact that the maximum principle states that the maximum and minimum values taken on by must occur on , then we have , and We need to choose the constants and so that ; then, we imposeAdditionally, the constants A and B satisfywhereSince the system of linear equation (7) has a solution.

Lemma 1. Let us suppose that a function satisfies and , then .

Proof. Let be such that . If , the conclusion is clearly correct. Suppose that ; it is clear that either or . In the first case, andwhich is a contradiction. In the second case, the proof depends on whether or not is differentiable at . If is not differentiable at , then . Since , it is clear that , which is a contradiction. If is differentiable at , according to the mean value theorem, . Since , it follows that there exists a neighbourhood such that . Choose a point such that . Then, the mean value theorem indicates that :and similarly, there also exists :Thus, we havewhich is a contradiction.
The direct application of the maximum principle is the following stability result.

Theorem 2. Let be the solution of (1), which can be estimated as

Proof. Setting , we can construct satisfyingFurthermore, the solution of (1) has first-order continuous differentiability, that is,It follows from the maximum principle that for all ; thus, we obtain

Theorem 3. The problem (1) has a unique solution .

Proof. The existence of problem (1) has been proved in Theorem 1. Let be the solution of problem (1), and ; set . Then, we haveIt follows at once from Theorem 2, and we can obtain .
Thus, problem (1) has a unique solution.

2.1. Asymptotic Expansion Approximation

For the construction of the RSC-SSM method, it is necessary to use the exact solution of the problem to analyze the position and width of the boundary layer. The problem (1) is considered as the coupling of the following two subproblems: where is the value of at , which is determined by .

The Shishkin decomposition method splits the solution of the singular perturbation problem (1) into regular and layer components. The regular component is defined as the solution of

The singular component is given by

Lemma 2. For each integer satisfying , the regular term and the singular term satisfy the boundswhere is a constant independent of and

Proof. This is found using the stability result in Theorem 2 and the techniques in [3].

Lemma 3. (see [12]). Considering the singularly perturbed reaction-diffusionwhere is sufficiently smooth in , the solution of this problem has the following asymptotic expansion:whereand the following inequality is satisfied:where is a generic constant.
Lemma 3 indicates that the boundary layer region of the singularly perturbed reaction-diffusion problem with smooth source term is and . In other words, the position of the boundary layer is at the two endpoints in the interval , and its width is .

2.2. Rational Spectral Collocation Method in the Barycentric Form

A rational interpolation function in the barycentric form of a function can be expressed as follows [15]:where are barycentric weights and are distinct interpolation points. Most important in practice are the so-called Chebyshev–Gauss–Lobatto points , and in this case, the barycentric weights are as follows [15]:

Theorem 4. (see [16]). Let and be domains in containing and a real interval , respectively. Let be a conformal map such that . If is such that is analytic inside and on an ellipse with foci , semimajor axis length , and semiminor axis length , then the rational function , which interpolates at the transformed Chebyshev points satisfiesuniformly for all .
As suggested in (31), the convergence rate of the rational spectral collocation method mainly depends on the analytic region of in the complex plane. Thus, the conformal map could be chosen to enlarge the ellipse of analyticity of . Then, compared with the Chebyshev spectral method, a better approximation of could be obtained.
An advantage of the rational function in barycentric form is that its derivatives can be calculated directly using differentiation formulae instead of repeatedly using the differential quotient rule. The th derivative of the rational interpolating function evaluated at the point can be expressed in the following form:where is the entry of the th order differentiation matrix. The entries of the first- and second-order differentiation matrices are given as follows [15]:Note that differentiation matrices (33) only rely on weights and the points , which is the reason why the underlying equation does not need to be converted to new coordinates after maps.

2.3. The Sinh Transform

To approximate the rapid changes in the boundary layer region, Tee and Trefethen have constructed the conformal map [17]:where are the location and width of the boundary layers, respectively. The transformed Chebyshev points are clustered near the location of boundary layer , and the density is determined by the width of the boundary layer.

To better distinguish the singular perturbation problem with two boundary layers, Tee proposed the combined sinh transform as

All derivatives of the piecewise map at are continuous to preserve the spectral accuracy. For the reaction-diffusion type, the parameter in (35) should be chosen as .

3. The Rational Spectral Collocation with a Singularly-Separated Method

The implementation and error estimation of RSC-SSM for a singularly perturbed reaction-diffusion problem with a discontinuous source term is elaborated in this section.

3.1. The Singularity-Separated Technique

Consider the problem (1). Taking the left subproblem (19) as an example, the efficient numerical method can be constructed. The homogenous equation has two eigenvalues:

Let be a special solution of ; its general solution is

Note that if and can be neglected.

Thus, the solution of (19) can be decomposed into two parts: , in which is the regular term and is the singular term. The regular term is the solution of an auxiliary boundary value problem:

It is known from the boundary conditions of equation (38) that . The singularities of the solution are weakened.

Similarly, the solution of (20) can also be decomposed into two parts: . The regular term is the solution of an auxiliary boundary value problem:

In the same way, .

Theorem 5. The singular components of (19) and (20) arewherewhere and are the solutions of the auxiliary in (38) and (39).

Proof. According to the boundary condition of (1), it is known thatWe can obtain . On the contrary, the solution of equation (1) , which is . Thus, we haveFurthermore,Thus, the parameters can be obtained:Thus, the solution of the singularly-separated technique can be obtained aswhere the regular terms and are the solutions of the auxiliary in (38) and (39) and the singular terms and are defined as (40).

3.2. RSC-SSM Method

The key to the success of the RSC-SSM is obtaining a high-precision numerical solution for weakened singular perturbation problems (38). The rational spectral collocation with a sinh transform is selected.

First, by introducing the linear transform and defining a new function , then , and we can rewrite (38) as

The boundary layers are located at the two endpoints of the underlying interval , and its width is .

Let the transformed Chebyshev collocation points bewhere is shown in (35).

Evaluating (47) at points yieldswhereand is a unit matrix of -order.

Let , then equation (49) can be rewritten as

The boundary conditions in (47) suggest that

The Dirichlet boundary conditions are imposed on the first and last rows of . We substitute elements in these rows with zeros. The first zero in the first row and the last zero in the last row are replaced by 1. Simultaneously, the first and last elements of vector are replaced by and .

By solving the linear algebra system of (51), we can obtain the numerical solution , which is the regular term in (35). Similarly, the numerical solution , which is the solution of (47), can be obtained.

According to the boundary condition of the original problem (1) and the value of the regular components and , the parameters of singular terms (40) are obtained.

The numerical solution of equation (1) can be obtained as

3.3. Error Analysis

In this section, we establish the error estimates of the RSC-SSM (53).

Theorem 6. Let and be the exact solution and numerical solution of the original problem (1), respectively. Then, we have

Proof. Let ; then, the error z satisfiesSince the singular correct function is the solution of the homogenous equations , set , thenand, according to the proof of Theorem 5, we haveSimultaneously, According to Lemma 2, we can obtainA combination of the convergence of rational spectral collocation (31) leads toBy considering (59) and (60), it leads toThus, we can establish a rational spectral method with a singularity-separated technique that can almost achieve spectral accuracy.

4. Numerical Experiments

To demonstrate the accuracy and efficiency of RSC-SSM, we will use the novel method to solve a singularly perturbed reaction-diffusion problem discontinuous source term and compare the results with other existing methods. We verify the theoretical results obtained in the previous section through numerical experiments. The maximum relative errors of the solution are given bywhere and are the numerical and exact solutions, respectively.

In our computations, all experiments are carried out using MATLAB (version R2014a) on a PC with a 2.5 GHz central processing unit (Intel Core i5-2450M), 4.00 GB memory, and Windows 7 operating system.

Example. Consider the following singularly perturbed problem with discontinuous source term:where

The exact solution of this problem can be expressed aswhere and are constants related to :

Obviously, there is an interior layer at in the solution.

In the RSC-SSM method, the parameters in combined transform of (35) are chosen as .

The RSC-SSM method and the different schemes in [9, 18] are used to solve this problem with several choices of and . The maximum relative errors of the three methods are listed in Table 1.

Compared with the existing difference schemes [9, 18], the RSC-SSM accuracy has been significantly improved for the case with . However, when the parameters , the accuracy of the RSC-SSM is similar to that of the difference method. This is because that the discarded item reached in singularly-separated technique. In Table 1, we investigate the effects of the singular perturbation parameter on the errors. We can see that a decrease in reduces the maximum relative errors.

Figure 1 depicts the numerical solution and the exact solution of the whole region with different . The numerical solution and exact solutions in both the interior and the boundary layers are given in Figure 2.

Figure 3 shows the maximum relative errors in the semilog scale with , and , respectively. It demonstrates the influence of points on the errors. The convergence rates are almost balanced, and even the errors have increased due to the cumulative effects with an increase in . Figure 4 shows the pointwise errors of the function in the whole region with , and , respectively. The smaller the parameter is, the more accurate the RSC-SSM result. Figures 3 and 4 also show that the error mainly comes from the discarded items in the process of singular separation. This confirms the results discussed in the previous section.

5. Conclusions

In this paper, a novel numerical method, named RSC-SSM, has been proposed to solve singularly perturbed boundary value problems with discontinuous source term. The solution is composed of the weaker singularity auxiliary solution and a singular correct function. The numerical experiment illustrates that the proposed RSC-SSM is obviously a better choice to other existing numerical methods available for the singularly perturbed boundary value problems with discontinuous source term. The numerical results demonstrate the almost spectral accuracy of the proposed algorithm and coincide with the theoretical analysis. Moreover, the theoretical and numerical frameworks presented in this paper can be extended to more complex problems.

Data Availability

The data used to support the findings of this study are included in the article.

Conflicts of Interest

The author declares that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

The author is grateful to Prof. Y J Wu for his valuable suggestions and help for the work related to this paper. The work was partially supported by the Research Project of Science and Technology of Colleges and Universities in Ningxia (no. NGY2020056), the First-Class Disciplines Foundation of Ningxia (no. NXYLXK2017B09), and the Science Foundation of North Minzu University (no. 2019XYZSX04).