Introduction

In many applications of engineering and science, there are various boundary value problems which involve three-dimensional partial differential equations. Only a few of these equations can be solved by analytical methods. In most cases, we depend on numerical solutions of such partial differential equations. There are several numerical methods available for solving these equations; the most common method used for solving such equations is finite difference method; but this method is slow. In the last few years, other numerical techniques were developed, which are more accurate, efficient and faster than previous numerical algorithms, such as: (a) Jacobi pseudospectral approximation for solving nonlinear complex generalized Zakharov system in [2], (b) A highly accurate collocation algorithm for solving 1 + 1 and 2 + 1 fractional percolation equations in [3], (c) Spectral-Galerkin algorithms using Jacobi polynomials for solving second- and fourth-order differential equations in [8] and [9] respectively, and (d) Legendre spectral-Galerkin method for solving multidimensional elliptic Robin boundary value problems in [11], (e) Jacobi spectral-Galerkin method for the integrated forms of fourth-order elliptic differential equations in [10]. In the last few decades, methods based on wavelet basis functions have been used abruptly. These methods are more efficient and give more accurate numerical results as compared to other well known methods. Wavelet methods are more interesting, accurate and reliable for solving integral and differential equations. Wavelets are a powerful and efficient mathematical tool that divides the data functions or operators into distinct frequency constituents and each constituent is analyzed or investigated with a resolution matching on its scale. Nowadays, wavelet methods are becoming a favorite choice of researchers for solving differential and integral equations. Haar [12] discovered a function, later known as Haar wavelet, in 1909. Such Haar functions are rectangular pair pulses and these are known as Daubechies wavelet of order 1. Also, it is a simplest orthonormal wavelet with compact support. The main disadvantage of Haar wavelets is their discontinuity and, therefore, derivatives do not exist at the points of discontinuities. Due to this, it is impossible to obtain the numerical solution of differential and integral equations. There are two possibilities for overcoming these shortcomings. First, to regularize the piecewise constant Haar functions with interpolation splines; this technique has been applied by Cattani in [4, 5]. But, by this technique, it is difficult to find the solution easily and simplicity of Haar wavelets gets lost. Another possibility, which is proposed by Chen and Hsiao in [6, 7] is that they recommended to expand the highest derivative appearing in the differential equation into the Haar series, instead of the function itself. The other derivatives (and the functions) are obtained through integrations.

Numerical solutions of differential and integral equations using Haar wavelet have been presented by Lepik in [14, 15]. Numerical solutions of two-dimensional PDEs using Haar wavelet have been presented in Lepik [16]. The fundamental idea behind the Haar wavelet method is to convert the given problem into a system of equations which involves finite number of variables. In numerical analysis, because of the property of localization, wavelet based algorithms have become an important tools for solving ordinary and partial differential equations. A new approach of the Chebyshev wavelets method for partial differential equations with boundary conditions of the telegraph type equation has been presented in [13]. Haar wavelet collocation method has been presented in [19], for solving boundary layer fluid flow problems. A numerical assessment of parabolic partial differential equations using Haar and Legendre wavelets has been presented in [20]. Numerical solution of two-dimensional elliptic PDEs with nonlocal boundary conditions has been presented in [21]. In the present paper, we use Haar wavelet collocation method for solving three-dimensional Poisson and Helmholtz equations because Haar wavelet method has sparse representation, fast transformation, and possibility of implementation of fast algorithms. The general linear partial differential equation of the second order in three independent variables is of the form

$$\begin{aligned} {A_{11}(x,y,z)}{\frac{\partial ^2{u}}{\partial {x^2}}}+{B_{11}(x,y,z)}{\frac{\partial ^2{u}}{\partial {y^2}}}+{C_{11}(x,y,z)}{\frac{\partial ^2{u}}{\partial {z^2}}}+{F_{11}}{\left[ {x,y,z,u,{\frac{\partial {u}}{\partial {x}}},{\frac{\partial {u}}{\partial {y}}},{\frac{\partial {u}}{\partial {z}}},{\frac{\partial ^2{u}}{{\partial {x^2}}{\partial {y}}}},\ldots }\right] }={0}, \end{aligned}$$
(1)

on \(K=\{(x,y,z):{a}<{x}<{b}, {c}<{y}<{d}, {e}<{z}<{f}\}\), with boundary conditions

$$\begin{aligned} u(0,y,z)=g_{0}(y,z), ~~u(x,0,z)=g_{1}(x,z),~~u(x,y,0)=g_{2}(x,y), \end{aligned}$$
(2)

and

$$\begin{aligned} u(1,y,z)=g_{3}(y,z), ~~u(x,1,z)=g_{4}(x,z),~~u(x,y,1)=g_{5}(x,y), \end{aligned}$$
(3)

where \(A_{11}, B_{11}, C_{11}, g_{0}, g_{1}, g_{2}, g_{3}, {g_{4}}, {g_{5}}\) and f are known functions. The Poisson equation in three-dimensional Cartesian coordinates system plays an important role due to its wide range of application in areas like ideal fluid flow, heat conduction, elasticity, electrostatics, gravitation and other science fields especially in physics and engineering. Poisson and Helmholtz equations are arising in different branches of science and engineering such as fluid mechanics, electricity and magnetism and torsion problems.

Our main aim is to develop an accurate and efficient collocation method using Haar wavelet and Kronecker product for solving three-dimensional partial differential equations such as Poisson and Helmholtz equations, by approximating a sixth-order mixed derivative by a series of Haar wavelet basis functions. In Sect. 2, Haar wavelet method has been discussed. Error analysis has been described in Sect. 3. In Sect. 4, numerical examples have been solved using the present method and compared with the exact solutions.

Kronecker product of two matrices

For saving calculation time, we use the concept of Kronecker product of matrix A with matrix B of orders \({p}\times {q}\) respectively and is defined as:

$$\begin{aligned} {A}\otimes {B}= \left( \begin{array}{cccc} {a_{11}}{B} &{} {a_{12}}{B} &{} \cdots &{} {a_{1q}}{B} \\ {a_{21}}{B} &{} {a_{22}}{B} &{} \cdots &{} {a_{2q}}{B} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ {a_{p1}}{B} &{} {a_{p2}}{B} &{} \cdots &{} {a_{pq}}{B} \\ \end{array} \right) . \end{aligned}$$
(4)

The first documented work on Kronecker products was written by Johann Georg Zehfuss between 1858 and 1868. In MATLAB, the Kronecker product of two matrices A and B is directly calculated with the command kron(AB).

Kronecker product of three matrices

The Kronecker product of three AB and C matrices each of orders \(p\times q\) can be calculated as:

$$\begin{aligned} {A}\otimes {B}\otimes {C}= \left( \begin{array}{cccc} {a_{11}}{E} &{} {a_{12}}{E} &{} \cdots &{} {a_{1q}}{E} \\ {a_{21}}{E} &{} {a_{22}}{E} &{} \cdots &{} {a_{2q}}{E} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ {a_{p1}}{E} &{} {a_{p2}}{E} &{} \cdots &{} {a_{pq}}{E} \\ \end{array} \right) , \end{aligned}$$
(5)

where E is of the form:

$$\begin{aligned} E={B}\otimes {C}= \left( \begin{array}{cccc} {b_{11}}{C} &{} {b_{12}}{C} &{} \cdots &{} {b_{1q}}{C} \\ {b_{21}}{C} &{} {b_{22}}{C} &{} \cdots &{} {b_{2q}}{C} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ {b_{p1}}{C} &{} {b_{p2}}{C} &{} \cdots &{} {b_{pq}}{C} \\ \end{array} \right) . \end{aligned}$$
(6)

Haar wavelet method

