1. INTRODUCTION

Due to rapid advancements in science and technology, the differential equations modeling physical aspects and real phenomena are turned out to be more and more complex. Among such kind of problems are singularly perturbed problems. Mathematical representation of boundary layers is the presence of a small parameter \( \epsilon \), called singular perturbation parameter, multiplying with the coefficients of some or all the terms involving highest order derivatives in the differential equations. Singular perturbation problems emerge in almost all the fields of science and engineering e.g. plasmadynamics, oceanography, biochemistry, elasticity, electric power systems, fluid dynamics, aerospace systems, ecology, reaction-diffusion processes etc. [1]. The solution of singularly perturbed problems (SPPs) typically contains boundary layers, and therefore, one has to pay great attention while approximating the solutions of such issues.

A lot of work has been done on numerical schemes for approximating the solutions of SPPs [2, 3]. Survey papers of Kadalbajoo and his co-authors [4,5,6,7,8,9,10] throw light on various computational techniques used for solving SPPs. Pearson [9, 10] is considered to be the first researcher who provided the numerical solution of singular perturbation problems using the classical three-point finite difference scheme over a non-uniform mesh. Axelsson and Gustafsson [11] presented a modified upwind scheme for convection dominated problems. Ortiz [12] discussed error bounds for the \( \tau \)-method for singularly perturbed (SP) differential equations. Kelley [13] derived sufficient conditions for the existence and asymptotic behavior of the solution of SP boundary value problems (BVPs). In 1980, Flaherty and Mathon [14] developed collocation method using cubic splines and polynomial for linear singularly perturbed 2-point BVPs. Niijima [15] analyzed an exponential type difference scheme for solving nonlinear SPPs. Sakai et al. [16] introduced hyperbolic and trigonometric B-splines of fourth degree for SPPs. Kadalbajoo and Rao [17] discussed a parallel discrete invariant algorithm for singularly perturbed boundary value problems. Shishkin [18,19,20,21,22,23] employed special type of mesh, called Shishkin mesh, to generate parameter-uniform numerical schemes under finite difference framework. Many other authors [24,25,26] also utilized Shishkin meshes for generating parameter-uniform numerical schemes for singularly perturbed problems having additional singularities. Recently, considering the benefits and advantages of meshfree methods over other numerical schemes, researchers have paid a considerable attention on the developments of meshfree methods. But for singularly perturbed problems, only a very few meshfree methods have been proposed.

Hashemian and Shodja [27] applied gradient reproducing kernel particle method for solving one-dimensional Burgers problem. The authors used different initial and boundary transformation techniques for the enforcement of essential boundary conditions.

Geng and Qian [28] employed reproducing kernel method for obtaining numerical solutions of singularly perturbed turning point problems having twin boundary layers. Later on, the authors developed modified reproducing kernel method [29] to solve singularly perturbed delay boundary value problems. The proposed method was based on the reproducing kernel theory and the error estimates of the method were also discussed. Nadjafi and co-authors [30] described a meshless method based on moving least squares (MLS) technique for solving singularly perturbed differential-difference equations. After that, a meshless approach, radial basis collocation method, with coordinate stretching procedure was presented by Ghassabzade et al. [31] for numerical treatment of singularly perturbed differential-difference equations.

In the present paper, we propose an element-free Galerkin(EFG) method, which is also one of the meshfree methods proposed by Belytschko et al. [32]. The authors proposed the method for solving the elasticity and heat conduction problems. But to the best of the authors’ knowledge, the proposed method has rarely been applied for treating SPPs as these type of problems require some special treatment in order to capture the boundary layers. In the current work, this treatment is carried out by proposing some special type of node distribution so that the proposed method can be made capable of capturing the sharp boundary layers. The proposed technique is very efficient for approximating the solutions of partial differential equations. Node particles can be added or deleted without difficulty due to the lack of element connectivity. As a result, a flexible refinement of domain discretization can be achieved efficiently and quickly. This feature makes the EFG method better adaptable than the finite element method (FEM). The proposed scheme utilizes moving least squares (MLS) approximation for generating shape functions. The methodology is based on the global weak form, and the numerical integrations are computed employing background cells. The Lagrange multipliers approach is used to impose the essential boundary constraints as the MLS shape functions do not satisfy the Kronecker delta function property.

