- Research
- Open Access
- Published:

# A boundary value approach for solving three-dimensional elliptic and hyperbolic partial differential equations

*SpringerPlus*
**volume 4**, Article number: 588 (2015)

## Abstract

In this article, the boundary value method is applied to solve three dimensional elliptic and hyperbolic partial differential equations. The partial derivatives with respect to two of the spatial variables (*y*, *z*) are discretized using finite difference approximations to obtain a large system of ordinary differential equations (ODEs) in the third spatial variable (*x*). Using interpolation and collocation techniques, a continuous scheme is developed and used to obtain discrete methods which are applied via the Block unification approach to obtain approximations to the resulting large system of ODEs. Several test problems are investigated to elucidate the solution process.

## Background

This paper is devoted to the numerical computation of the three dimensional elliptic and hyperbolic PDEs. The general three dimensional problem (without cross derivatives) is given as

defined in the domian \(\Omega = \{(x,y,z)/(x,y,z) \in (L_1, L_2, L_3) \times (L_4, L_5, L_6)\}\) with boundary \(\partial \Omega\). Associated with (1) are the initial conditions

or the boundary conditions

and the Dirichlet boundary conditions

The unknown function *u*, the variable coefficients *a*, *b*, *c*, *d*, *e*, *f* and the forcing term G are assumed to be continuously differentiable and have the required partial derivatives on \(\Omega\).

The numerical approximation of (1) has received great attention from researchers in the past few decades. This is because most modeled physical and engineering processes results in PDEs of the form (1). The standard convection diffusion equation is obtained if \(a=b=c\ne 0\) and \(G\equiv G(x,y,z)\) for all \(x, y, z \in \Omega\) (see Ge and Zhang 2002). Many transport processes including fluid flows and heat transfer can be modeled by a convective diffusive equation which describes the convection and diffusion of various physical quantities such as heat and momentum (see Roache 1976). Several numerical schemes have been developed for (1) which include the compact difference scheme (Ge and Zhang 2002; Spotz 1995; Spotz and Carey 1996; Zhang 1998a, b, c, d; Zhang et al. 2000), compact alternating direct implicit scheme (Cui 2010; Liao and Sun 2010), finite difference methods (Jain et al. 1992; Mohanty and Singh 2006), method of lines (Brastos 2007; Dehghan and Shokri 2008) , Jacobi elliptic function method (Bhrawy and Abdelkawy 2013), the use of collocation and radial basis functions (Shakeri and Dehghan 2008), Riccati–Bernoulli sub ODE method (Yang et al. 2015), the use of the expansion methods (He 1998; Roshid and Rahman 2014; Alam et al. 2014; Roshid et al. 2013, 2014a, b, c) among others.

The method of lines approach is commonly used for solving PDEs whereby the PDEs is converted into a system of ODEs by replacing the appropriate derivatives by finite difference approximations. Our objective is to convert the 3D PDEs into a system of ODEs by replacing two of the spatial derivatives by central difference approximations. The resulting system is then solved using the BVM. Specifically, we discretize the *y* and *z* variable with mesh spacings

We then define the vectors

and

where \(u_{m,n}(x) \approx u(x, y_m, z_n)\) and \(G_{m,n}(x) = \approx G(x,y_m, z_n, u_{m,n})\).

Also, we replace the partial derivatives \(\dfrac{\partial ^2 u(x,y,z)}{\partial y^2}\), \(\dfrac{\partial ^2 u(x,y,z)}{\partial z^2}\), \(\dfrac{\partial u(x,y,z)}{\partial y}\) and \(\dfrac{\partial u(x,y,z)}{\partial z}\) occuring in (1) by central difference approximations

Problem (1) leads to the semidiscretized system

which can be written in the form

subject to the initial conditions

or the boundary conditions