Consider \(x\in [\sigma _{1},\sigma _{2}]\), \(y\in [\sigma _{3},\sigma _{4}]\) and \(z\in [\sigma _{5},\sigma _{6}]\) where \(\sigma _{1}\), \(\sigma _{2}\), \(\sigma _{3}\), \(\sigma _{4}\), \(\sigma _{5}\) and \(\sigma _{6}\) are given constants. We shall define the quantities \(M_{1}=2^{J_{1}}\), \(M_{2}=2^{J_{2}}\) and \(M_{3}=2^{J_{3}}\) where \(J_{1}\), \(J_{2}\) and \(J_{3}\) are the maximal levels of resolution. Now, divide the interval \([\sigma _{1}, \sigma _{2}]\), \([\sigma _{3}, \sigma _{4}]\) and \([\sigma _{5}, \sigma _{6}]\) respectively into \(2M_{1}\), \(2M_{2}\) and \(2M_{3}\) subintervals, each of length \(\triangle {x}=(\sigma _{2}-\sigma _{1})/2M_{1}\), \(\triangle {y}=(\sigma _{4}-\sigma _{3})/2M_{2}\) and \(\triangle {z}=(\sigma _{6}-\sigma _{5})/2M_{3}\) respectively. Now, we introduce parameters : dilatation parameter \(j_{1}=0,1,2,\ldots ,J_{1}\); \(j_{2}=0,1,2,\ldots ,J_{2}\) and \(j_{3}=0,1,2,\ldots ,J_{3}\) and translation parameter \(k_{1}=0,1,2,\ldots ,m_{1}-1\); \(k_{2}=0,1,2,\ldots ,m_{2}-1\) and \(k_{3}=0,1,2,\ldots ,m_{3}-1\), where \(m_{1}=2^{j_{1}}\), \(m_{2}=2^{j_{2}}\) and \(m_{3}=2^{j_{3}}\). The wavelet numbers \(i_{1}\), \(i_{2}\) and \(i_{3}\) are calculated according the formula \(i_{1} = m_{1}+k_{1}+1\), \(i_{2} = m_{2}+k_{2}+1\) and \(i_{3} = m_{3}+k_{3}+1\) respectively. Therefore, we have

$$\begin{aligned} {h_{i_{1}}(x)}= {\left\{ \begin{array}{ll} 1, &{} \alpha _{1}\le {x}<{\alpha _{2}}, \\ -1, &{} \alpha _{2}\le {x}<{\alpha _{3}}, \\ 0, &{} \text {otherwise}, \end{array}\right. } \end{aligned}$$
(7)
$$\begin{aligned} {h_{i_{2}}(y)}= {\left\{ \begin{array}{ll} 1, &{} \beta _{1}\le {y}<{\beta _{2}}, \\ -1, &{} \beta _{2}\le {y}<{\beta _{3}}, \\ 0, &{} \text {otherwise}, \end{array}\right. } \end{aligned}$$
(8)

and

$$\begin{aligned} {h_{i_{3}}(z)}= {\left\{ \begin{array}{ll} 1, &{} \gamma _{1}\le {z}<{\gamma _{2}}, \\ -1, &{} \gamma _{2}\le {z}<{\gamma _{3}}, \\ 0, &{} \text {otherwise}, \end{array}\right. } \end{aligned}$$
(9)

where \(\alpha _{1}= {\sigma _{1}}+2{k_{1}}{\omega _{1}}{\triangle {x}}\), \(\alpha _{2}= {\sigma _{1}}+(2{k_{1}}+1){\omega _{1}}{\triangle {x}}\), \(\alpha _{3}= {\sigma _{1}}+2({k_{1}}+1){\omega _{1}}{\triangle {x}}\), \({\omega _{1}}=M_{1}/m_{1}\),

\(\beta _{1}= {\sigma _{3}}+2{k_{2}}{\omega _{2}}{\triangle {y}}\), \(\beta _{2}= {\sigma _{3}}+(2{k_{2}}+1){\omega _{2}}{\triangle {y}}\), \(\beta _{3}= {\sigma _{3}}+2({k_{2}}+1){\omega _{2}}{\triangle {y}}\), \({\omega _{2}}=M_{2}/m_{2}\),

\(\gamma _{1}= {\sigma _{5}}+2{k_{3}}{\omega _{3}}{\triangle {z}}\), \(\gamma _{2}= {\sigma _{5}}+(2{k_{3}}+1){\omega _{3}}{\triangle {z}}\), \(\gamma _{3}= {\sigma _{5}}+2({k_{3}}+1){\omega _{3}}{\triangle {z}}\), \({\omega _{3}}=M_{3}/m_{3}\).

The collocation points are obtained as:

$$\begin{aligned} x_{l_{1}}=\alpha _{1}+{\frac{(2{l_{1}}-1)}{2M_{1}}}, {l_{1}}=1,2,3,4,\ldots ,2M_{1}; \end{aligned}$$
(10)
$$\begin{aligned} y_{l_{2}}=\beta _{1}+{\frac{(2{l_{2}}-1)}{2M_{2}}}, {l_{2}}=1,2,3,4,\ldots ,2M_{2}; \end{aligned}$$
(11)

and

$$\begin{aligned} z_{l_{3}}=\gamma _{1}+{\frac{(2{l_{3}}-1)}{2M_{3}}}, {l_{3}}=1,2,3,4,\ldots ,2M_{3}. \end{aligned}$$
(12)

Consider the approximate wavelet solution of the form

$$\begin{aligned} {u_{xxyyzz}(x,y,z)}={\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{h_{i_{1}}(x)}{h_{i_{2}}(y)}{h_{i_{3}}(z)}}}. \end{aligned}$$
(13)

Integrating (13), twice with respect to x, from 0 to x, we obtain

$$\begin{aligned} {u_{yyzz}(x,y,z)}={u_{yyzz}(0,y,z)}+{x}{u_{xyyzz}(0,y,z)}+{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{P_{2,i_{1}}(x)}{h_{i_{2}}(y)}{h_{i_{3}}(z)}}}. \end{aligned}$$
(14)

Putting \(x=1\) in (14), we obtain

$$\begin{aligned} {u_{xyyzz}(0,y,z)}={u_{yyzz}(1,y,z)}-{u_{yyzz}(0,y,z)}-{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{P_{2,i_{1}}(1)}{h_{i_{2}}(y)}{h_{i_{3}}(z)}}}. \end{aligned}$$
(15)

From (14) and (15), we obtain

$$\begin{aligned} {u_{yyzz}(x,y,z)}={u_{yyzz}(0,y,z)}+{x}{({u_{yyzz}(1,y,z)}-{u_{yyzz}(0,y,z)})}\nonumber \\ +{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{({P_{2,i_{1}}(x)}-{x}{P_{2,i_{1}}(1)})}{h_{i_{2}}(y)}{h_{i_{3}}(z)}}}. \end{aligned}$$
(16)

Again, integrating (16), twice with respect to y, from 0 to y, we obtain

$$\begin{aligned} {u_{zz}(x,y,z)}={\psi _{11}(x,y,z)}+{y}{\psi _{12}(x,z)}+{x}{\psi _{13}(y,z)}\nonumber \\ +{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{({P_{2,i_{1}}(x)}-{x}{P_{2,i_{1}}(1)})}{P_{2,i_{2}}(y)}{h_{i_{3}}(z)}}}. \end{aligned}$$
(17)

where

$$\begin{aligned} {\psi _{11}(x,y,z)}={u_{zz}(x,0,z)}+{u_{zz}(0,y,z)}-{u_{zz}(0,0,z)}, \end{aligned}$$
(18)
$$\begin{aligned} {\psi _{12}(x,z)}={({u_{yzz}(x,0,z)}-{u_{yzz}(0,0,z)}+{x}{({u_{yzz}(0,0,z)}-{u_{yzz}(1,0,z)})})}, \end{aligned}$$
(19)
$$\begin{aligned} {\psi _{13}(y,z)}={({u_{zz}(1,y,z)}-{u_{zz}(1,0,z)}-{u_{zz}(0,y,z)}+{u_{zz}(0,0,z)})}. \end{aligned}$$
(20)

Putting \(y=1\) in (17), we obtain

$$\begin{aligned} {\psi _{12}(x,z)}={u_{zz}(x,1,z)}-{\psi _{11}(x,1,z)}-{x}{\psi _{13}(1,z)}\nonumber \\ -{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{({P_{2,i_{1}}(x)}-{x}{P_{2,i_{1}}(1)})}{P_{2,i_{2}}(1)}{h_{i_{3}}(z)}}}. \end{aligned}$$
(21)

From (17), using (21), we obtain

