Introduction

Singularly perturbed boundary value problems often arise in applied sciences and engineering, typical examples include high Reynold’s number flow in fluid dynamics, modelling the problems in mathematical biology and semi-conductor devices where the edge effects are important. These problems depend on a small positive parameter \(\varepsilon \) known as the singular perturbation parameter. These problems have been received a significant amount of attention in past and recent years. A well known fact is that the solution of such problems display sharp boundary or interior layers when \(\varepsilon \) is very small, i.e., the solution varies rapidly in some parts and varies slowly in some other parts. Typically there are thin transition layers where the solutions can jump abruptly, while away from the layers the solution behaves regularly and vary slowly. So the treatment of singularly perturbed problems presents severe difficulties that have to be addressed to ensure accurate numerical solutions. Thus more efficient but simpler computational techniques are required to solve singular perturbation problems. For a good analytical discussion on singular perturbation, one may refer the books: Doolan et al. [3], Kevorkian and Cole [9], O’Malley [12]. Also, for some numerical methods and their convergence analysis, one may refer to recent books: Farrell et al. [4], Miller et. al. [10], Roos et al. [19] and the references therein. In the articles [2, 57, 13, 1517, 20], many researcher have followed different numerical approach combining fitted mesh methods and fitted operator methods for solving singular perturbation problems where as [8] gives an erudite outline on the numerical methods for singular perturbation problems. In [11, 14] efficient numerical methods are used for singularly perturbed differential equations with an delay (or shift) term. Recently, Reddy et. al [18] have developed an exponential finite difference method for solving model equation of the form (1). But Most of these available numerical techniques are constructed on fitted operator techniques or by the use of reasonable apriori information about the solutions which is a limitation of this kind of approach.

In this paper, we introduce a simple exponentially fitted finite difference method for solving singularly perturbed two-point boundary value problems with the boundary layer at one end (left or right) point. A fitting factor is introduced and the model equation is discretized by a finite difference scheme on an uniform mesh. Thomas algorithm is used to solve the tri-diagonal system. The stability of the algorithm is investigated. Several linear and nonlinear problems are solved to demonstrate the applicability of the method. It is observed that the present method approximates the exact solution very well.

The rest of the paper is organized as follows: “Continuous problem” section recalls pertinent properties of the solution \(y(x)\) of (1). In “Discrete problem” section, we describe the finite difference scheme, followed by a brief discussion on Thomas algorithm and its stability analysis. We discuss the convergence analysis of the numerical solution obtained by the exponential scheme in “Convergence analysis” section. Finally, “Numerical result” section gives some numerical examples that confirm the theoretical error estimates. Also, we apply the proposed scheme on some nonlinear problems and problem with right end boundary layer.

Throughout this paper \(C\) denotes a generic positive constant independent of the grid points \(x_{j}\) and the parameters \(\varepsilon \) and \(N\) (the number of mesh intervals) which can take different values at different places, even in the same argument. A subscripted \(C\) (i.e., \(C_{1}\)) is a constant that is independent of \(\varepsilon \) and of the nodal points \(x_{j}\), but whose value is fixed. Whenever we write \(\phi = \fancyscript{O}(\psi )\), we mean that \(|\phi | \le C |\psi |\). To simplify the notation, we set \(g_{j} = g(x_{j})\) for any function \(g\), while \(g_{j}^{N}\) denotes an approximation of \(g\) at \(x_{j}\). Also, we assume that \( \varepsilon \le C N^{-1} \) as is generally the case of discretization of convection-diffusion problems. It is worthwhile to mention that this assumption is not a restriction in practical situation.

Continuous Problem

In this article, we consider the following singularly perturbed boundary value problem (SPBVP):