The paper is arranged as follows. In Sec. 2, the continuous singularly perturbed problem is considered. The numerical methodology consisting of the node generation, MLS approximation, weight functions and weak formulation, is discussed in Sec. 3. Section 4 deals with numerical examples and results followed by conclusion and bibliography.

2. CONTINUOUS PROBLEM

We investigated the following one-dimensional singularly perturbed problem.

$$ \epsilon \frac {d^2u(x)}{dx^2}+b(x)\frac {du(x)}{dx}+c(x)u(x)=f(x),\quad x\in \Omega =(0,1) $$
(1)

with essential boundary conditions defined by

$$ \begin {aligned} u(0)&=u_{0},\\ u(1)&=u_{1}, \end {aligned} $$
(2)

where \( \epsilon \) is a small positive parameter known as singular perturbation parameter with \( 0<\epsilon \ll 1 \), and \( b(x) \), \( c(x) \), and \( f(x) \) are continuous functions in the specified domain.

3. FORMULATION OF ELEMENT-FREE GALERKIN METHOD

3.1. Node Generation

As discussed by Roos et al. [3], when \( \epsilon \) tends to \( 0 \), boundary layers appear in the solution and we need to adopt some special technique in order to capture these boundary layers. In the present paper, we have utilized Shishkin’s approach in order to generate more nodes in the boundary layer region and to capture these layers nicely. In Shishkin’s approach, the distribution of nodes is carried out by splitting up the spatial domain \( \bar {\Omega }=[0,1] \) into two subintervals \( [0,1-\delta ] \) and \( [1-\delta ,1] \), where the transition parameter \( \delta \) is chosen as

$$ \delta =\min \left \{ \frac {1}{2},M \epsilon \ln {N} \right \}, $$

where \( M \) is a constant chosen appropriately and \( N+1 \) denotes the total number of nodes. Here, we have considered that the boundary layers appear at \( x=0 \). Similar procedure can be carried out for boundary layers appearing at \( x=1 \). On each of these subdomains, the nodes are generated as follows:

$$ x_{i} = \begin {cases} i h_{i},& \displaystyle i=0,1,\dots ,\frac {N}{2} \\[1em] \displaystyle \delta +\left (i-\frac {N}{2}\right ) h_{i}, & \displaystyle i=\frac {N}{2}+1,\dots ,N, \end {cases} $$

where mesh spacings \( h_i^{\prime }s \) are given by

$$ h_{i} = \begin {cases} \displaystyle \frac {2\delta }{N},& \displaystyle i=0,1,\dots ,\frac {N}{2} \\[1em] \displaystyle \frac {2(1-\delta )}{N},& \displaystyle i=\frac {N}{2}+1,\dots ,N. \end {cases}\\ $$

Remark 1.

Note that here Shishkin’s idea is used only to generate nodes and not the mesh as the present method does not require elements or element connectivity.

3.2. Moving Least Squares Approximation

The field function \( u(x) \) is approximated by \( u^{h}(x) \) using MLS approximants in the domain \( \Omega \). These approximants contain three components: basis functions which are usually polynomials, weight functions which are related with nodes present in the influence domain of a particular node, and the set of coefficients that depend upon position of nodes. The domain of influence of any nodal point \( x_{I} \) is defined as a local neighborhood of \( x_{I} \) or the domain that the particular node \( x_{I} \) exerts an influence upon. The MLS’s approximation of the unknown function \( u^{h}(x) \) is as follows:

$$ u^{h}(x)=\sum _{i=1}^{m} c_{i}(x)a_{i}(x) = \textbf {c}^{T}(x)\textbf {a}(x), $$
(3)

where \( \textbf {c}(x) \) is a vector of monomial basis functions, \( m \) is the number of components in the basis, and \( \textbf {a}(x) \) is an unknown vector of coefficients of the basis functions.

Now the approximated values of the field function \( u^{h}(x) \) at the nodes \( x_{I},~I=1,2,\dots ,n \), lying in the influence domain of the point \( x \) are given by

$$ u^{h}(x,x_{I})=\textbf {c}^{T}(x_{I}) \textbf {a}(x). $$

Following are the most common basic functions:

  1. Linear basis:

    $$ \begin {aligned} \textbf {c}^{T}(x)&=(1,x)& &\text {in 1D}, \\ \textbf {c}^{T}(x,y)&=(1,x,y)& &\text {in 2D}. \end {aligned} $$
  2. Quadratic basis:

    $$ \begin {aligned} \textbf {c}^{T}(x)&=(1,x,x^{2})& &\text {in 1D},\\ \textbf {c}^{T}(x,y)&=(1,x,y,x^{2},y^{2},xy)& &\text {in 2D}. \end {aligned} $$