$$\begin{aligned} {u_{zz}(x,y,z)}={\psi _{11}(x,y,z)}+{y}{({u_{zz}(x,1,z)}-{\psi _{11}(x,1,z)}-{x}{\psi _{13}(1,z)})}+{x}{\psi _{13}(y,z)}\nonumber \\ +{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{({P_{2,i_{1}}(x)}-{x}{P_{2,i_{1}}(1)})}({P_{2,i_{2}}(y)}-{y}{P_{2,i_{2}}(1)})}{h_{i_{3}}(z)}}. \end{aligned}$$
(22)

Now, integrating (13) twice with respect to z from 0 to z, we obtain

$$\begin{aligned} {u_{xxyy}(x,y,z)}={u_{xxyy}(x,y,0)}+{z}{u_{xxyyz}(x,y,0)}+{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{h_{i_{1}}(x)}{h_{i_{2}}(y)}{P_{2,i_{3}}(z)}}}. \end{aligned}$$
(23)

Putting \(z=1\) in (23), we obtain

$$\begin{aligned} {u_{xxyyz}(x,y,0)}={u_{xxyy}(x,y,1)}-{u_{xxyy}(x,y,0)}-{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{h_{i_{1}}(x)}{h_{i_{2}}(y)}{P_{2,i_{3}}(1)}}}. \end{aligned}$$
(24)

From (23), using (24), we obtain

$$\begin{aligned} {u_{xxyy}(x,y,z)}={u_{xxyy}(x,y,0)}+{z}{[{u_{xxyy}(x,y,1)}-{u_{xxyy}(x,y,0)}]}\nonumber \\ +{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{h_{i_{1}}(x)}{h_{i_{2}}(y)}{({P_{2,i_{3}}(z)}-{z}{P_{2,i_{3}}(1)})}}}. \end{aligned}$$
(25)

Again, integrating (25) twice with respect to x, from 0 to x, we obtain

$$\begin{aligned} {u_{yy}(x,y,z)}={\psi _{21}(x,y,z)}+{x}{\psi _{22}(y,z)}+{z}{\psi _{23}(x,y)}\nonumber \\ +{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{P_{2,i_{1}}(x)}{h_{i_{2}}(y)}{({P_{2,i_{3}}(z)}-{z}{P_{2,i_{3}}(1)})}}}, \end{aligned}$$
(26)

where

$$\begin{aligned} {\psi _{21}(x,y,z)}={u_{yy}(0,y,z)}+{u_{yy}(x,y,0)}-{u_{yy}(0,y,0)}, \end{aligned}$$
(27)
$$\begin{aligned} {\psi _{22}(y,z)}={({u_{xyy}(0,y,z)}-{u_{xyy}(0,y,0)}+{z}{({u_{xyy}(0,y,0)}-{u_{xyy}(0,y,1)})})}, \end{aligned}$$
(28)
$$\begin{aligned} {\psi _{23}(x,y)}={({u_{yy}(x,y,1)}-{u_{yy}(0,y,1)}-{u_{yy}(x,y,0)}+{u_{yy}(0,y,0)})}. \end{aligned}$$
(29)

Putting \(x=1\) in (26), we obtain:

$$\begin{aligned} {\psi _{22}(y,z)}={u_{yy}(1,y,z)}-{\psi _{21}(1,y,z)}-{z}{\psi _{23}(1,y)}\nonumber \\ -{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{P_{2,i_{1}}(1)}{h_{i_{2}}(y)}{({P_{2,i_{3}}(z)}-{z}{P_{2,i_{3}}(1)})}}}. \end{aligned}$$
(30)

Substituting (30) in (26), we obtain

$$\begin{aligned} {u_{yy}(x,y,z)}={\psi _{21}(x,y,z)}+{x}{({u_{yy}(1,y,z)}-{\psi _{21}(1,y,z)}-{z}{\psi _{23}(1,y)})}+{z}{\psi _{23}(x,y)}\nonumber \\ +{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{({P_{2,i_{1}}(x)}-{x}{P_{2,i_{1}}(1)})}{h_{i_{2}}(y)}{({P_{2,i_{3}}(z)}-{z}{{P_{2,i_{3}}(1)}})}}}. \end{aligned}$$
(31)

Now, integrating (13) twice with respect to y, from 0 to y, we obtain:

$$\begin{aligned} {u_{xxzz}(x,y,z)}={u_{xxzz}(x,0,z)}+{y}{{u_{xxyzz}(x,0,z)}}+{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{h_{i_{1}}(x)}{P_{2,i_{2}}(1)}{h_{i_{3}}(z)}}}. \end{aligned}$$
(32)

Putting \(y=1\) in (32), we obtain

$$\begin{aligned} {{u_{xxyzz}(x,0,z)}}={u_{xxzz}(x,1,z)}-{u_{xxzz}(x,0,z)}-{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{h_{i_{1}}(x)}{P_{2,i_{2}}(y)}{h_{i_{3}}(z)}}}. \end{aligned}$$
(33)

From (32) and (33), we obtain

$$\begin{aligned} {u_{xxzz}(x,y,z)}={u_{xxzz}(x,0,z)}+{y}{[{u_{xxzz}(x,1,z)}-{u_{xxzz}(x,0,z)}]}\nonumber \\ +{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{h_{i_{1}}(x)}{({P_{2,i_{2}}(y)}-{y}{P_{2,i_{2}}(1)})}{h_{i_{3}}(z)}}}. \end{aligned}$$
(34)

Again, integrating (34), twice with respect z, from 0 to z, we obtain

$$\begin{aligned} {u_{xx}(x,y,z)}={\psi _{31}(x,y,z)}+{z}{\psi _{32}(x,y)}+{y}{\psi _{33}(x,z)}\nonumber \\ +{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{h_{i_{1}}(x)}{({P_{2,i_{2}}(y)}-{y}{P_{2,i_{2}}(1)})}{P_{2,i_{3}}(z)}}}, \end{aligned}$$
(35)

where

$$\begin{aligned} {\psi _{31}(x,y,z)}={u_{xx}(x,y,0)}+{u_{xx}(x,0,z)}-{u_{xx}(x,0,0)}, \end{aligned}$$
(36)
$$\begin{aligned} {\psi _{32}(x,y)}={({u_{xxz}(x,y,0)}-{u_{xxz}(x,0,0)}+{y}{({u_{xxz}(x,0,0)}-{u_{xxz}(x,1,0)})})}, \end{aligned}$$
(37)
$$\begin{aligned} {\psi _{33}(x,z)}={({u_{xx}(x,1,z)}-{u_{xx}(x,1,0)}-{u_{xx}(x,0,z)}+{u_{xx}(x,0,0)})}. \end{aligned}$$
(38)

Putting \(z=1\) in (35), we obtain

$$\begin{aligned} {\psi _{32}(x,y)}={u_{xx}(x,y,1)}-{\psi _{31}(x,y,1)}-{y}{\psi _{33}(x,1)}\nonumber \\ -{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{h_{i_{1}}(x)}{({P_{2,i_{2}}(y)}-{y}{P_{2,i_{2}}(1)})}{P_{2,i_{3}}(1)}}}. \end{aligned}$$
(39)

From (35) and (39), we obtain

$$\begin{aligned} {u_{xx}(x,y,z)}={\psi _{31}(x,y,z)}+{z}{({u_{xx}(x,y,1)}-{\psi _{31}(x,y,1)}-{y}{\psi _{33}(x,1)})}+{y}{\psi _{33}(x,z)}\nonumber \\ +{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{h_{i_{1}}(x)}{({P_{2,i_{2}}(y)}-{y}{P_{2,i_{2}}(1)})}{({P_{2,i_{3}}(z)}-{z}{P_{2,i_{3}}(1)})}}}. \end{aligned}$$
(40)

Again, integrating (40), twice with respect to x, from 0 to x, we obtain

$$\begin{aligned} {u(x,y,z)}={\varphi _{0}(x,y,z)}+{x}{\varphi _{1}(y,z)}+{z}{\varphi _{2}(x,y)}-{yz}{\varphi _{3}(x)}+{y}{\varphi _{4}(x,z)}\nonumber \\ +{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{P_{2,i_{1}}(x)}{({P_{2,i_{2}}(y)}-{y}{P_{2,i_{2}}(1)})}{({P_{2,i_{3}}(z)}-{z}{P_{2,i_{3}}(1)})}}}, \end{aligned}$$
(41)