$$\begin{aligned} \left\{ \begin{array}{ll} Ly(x)\equiv \varepsilon y''(x)+a(x)y'(x)+b(x)y(x) = f(x), \,\, x\,\in \varOmega = (0,1),\\ B_0 \equiv y(0)= \alpha , \,\,\quad B_1 \equiv y(1)= \beta , \end{array}\right. \end{aligned}$$
(1)

where \(0< \varepsilon \ll 1\) is a small singular perturbation parameter, the functions \( a(x), \,b(x), \,f(x)\) are sufficiently smooth and \(\alpha , \beta \) are given constants. Further, we assume that \( a(x) \ge 2M > 0 \) and \( b(x) \le 0\). Under these assumptions, the above problem (1) has a unique solution which exhibits a boundary layer at \(x=0\).

From the theory of singular perturbations [12] and using Taylor’s series expansion for \(a(x)\) about \(x=0\) and restriction to their first terms, we get

$$\begin{aligned} y(x)=y_0(x)+(\alpha -y_0(0))\exp \bigg (-\frac{a(0)}{\varepsilon }x\bigg )+ \fancyscript{O}(\varepsilon ) \end{aligned}$$
(2)

where \(y_0 (x)\) is the solution of the reduced problem of (1), given by

$$\begin{aligned} a(x) y_0'(x)+b(x) y_0 (x) = f(x) \quad \text{ with } y_0 (1)=\beta . \end{aligned}$$
(3)

First, the interval \([0,1]\) is divided into \(N\) equal number of subintervals, each of length \(h\). Let \(0=x_0 < x_1 <x_2<\ldots < x_N = 1\) be the points such that \(x_i=ih\) for \(i=0,1,\ldots ,N\). From (2) as \(h\rightarrow 0\), we have

$$\begin{aligned} \displaystyle \lim _{h\rightarrow 0} y(ih)=y_0(0)+(\alpha -y_0 (0) )\exp \bigg (-\frac{a(0)}{\varepsilon }ih\bigg ). \end{aligned}$$
(4)

Let \(\rho = \frac{h}{\varepsilon }\). Now the equation becomes

$$\begin{aligned} \displaystyle \lim _{h\rightarrow 0} y(ih) = y_0(0)+(\alpha -y_0 (0) )\exp \bigg (-\frac{a(0)}{\varepsilon }\rho \bigg ). \end{aligned}$$
(5)

Now introducing an exponentially fitting factor \(\sigma (\rho )\) in (1), we get

$$\begin{aligned} \varepsilon \sigma (\rho ) y''(x)+a(x)y'(x)+b(x)y(x) = f(x), \end{aligned}$$
(6)

with boundary conditions \(B_0 \equiv y(0)= \alpha ,\) and \(B_1 \equiv y(1)= \beta .\) The fitting factor \(\sigma (\rho )\) is to be determined in such a way that the solution of (6) converges uniformly to the solution (1).

Lemma 1

(Maximum principle) Let \(v\) be a smooth function satisfying \(v(0) \ge 0,\ v(1)\ge 0 \) and \(L v(x)\le 0, \ \forall x \in \ \varOmega , \text{ then } \text{ v(x) } \ge 0 , \ \forall x \in \ \overline{\varOmega }\).

Proof

We can prove the above lemma by method of contradiction. Let \(x^{*} \in \overline{\varOmega }\) be such that \(v(x^{*}) = \min v(x), x \in \overline{\varOmega }\) and assume that \(v(x^{*}) < 0\). Clearly \(x^{*}\notin \{0,1\}\) and \(v'(x^{*})=0 \) and \(v''(x^{*})\ge 0.\) Now consider

$$\begin{aligned} L v(x^{*})\equiv \varepsilon v''(x^{*})+a(x^{*})v'(x^{*}) +b(x^{*})v(x^{*})> 0 \end{aligned}$$

which is a contradiction to our assumption. Hence \( v(x) \ge 0, \forall x \in \ \overline{\varOmega }\). \(\square \)

An immediate consequence of the maximum principle is the following stability estimate.

Lemma 2

If \(u\) is the solution of the boundary value problem (1), then

$$\begin{aligned} \Vert u \Vert \ \le \ M^{-1}\Vert f\Vert + \max \{|\alpha |,|\beta |\}. \end{aligned}$$
(7)

Proof

Consider the following barrier function

$$\begin{aligned} \psi ^{\pm }(x) = \bigg [ \bigg (\frac{1-x}{M}\bigg )\Vert f\Vert + \max \big \{|\alpha |,|\beta |\big \}\bigg ] \pm u(x). \end{aligned}$$

It is easy to check that \(\psi ^{\pm }(x) \ge 0 \) at \(x=0,1\). Now from (1)

$$\begin{aligned} L\psi ^{\pm }(x)&= \varepsilon \big (\psi ^{\pm }(x)\big )''+ a(x)\big (\psi ^{\pm }(x)\big )' + b(x)\psi ^{\pm }(x)\\&= \dfrac{-a(x)}{M}\Vert f\Vert +b(x)\bigg [ \bigg (\dfrac{1-x}{M}\bigg )\Vert f\Vert + \max \{|\alpha |,|\beta |\}\bigg ] \pm Lu(x) \\&\le \big [ -\Vert f\Vert \pm f(x)\big ]+b(x)\bigg [ \bigg (\dfrac{1-x}{M}\bigg )\Vert f\Vert + \max \{|\alpha |,|\beta |\}\bigg ] \le 0. \end{aligned}$$

Thus by applying the maximum principle (Lemma 1), we can conclude that \(\psi ^{\pm }(x)\ge 0, \forall x \in \overline{\varOmega }\), which is the required result. \(\square \)

Lemma 3

The solution \(u(x)\) and its derivatives of the BVP (1) satisfy the following bounds:

$$\begin{aligned} |u^{(k)}(x)| \le C \bigg (1+\varepsilon ^{-k}\exp (-M x /\varepsilon )\bigg ), \quad k=0,1,2,3, \qquad x\in \overline{\varOmega }. \end{aligned}$$
(8)

Proof

This lemma can be proved by following the method of proof as in [10]. \(\square \)

Discrete Problem

Consider the difference approximation of (1) on a uniform grid \(\overline{\varOmega }^{N} = \{x_{j}\}_{j=0}^{N}\) and denote \(h =x_{j+1}-x_{j}\). For a mesh function \(Z_{j}\), we define the following difference operators:

$$\begin{aligned} D^{+}Z_{j}&= \dfrac{Z_{j+1}-Z_{j}}{h},\,\, D^{-}Z_{j} = \dfrac{Z_{j}-Z_{j-1}}{h}, \,D^{0}Z_{j} = \dfrac{Z_{j+1}-Z_{j-1}}{2h},D^{+}D^{-}Z_{j}\\&= \dfrac{Z_{j+1}-2Z_j+Z_{j-1}}{h^2} . \end{aligned}$$

The upwind finite difference scheme for (6) takes the form

$$\begin{aligned} \left\{ \begin{array} {ll} -\varepsilon \sigma (\rho )y(x_i)+ a(x_{i}) D^{0}y(x_i)+b(x_i)y(x_i) = f(x_{i})\,, \quad 1\le i \le N-1,\\ y_0 = y(x_0)= \alpha ,\quad y_N = y(x_N) = \beta \ . \end{array}\right. \end{aligned}$$
(9)

Using the above difference operators, we have

$$\begin{aligned} L^Ny(x_i)= \left\{ \begin{array} {ll} -\varepsilon \sigma (\rho )\dfrac{y(x_{i+1})-2y(x_{i})+y(x_{i-1})}{h^2}+ a(x_{i}) \dfrac{y(x_{i+1})-y(x_{i-1})}{2h}\\ +b(x_i)y(x_i) = f(x_{i}), \quad 1\le i \le N-1,\\ y_0 = y(x_0)= \alpha ,\quad y_N = y(x_N) = \beta \ . \end{array}\right. \end{aligned}$$
(10)

Multiplying (10) by \(h\) and taking the limit \(h\rightarrow 0\), we get

$$\begin{aligned} \displaystyle \lim _{h\rightarrow 0} \dfrac{\sigma (\rho )}{\rho }\bigg (y(x_{i+1})-2y(x_{i})+y(x_{i-1})\bigg ) + \dfrac{a(x_{i})}{2} \bigg (y(x_{i+1})-y(x_{i-1})\bigg ) = 0, \end{aligned}$$
(11)

where \(f(x_i)-b(x_i)y(x_i)\) is bounded. substituting (4) in (11) and then simplifying, we get

$$\begin{aligned} \sigma (\rho ) = \dfrac{\sigma a(0)}{2} \coth \bigg [\frac{\sigma a(0)}{2}\bigg ] \end{aligned}$$
(12)

Hence, (9) takes the form

$$\begin{aligned} \left\{ \begin{array} {ll} \sigma (\rho )y''(x_i)+ p(x_{i}) D^{0}y(x_i)+q(x_i)y(x_i) = r(x_{i})\,, \quad 1\le i \le N-1,\\ y_0 = y(x_0)= \alpha ,\quad y_N = y(x_N) = \beta \ . \end{array}\right. \end{aligned}$$
(13)

where \(p(x) = a(x)/\varepsilon , q(x) = b(x)/\varepsilon , r(x) = f(x)/\varepsilon \).

Let \(\delta \) be a small deviating argument such that \(0 < \delta \ll 1\). By using Talylor’s expansion about the point \(x=x_i\) up to the second order approximation, we have

$$\begin{aligned} y(x_i-\delta ) = y(x_i)-\delta y'(x_i)+\frac{\delta ^2}{2}y''(x_i). \end{aligned}$$

Therefore, we have

$$\begin{aligned} y''(x_i) = \frac{\delta ^2}{2}[y(x_i-\delta )-y(x_i)-\delta D^+ y(x_i)]. \end{aligned}$$

So from (13), we have

$$\begin{aligned} 2\sigma (\rho )[y(x_i-\delta )-y(x_i)-\delta D^+ y(x_i)]+ \delta ^2 p(x_{i}) D^{0}y(x_i)+ \delta ^2 q(x_i)y(x_i) = \delta ^2 r(x_{i})\,. \end{aligned}$$
(14)

But from Taylor series expansion about the point \(x=x_i\), we have

$$\begin{aligned} y(x_i-\delta ) \approx y(x_i)-\delta y'(x_i) = y(x_i)-\delta D^-y(x_i). \end{aligned}$$

Substituting the above in (14), we get a three term recurrence relation as follows:

$$\begin{aligned} E_iy_{i-1}+F_iy_{i}+G_iy_{i+1} = H_i\,, \quad 1\le i \le N-1, \end{aligned}$$
(15)

where

$$\begin{aligned} E_i&= \dfrac{2\sigma (\rho )}{h}-\dfrac{\delta p(x_i)}{2h},\qquad F_i = \dfrac{-4\sigma (\rho )}{h}-\delta q(x_i),\\ G_i&= \dfrac{2\sigma (\rho )}{h}+\dfrac{\delta p(x_i)}{2h},\qquad H_i = \delta r(x_i). \end{aligned}$$

Now (15) gives a system of \(N-1\) equations with \(N-1\) unknowns from \(y_1\) to \(y_{N-1}\) where \(y(x_i) = y_i\). To solve the tri-diagonal system, we use Thomas algorithm. A brief discussion on Thomas algorithm is as follows:

Thomas algorithm A brief discussion on Thomas algorithm for solving the tri-diagonal system (15) is given below:

Consider the tri-diagonal system (15) with the boundary conditions. In Thomas algorithm, we set a recurrence relation

$$\begin{aligned} y_{i}= W_i \,y_{i+1}+T_i\,, \quad \text{ for } i= N-2, N-1,\ldots , 1, \end{aligned}$$
(16)

where \(W_i = W(x_i)\) and \(T_i = T(x_i)\) are to be determined. For \(i=0\), we get \(y_0 = W_0 y_1+T_0\), but from boundary conditions, we already know that \(y_0 = \alpha \). So by comparing the coefficients, we get \(W_0 = 0\) and \(T_0 = \alpha \). Again from (16), we have

$$\begin{aligned} y_{i-1}= W_{i-1} \,y_{i}+T_{i-1}\,, \quad \text{ for } i= N-2, N-1,\ldots , 1. \end{aligned}$$
(17)

Substituting (17) in (15), we get

$$\begin{aligned} E_i[W_{i-1} \,y_{i}+T_{i-1}]+F_iy_{i}+G_iy_{i+1} = H_i\,, \end{aligned}$$
(18)

and on simplifying, we obtain

$$\begin{aligned} y_{i}= \dfrac{-G_i}{F_i+E_iW_{i-1}} \,y_{i+1}+\dfrac{H_i-E_iT_{i-1}}{F_i+E_iW_{i-1}}\,. \end{aligned}$$
(19)

Comparing (15) and (19), we get

$$\begin{aligned} W_i= \dfrac{-G_i}{F_i+E_iW_{i-1}},\qquad T_i = \dfrac{H_i-E_iT_{i-1}}{F_i+E_iW_{i-1}}. \end{aligned}$$

with the initial conditions \(W_0 = 0\) and \(T_0 = \alpha \). Now, we can calculate \(W_i,T_i\) and hence using the value \(y_n = \beta \), we can get the values of \(y_i\) for \(i =N-2, N-1,\ldots , 1. \)

Stability Analysis

By stability, we mean that the error committed at one stage is not propagated into larger to the later stage. Suppose a small error \(e_{i-1}\) has been made in calculating \(W_{i-1}\) given above. Now \(\overline{W}_{i-1} = W_{i-1}+e_{i-1}\) and we want to calculate \(\overline{W}_{i-1}\). So

$$\begin{aligned} e_i&= \dfrac{G_i}{F_i-E_i(W_{i-1}+e_{i-1})}-\dfrac{G_i}{F_i-E_i W_{i-1}}, \\&= \dfrac{G_iE_ie_{i-1}}{(F_i-E_i(W_{i-1}+e_{i-1}))(F_i-E_i W_{i-1})}= \dfrac{W_i^2E_i}{G_i} e_{i-1} . \end{aligned}$$

From the assumption made earlier that \(a(x)> 0\), \(b(x)\le 0\), so \(|E_i| \le |G_i|\). Now by the condition \(|W_i| < 1, \, i=1,2,\ldots ,N-1\), it follows that \( |e_i| = |W_i|^2\dfrac{|E_i|}{|G_i|}|e_{i-1}| < |e_{i-1}|, \) and hence, the stability is guaranteed.

Lemma 4

(Discrete comparison principle) Assume that the mesh function \(V(x_i)\) satisfies \(V(x_0)\ge 0\) and \(V(x_N)\ge 0\). If \(L^N V(x_i)\le 0\) for \(1\le i \le N-1\), then \(V(x_i)\ge 0\) for \(0 \le i \le N\).

Proof

Let us choose \(k\) such that \(V(x_k) = \min V(x_i), 1\le i \le N-1\). If \(V(x_k) \ge 0\), then there is nothing to prove. It is obvious that \(V(x_{k+1})-V(x_{k}) \ge 0\) and \(V(x_{k})-V(x_{k-1}) \le 0\). Now from (10), we have

$$\begin{aligned} L^N V(x_k)\!=\! \varepsilon \sigma (\rho )\dfrac{V(x_{k\!+\!1})\!-\!2V(x_{k})\!+\!V(x_{k\!-\!1})}{h^2}\!+\! a(x_{k}) \dfrac{V(x_{k\!+\!1})\!-\!V(x_{k\!-\!1})}{2h}\!+\!b(x_k)V(x_k)\ge 0, \end{aligned}$$

which contradicts \(L^N V(x_i)\le 0\). Hence, our assumption is wrong. \(\square \)

Convergence Analysis

The following theorem shows the \(\varepsilon \)-uniform convergence of the proposed scheme.

Theorem 1

Let \(y\) and \(Y\) be respectively the exact solution of (1) and the discrete solution of (13) respectively. Then, for sufficiently large \(N\), we have the following \(\varepsilon \)–uniform error estimate:

$$\begin{aligned} \sup _{0< \varepsilon \le 1}\Vert y-Y\Vert \le C N^{-1}(\ln N)^2, \quad x \in \overline{\varOmega } \end{aligned}$$
(20)

Proof

First, let us decompose the solution \(y(x)\) of (1) into regular and singular parts as: \( y(x)= r(x)+s(x). \) Now for \(0\le k \le 3\), the regular component \(r(x)\) satisfies

$$\begin{aligned} |r^k(x)| \le C[1+\varepsilon ^{2-k}e(x,a)], \quad \forall x \in [0,1]. \end{aligned}$$
(21)

and the singular component \(s(x)\) satisfies

$$\begin{aligned} |s^k(x)| \le C \varepsilon ^{-k}e(x,a), \quad \forall x \in [0,1] . \end{aligned}$$
(22)

where \(e(x,a) = e_1(x,a)+e_2(x,a) = \exp (\frac{-a_0 x}{\varepsilon })+ \exp (\frac{-a_0(1-x)}{\varepsilon })\). (for details see [10]).

Similarly, decompose the discrete solution \(Y\) of the problem (13) into regular \((R_{\varepsilon })\) and singular \((S_{\varepsilon })\) components. Thus \(Y(x)= R_\varepsilon (x)+S_\varepsilon (x)\) where \(R_{\varepsilon }\) and \(S_{\varepsilon }\) are respectively the solution of the following problems:

$$\begin{aligned}&L^N R_{\varepsilon } = f(x), \quad R_{\varepsilon }(0) = r(0), \quad R_{\varepsilon }(1) = r(1),\\&L^N S_{\varepsilon } = 0, \quad S_{\varepsilon }(0) = s(0), \quad S_{\varepsilon }(1) = s(1). \end{aligned}$$

Thus \(y(x)-Y(x) = [r(x)-R_\varepsilon (x)]+ [s(x)-S_\varepsilon (x)]\) and the error can be estimated as

$$\begin{aligned} \Vert y(x)-Y(x)\Vert \le \Vert r(x)-R_\varepsilon (x)\Vert + \Vert s(x)-S_\varepsilon (x)\Vert . \end{aligned}$$

Now we need to calculate the errors in the regular and singular components separately.

Let us first calculate the error in the regular component. Consider the local truncation error defined as follows:

$$\begin{aligned} L^{N}(R_\varepsilon (x)-r(x))&= (L-L^N)r(x) = f(x)-L^N(r(x))\nonumber \\&= \varepsilon (D^2-\Delta ^2)r(x)+a(x)(D-D^0)r(x) \end{aligned}$$
(23)

Using Taylor’s series expansion and neglecting higher order terms from fourth order, we get the following expansions for \(y(x_i+h)\) and \(y(x_i-h)\):

$$\begin{aligned} y(x_i+h) = y(x_i)+hy'(x_i)+\frac{h^2}{2}y''(x_i)+\frac{h^3}{6}y'''(\xi _1^{(i)}), \end{aligned}$$

and

$$\begin{aligned} y(x_i-h) = y(x_i)-hy'(x_i)+\frac{h^2}{2}y''(x_i)-\frac{h^3}{6}y'''(\xi _2^{(i)}), \end{aligned}$$

where \((\xi _1^{(i)}), (\xi _1^{(i)}) \in (x_{i-1}, x_{i+1})\). Simplifying the above two expressions, we can easily show that

$$\begin{aligned} (\Delta ^2y)(x_i) = y''(x_i)-\frac{h}{6}\big [y'''(\xi _1^{(i)})-y'''(\xi _2^{(i)}) \big ]. \end{aligned}$$

So, \(\Vert (\Delta ^2-\frac{d^2}{dx^2})y(x_i)\Vert \le C\Vert y'''\Vert \), where \(\Vert y'''\Vert = \displaystyle \sup _{x_i\in (x_0,x_N)} |y'''(x_i)|.\) Similarly by Taylor’s series expansion up to the second order terms we get

$$\begin{aligned} \Vert (D^0-\frac{d}{dx})y(x_i)\Vert \le C\Vert y''\Vert . \end{aligned}$$

Now using the bounds of \(r^k(x), s^k(x)\) and the assumption \(\varepsilon \le C N^{-1}\), the equation (23) reduces to

$$\begin{aligned} \Vert L^N(R_\varepsilon -r)(x_i)\Vert \le CN^{-1}. \end{aligned}$$
(24)

Hence, using the discrete maximum principle (Lemma 4), we get

$$\begin{aligned} \Vert (R_\varepsilon -r)\Vert \le CN^{-1}. \end{aligned}$$
(25)

Now we need to find out the error in the singular component. The local truncation error in the singular component is bounded in the standard way as done for the regular part and is given by

$$\begin{aligned} \Vert L^N(S_\varepsilon -s)(x_i)\Vert \le C \varepsilon ^{-2}N^{-1}. \end{aligned}$$

Choose a constant \(K\) such that \(K\varepsilon \ln N \ge \frac{1}{4}\), i.e., \(\varepsilon ^{-1} \le 4 K \ln N\) So from above inequality, we have

$$\begin{aligned} \Vert L^N(S_\varepsilon -s)(x_i)\Vert \le C N^{-1} (\ln N)^2. \end{aligned}$$

Now again using the discrete comparison principle , we reach at

$$\begin{aligned} \Vert (S_\varepsilon -s)\Vert \le C N^{-1} (\ln N)^2. \end{aligned}$$
(26)

Finally, combining (25) and (26), we get our desired result. \(\square \)

Numerical Results

To demonstrate the applicability of the method, we have applied the proposed scheme on several linear and nonlinear singular perturbation problems with left boundary layers. These examples are widely discussed in the literature. The exact solutions or sometimes uniformly valid approximate solutions are used for comparison purpose.

Example 1

Consider the homogeneous problem

$$\begin{aligned} \left\{ \begin{array}{ll} \varepsilon y''(x)+y'(x)-y(x)= 0, \quad x \in (0,1),\\ y(0)=1, \quad y(1)=1. \end{array}\right. \end{aligned}$$

The exact solution is given by \(y(x)=\dfrac{(\exp ({m_{2})}-1)\exp ({m_{1}x})-(1-\exp ({m_{1})})\exp ({m_{2}x})}{\exp (m_{2})-\exp (m_{1})},\) where \( m_{1,2}=\dfrac{-1\pm \sqrt{1+4 \varepsilon }}{2\varepsilon }.\) This BVP has a boundary layer in the left end at \(x=0\).

Example 2

Consider the non-homogeneous singular perturbation problem

$$\begin{aligned} \left\{ \begin{array}{ll} \varepsilon y''(x)+y'(x)= 1+2x, \quad x \in (0,1),\\ y(0)=0, \quad y(1)=0. \end{array}\right. \end{aligned}$$

Its exact solution is \(y(x)=x(1+x-2\varepsilon )+\dfrac{(2\varepsilon -1)(1-\exp (-x/\varepsilon ))}{1-\exp (-1/\varepsilon )},\) which has a boundary layer at the left side of the domain near \(x=0\) (Table 1).

Table 1 Maximum point-wise errors \(E_{\varepsilon }^{N}\) and the rate of convergence \(r_{\varepsilon }^{N}\) for Example 1

For any value of \(N\) and \(\varepsilon \), we calculate the exact maximum point-wise errors \(E_{\varepsilon }^{N}\) and the corresponding rates of convergence by

$$\begin{aligned} E_{\varepsilon }^{N} = \displaystyle \max _{0\le j \le N}|y(x_{j})-Y_{j}^{N}|\, \quad \text{ and } \quad r_{\varepsilon }^{N} =\log _2\left( \dfrac{E_{\varepsilon }^N}{E_{\varepsilon }^{2N}}\right) , \end{aligned}$$

where \(u\) is the exact solution and \(U_{j}^{N}\) is the numerical solution obtained by using \(N\) mesh intervals in the domain \(\overline{\varOmega }^{N}\) (Table 2).

Table 2 Maximum point-wise errors \(E_{\varepsilon }^{N}\) and the rate of convergence \(r_{\varepsilon }^{N}\) for Example 2

Now we would like to see uniform error and rate of convergence as (Table 2)

$$\begin{aligned} E^{N} = \displaystyle \max _{0\le \varepsilon \le 1}E_{\varepsilon }^{N} \, \quad \text{ and } \quad r^{N} =\log _2\left( \dfrac{E^N}{E^{2N}}\right) . \end{aligned}$$

Non-Linear Example

In this section to demonstrate the applicability of the proposed method, we have applied it to a nonlinear singular perturbation problem with left boundary layer. First the nonlinear problem is converted to a sequence of linear problem by method of quasi-linearization process [3].

Example 3

Consider the non-linear singular perturbation problem

$$\begin{aligned} \left\{ \begin{array}{ll} \varepsilon y''(x)+2y'(x)+\exp (y(x))= 0, \quad x \in (0,1),\\ y(0)=0, \quad y(1)=0. \end{array}\right. \end{aligned}$$

The linear problem concerned to this example is

$$\begin{aligned} \varepsilon y''(x)+2y'(x)+\frac{2}{1+x}(y(x))= \frac{2}{1+x}\bigg [\ln \left( \frac{2}{1+x}\right) -1\bigg ]. \end{aligned}$$

The uniform valid approximation (Ref. [1]) is \(y(x) = \ln (\frac{2}{1+x})-(\ln 2) \exp (-2x/ \varepsilon )\), which has a boundary layer of thickness \(O(\varepsilon )\) near \(x=0\) (Table 3).

Table 3 Maximum point-wise errors \(E_{\varepsilon }^{N}\) and the rate of convergence \(r_{\varepsilon }^{N}\) for Example 3

Right End Boundary Layer Problem

Finally, we consider the following singularly perturbed boundary value problem with right end boundary layer:

$$\begin{aligned} \left\{ \begin{array}{ll} Ly(x)\equiv -\varepsilon y''(x)+a(x)y'(x)+b(x)y(x) = f(x), \,\, x\,\in \varOmega = (0,1),\\ B_0 \equiv y(0)= \alpha , \,\,\quad B_1 \equiv y(1)= \beta , \end{array}\right. \end{aligned}$$
(27)

where \(0< \varepsilon \ll 1\) is a small singular perturbation parameter, the functions \( a(x), b(x), f(x)\) are sufficiently smooth and \(\alpha , \beta \) are given constants. Further, we assume that \( a(x) \ge 2M > 0 \) and \( b(x) \ge 0\). Under these assumptions, the above problem (27) has a unique solution which exhibits a boundary layer at \(x=1\).

Using Taylor series expansion for \(a(x)\) near the point \(x=1\), we get

$$\begin{aligned} y(x)=y_0(x)+(\beta -y_0(1))\exp \bigg (-\frac{a(1)(1-x)}{\varepsilon }\bigg ), \end{aligned}$$
(28)

where \(y_0 (x)\) is the solution of the reduced problem of (27), given by

$$\begin{aligned} a(x) y_0'(x)+b(x) y_0 (x) = f(x) \quad \text{ with } y_0 (0)=\alpha . \end{aligned}$$
(29)

As \(h\rightarrow 0\), we have

$$\begin{aligned} \displaystyle \lim _{h\rightarrow 0} y(ih)=y_0(0)+(\beta -y_0 (1) )\exp \bigg (-\frac{a(1)(1-ih)}{\varepsilon }\bigg ), \end{aligned}$$
(30)

which becomes

$$\begin{aligned} \displaystyle \lim _{h\rightarrow 0} y(ih) = y_0(0)+(\beta -y_0 (1) )\exp (a(1)(1/\varepsilon -i\rho )), \end{aligned}$$
(31)

where \(\rho = \frac{h}{\varepsilon }\). Introducing an exponentially fitting factor \(\sigma (\rho )\) in (27), we get

$$\begin{aligned} -\varepsilon \sigma (\rho ) y''(x)+a(x)y'(x)+b(x)y(x) = f(x), \end{aligned}$$
(32)

with boundary conditions \(B_0 \equiv y(0)= \alpha ,\) and \(B_1 \equiv y(1)= \beta .\) On simplifying, we get

$$\begin{aligned} \sigma (\rho ) = \dfrac{\sigma a(1)}{2} \coth \bigg [\frac{\sigma a(1)}{2}\bigg ]. \end{aligned}$$
(33)

Now we can use the finite difference scheme and the techniques discussed for the left end boundary layer problem. Finally, we will reach at a three term recurrence relation as follows:

$$\begin{aligned} \widehat{E}_iy_{i-1}+\widehat{F}_iy_{i}+\widehat{G}_iy_{i+1} = \widehat{H}_i\,, \quad 1\le i \le N-1, \end{aligned}$$
(34)

where

$$\begin{aligned} \widehat{E}_i&= \frac{2\sigma (\rho )}{h}-\frac{\delta p(x_i)}{2h},\qquad \widehat{F}_i = \frac{-4\sigma (\rho )}{h}-\delta q(x_i),\\ \widehat{G}_i&= \frac{2\sigma (\rho )}{h}+\frac{\delta p(x_i)}{2h},\qquad \widehat{H}_i= \delta r(x_i). \end{aligned}$$

Now (34) gives a system of \(N-1\) equations with \(N-1\) unknowns from \(y_1\) to \(y_{N-1}\) where \(y(x_i) = y_i\). Hence, we can use Thomas algorithm to solve the tri-diagonal system.

Example 4

Consider the following singular perturbation problem:

$$\begin{aligned} \left\{ \begin{array}{ll} -\varepsilon y''(x)+y'(x)+(1+\varepsilon )y(x)= 0, \quad x \in (0,1),\\ y(0)=1+\exp (-\frac{1+\varepsilon }{\varepsilon }), \quad y(1)=1+1/e, \end{array}\right. \end{aligned}$$

Its exact solution \(y(x)\) is of the form \(y(x) = e^{(1+\varepsilon )(\frac{x-1}{\varepsilon })}+e^x,\) and has a boundary layer at the right side of the domain near \(x=1\). The numerical results are shown in Table 4.

Table 4 Maximum point-wise errors \(E_{\varepsilon }^{N}\) and the rate of convergence \(r_{\varepsilon }^{N}\) for Example 4

Conclusion

An efficient exponentially fitted finite difference scheme for a class of singularly perturbed BVPs of the form (1) with left (or right) boundary layers is presented in this paper. A comparatively simple fitting factor is introduced and the solution thus obtained through a tri-diagonal system. We carried out the error analysis and numerical results obtained for some examples show that proposed scheme is of almost first-order accurate up to an logarithm factor. Hence, the key result established here is that the solution thus obtained is uniformly convergent with respect to the perturbation parameter.