We define the weighted residual functional as

$$ J(a)=\sum _{I=1}^{n} w(x-x_{I})\big [\textbf {c}^{T}(x_{I})\textbf {a}(x)-u_{I}\big ]^2, $$
(4)

where \( n \) denotes the number of nodes \( x_i \) in the support domain of the point of interest \( x \). The nodes in the support domain of any point \( x \) are used to support or approximate the function value at \( x \). The dimension \( d_{s} \) of the support domain of the point \( x \) is defined by

$$ d_{s}=\alpha _{s}d_{c}, $$

where \( \alpha _{s} \) signifies the dimensionless size of the support domain and nodal spacing at the point \( x \) is described by the characteristic length \( d_{c} \); \( w(x-x_{I}) \) in the expression (4) is some weight function which is generally chosen as monotonically decreasing as \( |x-x_{I}| \) increases. In the literature, numerous weight functions have been developed and employed by researchers, as mentioned in Sec. 3.3. In MLS approximation, the condition \( m>n \) generally leads to the ill-conditioned system of equations.

On simplification, Eq.(4) can be rewritten as follows:

$$ \begin {aligned} J=\textbf {(Ca-u)}^{T}\textbf {W}\textbf {(Ca-u)},\end {aligned} $$

where

$$ \begin {aligned} \textbf {u}^{T}(x)&=(u_{1},u_{2},u_{3},\dots ,u_{n}),\\[.5em] \textbf {C}&=\begin {bmatrix} c_{1}\mathbf ({x}_{1}) &c_{1}\mathbf ({x}_{2}) & \cdots &c_{1}\mathbf ({x}_{n}) \\ c_{2}\mathbf ({x}_{1}) &c_{2}\mathbf ({x}_{2}) & \cdots &c_{2}\mathbf ({x}_{n}) \\ \vdots &\vdots &\ddots &\vdots \\ c_{n}\mathbf ({x}_{1}) &c_{n}\mathbf ({x}_{2}) & \cdots &c_{n}\mathbf ({x}_{n}) \\ \end {bmatrix}, \end {aligned} $$

and \( \textbf {W} \) is the diagonal matrix defined as

$$ \textbf {W}=\begin {bmatrix} w\mathbf {(x-x_{1})} & 0 & \cdots & 0 \\ 0 & w\mathbf {(x-x_{2})} & \cdots & 0 \\ \vdots &\vdots & \ddots &\vdots \\ 0 & 0 & \cdots &w\mathbf {(x-x_{n})} \end {bmatrix} $$

The minimization of \( J \) with respect to \( \textbf {a}(x) \) leads to

$$ \frac {\partial J}{\partial \textbf {a}}=0. $$

This gives

$$ \textbf {a}(x)=\textbf {P}^{-1}(x)\textbf {S}(x)u_{I}, $$

where

$$ \begin {aligned} \textbf {P}(x)&=\sum _{I=1}^{n} w(x-x_{I})\textbf {c}(x_{I})\textbf {c}^{T}(x_{I}), \\ \textbf {S}(x)&=\big [w(x-x_{1})\textbf {c}(x_{1}),w(x-x_{2})\textbf {c}(x_{2}),\dots ,w(x-x_{n})\textbf {c}(x_{n})\big ].\end {aligned} $$

Therefore, from (3), the approximated field function \( u^{h} \) can be computed as

$$ u^{h}(x)=\sum _{I=1}^{n} \sum _{j=1}^{m} c_{j}(x)\big (\textbf {P}^{-1}(x)\textbf {S}(x)\big )_{jI} u_{I}=\sum _{I=1}^{n} {\phi }_{I}(x)u_{I}, $$

where the shape functions \( \phi _{I}(x),~I=1,2,3,\dots ,n, \) are defined by

$$ \phi _{I}(x)=\sum _{j=1}^{m} c_{j}(x)\big (\textbf {P}^{-1}(x)\textbf {S}(x)\big )_{jI} =\textbf {c}^{T}\textbf {P}^{-1}\textbf {S}_{I}. $$

3.3. Choice of Weight Functions