where

$$\begin{aligned} {\varphi _{0}(x,y,z)}={u(0,y,z)}+{u(x,y,0)}-{u(0,y,0)}+{u(x,0,z)}-{u(0,0,z)}-{u(x,0,0)}+{u(0,0,0)}, \end{aligned}$$
(42)
$$\begin{aligned} {\varphi _{1}(y,z)}={({u_{x}(0,y,z)}-{u_{x}(0,y,0)}-{u_{x}(0,0,z)}+{u_{x}(0,0,0)})}\nonumber \\ +{z}{({u_{x}(0,y,0)}-{u_{x}(0,y,1)}+{u_{x}(0,0,1)}-{u_{x}(0,0,0)})}\nonumber \\ -{yz}{({u_{x}(0,1,0)}-{u_{x}(0,1,1)}+{u_{x}(0,0,1)}-{u_{x}(0,0,0)})}\nonumber \\ +{y}{({u_{x}(0,1,0)}-{u_{x}(0,1,z)}+{u_{x}(0,0,z)}-{u_{x}(0,0,0)})}, \end{aligned}$$
(43)
$$\begin{aligned} {\varphi _{2}(x,y)}={u(x,y,1)}-{u(0,y,1)}-{u(x,y,0)}+{u(0,y,0)}-{u(x,0,1)}\nonumber \\ +{u(0,0,1)}+{u(x,0,0)}-{u(0,0,0)}, \end{aligned}$$
(44)
$$\begin{aligned} {\varphi _{3}(x)}={u(x,1,1)}-{u(0,1,1)}-{u(x,1,0)}+{u(0,1,0)}-{u(x,0,1)}\nonumber \\ +{u(0,0,1)}+{u(x,0,0)}-{u(0,0,0)}, \end{aligned}$$
(45)
$$\begin{aligned} {\varphi _{4}(x,z)}={u(x,1,z)}-{u(0,1,z)}-{u(x,1,0)}+{u(0,1,0)}-{u(x,0,z)}\nonumber \\ +{u(0,0,z)}+{u(x,0,0)}-{u(0,0,0)}. \end{aligned}$$
(46)

Putting \(x=1\) in (41), we obtain

$$\begin{aligned} {\varphi _{1}(y,z)}={u(1,y,z)}-{\varphi _{0}(1,y,z)}-{z}{\varphi _{2}(1,y)}+{yz}{\varphi _{3}(1)}-{y}{\varphi _{4}(1,z)}\nonumber \\ -{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{P_{2,i_{1}}(1)}{({P_{2,i_{2}}(y)}-{y}{P_{2,i_{2}}(1)})}{({P_{2,i_{3}}(z)}-{z}{P_{2,i_{3}}(1)})}}}. \end{aligned}$$
(47)

From (41) and (47), we obtain

$$\begin{aligned} {u(x,y,z)}={\varphi _{0}(x,y,z)}+{x}\{u(1,y,z)-{{\varphi _{0}(1,y,z)}}-{z}{\varphi _{2}(1,y)}+{yz}{\varphi _{3}(1)}-{y}{\varphi _{4}(1,z)}\}+{z}{\varphi _{2}(x,y)}-{yz}{\varphi _{3}(x)}\nonumber \\ +{y}{\varphi _{4}(x,z)}+{\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{({P_{2,i_{1}}(x)}-{x}{P_{2,i_{1}}(1)})}{({P_{2,i_{2}}(y)}-{y}{P_{2,i_{2}}(1)})}{({P_{2,i_{3}}(z)}-{z}{P_{2,i_{3}}(1)})}}}. \end{aligned}$$
(48)

Substituting the values from (22), (31) and (40) in (1), we obtain

$$\begin{aligned} {\sum _{i_{1}=1}^{2M_{1}}\sum _{i_{2}=1}^{2M_{2}}\sum _{i_{3}=1}^{2M_{3}}{W_{{i_{1}}{i_{2}}{i_{3}}}{[R_{{i_{1}}{i_{2}}{i_{3}}}(x,y,z)+S_{{i_{1}}{i_{2}}{i_{3}}}(x,y,z)+T_{{i_{1}}{i_{2}}{i_{3}}}(x,y,z)]}}}=F(x,y,z), \end{aligned}$$
(49)

where

$$\begin{aligned} R_{{i_{1}}{i_{2}}{i_{3}}}(x,y,z)=\{h_{i_{1}}(x)\}\{({P_{2,i_{2}}(y)}-{y}{P_{2,i_{2}}(1)})\}\{({P_{2,i_{3}}(z)}-{z}{P_{2,i_{3}}(1)})\}\nonumber \\ \approx \{H_{1}(i_{1},x)\}\{P_{11}(i_{2},y)\}\{P_{12}(i_{3},z)\}, \end{aligned}$$
(50)
$$\begin{aligned} S_{{i_{1}}{i_{2}}{i_{3}}}(x,y,z)=\{({P_{2,i_{1}}(x)}-{x}{P_{2,i_{1}}(1)})\}\{h_{i_{2}}(y)\}\{({P_{2,i_{3}}(z)}-{z}{{P_{2,i_{3}}(1)}})\}\nonumber \\ \approx \{P_{21}(i_{1},x)\}\{H_{2}(i_{2},y)\}\{P_{22}(i_{3},z)\}, \end{aligned}$$
(51)
$$\begin{aligned} T_{{i_{1}}{i_{2}}{i_{3}}}(x,y,z)=\{({P_{2,i_{1}}(x)}-{x}{P_{2,i_{1}}(1)})\}\{({P_{2,i_{2}}(y)}-{y}{P_{2,i_{2}}(1)})\}\{h_{i_{3}}(z)\}\nonumber \\ \approx \{P_{31}(i_{1},x)\}\{P_{32}(i_{2},y)\}\{H_{3}(i_{3},z)\}, \end{aligned}$$
(52)

and

$$\begin{aligned} F(x,y,z)=f(x,y,z)-{({\psi _{31}(x,y,z)}+{z}{({u_{xx}(x,y,1)}-{\psi _{31}(x,y,1)}-{y}{\psi _{33}(x,1)})}+{y}{\psi _{33}(x,z)})}\nonumber \\ ~~~~~~~-{({\psi _{21}(x,y,z)}+{x}{({u_{yy}(1,y,z)}-{\psi _{21}(1,y,z)}-{z}{\psi _{23}(1,y)})}+{z}{\psi _{23}(x,y)})}\nonumber \\ -{({\psi _{11}(x,y,z)}+{y}{({u_{zz}(x,1,z)}-{\psi _{11}(x,1,z)}-{x}{\psi _{13}(1,z)})}+{x}{\psi _{13}(y,z)})}. \end{aligned}$$
(53)

Expressions for \(\{h_{i_{1}}(x)\}\), \(\{h_{i_{2}}(y)\}\) and \(\{h_{i_{3}}(z)\}\) are given below:

$$\begin{aligned} \{h_{i_{1}}(x)\}=\{H_{1}(i_{1},x)\}, ~~\{({P_{2,i_{2}}(y)}-{y}{P_{2,i_{2}}(1)})\}=\{P_{11}(i_{2},y)\},\nonumber \\ ~~\{({P_{2,i_{3}}(z)}-{z}{P_{2,i_{3}}(1)})\}=\{P_{12}(i_{3},z)\}, \end{aligned}$$
(54)
$$\begin{aligned} \{h_{i_{2}}(y)\}=\{H_{2}(i_{2},y)\}, ~~\{({P_{2,i_{1}}(x)}-{x}{P_{2,i_{1}}(1)})\}=\{P_{21}(i_{1},x)\}, \nonumber \\ ~~\{({P_{2,i_{3}}(z)}-{z}{P_{2,i_{3}}(1)})\}=\{P_{22}(i_{3},z)\}, \end{aligned}$$
(55)
$$\begin{aligned} \{h_{i_{3}}(z)\}=\{H_{3}(i_{3},z)\}, ~~\{({P_{2,i_{1}}(x)}-{x}{P_{2,i_{1}}(1)})\}=\{P_{31}(i_{1},x)\}, \nonumber \\ ~~\{({P_{2,i_{2}}(y)}-{y}{P_{2,i_{2}}(1)})\}=\{P_{32}(i_{2},y)\}. \end{aligned}$$
(56)