where \(\mathbf {f}(x,\mathbf {u, u'}) = \mathbf {Au + G}\) and \(\mathbf {A}\) is a \(k\times k\) matrix \((k = (M-1)(N-1))\) arising from the semidiscretized system (2) which is expressed in the form (3) and whose solution is sought using the BVMs. We note that \(\mathbf {G}\) is a vector of constants. The BVMs are a class of linear multistep methods (LMM) with step number *k* and whose *k* additional conditions are not only imposed at the beginning of the integration process but also at the end so that they form a discrete analog of the continuous boundary value problems. Thus, they are used for the numerical approximation of both initial and boundary value problems. They have been used for the solution of first order 1D initial and boundary value problems and their convergence and linear stability properties have been fully discussed in Brugnano and Trigiante (1998). Recently, Biala and Jator (2015) developed BVMs for the direct solution of systems of the general second order ODEs. One main feature of the BVMs is that they can be used in the same way for solving both initial and boundary value problems. Therefore, such methods are the best candidate for solving the semididscretized PDEs in (3). The BVMs simultaneously generates approximate solutions \((u_{1,m,n}, u_{2,m,n}, \ldots , u_{l,m,n})^T\) to the exact solution \((u_{m,n}(x_1), u_{m,n}(x_2), \ldots , u_{m,n}(x_l))^T\) on the entire interval of integration. This approach has the advantage of producing smaller global errors than those produced by the step-by-step methods due to the presence of accumulated errors at each step in the step-by-step method.

The paper is organized as follows: in "Description of the BVM", we derive a continuous scheme which is used to formulate the BVM as well as investigate the properties of the BVM. The computational complexities associated with the method is addressed in "Computational procedures". Several numerical test examples are given in "Numerical examples" to show the accuracy of the method. We give some concluding remarks in "Conclusion".

## Description of the BVM

We propose a BVM for (1) in which on the partition \(\pi _L, h>0, x_l = x_0 + lh, l=0,1, \ldots , L,\) the four step \([x_{l},u_{l,m,n},u'_{l,m,n}] \mapsto [x_{l+4},u_{l+4,m,n},u'_{l+4,m,n}]\) is given by the equations

where \(\pi _L: L_1 = x_0 < x_1 < x_2 < \cdots < x_L = L_4\) and \(\alpha _{i,j}, \alpha '_{i,j}\), \(\beta _{i,j}\), \(i=1(1)8\) and \(j=0(1)4\) are coefficients to be uniquely determined. We note that \(u_{l+i,m,n}\) denote the numerical approximation to the analytical solution \(u(x_{l+i},y_m,z_n)\) and \(f_{{l+i},m,n} \equiv f(x_{l+i},y_m, z_n)\).

### Development of the continuous BVM

In this section, we discuss the construction of the continuous scheme, via the interpolation and collocation approach (Jator and Li 2012), from which (6) is derived.

###
**Theorem 1**

*Let the continuous representation*

*satisfy the following conditions*

*then the continuous representation* (7)* is equivalent to*

*where we define the matrix V as*

\(V_j\)
*is obtained by replacing the*
*jth*
* column of*
*V*
* by*
*W*
* where*
*T*
*denotes the transpose,*
\(P_j(x) = x^j, j= 0(1)6\)
*are basis functions and W is a vector given by*

###
*Proof*

We define the polynomial basis functions

where \(\alpha _{i+1,j}\) and \(h^2\beta _{i+1,j}\) are coefficients to be uniquely determined.

Substituting (10) into (7), we have

which may be written as

and expressed in the form

where

Imposing conditions (8) on (11), we obtain a system of seven equations, which can be expressed as \(V = LW\) where \(L=(\ell _0, \ell _1, \ldots , \ell _6)^T\) is a vector of seven undetermined coefficients. Using the Crammer’s rule, the elements of *L* can be obtained and are given as

where \(V_j\) is obtained by replacing the *jth* column of *V* by *W*. We rewrite (11) as (9) using the newly found elements of *L*. \(\square\)

### BVM and its block extension

The coefficients given in (6) are specified by evaluating (9) at \(x=\{x_{l+1}, x_{l+3}, x_{l+4}\}\) and evaluating \(\Phi '(x)\) at \(x=\{x_l, x_{l+1}, x_{l+2}, x_{l+3}, x_{l+4}\}\) to obtain

###
*Remark 1*

We note that the method (12) is locally obtained on \([x_l,x_{l+4}]\) and is applied to simultaneously obtain approximations to the semidiscretized system (3) over the whole 3D space \([L_1,L_2,L_3] \times [L_4,L_5,L_6];\) in which case \(l=0(4)(L-4)\), \(m=0(1)(M-1)\) and \(n=0(1)(N-1)\). Also, we note that the first three formulas in (12) are of \(O(h^8)\) while the derivative formulas are of \(O(h^7)\).

### Convergence analysis

We discuss the convergence of the BVMs in the following theorem

###
**Theorem 2**

*Let*
\(\mathbf{U }\)
* be an approximation of the solution vector*
\({\overline{\mathbf{U }}}\)
* for the system obtained on a partition*
\(\pi _{L}:=\{L_1=x_{0}<x_{1}<\ldots <x_{L}=L_4,~ x_{m}=x_{m-1}+h\}\)
* from the method* (12).* If*
\(e_{l}=|u_{m,n}(x_{l})-u_{l,m,n}|\), \(he^{\prime }_{l}=|hu^{\prime }_{m,n}(x_{l})-hu^{\prime }_{l,m,n}|\),* where the exact solution*
\(u_{m,n}(x)\)
* is several times differentiable on*
\([L_1,L_4]\)
* and if*
\(\Vert E\Vert =\Vert \mathbf{U }-{\overline{\mathbf{U }}}\Vert\), *then, the BVM is convergent of order 6, which implies that *
\(\Vert E\Vert =O(h^{6})\).

###
*Proof*

We begin the proof by compactly writing (12) in matrix form with the introduction of the following matrix notations. Let A be a \(2L\times 2L\) matrix defined by

\(A_{12}\) and \(A_{22}\) are null and identity matrices respectively.

Similarly, let B be a \(2L\times 2L\) matrix defined by

where \(B_{ij}\) are given as

\(B_{12}\) and \(B_{22}\) are null matrices.

We also define the vectors

where *L*(*h*) is the local truncation error vector of the formulas in (12).

The exact form of the system formed by (12) is given by

and the approximate form of the system is given by

where \({\overline{\mathbf{U }}} = (u_{1,m,n}, \ldots , u_{L,m,n}, hu'_{1,m,n}, \ldots , hu'_{L,m,n})^T\) is the approximate solution of \(\mathbf{U }\). Subtracting (13) from (14) and letting \(\mathbf{E } = {\overline{\mathbf{U }}} - \mathbf{U } = (e_1, \ldots , e_L, he'_1, \ldots , he'_L)^T\) and using the Mean value theorem, we have the error system

where *J* is the Jacobian matrix and its entries \(J_{11}\), \(J_{12}\), \(J_{21}\) and \(J_{22}\) are defined as

Let \(M = -BJ\) be a matrix of dimension 2*L* so that (15) becomes

and for sufficiently small *h*, \(A + M\) is a monotone matrix and thus nonsingular. Therefore

and

which shows that the methods are convergent and the global error is of order \(O(h^{6})\). \(\square\)

## Computational procedures

The method (12) can also be expressed in block form as

where the positive integer \(\Gamma =N/4\) is the number of blocks,

and \(A_{0}\), \(A_{1}\), \(B_{0}\), and \(B_{1}\) are matrices each of dimension 8 whose entries are given by the coefficients of (12).

Equation (1) is converted to (3) by discretizing the partition \(\pi _M\) and \(\pi _N\), given by

where

are constant stepsizes of the partition \(\pi _M\) and \(\pi _N\) respectively, \(m=1(1)M\), \(n=1(1)N,\)
*M* and *N* are positive integers and *m*, *n* are the grid index in the *y* and *z* direction respectively.

The resulting system of ODEs (3) is then solved on the partition \(\pi _L\). The block unification of (17) lead to a large system of finite difference equations which is then solved to provide all solutions of (3) on \(\Omega\).

The following algorithm summarizes the numerical integration of (3) for some set of points *x* on \(\pi _L\).

*Step 1* Use the block unification of (17) for \(\mu =1, n=0\) to obtain \(\mathbf{V }_{1}\) on the domian \([x_{0}, L_2, L_3]\times [x_4, L_5, L_6]\) and for \(\mu =2, n=4\), \(\mathbf{V }_{2}\) is obtained on the domain \([x_{4}, L_2, L_3]\times [x_8, L_5, L_6]\), and on the domains \([x_{8}, L_2, L_3]\times [x_{12}, L_5, L_6], \ldots , [x_{L-4}, L_2, L_3]\times [x_L, L_5, L_6]\), for \(\mu =3, \ldots ,\Gamma\), \(n=8, 12 \ldots , N-4\), we obtain \(\mathbf{V }_{3} \ldots , \mathbf{V }_{\Gamma }\).

*Step 2* The unified block given by the system \(\mathbf{V }_{1} \bigcup \mathbf{V }_{2} \bigcup \ldots \bigcup \mathbf{V }_{\Gamma -1}\bigcup \mathbf{V }_{\Gamma }\) obtained in Step 1 is a large system with dimensions \(2L(M-1)(N-1)\) with \(u_{m,n}(x_l) \approx u(x_l, y_m, z_n)\), \(l=1, \ldots , L\), \(m=1, \ldots , M\), \(n=1, \ldots , N.\)

*Step 3* The system obtained in Step 2 is solved using the feature NSolve in Mathematica 10.0 for linear problems and FindRoot (which incorporates the Newton’s method) for nonlinear problems.

*Step 4* The solution of (1) is approximated by the solution in Step 3 as \(\mathbf{U }(x_l) = [u(x_l, y_m, z_n), \ldots , u(x_L, y_m, z_n)]^T\), \(m=1,\ldots , M\)
\(n=1, \ldots , N.\)

## Numerical examples

In this section, some examples are investigated to show the reliability and efficiency of the proposed scheme in this paper.

### Test 1

We consider the Laplace equation with non zero forcing term *G*(*x*, *y*, *z*) and with zero boundary values on the entire \(\partial \Omega\) given in Zhang (1998c) and whose solution is given as

where \(\Omega = [0,1]^2 \times [0,L_4]\). Table 1 shows the errors in the \(l^\infty\) norm with different mesh sizes. Figure 1 shows the plot of the exact, approximate and error function when \(x=0.5.\)

### Test 2

Next, we consider the following Sine-Gordon equation given in Cui (2010)

where \(\Omega = [0,2]^2 \times [0,L_4]\) and whose theoretical solution is \(u(x,y,z) = e^{-\alpha x}(1 - \cos (\pi y))(1 - \cos (\pi z))\). In our computations, we have chosen \(\alpha = \rho = 1\) and the \(l^\infty\) norms are given in Table 2 with different meshsizes. Figure 2 also shows the plot of the exact, approximate and error function when \(x=1.\)

### Test 3

We also consider the following equation given in Cui (2010)

where \(\Omega = [-1,1]^2 \times [-1,L_4]\) and whose theoretical solution is \(u(x,y,z) = 4\arctan (e^{y+z-x})\) with corresponding Dirichlet boundary conditions. The \(l^\infty\) norms are given in Table 3 with different meshsizes. Figure 3 also shows the plot of the exact, approximate and error function when \(x=1.0.\)

### Test 4

We also consider the singularly perturbed convection diffusion equation given in Mohanty and Singh (2006)

defined in the domain \(\Omega = [0,1]^3\) with boundary \(\partial \Omega\) and subject to the Dirichlet boundary conditions and whose theoretical solution is

where \(\sigma ^2 = 2\pi ^2 + \dfrac{1}{4\epsilon ^2}\). We have solved the problem using \(\epsilon =0.1\) to 1.0. The \(l^\infty\) norms are given in Table 4 with different meshsizes. Figure 4 also shows the plot of the exact, approximate and error function when \(x=0.5.\)

### Test 5

The singularly perturbed elliptic boundary value problem given in Mohanty and Singh (2006)

defined in the domain \(\Omega = [0,1]^3\) with boundary \(\partial \Omega\) and subject to the Dirichlet boundary conditions and where the forcing term G is set to satisfy the exact solution given as \(u(x,y,z) = x^2\cosh (y)\sinh (z)\). We have solved the problem using \(\epsilon =0.001\). The \(l^\infty\) norms are given in Table 5 with different meshsizes and for different values of \(\alpha\). Figure 5 also shows the plot of the exact, approximate and error function when \(x=0.5.\)

## Conclusion

In this paper, we have developed a highly accurate 3D problem solver. This has been achieved by the discretization of two of the spatial variables and the construction of a continuous BVM via the interpolation and collocation approach for solving the resulting semidiscretized system. The results given in "Numerical examples" show that the approach is highly efficient and highly accurate.

## References

Alam MN, Akbar MA, Roshid HO (2014) Traveling wave solutions of the Boussinesq equation via the new approach of generalized (G′/G)-expansion method. SpringerPlus 3(1):43

Bhrawy AH, Abdelkawy MA (2013) Cnoidal and snoidal wave solutions to coupled nonlinear wave equations by the extended Jacobi’s elliptic function method. Commun Nonlinear Sci Numer Simul 18(4):915–925

Biala TA, Jator SN (2015) A family of boundary value methods for the numerical approximation of systems of second order boundary value problems (submitted)

Brastos AG (2007) The solution of the two-dimensional sine-Gordon equation using the method of lines. J Comput Appl Math 206:251–277

Brugnano L, Trigiante D (1998) Solving differential problems by multistep initial and boundary value problems. Gordon and Breach Science Publishers, New York

Cui M (2010) High order compact alternating direction implicit method for the generalized sine-Gordon equation. J Comput Appl Math 235:837–849

Dehghan M, Shokri A (2008) A numerical method for one-dimensional nonlinear sine-Gordon equation using collocation and radial basis functions. Numer Methods Partial Differ Equ 24:687–698

Ge L, Zhang J (2002) Symbolic computation of high order compact difference scheme for three dimensional linear elliptic partial differential equations with variable coefficients. J Comput Appl Math 143:9–27

He JH (1998) An approximate solution technique depending on an artificial parameter: a special example. Commun Nonlinear Sci Numer Simul 3:92–97

Jain MK, Jain RK, Mohanty RK (1992) Fourth order difference method for three dimensional elliptic equations with nonlinear first derivative terms. Numer Methods Partial Diffe Equ 8:575–591

Jator SN, Li J (2012) An algorithm for second order initial and boundary value problems with an automatic error estimate based on a third derivative method. Numer Algorithms 59:333–346

Liao HL, Sun ZZ (2010) Maximum norm error bounds of ADI and compact ADI methods for solving parabolic equations. Numer Methods Partial Differ Equ 26:37–60

Mohanty RK, Singh S (2006) A new highly accurate discretization for three dimensional singularly perturbed nonlinear elliptic partial differential equations. Numer Methods Partial Differ Equ 22:1379–1395

Roache PJ (1976) Computational fluid dynamics. Hermosa, Albuquerque

Roshid HO, Rahman N, Akbar MA (2013) Traveling wave solutions of nonlinear Klein–Gordon equation by extended-expansion method. Ann Pure Appl Math 3(1):10–16

Roshid HO, Kabir MR, Bhowmik RC, Datta BK (2014) Investigation of solitary wave solutions for Vakhnenko–Parkes equation via exp-function and Exp-expansion method. SpringerPlus 3(692):1–10

Roshid HO, Akbar MA, Alam MN, Hoque MF, Rahman N (2014) New extended-expansion method to solve nonlinear evolution equation: the (3 + 1)-dimensional potential-YTSF equation. SpringerPlus 3:122. doi:10.1186/2193-1801-3-122

Roshid HO, Hoque MF, Akbar MA (2014) New extended-expansion method for traveling wave solutions of nonlinear partial differential equations (NPDEs) in mathematical physics. Italian J Pure Appl Math 33:175–190

Roshid HO, Rahman MA (2014) The exp-expansion method with application in the (1+1)-dimensional classical Boussinesq equations. Results Phys 4:150–155

Shakeri F, Dehghan M (2008) The method of lines for solution of the one-dimensional wave equation subject to an integral conservation condition. Comput Math Appl 56:2175–2188

Spotz WF (1995) High-order compact finite difference scheme for computational mechanics. Ph.D. Thesis, University of Texas at Austin, Austin, TX

Spotz WF, Carey GF (1996) A high-order compact formulation for the 3D Poisson equation. Numer Methods Partial Differ Equ 12:235–243

Yang XF, Deng ZC, Wei Y (2015) A Riccati–Bernoulli sub-ODE method for nonlinear partial differential equations and its application. Adv Differ Equ 1:117–133

Zhang J (1998a) On convergence and performance of iterative methods with fourth-order compact schemes. Numer Methods Partial Differ Equ 14:262–2832

Zhang J (1998b) An explicit fourth-order compact finite difference scheme for three dimensional convection-diffusion equation. Commun Numer Methods Eng 14:209–218

Zhang J (1998c) Fast and high accuracy multigrid solution of the three dimensional Poisson equation. J Comput Phys 143:449–461

Zhang J (1998d) Fourth-order compact discretization and iterative solution of the 3D convection-diffusion equation. In: Wang J, Allen MB, Chen BM, Mathew T (eds) Iterative methods in scientific computation. IMACS, New Brunswick, pp 331–336

Zhang J, Ge L, Gupta MM (2000) Fourth order compact difference scheme for 3D convection diffusion equation with boundary layers on nonuniform grids. Neural Parallel Sci Comput 8(3, 4):373–392

## Authors' contributions

SJ proposed the algorithm. TB developed, analyzed and implement the methods. SJ also contributed to the implementation of the methods. Both authors read and approved the final manuscript.

### Acknowledgements

The authors are very grateful to the referees whose valuable suggestions tremendously improved the quality of the manuscript.

### Compliance with ethical guidelines

**Competing interests** The authors declare that they have no competing interests.

## Author information

### Affiliations

### Corresponding author

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

## About this article

### Cite this article

Biala, T.A., Jator, S.N. A boundary value approach for solving three-dimensional elliptic and hyperbolic partial differential equations.
*SpringerPlus* **4, **588 (2015). https://doi.org/10.1186/s40064-015-1348-1

Received:

Accepted:

Published:

### Keywords

- Boundary value methods
- Method of lines
- Hyperbolic and elliptic PDEs
- Systems of ordinary differential equations

### Mathematics Subject Classification

- 65N06
- 65N40