Weight functions provide weights for the residuals at different nodes within the influence domain and they ensure that nodes enter and leave the influence domain smoothly so that the shape functions satisfy the compatibility condition and the approximation is globally continuous. Some of the weight functions which are widely used are defined as below. Generally, the weight function is based on a normalized distance \( s=\frac {\|x-x_{j}\|}{R_{j}} \), where \( R_{j} \) is the radius of the influence domain of the node \( x_{j} \).

  1. Cubic spline:

    $$ w(s) = \begin {cases} \displaystyle \frac {2}{3}-4s^2+4s^3, & \displaystyle s\leq \frac 12 \\[1em] \displaystyle \frac {4}{3}-4s+4s^2-\frac {4}{3}s^3, & \displaystyle \frac 12<s\leq 1 \\[.5em] 0, & s>1. \end {cases} $$
  2. Quartic spline:

    $$ w(s) = \begin {cases} 1-6s^2+8s^3-3s^4, & s\leq 1 \\ 0, & s>1. \end {cases} $$
  3. Exponential spline:

    $$ w_{I}(x) = w(s) = \begin {cases} \dfrac {e^{-(s/\alpha )^2}-e^{-(1/\alpha )^2}}{1-e^{-(1/\alpha )^2}}, & s\leq 1 \\ 0, & s>1. \end {cases} $$

where the parameter \( \alpha \) is mostly taken as \( \alpha =0.3 \). In the present investigation, exponential weight functions have been used for approximating the solutions of singularly perturbed problems.

3.4. Weak Formulation

The element-free Galerkin weak formulation, using the above-discussed moving least squares methodology, for the considered problem (1) is given by

$$ \begin {aligned} - \epsilon \int _{\Omega } \phi _{i} u^{\prime\prime}(x)\,d\Omega - \int _{\Omega } b(x)\phi _{i} u^{\prime}(x)\,d\Omega &{}- \int _{\Omega } c(x) \phi _{i} u(x)\,d\Omega - \delta \lambda (u-u_{0})\,\Big |_{x=0} - \delta u\lambda \,\Big |_{x=0} \\ &\qquad \qquad {} - \delta \rho (u-u_{1})\,\Big |_{x=1} - \delta u\rho \,\Big |_{x=1} = \int _{\Omega }\phi _{i} f(x)\,d\Omega , \end {aligned} $$
(5)

where \( \phi _{i} \) is the test function generated by moving least square approach as discussed in Sec. 3.2. The last terms in equation (5) are produced due to the method of Lagrange multipliers for handling essential boundary conditions (2). Now integrating by parts and simplifying the above equation, we get

$$ \begin {aligned} &\sum _{j}\left [\epsilon \int _{\Omega } \phi _{i}^{\prime }\phi _{j}^{\prime }\,d\Omega -\int _{\Omega } b(x)\phi _{i}\phi _{j}^{\prime }\,d\Omega -\int _{\Omega } c(x)\phi _{i}\phi _{j}\,d\Omega \right ]u_{j} +\sum _{l}\sum _{j}\delta \lambda _{j}(-N_{l}\phi _{j}u_{j})\,\Big |_{x=0} \\ &\qquad \qquad {}-\sum _{l}\delta \lambda _{i}(-N_{l}u_{0})\,\Big |_{x=0} +\sum _{l}\sum _{j}\delta u_{l}(-\phi _{l}N_{j})\lambda _{j}\,\Big |_{x=0} +\sum _{l}\sum _{j}\delta \rho _{j}(-R_{l}\phi _{j})u_{j}\,\Big |_{x=1} \\ &\qquad \qquad \qquad \qquad {}-\sum _{l}^{n}\delta \rho _{l}(-R_{i}u_{1})\,\Big |_{x=1} +\sum _{l}\sum _{j}\delta u_{l}(-\phi _{l}R_{j})\rho _{j}\,\Big |_{x=1} \\ &\qquad \qquad \qquad \qquad \qquad \qquad {}=\left [\,\int _{\Omega } \phi _{i}f(x)\,d\Omega +\epsilon \phi _{i}(1)\frac {du}{dx}\,\bigg |_{x=1} -\epsilon \phi _{i}(0)\frac {du}{dx}\,\bigg |_{x=0}\right ].\end {aligned} $$

On solving the above nodal weak formulations and assembling, the equations can be written in the matrix form as

$$ \begin {bmatrix} K & G & H \\ G^{T} & 0 & 0 \\ H^{T} & 0 & 0 \end {bmatrix} \begin {bmatrix} U \\ \lambda \\ \rho \end {bmatrix} = \begin {bmatrix} F \\ q \\ q_{c} \end {bmatrix}, $$