Discretising (49)–(53) using (10)–(12), we obtain the following system of equations in matrix form

$$\begin{aligned} {[W]}{[R+S+T]}={[F]}, \end{aligned}$$
(57)

where W represents the wavelet coefficient matrix. The value of matrix R can be calculated as:

$$\begin{aligned} R={H_{1}}\otimes {P_{11}} \otimes {P_{12}}, \end{aligned}$$
(58)

where

$$\begin{aligned} {H_{1}}= \left( \begin{array}{cccc} {H_{1}(1,x_{1})} &{} {H_{1}(1,x_{2})} &{} \cdots &{} {H_{1}(1,x_{2M_{1}})} \\ {H_{1}(2,x_{1})} &{} {H_{1}(2,x_{2})} &{} \cdots &{} {H_{1}(2,x_{2M_{1}})} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ {H_{1}(2M_{1},x_{1})} &{} {H_{1}(2M_{1},x_{2})} &{} \cdots &{} {H_{1}(2M_{1},x_{2M_{1}})} \\ \end{array} \right) , \end{aligned}$$
(59)
$$\begin{aligned} {P_{11}}= \left( \begin{array}{cccc} {P_{11}(1,y_{1})} &{} {P_{11}(1,y_{2})} &{} \cdots &{} {P_{11}(1,y_{2M_{2}})} \\ {P_{11}(2,y_{1})} &{} {P_{11}(2,y_{2})} &{} \cdots &{} {P_{11}(2,y_{2M_{2}})} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ {P_{11}(2M_{2},y_{1})} &{} {P_{11}(2M_{2},y_{2})} &{} \cdots &{} {P_{11}(2M_{2},y_{2M_{2}})} \\ \end{array} \right) , \end{aligned}$$
(60)

and

$$\begin{aligned} {P_{12}}= \left( \begin{array}{cccc} {P_{12}(1,z_{1})} &{} {P_{12}(1,z_{2})} &{} \cdots &{} {P_{12}(1,z_{2M_3})} \\ {P_{12}(2,z_{1})} &{} {P_{12}(2,z_{2})} &{} \cdots &{} {P_{12}(2,z_{2M_{3}})} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ {P_{12}(2M_{3},z_{1})} &{} {P_{12}(2M_{3},z_{2})} &{} \cdots &{} {P_{12}(2M_{3},z_{2M_{3}})} \\ \end{array} \right) . \end{aligned}$$
(61)

The value of matrix S can be calculated as:

$$\begin{aligned} S={P_{21}} \otimes {H_{2}} \otimes {P_{22}}, \end{aligned}$$
(62)

where

$$\begin{aligned} {P_{21}}= \left( \begin{array}{cccc} {P_{21}(1,x_{1})} &{} {P_{21}(1,x_{2})} &{} \cdots &{} {P_{21}(1,x_{2M_{1}})} \\ {P_{21}(2,x_{1})} &{} {P_{21}(2,x_{2})} &{} \cdots &{} {P_{21}(2,x_{2M_{1}})} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ {P_{21}(2M_{1},x_{1})} &{} {P_{21}(2M_{1},x_{2})} &{} \cdots &{} {P_{21}(2M_{1},x_{2M_{1}})} \\ \end{array} \right) , \end{aligned}$$
(63)
$$\begin{aligned} {H_{2}}= \left( \begin{array}{cccc} {H_{2}(1,y_{1})} &{} {H_{2}(1,y_{2})} &{} \cdots &{} {H_{2}(1,y_{2M_{2}})} \\ {H_{2}(2,y_{1})} &{} {H_{2}(2,y_{2})} &{} \cdots &{} {H_{2}(2,y_{2M_{2}})} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ {H_{2}(2M_{2},y_{1})} &{} {H_{2}(2M_{2},y_{2})} &{} \cdots &{} {H_{2}(2M_{2},y_{2M_{2}})} \\ \end{array} \right) , \end{aligned}$$
(64)

and

$$\begin{aligned} {P_{22}}= \left( \begin{array}{cccc} {P_{22}(1,z_{1})} &{} {P_{22}(1,z_{2})} &{} \cdots &{} {P_{22}(1,z_{2M_{3}})} \\ {P_{22}(2,z_{1})} &{} {P_{22}(2,z_{2})} &{} \cdots &{} {P_{22}(2,z_{2M_{3}})} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ {P_{22}(2M_{3},z_{1})} &{} {P_{22}(2M_{3},z_{2})} &{} \cdots &{} {P_{22}(2M_{3},z_{2M_{3}})} \\ \end{array} \right) . \end{aligned}$$
(65)

The value of matrix T can be calculated as:

$$\begin{aligned} T={P_{31}} \otimes {P_{32}} \otimes {H_{3}}, \end{aligned}$$
(66)

where

$$\begin{aligned} {P_{31}}= \left( \begin{array}{cccc} {P_{31}(1,x_{1})} &{} {P_{31}(1,x_{2})} &{} \cdots &{} {P_{31}(1,x_{2M_{1}})} \\ {P_{31}(2,x_{1})} &{} {P_{31}(2,x_{2})} &{} \cdots &{} {P_{31}(2,x_{2M_{1}})} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ {P_{31}(2M_{1},x_{1})} &{} {P_{31}(2M_{1},x_{2})} &{} \cdots &{} {P_{31}(2M_{1},x_{2M_{1}})} \\ \end{array} \right) , \end{aligned}$$
(67)
$$\begin{aligned} {P_{32}}= \left( \begin{array}{cccc} {P_{32}(1,y_{1})} &{} {P_{32}(1,y_{2})} &{} \cdots &{} {P_{32}(1,y_{2M_{2}})} \\ {P_{32}(2,y_{1})} &{} {P_{32}(2,y_{2})} &{} \cdots &{} {P_{32}(2,y_{2M_{2}})} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ {P_{32}(2M_{2},y_{1})} &{} {P_{32}(2M_{2},y_{2})} &{} \cdots &{} {P_{32}(2M_{2},y_{2M_{2}})} \\ \end{array} \right) , \end{aligned}$$
(68)

and

$$\begin{aligned} {H_{3}}= \left( \begin{array}{cccc} {H_{3}(1,z_{1})} &{} {H_{3}(1,z_{2})} &{} \cdots &{} {H_{3}(1,z_{2M_{3}})} \\ {H_{3}(2,z_{1})} &{} {H_{3}(2,z_{2})} &{} \cdots &{} {H_{3}(2,z_{2M_{3}})} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ {H_{3}(2M_{3},z_{1})} &{} {H_{3}(2M_{3},z_{2})} &{} \cdots &{} {H_{3}(2M_{3},z_{2M_{3}})} \\ \end{array} \right) . \end{aligned}$$
(69)

Each component of F can be evaluated as:

$$\begin{aligned} F(x,y,z)=\{F_{1}(x)\}\{F_{2}(y)\}\{F_{3}(z)\}={F_{1}} \otimes ({F_{2}} \otimes {F_{3}}), \end{aligned}$$
(70)

where

$$\begin{aligned} {F_{1}}=[{F_{1}(x_{1})}, {F_{1}(x_{2})},\ldots ,{F_{1}(x_{2M_{1}})}], \end{aligned}$$
(71)
$$\begin{aligned} {F_{2}}=[{F_{2}(y_{1})}, {F_{2}(y_{2})},\ldots ,{F_{2}(y_{2M_{2}})}], \end{aligned}$$
(72)
$$\begin{aligned} {F_{3}}=[{F_{3}(z_{1})}, {F_{3}(z_{2})},\ldots ,{F_{3}(z_{2M_{3}})}]. \end{aligned}$$
(73)

The numerical solution of given problem is obtained by substituting the values of wavelet coefficients into (48).

Error analysis for three-dimensional PDEs

In this section we present the error analysis for our proposed scheme. In order to analyze the convergence of our method, we state and prove the following convergence theorem:

Theorem

Suppose that u(xyz) satisfies a Lipschitz condition on \(D=[0,1)\times [0,1)\times [0,1)\), that is there exist a positive constant \(L_{1}, L_{2}, L_{3}\) and \(L_{4}\), such that for all \((x_{1},y,z)\), \((x_{2},y,z)\), \((x_{3},y,z)\), \((x_{4},y,z)\), \((x_{5},y,z)\), \((x_{6},y,z)\), \((x_{7},y,z)\) and \((x_{8},y,z)\) in D, we have

$$\begin{aligned} {\left\{ \begin{array}{ll} \mid {u(x_{2},y,z)-u(x_{1},y,z)}\mid ={L_{1}}{\mid {x_{2}-x_{1}}\mid }, \\ \mid {u(x_{4},y,z)-u(x_{3},y,z)}\mid ={L_{2}}{\mid {x_{4}-x_{3}}\mid }, \\ \mid {u(x_{6},y,z)-u(x_{5},y,z)}\mid ={L_{3}}{\mid {x_{6}-x_{5}}\mid }, \\ \mid {u(x_{8},y,z)-u(x_{7},y,z)}\mid ={L_{4}}{\mid {x_{8}-x_{7}}\mid }. \end{array}\right. } \end{aligned}$$
(74)

Then, the error bound \(\parallel {E_{m}}\parallel _{2}\) obtained from above is

$$\begin{aligned} \parallel {E_{m}}\parallel _{2}\approx {O\left( \frac{1}{m}\right) ^4}. \end{aligned}$$
(75)

Here, the order of convergence is of the order 4.

Proof

Consider \(M_{1}=M_{2}=M_{3}=M\). Let \(u_{exact}(x,y,z)\) and \(u_{approximate}(x,y,z)\) be the exact and approximate solutions of the partial differential equation. The error at the Jth level of resolution is defined as:

$$\begin{aligned} E_{m}={u_{exact}}(x,y,z)-{u_{approximate}}(x,y,z)\nonumber \\ ={\sum _{i_{1}=2M+1}^{\infty }}{\sum _{i_{2}=2M+1}^{\infty }}{\sum _{i_{3}=2M+1}^{\infty }}{{\mathcal {C}}_{i_{1}i_{2}i_{3}}}{h_{i_{1}}(x)}{h_{i_{2}}(y)}{h_{i_{3}}(z)}={\sum _{i_{1},i_{2},i_{3}=2M+1}^{\infty }}{{{\mathcal {C}}_{i_{1}i_{2}i_{3}}}{h_{i_{1}}(x)}{h_{i_{2}}(y)}{h_{i_{3}}(z)}}, \end{aligned}$$
(76)

where

$$\begin{aligned} {u_{approximate}}(x,y,z)={\sum _{i_{1}=1}^{2M}}{\sum _{i_{2}=1}^{2M}}{\sum _{i_{3}=1}^{2M}}{{\mathcal {C}}_{i_{1}i_{2}i_{3}}}{h_{i_{1}}(x)}{h_{i_{2}}(y)}{h_{i_{3}}(z)}, \end{aligned}$$
(77)

and the wavelet coefficients are calculated as:

$$\begin{aligned} {\mathcal {C}}_{i_{1}i_{2}i_{3}}={\int _{0}^{1}}{\int _{0}^{1}}{\int _{0}^{1}}{{u(x,y,z)}{h_{i_{1}}(x)}{h_{i_{2}}(y)}{h_{i_{3}}(z)}}{\mathrm{d}x}{\mathrm{d}y}{\mathrm{d}z}=\Big<{h_{i_{1}}(x)},\Big<{h_{i_{2}}(y)},\Big <u(x,y,z),{h_{i_{3}}(z)}\Big>\Big>\Big >. \end{aligned}$$
(78)

Here \(\Big <.\Big>\) shows the inner product. Define \({\parallel {.}\parallel }_{2}\) as:

$$\begin{aligned} {\parallel {E_{m}}\parallel }_{2}^{2} ={\int _{0}^{1}}{\int _{0}^{1}}{\int _{0}^{1}}{({u_{exact}}(x,y,z)-{u_{approximate}}(x,y,z))^2}{{ d}x}{{ d}y}{dz}. \end{aligned}$$
(79)

From (76) and (79), we obtain 

$$\begin{aligned} {\parallel {E_{m}}\parallel }_{2}^{2} ={\int _{0}^{1}}{\int _{0}^{1}}{\int _{0}^{1}}{\left( {\sum _{i_{1},i_{2},i_{3}=2M+1}^{\infty }}{{\mathcal {C}}_{i_{1}i_{2}i_{3}}}{h_{i_{1}}(x)}{h_{i_{2}}(y)}{h_{i_{3}}(z)}\right) ^{2}}{\mathrm{d}x}{\mathrm{d}y}{\mathrm{d}z}. \end{aligned}$$
(80)

Using definition of inner product, from (80), we obtain

$$\begin{aligned} {\parallel {E_{m}}\parallel }_{2}^{2} ={\sum _{i_{1},i_{2},i_{3}=2M+1}^{\infty }}~{\sum _{p,q,r=2M+1}^{\infty }}{{\mathcal {C}}_{i_{1}i_{2}i_{3}}}{{\mathcal {C}}_{pqr}}\left( {\int _{0}^{1}{h_{i_{1}}(x)}{h_{p}(x)}{\mathrm{d}x}}\right) {\left( {\int _{0}^{1}{h_{i_{2}}(y)}{h_{q}(y)}{\mathrm{d}y}}\right) }{\left( {\int _{0}^{1}{h_{i_{3}}(z)}{h_{r}(z)}{\mathrm{d}z}}\right) }. \end{aligned}$$
(81)

Using orthogonality conditions, from (81), we obtain

$$\begin{aligned} {\parallel {E_{m}}\parallel }_{2}^{2} ={\frac{1}{m^3}}{\sum _{i_{1},i_{2},i_{3}=2M+1}^{\infty }}{({{\mathcal {C}}_{i_{1}i_{2}i_{3}})}^2}. \end{aligned}$$
(82)

According to (9), we can write

$$\begin{aligned} {\Big <u(x,y,z),~h_{i_{3}}(z)\Big >}={\int _{0}^{1}}{u(x,y,z)}{h_{i_{3}}(z)}{\mathrm{d}z}={\int _{k/m}^{k+0.5/m}{u(x,y,z){dz}}}-{\int _{k+0.5/m}^{k+1/m}{u(x,y,z){\mathrm{d}z}}}. \end{aligned}$$
(83)

Applying mean value theorem, that is there exist \(z_{1}\in [{\frac{k}{m}}, {\frac{k+0.5}{m}}]\) and \(z_{2}\in [{\frac{k+0.5}{m}}, {\frac{k+1}{m}}]\), such that 

$$\begin{aligned} {\Big <u(x,y,z),~h_{i_{3}}(z)\Big >}={\left[ \left( {{\frac{k+0.5}{m}}-{\frac{k}{m}}}\right) {u(x,y,z_{1})}-\left( {{\frac{k+1}{m}}-{\frac{k+0.5}{m}}}\right) {u(x,y,z_{2})}\right] }\nonumber \\ ={\frac{1}{2m}}{\left[ {u(x,y,z_{1})-{u(x,y,z_{2})}}\right] }. \end{aligned}$$
(84)

Again,

$$\begin{aligned} \Big<h_{i_{2}}(y),\Big<u(x,y,z),~h_{i_{3}}(z)\Big>\Big>=\Big <h_{i_{2}}(y),~{\frac{1}{2m}}{\left( {u(x,y,z_{1})-{u(x,y,z_{2})}}\right) }\Big >, \end{aligned}$$
(85)

From (85), using the definition of inner product, we obtain

$$\begin{aligned} \Big<h_{i_{2}}(y),\Big <u(x,y,z),~h_{i_{3}}(z)\Big>\Big >=\int _{0}^{1}{{\frac{1}{2m}}{\left[ {u(x,y,z_{1})-{u(x,y,z_{2})}}\right] }}{h_{i_{2}}(y)}{{ d}y}, \end{aligned}$$
(86)

Using (8), from (86), we obtain

$$\begin{aligned} \Big<h_{i_{2}}(y),\Big <u(x,y,z),~h_{i_{3}}(z)\Big>\Big >={\frac{1}{2m}}{\left[ {\int _{\frac{k}{m}}^{\frac{k+0.5}{m}}{{u(x,y,z_{1})}}{{ d}y}}-{\int _{\frac{k+0.5}{m}}^{\frac{k+1}{m}}{{u(x,y,z_{1})}}{{ d}y}}\right] }\nonumber \\ -{\frac{1}{2m}}{\left[ {\int _{\frac{k}{m}}^{\frac{k+0.5}{m}}{{u(x,y,z_{2})}}{{ d}y}}+{\int _{\frac{k+0.5}{m}}^{\frac{k+1}{m}}{{u(x,y,z_{2})}}{{ d}y}}\right] }. \end{aligned}$$
(87)

Again, applying mean value theorem, we obtain:

$$\begin{aligned} \Big<h_{i_{2}}(y),\Big <u(x,y,z),~h_{i_{3}}(z)\Big>\Big >={\frac{1}{2m}}{\left[ {\left( {{\frac{k+0.5}{m}}-{\frac{k}{m}}}\right) }{u(x,y_{1},z_{1})}-{\left( {{\frac{k+1}{m}}-{\frac{k+0.5}{m}}}\right) }{u(x,y_{2},z_{1})}\right] }\nonumber \\ +{\frac{1}{2m}}{\left[ {\left( {{\frac{k+1}{m}}-{\frac{k+0.5}{m}}}\right) }{u(x,y_{4},z_{2})}-{\left( {{\frac{k+0.5}{m}}-{\frac{k}{m}}}\right) }{u(x,y_{3},z_{2})}\right] }. \end{aligned}$$
(88)

After simplifications, from (88), we obtain

$$\begin{aligned} \Big<h_{i_{2}}(y),\Big <u(x,y,z),~h_{i_{3}}(z)\Big>\Big > ={\frac{1}{2^{j+2}{m}}}{\left[ {u(x,y_{1},z_{1})}-{u(x,y_{2},z_{1})}-{u(x,y_{3},z_{2})}+{u(x,y_{4},z_{2})}\right] }. \end{aligned}$$
(89)

Hence,

$$\begin{aligned} {\mathcal {C}}_{i_{1}i_{2}i_{3}}=\Big <{h_{i_{1}}(x),~{\frac{1}{2^{j+2}{m}}}{\left[ {u(x,y_{1},z_{1})}-{u(x,y_{2},z_{1})}-{u(x,y_{3},z_{2})}+{u(x,y_{4},z_{2})}\right] }}\Big >\nonumber \\ ={\frac{1}{2^{j+2}{m}}}{\int _{0}^{1}}{{\left[ {u(x,y_{1},z_{1})}-{u(x,y_{2},z_{1})}-{u(x,y_{3},z_{2})}+{u(x,y_{4},z_{2})}\right] }{h_{i}(x)}}{{ d}x}. \end{aligned}$$
(90)

From (90), using (7), we obtain

$$\begin{aligned} {\mathcal {C}}_{i_{1}i_{2}i_{3}}={\frac{1}{2^{j+2}{m}}}{\left[ {\int _{\frac{k}{m}}^{\frac{k+0.5}{m}}}{u(x,y_{1},z_{1})}{{ d}x}-{\int _{\frac{k+0.5}{m}}^{\frac{k+1}{m}}}{u(x,y_{1},z_{1})}{{ d}x}\right] }\nonumber \\ -{\frac{1}{2^{j+2}{m}}}{\left[ {\int _{\frac{k}{m}}^{\frac{k+0.5}{m}}}{u(x,y_{2},z_{1})}{{ d}x}+{\int _{\frac{k+0.5}{m}}^{\frac{k+1}{m}}}{u(x,y_{2},z_{1})}{{ d}x}\right] }\nonumber \\ +{\frac{1}{2^{j+2}{m}}}{\left[ {\int _{\frac{k}{m}}^{\frac{k+0.5}{m}}}{u(x,y_{4},z_{2})}{{ d}x}-{\int _{\frac{k+0.5}{m}}^{\frac{k+1}{m}}}{u(x,y_{4},z_{2})}{{ d}x}-{\int _{\frac{k}{m}}^{\frac{k+0.5}{m}}}{u(x,y_{3},z_{2})}{{ d}x}+{\int _{\frac{k+0.5}{m}}^{\frac{k+1}{m}}}{u(x,y_{3},z_{2})}{{ d}x}\right] }. \end{aligned}$$
(91)

Applying mean value theorem, from (91), we obtain

$$\begin{aligned} {\mathcal {C}}_{i_{1}i_{2}i_{3}}={\frac{1}{2^{j+2}{m}}}\left[ \left( {\frac{k+0.5}{m}}-{\frac{k}{m}}\right) {u(x_{1},y_{1},z_{1})}-{\left( {\frac{k+1}{m}}-{\frac{k+0.5}{m}}\right) }{u(x_{2},y_{1},z_{1})}\right] \nonumber \\ +{\frac{1}{2^{j+2}{m}}}\left[ -\left( {\frac{k+0.5}{m}}-{\frac{k}{m}}\right) {u(x_{3},y_{2},z_{1})}+{\left( {\frac{k+0.5}{m}}-{\frac{k}{m}}\right) }{u(x_{4},y_{2},z_{1})}\right] \nonumber \\ +{\frac{1}{2^{j+2}{m}}}\left[ \left( {\frac{k+0.5}{m}}-{\frac{k}{m}}\right) {u(x_{5},y_{4},z_{2})}-{\left( {\frac{k+1}{m}}-{\frac{k+0.5}{m}}\right) }{u(x_{6},y_{4},z_{2})}\right] \nonumber \\ +{\frac{1}{2^{j+2}{m}}}\left[ -{\left( {\frac{k+0.5}{m}}-{\frac{k}{m}}\right) }{u(x_{7},y_{3},z_{2})}+{\left( {\frac{k+1}{m}}-{\frac{k+0.5}{m}}\right) }{u(x_{8},y_{3},z_{2})}\right] . \end{aligned}$$
(92)

After simplifications, from (92), we obtain

$$\begin{aligned} |{\mathcal {C}}_{i_{1}i_{2}i_{3}}|\le {\frac{1}{2^{2j+3}{m}}}{\left[ {|{u(x_{1},y_{1},z_{1})}-{u(x_{2},y_{1},z_{1})}+{u(x_{4},y_{2},z_{1})}-{u(x_{3},y_{2},z_{1})}|}\right] }\nonumber \\ +{\frac{1}{2^{2j+3}{m}}}{\left[ {|{u(x_{5},y_{4},z_{2})}-{u(x_{6},y_{4},z_{2})}+{u(x_{8},y_{3},z_{2})}-{u(x_{7},y_{3},z_{2})}|}\right] }. \end{aligned}$$
(93)

Using (74), from (93), we obtain

$$\begin{aligned} |{\mathcal {C}}_{i_{1}i_{2}i_{3}}|\le {\frac{1}{2^{2j+3}{m}}}{\frac{4L}{2m}}, \end{aligned}$$
(94)

where \(L=max\{L_{1}, L_{2}, L_{3}, L_{4}\}\). After simplifications, from (94), we obtain

$$\begin{aligned} |{\mathcal {C}}_{i_{1}i_{2}i_{3}}|\le {\frac{4L}{2^{2j+4}{m^2}}}\le {\frac{L}{2^{2j+2}}}{\frac{1}{m^2}}. \end{aligned}$$
(95)

Squaring both sides, from (95), we obtain

$$\begin{aligned} {({\mathcal {C}}_{i_{1}i_{2}i_{3}})}^2\le {\frac{L^2}{2^{4j+4}}}{\frac{1}{m^4}}. \end{aligned}$$
(96)

By substituting (96) in (82), we obtain

$$\begin{aligned} {\parallel {E_{m}}\parallel }_{2}^{2}\le {\sum _{i_{1},i_{2},i_{3}=2M+1}^{\infty }}{{\frac{L^2}{2^{4j+4}{m^4}}}}{{\frac{1}{m^3}}}. \end{aligned}$$
(97)

After simplifications, from (97), we obtain

$$\begin{aligned} {\parallel {E_{m}}\parallel }_{2}^{2}\le {\frac{L^2}{m^7}}{\frac{1}{2^4}}{\sum _{i_{1},i_{2},i_{3}=2M+1}^{\infty }}{\frac{1}{2^{4j}}}. \end{aligned}$$
(98)

Expanding (98), we obtain

$$\begin{aligned} {\parallel {E_{m}}\parallel }_{2}^{2}\le {\frac{L^2}{m^7}}{\frac{1}{2^4}}{\sum _{j=J+1}^{\infty }}{\left( {\sum _{i_{1}=0}^{2^j-1}}{\sum _{i_{2}=0}^{2^j-1}}{\sum _{i_{3}=0}^{2^j-1}}{{\frac{1}{2^{4j}}}}\right) }. \end{aligned}$$
(99)

From (99), after simplification, we obtain

$$\begin{aligned} {\parallel {E_{m}}\parallel }_{2}^{2}\le {\frac{L^2}{m^7}}{\frac{1}{2^4}}{\sum _{j=J+1}^{\infty }}{\left( {\frac{1}{2^{j}}}\right) }. \end{aligned}$$
(100)

From (100), after series summation, we obtain

$$\begin{aligned} {\parallel {E_{m}}\parallel }_{2}^{2}\le {\frac{L^2}{m^8}}. \end{aligned}$$
(101)

After taking square root, we obtain

$$\begin{aligned} {\parallel {E_{m}}\parallel }_{2}\approx {O\left( \frac{1}{m^4}\right) }. \end{aligned}$$
(102)

This shows that the convergence is of the order 4. \(\square\)

Numerical examples and discussion

We have applied our method on some numerical examples, to observe the accuracy and efficiency of the present method for solving three-dimensional Poisson equations.

Example 1

Consider the following linear three-dimensional Poisson equation

$$\begin{aligned} {\nabla ^{2}}{u}={\frac{{\partial ^{2}{u}}}{\partial {x^{2}}}}+{\frac{{\partial ^{2}{u}}}{\partial {y^{2}}}}+{\frac{{\partial ^{2}{u}}}{\partial {z^{2}}}}={f(x,y,z)}, \end{aligned}$$
(103)

on \(K=\{(x,y,z):{0}{<}{x}{<} {1}, {0}{<}{y}{<}{1}, {0}{<}{z}{<}{1}\}\), with boundary conditions:

$$\begin{aligned} u(0,y,z)= u(x,0,z)= u(x,y,0)= u(1,y,z)= u(x,1,z)= u(x,y,1)= 0, \end{aligned}$$
(104)

where

$$\begin{aligned} f(x,y,z)={\sin {{\pi }x}}.{\sin {{\pi }y}}.{\sin {{\pi }z}}. \end{aligned}$$
(105)

The exact solution is \(u(x,y,z)=-{\frac{1}{3{\pi ^2}}}.{\sin (\pi {x})}.{\sin (\pi {y})}.{\sin (\pi {z})}\). Table 1 shows the maximum absolute errors of Example 1.

Table 1 Maximum absolute errors of Example 1

The proposed method is more simplest and different from the method presented in [23]. For \(J=3\), the maximum absolute error obtained by [23] is \(1.3730E-004\), where as in our research paper maximum absolute error is \(5.3267E-005\).

Example 2

Consider the following linear three-dimensional Poisson equation

$$\begin{aligned} {\nabla ^{2}}{u}={\frac{{\partial ^{2}{u}}}{\partial {x^{2}}}}+{\frac{{\partial ^{2}{u}}}{\partial {y^{2}}}}+{\frac{{\partial ^{2}{u}}}{\partial {z^{2}}}}={f(x,y,z)}, \end{aligned}$$
(106)

on \(K=\{(x,y,z):{0}{<}{x}{<}{1}, {0}{<}{y}{<}{1}, {0}{<}{z}{<}{1}\}\), with boundary conditions:

$$\begin{aligned} u(0,y,z)= u(x,0,z)= u(x,y,0)= u(1,y,z)= u(x,1,z)= u(x,y,1)= 0, \end{aligned}$$
(107)

where

$$\begin{aligned} f(x,y,z)={6{x}{y}{z}}{[{{y^2}{z^2}{(1-2x)}}{(1-y)}{(1-z)}+{{x^2}{z^2}}{(1-x)}{(1-2y)}{(1-z)}+{x^2}{y^2}{(1-x)}{(1-y)}{(1-2z)}]}. \end{aligned}$$
(108)

The exact solution is \(u(x,y,z)={x^3}{y^3}{z^3}{(1-x)}{(1-y)}{(1-z)}\). Table 2 shows the maximum absolute errors of Example 2.

Table 2 Maximum absolute errors of Example 2

Example 3

Consider the following linear three-dimensional Helmholtz equation

$$\begin{aligned} {\nabla ^{2}}{u}={\frac{{\partial ^{2}{u}}}{\partial {x^{2}}}}+{\frac{{\partial ^{2}{u}}}{\partial {y^{2}}}}+{\frac{{\partial ^{2}{u}}}{\partial {z^{2}}}}+{2500}{u}={f(x,y,z)}, \end{aligned}$$
(109)

on \(K=\{(x,y,z):{0}{<}{x}{<}{1}, {0}{<}{y}{<}{1}, {0}{<}{z}{<}{1}\}\), with boundary conditions:

$$\begin{aligned} u(0,y,z)= u(x,0,z)= u(x,y,0)= u(1,y,z)= u(x,1,z)= u(x,y,1)= 0, \end{aligned}$$
(110)

where

$$\begin{aligned} f(x,y,z)={(2500-{3{\pi ^2}})}.{\sin {{\pi }x}}.{\sin {{\pi }y}}.{\sin {{\pi }z}}. \end{aligned}$$
(111)

The exact solution is \(u(x,y,z)={\sin (\pi {x})}.{\sin (\pi {y})}.{\sin (\pi {z})}\). Table 3 shows the maximum absolute errors of Example 3.

Table 3 Maximum absolute errors of Example 3

Example 4

Consider the following linear three-dimensional Helmholtz equation

$$\begin{aligned} {\nabla ^{2}}{u}={\frac{{\partial ^{2}{u}}}{\partial {x^{2}}}}+{\frac{{\partial ^{2}{u}}}{\partial {y^{2}}}}+{\frac{{\partial ^{2}{u}}}{\partial {z^{2}}}}+{1500}{u}={f(x,y,z)}, \end{aligned}$$
(112)

on \(K=\{(x,y,z):{0}{<}{x}{<}{1}, {0}{<}{y}{<}{1}, {0}{<}{z}{<}{1}\}\), with boundary conditions:

$$\begin{aligned} u(0,y,z)= u(x,0,z)= u(x,y,0)= u(1,y,z)= u(x,1,z)= u(x,y,1)= 0, \end{aligned}$$
(113)

where

$$\begin{aligned} f(x,y,z)={(6{x{(1-2x)}}-(1500-{2{\pi ^2}}){x^3}{(1-x)})}.{\sin {{\pi }y}}.{\sin {{\pi }z}}. \end{aligned}$$
(114)

The exact solution is \(u(x,y,z)={x^3}{(1-x)}.{\sin (\pi {y})}.{\sin (\pi {z})}\). Table 4 shows the maximum absolute errors of Example 4.

Table 4 Maximum absolute errors of Example 4

Conclusion

It is concluded from here that the Haar wavelet method is a powerful mathematical tool for solving three-dimensional partial differential equations. As we increase the values of \(2M_{1}\), \(2M_{2}\) and \(2M_{3}\), absolute errors decrease rapidly and the numerical solutions are much closer to the exact solutions. Also, proposed method gives better results as compared to numerical results presented in [23]. Also, proposed method is applicable to many types of three-dimensional Poisson equations (see, for example, in Sect. 4, Example 2) whereas method presented in [23] is applicable to only one type of three-dimensional Poisson equation. In view of numerical results, it is concluded that proposed method based on Haar wavelet is more efficient and accurate for solving three-dimensional partial differential equations.