where

$$ \begin {gathered} K_{ij} = - \epsilon \int _{\Omega } \phi _{i}^{\prime }\phi _{j}^{\prime }\,d\Omega - \int _{\Omega } b(x)\phi _{i}\phi _{j}^{\prime }\,d\Omega - \int _{\Omega } c(x)\phi _{i}\phi _{j}\,d\Omega , \\ G_{lj}^{T} = -\delta \lambda _{j}(N_{l}\phi _{j})\,\Big |_{x=0}, \quad H_{lj}^{T} = -\delta \rho _{j}(R_{l}\phi _{j})\,\Big |_{x=1}, \quad F_{i} = \int _{\Omega } \phi _{i}f(x)\,d\Omega , \\ q_{l} = -\delta \lambda _{l}(N_{l}u_{0})\,\Big |_{x=0}, \quad q_{c_{l}} = -\delta \rho _{l}(R_{l}u_{1})\,\Big |_{x=1},\end {gathered} $$

where \( \lambda = \sum _{l=1}^{n}N_{l}\lambda _{l} \) and \( \rho = \sum _{l=1}^{n}R_{l}\rho _{l} \) are Lagrange multipliers while \( N_{I} \) and \( R_{I} \) are shape functions for \( I^{th} \) node on the essential boundary.

4. NUMERICAL EXAMPLES AND DISCUSSIONS

In this section, some numerical examples are presented to examine the accuracy and efficiency of the proposed EFG method for solving the singularly perturbed problems. For all examples, we have considered exponential weight functions with shape parameter \( \alpha =0.3 \). The basis functions have been chosen as \( c(x)=[1,x,x^2] \). Since boundary layers appear in the solution of SPP, non-uniformly distributed nodes have been generated wherein more nodes have been put into the boundary layer region as discussed in Sec. 3.1. Accuracy of the proposed method also depends upon the choice of the size (radius) of the support domain, which is taken as \( 2.8 \leq \alpha _c \leq 3.4 \). Two-point Gauss quadrature rule has been implemented in order to approximate the resulting integrals arising due to the EFG weak formulation. Computations have been performed on \( \textbf {MATLAB R2016a} \) software. Absolute errors have been presented for the numerical examples to depict the numerical efficiency and accuracy of the proposed scheme. The pointwise errors and maximum absolute errors have been estimated by

$$ e^{i}_{\epsilon ,N}=\big |u(x_{i})-u_{N}(x_{i})\big |\quad \text {and}\quad E_{\epsilon ,N}=\max _{i} e^{i}_{\epsilon ,N}. $$

Example 1.

We considered the nonhomogeneous convection-diffusion singularly perturbed problem [33]

$$ \epsilon u^{\prime\prime}+u^{\prime}=1+2x $$

with the Dirichlet boundary conditions

$$ \begin {aligned} u(0)&=0,\\ u(1)&=1.\end {aligned} $$

The exact solution of the problem is given by

$$ \begin {aligned} u(x)=x(x+1-2\epsilon )+\frac {(2\epsilon -1)(1-e^{-x/\epsilon })}{(1-e^{-1/\epsilon })}.\end {aligned} $$

The problem has been solved using the proposed EFG method with exponential weight functions.

Table 1 shows the maximum absolute errors for various values of the singular perturbation parameter \( \epsilon \) and number of nodes \( N \). It can clearly be recognized that the proposed scheme approximates the solution very efficiently even for extremely small values of \( \epsilon \) such as \( \epsilon =2^{-18} \) and for very small number of nodal points \( N=32 \), which clearly depicts the robustness of the scheme. The table also shows the numerical convergence of the proposed scheme.

Comparison of the solutions obtained using the proposed scheme has been made with those obtained by Kumar et al. [33] in Table 2 for \( \epsilon =10^{-4} \). It can clearly be observed that the proposed scheme provides better solution for the considered problem. Figure 1 illustrates the contrast of the numerical solution with the exact solution along with the maximum absolute error for \( \epsilon =2^{-6} \) and \( N=128 \). One can easily see in the figure that the EFG solution matches with the exact one with great accuracy.

Table 1. Maximum absolute errors for Example 1
Table 2. Comparison of numerical results of Example 1 with the results of [33] with \( \epsilon =10^{-4} \)
Fig. 1.
figure 1

Exact and EFG solution plot (a); pointwise absolute error plot for \( \epsilon =2^{-7},~ N=128 \) for Example 1 (b).

Example 2.

Consider the nonhomogeneous singularly perturbed problem [34]

$$ -\epsilon u^{\prime\prime}+u=x $$

with the boundary conditions

$$ \begin {aligned} u(0)&=1,\\ u(1)&=1+e^{-1/\sqrt {\epsilon }}.\end {aligned} $$

The exact solution of the considered problem is given by

$$ u(x)=x+e^{-x/\sqrt {\epsilon }}. $$

In Table 3, the maximum absolute errors have been calculated. It can clearly be seen from the table that the absolute errors tends to \( 0 \) as the number of nodes increases which clearly depicts the numerical convergence of the proposed EFG scheme. One can observe that even for very small values of \( \epsilon \) like \( 2^{-16} \), the proposed scheme provides very accurate results.

Table 3. Maximum absolute errors for Example 2 for different values of \( \epsilon \)

Example 3.

For the third example, we considered the SPP [35]

$$ \epsilon u^{\prime\prime}+u=0 $$

with the boundary conditions

$$ \begin {aligned} u(0)&=0,\\ u(1)&=1.\end {aligned} $$

The exact solution is given by

$$ u(x)=\frac {1-e^{-x/\sqrt {\epsilon }}}{1-e^{-1/\sqrt {\epsilon }}}. $$

The solution of the problem under consideration has been approximated by element-free Galerkin method. For various values of \( \epsilon \) and \( N \), the maximum absolute errors have been listed in Table 4, which depicts the numerical convergence of the proposed scheme. Comparison of the approximated solution with the exact one is presented in Fig. 2a. In Fig. 2b, pointwise errors are plotted which show that the error is maximum in the boundary layer region.

Table 4. Maximum absolute errors for Example 3 for different values of \( \epsilon \)
Fig. 2.
figure 2

Exact and EFG solution plot (a); pointwise absolute error plot for \( \epsilon =2^{-10},~ N=128 \) for Example 3 (b).

Example 4.

Consider the homogeneous problem [33]

$$ \epsilon u^{\prime\prime}+u^{\prime}-u=0 $$

with

$$ \begin {aligned} u(0)&=1,\\ u(1)&=1.\end {aligned} $$

The exact solution is given by

$$ u(x)=\frac {(e^{m_{2}}-1)e^{m_{1}x}+(1-e^{m_{1}})e^{m_{2}x}}{e^{m_{2}}-e^{m_{1}}}, $$

where

$$ \begin {aligned} m_{1}&=\frac {-1+\sqrt {1+4\epsilon }}{2\epsilon }, \\ m_{2}&=\frac {-1-\sqrt {1+4\epsilon }}{2\epsilon }.\end {aligned} $$

When the singular perturbation parameter \( \epsilon \) approaches zero, the considered problem exhibits boundary layers at x=0. The considered problem has been examined by Kumar et al. [33] by using boundary value technique. Table 5, which shows the maximum absolute errors obtained for various values of \( \epsilon \) and \( N \), testifies the good performance of the element-free Galerkin method. Table 6 exhibits the contrast between the absolute errors attained by the proposed scheme and the boundary value approach in [33]. Plot 3a illustrates the comparison of the exact and computed solutions for \( \epsilon =2^{-12} \) and \( N=128 \). The plot clearly depicts that the proposed method is robust enough to capture even very sharp boundary layers. Maximum pointwise errors have been plotted in Plot 3b over the whole domain.

Table 5. Maximum absolute errors for Example 4
Table 6. Comparison of pointwise absolute errors of proposed EFG method and boundary value method (BVM) [33] for Example 4 for \( \epsilon =10^{-4} \)
Fig. 3.
figure 3

Exact and EFG solution plot (a); pointwise absolute error plot for \( \epsilon =2^{-12},~ N=64 \) for Example 4 (b).

Example 5.

For the next problem, the following variable coefficient singularly perturbed problem [36] has been considered:

$$ \epsilon u^{\prime\prime} + \frac {3}{(1+\frac {x^2}{\epsilon })^2}u^{\prime} = 0. $$

The Dirichlet boundary conditions are taken as

$$ \begin {aligned} u(0) &= 0, \\ u(1) &= \frac {1}{\sqrt {\epsilon +1}}.\end {aligned} $$

The exact solution of the problem is given by

$$ u(x) = \frac {x}{\sqrt {\epsilon +x^2}}. $$

In Fig. 4a, the exact solution and the approximate solution obtained by EFG method have been plotted. The pointwise errors are plotted in Fig. 4b.

Fig. 4.
figure 4

Exact and EFG solution plot (a); pointwise absolute error plot for \( \epsilon =2^{-8} \) and \( N=128 \) for Example 5 (b).

Example 6.

Consider the variable coefficients SPP [37]

$$ \epsilon u^{\prime\prime}+(1+x)^2 u^{\prime}+2(1+x)u = f(x) $$

with the boundary conditions

$$ \begin {aligned} u(0) &= 0, \\ u(1) &= e^{-1/2}-e^{-7/3\epsilon }.\end {aligned} $$

\( f(x) \) is calculated in this way to provide the exact solution.

$$ u(x)=e^{-x/2}-e^{-x(x^2+3x+3)/3\epsilon }. $$

Again, the proposed EFG scheme has been employed by considering the non-uniform nodal points to solve the problem. The \( L_{\infty } \) errors are given in Table 7. It can be clearly seen that for each \( \epsilon \), the maximum pointwise absolute errors are decreasing with the increase in the number of nodes. This clearly depicts that the proposed scheme converges numerically. The results obtained using the scheme have also been compared with those cited in literature in Table 8. One can easily observe that the present scheme provides more accurate results. Figure 5 also depicts that the EFG method is completely efficient in capturing sharpened boundary layers.

Table 7. Maximum absolute errors for Example 6 for different values of \( \epsilon \)
Table 8. Comparison of \( L_{\infty } \) errors for standard finite difference method (SFDM) [37] and EFGM for Example 6
Fig. 5.
figure 5

Exact and EFG solution plot (a); pointwise absolute error plot for \( \epsilon =10^{-7},~ N=128 \) for Example 6 (b).

Table 9. \( L_\infty \) errors for Example 7 for different values of \( \epsilon \)

Example 7.

For the seventh example, we considered the variable coefficients convection-diffusion singularly perturbed problem [37]

$$ \epsilon u^{\prime\prime}+(1+x)^3 u^{\prime}=f(x) $$

with the boundary conditions

$$ \begin {aligned} u(0)&=2,\\ u(1)&=\frac {e^{-15/4\epsilon }}{8}+e^{-1/2}.\end {aligned} $$

The exact solution is given by

$$ u(x)=\frac {e^{-[(x+1)^4-1]/4\epsilon }}{(x+1)^3}+e^{-x/2}. $$

For small values of the singular perturbation parameter \( \epsilon \), Problem 7 exhibits boundary layers at \( x=0 \). The maximum absolute errors are shown in Table 9 for multiple values of \( \epsilon \) and \( N \). In the following Table 10, the approximated solutions attained using the EFG method are compared with those obtained using the fitted mesh finite difference method (FMFDM) [37]. Numerical results and the \( L_{\infty } \) error graph have also been plotted in Fig. 6. At \( x=0 \), the solution shows very sharp boundary layers, and the EFG method captures these layers efficiently for very small values of \( \epsilon \) like \( 10^{-9} \) and matches with the exact solution.

Table 10. Comparison of \( L_\infty \) errors for FMFDM [37] and EFG method for Example 7
Fig. 6.
figure 6

Exact and EFG solution plot (a); pointwise absolute error plot for \( \epsilon =10^{-9},~ N=128 \) for Example 7 (b).

CONCLUSIONS

In the present paper, the element-free Galerkin method has been proposed for solving singularly perturbed problems exhibiting boundary layers. The proposed numerical scheme depends on moving least squares approximation. Non-uniform distributed nodes have been created in order to have more points in the boundary layer region. Exponential weight function have been used.

For testing the robustness and efficiency of the proposed scheme, some numerical experiments have been carried out. The \( L_\infty \) errors are tabulated which show the numerical convergence of the EFG scheme. The EFG approach is very efficient in capturing very sharp boundary layers, as shown by solutions plotted for various values of the singular perturbation parameter \( \epsilon \). Comparisons of absolute and pointwise error results with those cited in the literature show that the EFG method is reliable and robust for approximating the solution of singularly perturbed boundary layer problems.

DATA AVAILABILITY

The datasets supporting the results presented in the study have been generated using the MATLAB code. No external data files are used in the present work.

CONFLICT OF INTEREST

The authors declare no conflict of interests in this study.