Theory and Modern Applications

# A new structure to n-dimensional trigonometric cubic B-spline functions for solving n-dimensional partial differential equations

## Abstract

In this paper, we present a new structure of the n-dimensional trigonometric cubic B-spline collocation algorithm, which we show in three different formats: one-, two-, and three-dimensional. These constructs are critical for solving mathematical models in different fields. We illustrate the efficiency and accuracy of the proposed method by its application to a few two- and three-dimensional test problems. We use other numerical methods available in the literature to make comparisons.

## Introduction

We are all aware that solving partial differential equations is important in a variety of fields as physics, chemistry, engineering, and other fields. There are two types of solutions to these equations, analytical and numerical solutions . Researchers have recently appeared to use a variety of approaches to find these solutions, including empirical and numerical methods. With the existence of models for these equations, which are difficult to solve, especially if they are two-, three-, or higher-dimensional, this studying continued to seek these solutions. Since it was difficult for some researchers in this field to find analytical solutions for these models of various dimensions over time, they switched to numerical solutions. Several researchers have used a variety of analytical approaches to solve these multidimensional equations; see  as examples. We are working on a method for solving partial differential equations in two- and three-dimensional cases, as well as other problems, using a trigonometric cubic B-spline collocation method. Our aim is a continuation of what was done previously [16, 17]. Frazer et al.  started the collocation approach in 1937. After that, Bickley  used the collocation technique alongside the least-squares and Galerkin strategies to consider shaky heat situation problems. Since then, the collocation technique has been applied to a broad range of issues . To assume halfway differential conditions, polynomial B-splines have been used extensively together with the collocation technique. To solve various straight and nonlinear boundary esteem problems, cubic B-splines, quasi-B-splines, quartic B-splines, quintic B-splines, and other forms of B-splines are used in conjunction with the collocation technique . Collocation strategies such as Haar wavelet collocation technique , a slope replicating component collocation technique , and Newton premise capacities collocation technique  are also gaining popularity for illuminating various conditions.

In this paper, we present an n-dimensional trigonometric cubic B-spline collocation algorithm with some numerical examples to investigate the efficacy and accuracy of the method.

The paper is structured as follows. In Sect. 2, we present formulations of n-dimensional trigonometric cubic B-splines. Section 3 contains the error estimates. In Sect. 4, we introduce numerical examples. Finally, we give the conclusions.

## Construct trigonometric cubic B-spline formulas

In this section, we introduce the forms for n-dimensional trigonometric cubic B-splines.

### One-dimensional trigonometric cubic B-spline 

Let $$a\leq x\leq b$$, and let $$\phi _{i} (x)$$ be trigonometric cubic B-spline with knots at the points $$x_{i}$$. Then the set of cubic B-splines $$\phi _{-1} (x), \phi _{0} (x), \ldots, \phi _{N-1} (x), \phi _{N} (x)$$, $$\phi _{N+1}$$ serves as a basis for functions specified over a range of values. The approximation $$U^{N} (x)$$ of $$U(x)$$ using these splines is defined as

\begin{aligned} U^{N} (x)=\sum_{i=-1}^{N+1} \chi _{i} \phi _{i} (x), \end{aligned}
(1)

where $$\chi _{i}$$ are unknown coefficients. We define $$U_{i}$$, $$\frac{d U_{i} }{d x}, \frac{d^{2} U_{i} }{d x^{2} }$$ by

\begin{aligned} \begin{aligned} &U_{i} = \aleph _{1} \chi _{i-1} +\aleph _{2} \chi _{i} +\aleph _{1} \chi _{i+1}, \\ & {\frac{d U_{i} }{d x} = -\aleph _{3} \chi _{i-1} +\aleph _{3} \chi _{i+1}, } \\ & \frac{d^{2} U_{i} }{d x^{2} } = \aleph _{4} \chi _{i-1} +\aleph _{5} \chi _{i} +\aleph _{4} \chi _{i+1}, \end{aligned} \end{aligned}
(2)

where

\begin{aligned} &\aleph _{1}=\sin ^{2} \biggl(\frac{\text{h}}{2} \biggr) \csc (h)\csc \biggl( \frac{\text{3h}}{2} \biggr),\qquad \aleph _{2}= \frac{\text{2}}{1+2\cos (h)}, \qquad\aleph _{3}=\frac{\text{3}}{4}\csc \biggl( \frac{\text{3h}}{2} \biggr), \\ &\aleph _{4}= \frac{3 ((1+3\cos (h))\csc ^{2} (\frac{\text{h}}{2} ) )}{16 (2\cos (\frac{\text{h}}{2} )+\cos (\frac{\text{3h}}{2} ) )},\qquad \aleph _{5}= \frac{-3\cot ^{2} (\frac{\text{h}}{2} )}{2+4\cos (h)}. \end{aligned}

The above analysis yields the following theorem.

### Theorem 1

The solution of one-dimensional DE using the collocation method with basis trigonometric cubic B-spline can be determined by equation (2).

### Two-dimensional trigonometric cubic B-spline

In this subsection, we give a formula for a two-dimensional trigonometric cubic B-spline on a rectangular grid divided into regular rectangular finite elements on both sides. $$h=\Delta x, k=\Delta y$$ by the knots $$(x_{m}, y_{n} )$$, $$m=0,1,\ldots,M, n=0,1,\ldots,N$$. The approximation $$U^{N} (x,y)$$ of $$U(x,y)$$ is given by

\begin{aligned} U^{N}(x, y)=\sum_{m=-1}^{M+1} \sum_{n=-1}^{N+1}\chi _{m, n} B_{m,n} (x,y), \end{aligned}
(3)

where $$\chi _{m, n}$$ are the amplitudes of the trigonometric cubic B-splines $$B_{m, n} (x,y)$$ given by

\begin{aligned} B_{m, n} (x,y)=\phi _{m} (x) \phi _{n} (y). \end{aligned}

Peaks on the knot $$(x_{m},y_{n})$$ and $$\phi _{m} (x), \phi _{n} (y)$$ are identical in form to the one-dimensional trigonometric cubic B-splines. Then $$U_{m,n}, \frac{\partial U_{m,n} }{\partial x}, \frac{\partial U_{m,n} }{\partial y}, \frac{\partial ^{2} U_{m,n} }{\partial x^{2} }$$, $$\frac{\partial ^{2} U_{m,n} }{\partial y^{2} }, \frac{\partial ^{2} U_{m,n} }{\partial x\, \partial y }, \dots$$ are given by

\begin{aligned} &\begin{aligned} U_{m, n} ={}& \frac{\sec (\frac{h}{2} ) \sec (\frac{k}{2} )}{4 (2 \cos (h)+1) (2 \cos (k)+1)} \\ & {}\times\biggl(16 \cos \biggl(\frac{h}{2} \biggr) \cos \biggl( \frac{k}{2} \biggr) \chi _{m,n}+4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n-1}+4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n+1} \\ &{}+4 \cos \biggl(\frac{k}{2} \biggr) \chi _{m-1,n}+4 \cos \biggl( \frac{k}{2} \biggr) \chi _{m+1,n}+\chi _{m-1,n-1} \\ &{}+\chi _{m-1,n+1}+\chi _{m+1,n-1}+\chi _{m+1,n+1} \biggr), \end{aligned} \end{aligned}
(4)
\begin{aligned} &\begin{aligned} \frac{\partial U_{m, n} }{\partial x} ={}&{-} \frac{3 \csc (\frac{3 h}{2} ) \sec (\frac{k}{2} )}{16 \cos (k)+8} \biggl(4 \cos \biggl(\frac{k}{2} \biggr) \chi _{m-1,n}-4 \cos \biggl( \frac{k}{2} \biggr) \chi _{m+1,n} \\ &{} +\chi _{m-1,n-1}+\chi _{m-1,n+1}-\chi _{m+1,n-1}- \chi _{m+1,n+1} \biggr), \\ \frac{\partial U_{m, n} }{\partial y} ={}&{-} \frac{3 \sec (\frac{h}{2} ) \csc (\frac{3 k}{2} )}{16 \cos (h)+8} \biggl(4 \cos \biggl( \frac{h}{2} \biggr) \chi _{m,n-1}-4 \cos \biggl( \frac{h}{2} \biggr) \chi _{m,n+1} \\ &{} +\chi _{m-1,n-1}-\chi _{m-1,n+1}+\chi _{m+1,n-1}- \chi _{m+1,n+1} \biggr), \end{aligned} \end{aligned}
(5)
\begin{aligned} &\begin{aligned} \frac{\partial ^{2} U_{m, n} }{\partial x^{2} } ={}& \frac{3 \csc ^{2} (\frac{h}{2} ) \sec (\frac{h}{2} )}{32 (2 \cos (h)+1) (2 \cos (k)+1)} \\ &{}\times \biggl(\sec \biggl(\frac{k}{2} \biggr) \biggl(-8 \cos ^{3} \biggl( \frac{h}{2} \biggr) (\chi _{m,n-1}+\chi _{m,n+1} )+ \bigl(3 \cos (h)+1\bigr) \chi _{m-1,n+1} \\ &{}+\bigl(3 \cos (h)+1\bigr) \chi _{m+1,n-1} \biggr)+\bigl(3 \cos (h)+1\bigr) \sec \biggl( \frac{k}{2} \biggr) \chi _{m-1,n-1} \\ &{}+\bigl(3 \cos (h)+1\bigr) \sec \biggl(\frac{k}{2} \biggr) \chi _{m+1,n+1}+4 \biggl(-8 \cos ^{3} \biggl(\frac{h}{2} \biggr) \chi _{m,n} \\ &{}+\bigl(3 \cos (h)+1\bigr) \chi _{m-1,n}+\bigl(3 \cos (h)+1\bigr) \chi _{m+1,n} \biggr) \biggr), \end{aligned} \end{aligned}
(6)
\begin{aligned} &\begin{aligned} &\frac{\partial ^{2} U_{m, n} }{\partial y^{2} } \\ &\quad= \frac{3}{32 (2 \cos (h)+1) (2 \cos (k)+1)} \biggl(-8 \sec \biggl( \frac{h}{2} \biggr) \cot ^{2} \biggl(\frac{k}{2} \biggr) \chi _{m+1,n} \\ &\qquad{}+\cot ^{2} \biggl(\frac{k}{2} \biggr) \biggl(\sec \biggl( \frac{h}{2} \biggr) \bigl(3 \cos (k)+1\bigr) \sec ^{3} \biggl( \frac{k}{2} \biggr) \biggl(4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n-1} \\ &\qquad{}+\chi _{m-1,n-1}+\chi _{m-1,n+1} \biggr)-8 \sec \biggl( \frac{h}{2} \biggr) \chi _{m-1,n}-32 \chi _{m,n} \biggr)+ \sec \biggl(\frac{h}{2} \biggr) \\ & \qquad{}\times\bigl(3 \cos (k)+1\bigr) \csc ^{2} \biggl(\frac{k}{2} \biggr) \sec \biggl( \frac{k}{2} \biggr) \chi _{m+1,n-1}+\sec \biggl( \frac{h}{2} \biggr) \bigl(3 \cos (k)+1\bigr) \csc ^{2} \\ & \qquad{}\times\biggl(\frac{k}{2} \biggr) \sec \biggl(\frac{k}{2} \biggr) \chi _{m+1,n+1}+4 \bigl(3 \cos (k)+1\bigr) \csc ^{2} \biggl( \frac{k}{2} \biggr) \sec \biggl( \frac{k}{2} \biggr) \chi _{m,n+1} \biggr), \\ &\quad\vdots \end{aligned} \end{aligned}
(7)

The above analysis yields the following theorem.

### Theorem 2

The solution of a two-dimensional DE using the collocation method with basis trigonometric cubic B-spline can be determined by equations (4)(7).

### Three-dimensional trigonometric cubic B-spline

Now we obtain the trigonometric cubic B-spline in three dimensions on a framework divided into components of sides $$h=\Delta x, k=\Delta y, q=\Delta z$$ by the knots $$(x_{m}, y_{n}, z_{r} )$$, $$m=0,1,\ldots,M, n=0,1,\ldots,N, r=0,1,\ldots,R$$. Functions can be interpolated in terms of piecewise trigonometric cubic B-splines: If $$U(x, y, z)$$ is a function of $$x, y$$, and z, then it can be shown that there exists a unique approximation

\begin{aligned} U^{N}(x, y, z)=\sum_{m=-1}^{M+1} \sum_{n=-1}^{N+1}\sum _{r=-1}^{R+1} \chi _{m, n, r} B_{m,n,r} (x,y,z), \end{aligned}
(8)

where $$\chi _{m, n, r}$$ are the trigonometric cubic B-spline amplitudes, and $$B_{m, n, r} (x,y,z)$$ are given by

\begin{aligned} B_{m, n, r} (x,y,z)=\phi _{m} (x) \phi _{n} (y) \phi _{r} (z). \end{aligned}

Also, $$\phi _{m} (x),\phi _{n} (y)$$, and $$\phi _{r} (z)$$ have the same shape as trigonometric cubic B-splines in one dimension. The compositions of $$U_{m,n,r}, \frac{\partial U_{m,n,r} }{\partial x}, \frac{\partial U_{m,n,r} }{\partial y}, \frac{\partial U_{m,n,r} }{\partial z}$$, $$\frac{\partial ^{2} U_{m,n,r} }{\partial x^{2} }, \frac{\partial ^{2} U_{m,n,r} }{\partial y^{2} }, \frac{\partial ^{2} U_{m,n,r} }{\partial z^{2} }, \frac{\partial ^{2} U_{m,n,r} }{\partial x\,\partial y }, \frac{\partial ^{2} U_{m,n,r} }{\partial x\,\partial z }, \dots$$, are given in terms of $$\chi _{m,n,r}$$ by

\begin{aligned} &U_{m, n, r} \\ &\quad= \frac{\sec (\frac{h}{2} ) \sec (\frac{k}{2} )}{8 (2 \cos (h)+1) (2 \cos (k)+1) (2 \cos (q)+1)} \biggl(\sec \biggl(\frac{q}{2} \biggr) \biggl(\chi _{m,n,r-1} \\ &\qquad{}+\chi _{m,n,r+1}+4 \cos \biggl(\frac{h}{2} \biggr) \biggl(4 \cos \biggl(\frac{k}{2} \biggr) \biggl(4 \cos \biggl(\frac{q}{2} \biggr) \chi _{m,n,r} \biggr)+\chi _{m,n+1,r-1} \\ &\qquad{}+4 \cos \biggl(\frac{q}{2} \biggr) \chi _{m,n-1,r}+4 \cos \biggl( \frac{q}{2} \biggr) \chi _{m,n+1,r}+\chi _{m,n-1,r+1}+\chi _{m,n+1,r+1} \biggr) \\ &\qquad{}+4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n-1,r-1}+4 \cos \biggl( \frac{k}{2} \biggr) \biggl(4 \cos \biggl(\frac{q}{2} \biggr) ( \chi _{m-1,n,r}+\chi _{m+1,n,r} ) \\ &\qquad{}+\chi _{m-1,n,r-1}+\chi _{m-1,n,r+1}+\chi _{m+1,n,r-1}+ \chi _{m+1,n,r+1} \biggr)+\chi _{m-1,n-1,r-1} \\ &\qquad{}+\chi _{m-1,n-1,r+1}+\chi _{m-1,n+1,r-1}+\chi _{m-1,n+1,r+1}+\chi _{m+1,n-1,r-1} \\ &\qquad{}+\chi _{m+1,n-1,r+1}+\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1} \biggr)+4 (\chi _{m-1,n-1,r} \\ &\qquad{}+\chi _{m-1,n+1,r}+\chi _{m+1,n-1,r}+\chi _{m+1,n+1,r} ) \biggr), \end{aligned}
(9)
\begin{aligned} & \frac{\partial U_{m,n,r} }{\partial x} \\ &\quad =- \frac{3 \csc (\frac{3 h}{2} ) \sec (\frac{k}{2} ) \sec (\frac{q}{2} )}{16 (2 \cos (k)+1) (2 \cos (q)+1)} \\ &\qquad{}\times \biggl(4 \cos \biggl(\frac{q}{2} \biggr) \biggl(4 \cos \biggl( \frac{k}{2} \biggr) (\chi _{m-1,n,r}-\chi _{m+1,n,r} )+ \chi _{m-1,n+1,r}-\chi _{m+1,n-1,r} \\ &\qquad{}-\chi _{m+1,n+1,r} \biggr)+4 \cos \biggl(\frac{k}{2} \biggr) ( \chi _{m-1,n,r-1}+\chi _{m-1,n,r+1}-\chi _{m+1,n,r-1} \\ &\qquad{}-\chi _{m+1,n,r+1} )+4 \cos \biggl(\frac{q}{2} \biggr) \chi _{m-1,n-1,r}+ \chi _{m-1,n-1,r-1}+\chi _{m-1,n-1,r+1} \\ &\qquad{}+\chi _{m-1,n+1,r-1}+\chi _{m-1,n+1,r+1}-\chi _{m+1,n-1,r-1}-\chi _{m+1,n-1,r+1} \\ &\qquad{}-\chi _{m+1,n+1,r-1}-\chi _{m+1,n+1,r+1} \biggr), \\ & \frac{\partial U_{m,n,r} }{\partial y} \\ &\quad=- \frac{3 \sec (\frac{h}{2} ) \csc (\frac{3 k}{2} ) \sec (\frac{q}{2} )}{16 (2 \cos (h)+1) (2 \cos (q)+1)} \\ & \qquad{}\times\biggl(4 \cos \biggl(\frac{h}{2} \biggr) \biggl(4 \cos \biggl( \frac{q}{2} \biggr) (\chi _{m,n-1,r}-\chi _{m,n+1,r} )+ \chi _{m,n-1,r+1}-\chi _{m,n+1,r-1} \\ &\qquad{}-\chi _{m,n+1,r+1} \biggr)+4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n-1,r-1}+4 \cos \biggl(\frac{q}{2} \biggr) (\chi _{m-1,n-1,r} \\ &\qquad{}-\chi _{m-1,n+1,r}+\chi _{m+1,n-1,r}-\chi _{m+1,n+1,r} )+\chi _{m-1,n-1,r-1}+ \chi _{m-1,n-1,r+1} \\ &\qquad{}-\chi _{m-1,n+1,r-1}-\chi _{m-1,n+1,r+1}+\chi _{m+1,n-1,r-1}+\chi _{m+1,n-1,r+1} \\ &\qquad{}-\chi _{m+1,n+1,r-1}-\chi _{m+1,n+1,r+1} \biggr), \\ &\frac{\partial U_{m,n,r} }{\partial z} \\ &\quad =- \frac{3 \sec (\frac{h}{2} ) \sec (\frac{k}{2} ) \csc (\frac{3 q}{2} )}{16 (2 \cos (h)+1) (2 \cos (k)+1)} \\ &\qquad{}\times \biggl(4 \cos \biggl(\frac{h}{2} \biggr) \biggl(4 \cos \biggl( \frac{k}{2} \biggr) (\chi _{m,n,r-1}-\chi _{m,n,r+1} )+ \chi _{m,n+1,r-1}-\chi _{m,n+1,r+1} \biggr) \\ &\qquad{}+4 \cos \biggl(\frac{h}{2} \biggr) (\chi _{m,n-1,r-1}-\chi _{m,n-1,r+1} )+4 \cos \biggl(\frac{k}{2} \biggr) (\chi _{m-1,n,r-1} \\ &\qquad{}-\chi _{m-1,n,r+1}+\chi _{m+1,n,r-1}-\chi _{m+1,n,r+1} )+\chi _{m-1,n-1,r-1}- \chi _{m-1,n-1,r+1} \\ &\qquad{}+\chi _{m-1,n+1,r-1}-\chi _{m-1,n+1,r+1}+\chi _{m+1,n-1,r-1} \\ &\qquad{}-\chi _{m+1,n-1,r+1}+\chi _{m+1,n+1,r-1}-\chi _{m+1,n+1,r+1} \biggr), \end{aligned}
(10)
\begin{aligned} & \frac{\partial ^{2} U_{m,n,r} }{\partial x\,\partial y } \\ &\quad = \frac{9 \csc (\frac{3 h}{2} ) \csc (\frac{3 k}{2} ) \sec (\frac{q}{2} )}{64 \cos (q)+32} \biggl(4 \cos \biggl(\frac{q}{2} \biggr) \chi _{m-1,n-1,r} \\ &\qquad{}-4 \cos \biggl(\frac{q}{2} \biggr) \chi _{m-1,n+1,r}-4 \cos \biggl( \frac{q}{2} \biggr) \chi _{m+1,n-1,r}+4 \cos \biggl(\frac{q}{2} \biggr) \chi _{m+1,n+1,r} \\ &\qquad{}+\chi _{m-1,n-1,r-1}+\chi _{m-1,n-1,r+1}-\chi _{m-1,n+1,r-1}-\chi _{m-1,n+1,r+1} \\ &\qquad{}-\chi _{m+1,n-1,r-1}-\chi _{m+1,n-1,r+1}+\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1} \biggr), \\ &\frac{\partial ^{2} U_{m,n,r} }{\partial x\,\partial z } \\ &\quad=\frac{9 \csc (\frac{3 h}{2} ) \sec (\frac{k}{2} ) \csc (\frac{3 q}{2} )}{64 \cos (k)+32} \biggl(4 \cos \biggl(\frac{k}{2} \biggr) \chi _{m-1,n,r-1} \\ &\qquad{}-4 \cos \biggl(\frac{k}{2} \biggr) \chi _{m-1,n,r+1}-4 \cos \biggl( \frac{k}{2} \biggr) \chi _{m+1,n,r-1}+4 \cos \biggl(\frac{k}{2} \biggr) \chi _{m+1,n,r+1} \\ &\qquad{}+\chi _{m-1,n-1,r-1}-\chi _{m-1,n-1,r+1}+\chi _{m-1,n+1,r-1}-\chi _{m-1,n+1,r+1} \\ &\qquad{}-\chi _{m+1,n-1,r-1}+\chi _{m+1,n-1,r+1}-\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1} \biggr), \\ & \frac{\partial ^{2} U_{m,n,r} }{\partial y\,\partial z } \\ &\quad = \frac{9 \sec (\frac{h}{2} ) \csc (\frac{3 k}{2} ) \csc (\frac{3 q}{2} )}{64 \cos (h)+32} \biggl(4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n-1,r-1} \\ &\qquad{}-4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n-1,r+1}-4 \cos \biggl( \frac{h}{2} \biggr) \chi _{m,n+1,r-1}+4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n+1,r+1} \\ &\qquad{}+\chi _{m-1,n-1,r-1}-\chi _{m-1,n-1,r+1}-\chi _{m-1,n+1,r-1}+\chi _{m-1,n+1,r+1} \\ &\qquad{}+\chi _{m+1,n-1,r-1}-\chi _{m+1,n-1,r+1}-\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1} \biggr), \\ & \frac{\partial ^{3} U_{m,n,r} }{\partial x\,\partial y\,\partial z } \\ &\quad = \frac{1}{64} (-27) \csc \biggl(\frac{3 h}{2} \biggr) \csc \biggl( \frac{3 k}{2} \biggr) \csc \biggl(\frac{3 q}{2} \biggr) (\chi _{m-1,n-1,r-1} \\ &\qquad{}-\chi _{m-1,n-1,r+1}-\chi _{m-1,n+1,r-1}+\chi _{m-1,n+1,r+1}-\chi _{m+1,n-1,r-1} \\ &\qquad{}+\chi _{m+1,n-1,r+1}+\chi _{m+1,n+1,r-1}-\chi _{m+1,n+1,r+1} ), \\ &\quad{} \vdots \end{aligned}
(11)
\begin{aligned} &\frac{\partial ^{2} U_{m,n,r} }{\partial x^{2} } \\ &\quad = \frac{3 \csc ^{2} (\frac{h}{2} ) \sec (\frac{h}{2} ) \sec (\frac{k}{2} )}{64 (2 \cos (h)+1) (2 \cos (k)+1) (2 \cos (q)+1)} \\ &\qquad{}\times \biggl(\sec \biggl(\frac{q}{2} \biggr) \biggl(-6 \cos \biggl( \frac{h}{2} \biggr) \biggl(4 \cos \biggl(\frac{k}{2} \biggr) ( \chi _{m,n,r-1}+\chi _{m,n,r+1} )+\chi _{m,n+1,r-1} \\ &\qquad{}+\chi _{m,n+1,r+1} \biggr)-2 \cos \biggl(\frac{3 h}{2} \biggr) \biggl(4 \cos \biggl(\frac{k}{2} \biggr) (\chi _{m,n,r-1}+\chi _{m,n,r+1} )+\chi _{m,n+1,r-1} \\ &\qquad{}+\chi _{m,n+1,r+1} \biggr)+3 \cos (h) \biggl(4 \cos \biggl( \frac{k}{2} \biggr) (\chi _{m-1,n,r-1}+\chi _{m-1,n,r+1}+\chi _{m+1,n,r-1} \\ &\qquad{}+\chi _{m+1,n,r+1} )+\chi _{m-1,n+1,r-1}+\chi _{m-1,n+1,r+1}+ \chi _{m+1,n-1,r-1}+\chi _{m+1,n-1,r+1} \\ &\qquad{}+\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1} \biggr)-8 \cos ^{3} \biggl( \frac{h}{2} \biggr) (\chi _{m,n-1,r-1}+\chi _{m,n-1,r+1} ) \\ &\qquad{}+\bigl(3 \cos (h)+1\bigr) \chi _{m-1,n-1,r-1}+\bigl(3 \cos (h)+1\bigr) \chi _{m-1,n-1,r+1}+4 \cos \biggl( \frac{k}{2} \biggr) \\ &\qquad{}\times (\chi _{m-1,n,r-1}+\chi _{m-1,n,r+1}+\chi _{m+1,n,r-1}+\chi _{m+1,n,r+1} )+\chi _{m-1,n+1,r-1} \\ &\qquad{}+\chi _{m-1,n+1,r+1}+\chi _{m+1,n-1,r-1}+\chi _{m+1,n-1,r+1}+\chi _{m+1,n+1,r-1}+ \chi _{m+1,n+1,r+1} \biggr) \\ &\qquad{}+4 \biggl(-8 \cos ^{3} \biggl(\frac{h}{2} \biggr) \biggl(4 \cos \biggl( \frac{k}{2} \biggr) \chi _{m,n,r}+\chi _{m,n-1,r}+ \chi _{m,n+1,r} \biggr)+4 \bigl(3 \cos (h)+1\bigr) \\ &\qquad{}\times\cos \biggl(\frac{k}{2} \biggr) \chi _{m-1,n,r}+12 \cos (h) \cos \biggl(\frac{k}{2} \biggr) \chi _{m+1,n,r}+\bigl(3 \cos (h)+1\bigr) \chi _{m-1,n-1,r} \\ &\qquad{}+3 \cos (h) \chi _{m-1,n+1,r}+3 \cos (h) \chi _{m+1,n-1,r}+3 \cos (h) \chi _{m+1,n+1,r}+4 \cos \biggl(\frac{k}{2} \biggr) \\ &\qquad{}\times\chi _{m+1,n,r}+\chi _{m-1,n+1,r}+\chi _{m+1,n-1,r}+\chi _{m+1,n+1,r} \biggr) \biggr), \end{aligned}
(12)
\begin{aligned} &\frac{\partial ^{2} U_{m,n,r} }{\partial y^{2} } \\ &\quad = \frac{3 \sec (\frac{h}{2} ) \csc ^{2} (\frac{k}{2} ) \sec (\frac{k}{2} ) }{64 (2 \cos (h)+1) (2 \cos (k)+1) (2 \cos (q)+1)} \biggl(\sec \biggl(\frac{q}{2} \biggr) \\ &\qquad{}\times (4 \cos \biggl(\frac{h}{2} \biggr) \biggl(-8 \cos ^{3} \biggl( \frac{k}{2} \biggr) (\chi _{m,n,r-1}+\chi _{m,n,r+1} )+3 \cos (k) \chi _{m,n-1,r-1} \\ &\qquad{}+\bigl(3 \cos (k)+1\bigr) \chi _{m,n-1,r+1}+\bigl(3 \cos (k)+1\bigr) (\chi _{m,n+1,r-1}+ \chi _{m,n+1,r+1} ) \biggr) \\ &\qquad{}+4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n-1,r-1}-8 \cos ^{3} \biggl(\frac{k}{2} \biggr) (\chi _{m-1,n,r-1}+\chi _{m-1,n,r+1} ) \\ &\qquad{}-6 \cos \biggl(\frac{k}{2} \biggr) \chi _{m+1,n,r-1}-6 \cos \biggl( \frac{k}{2} \biggr) \chi _{m+1,n,r+1}+\bigl(3 \cos (k)+1\bigr) \chi _{m-1,n-1,r-1} \\ &\qquad{}+\bigl(3 \cos (k)+1\bigr) \chi _{m-1,n-1,r+1}+3 \cos (k) \chi _{m-1,n+1,r-1}+3 \cos (k) \chi _{m-1,n+1,r+1} \\ &\qquad{}+3 \cos (k) \chi _{m+1,n-1,r-1}+3 \cos (k) \chi _{m+1,n-1,r+1}-2 \cos \biggl( \frac{3 k}{2} \biggr) \chi _{m+1,n,r-1} \\ &\qquad{}-2 \cos \biggl(\frac{3 k}{2} \biggr) \chi _{m+1,n,r+1}+3 \cos (k) \chi _{m+1,n+1,r-1}+3 \cos (k) \chi _{m+1,n+1,r+1} \\ &\qquad{}+\chi _{m-1,n+1,r-1}+\chi _{m-1,n+1,r+1}+\chi _{m+1,n-1,r-1}+\chi _{m+1,n-1,r+1} \\ &\qquad{}+\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1} )+4 \biggl(4 \cos \biggl( \frac{h}{2} \biggr) \biggl(-8 \cos ^{3} \biggl(\frac{k}{2} \biggr) \chi _{m,n,r} \\ &\qquad{}+\bigl(3 \cos (k)+1\bigr) \chi _{m,n-1,r}+\bigl(3 \cos (k)+1\bigr) \chi _{m,n+1,r} \biggr)-8 \cos ^{3} \biggl(\frac{k}{2} \biggr) \chi _{m-1,n,r} \\ &\qquad{}-6 \cos \biggl(\frac{k}{2} \biggr) \chi _{m+1,n,r}+\bigl(3 \cos (k)+1\bigr) \chi _{m-1,n-1,r}+3 \cos (k) \chi _{m-1,n+1,r} \\ &\qquad{}+3 \cos (k) \chi _{m+1,n-1,r}-2 \cos \biggl(\frac{3 k}{2} \biggr) \chi _{m+1,n,r}+3 \cos (k) \chi _{m+1,n+1,r} \\ &\qquad{} +\chi _{m-1,n+1,r}+\chi _{m+1,n-1,r}+\chi _{m+1,n+1,r} \biggr) \biggr), \end{aligned}
(13)
\begin{aligned} & \frac{\partial ^{2} U_{m,n,r} }{\partial z^{2} } \\ &\quad = \frac{3 \sec (\frac{h}{2} ) \sec (\frac{k}{2} ) \cot ^{2} (\frac{q}{2} )}{32 (2 \cos (h)+1) (2 \cos (k)+1) (2 \cos (q)+1)} (-4 \cos \biggl(\frac{h}{2} \biggr) \sec ^{3} \biggl(\frac{q}{2} \biggr) \\ &\qquad {}\times\biggl(4 \cos \biggl(\frac{k}{2} \biggr) (\chi _{m,n,r-1}+\chi _{m,n,r+1} )+\chi _{m,n-1,r-1}+\chi _{m,n-1,r+1}+\chi _{m,n+1,r-1} \\ &\qquad{}+\chi _{m,n+1,r+1} \biggr)+3 \sec \biggl(\frac{q}{2} \biggr) \biggl(4 \cos \biggl(\frac{h}{2} \biggr) \biggl(4 \cos \biggl(\frac{k}{2} \biggr) (\chi _{m,n,r-1}+\chi _{m,n,r+1} ) \\ &\qquad{}+\chi _{m,n+1,r-1}+\chi _{m,n+1,r+1} \biggr)+4 \cos \biggl( \frac{h}{2} \biggr) (\chi _{m,n-1,r-1}+\chi _{m,n-1,r+1} ) \\ &\qquad{}+4 \cos \biggl(\frac{k}{2} \biggr) (\chi _{m-1,n,r-1}+\chi _{m-1,n,r+1}+ \chi _{m+1,n,r-1}+\chi _{m+1,n,r+1} ) \\ &\qquad{}+\chi _{m-1,n-1,r-1}+\chi _{m-1,n-1,r+1}+\chi _{m-1,n+1,r-1}+\chi _{m-1,n+1,r+1}+ \chi _{m+1,n-1,r-1} \\ &\qquad {}+\chi _{m+1,n-1,r+1}+\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1} \biggr)-16 \cos \biggl(\frac{h}{2} \biggr) \biggl(4 \cos \biggl(\frac{k}{2} \biggr) \\ &\qquad{}\times\chi _{m,n,r}+\chi _{m,n-1,r}+\chi _{m,n+1,r} \biggr)-4 \cos \biggl( \frac{k}{2} \biggr) \sec ^{3} \biggl(\frac{q}{2} \biggr) (\chi _{m-1,n,r-1}+ \chi _{m-1,n,r+1} \\ &\qquad{}+\chi _{m+1,n,r-1}+\chi _{m+1,n,r+1} )-16 \cos \biggl( \frac{k}{2} \biggr) (\chi _{m-1,n,r}+\chi _{m+1,n,r} )- \sec ^{3} \biggl( \frac{q}{2} \biggr) \\ &\qquad{}\times (\chi _{m-1,n-1,r-1}+\chi _{m-1,n-1,r+1}+\chi _{m-1,n+1,r-1}+ \chi _{m-1,n+1,r+1}+\chi _{m+1,n-1,r-1} \\ &\qquad{}+\chi _{m+1,n-1,r+1}+\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1} )-4 (\chi _{m-1,n-1,r}+\chi _{m-1,n+1,r} \\ &\qquad{}+\chi _{m+1,n-1,r}+\chi _{m+1,n+1,r} ) ), \end{aligned}
(14)
\begin{aligned} & \frac{\partial ^{3} U_{m,n,r} }{\partial x^{2}\,\partial y } \\ &\quad = \frac{9 \csc ^{2} (\frac{h}{2} ) \sec (\frac{h}{2} ) \csc (\frac{3 k}{2} ) \sec (\frac{q}{2} )}{128 (2 \cos (h)+1) (2 \cos (q)+1)} (-4 \bigl(3 \cos (h)+1\bigr) \\ & \qquad{}\times\cos \biggl(\frac{q}{2} \biggr) \chi _{m-1,n-1,r}+6 \cos \biggl(h+ \frac{q}{2} \biggr) \chi _{m-1,n+1,r}+6 \cos \biggl(h-\frac{q}{2} \biggr) \chi _{m-1,n+1,r} \\ &\qquad{}+12 \cos \biggl(\frac{h-q}{2} \biggr) \chi _{m,n-1,r}+12 \cos \biggl( \frac{h+q}{2} \biggr) \chi _{m,n-1,r}+4 \cos \biggl(\frac{1}{2} (3 h-q) \biggr) \\ &\qquad{}\times \chi _{m,n-1,r}+4 \cos \biggl(\frac{1}{2} (3 h+q) \biggr) \chi _{m,n-1,r}-12 \cos \biggl(\frac{h-q}{2} \biggr) \chi _{m,n+1,r} \\ &\qquad{}-12 \cos \biggl(\frac{h+q}{2} \biggr) \chi _{m,n+1,r}-4 \cos \biggl( \frac{1}{2} (3 h-q) \biggr) \chi _{m,n+1,r}-4 \cos \biggl( \frac{1}{2} (3 h+q) \biggr) \\ &\qquad{}\times \chi _{m,n+1,r}-6 \cos \biggl(h+\frac{q}{2} \biggr) \chi _{m+1,n-1,r}-6 \cos \biggl(h-\frac{q}{2} \biggr) \chi _{m+1,n-1,r} \\ &\qquad{}+6 \cos \biggl(h+\frac{q}{2} \biggr) \chi _{m+1,n+1,r}+6 \cos \biggl(h- \frac{q}{2} \biggr) \chi _{m+1,n+1,r}-\bigl(3 \cos (h)+1\bigr) \\ &\qquad{}\times \chi _{m-1,n-1,r-1}-3 \cos (h) \chi _{m-1,n-1,r+1}+3 \cos (h) \chi _{m-1,n+1,r-1} \\ &\qquad{}+3 \cos (h) \chi _{m-1,n+1,r+1}+6 \cos \biggl( \frac{h}{2} \biggr) \chi _{m,n-1,r-1}+2 \cos \biggl( \frac{3 h}{2} \biggr) \chi _{m,n-1,r-1} \\ &\qquad{}+6 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n-1,r+1}+2 \cos \biggl( \frac{3 h}{2} \biggr) \chi _{m,n-1,r+1}-6 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n+1,r-1} \\ &\qquad{}-2 \cos \biggl(\frac{3 h}{2} \biggr) \chi _{m,n+1,r-1}-6 \cos \biggl( \frac{h}{2} \biggr) \chi _{m,n+1,r+1}-2 \cos \biggl(\frac{3 h}{2} \biggr) \chi _{m,n+1,r+1} \\ &\qquad{}-3 \cos (h) \chi _{m+1,n-1,r-1}-3 \cos (h) \chi _{m+1,n-1,r+1}+3 \cos (h) \chi _{m+1,n+1,r-1} \\ &\qquad{}+3 \cos (h) \chi _{m+1,n+1,r+1}+4 \cos \biggl(\frac{q}{2} \biggr) \chi _{m-1,n+1,r}-4 \cos \biggl(\frac{q}{2} \biggr) \chi _{m+1,n-1,r} \\ &\qquad{}+4 \cos \biggl(\frac{q}{2} \biggr) \chi _{m+1,n+1,r}-\chi _{m-1,n-1,r+1}+ \chi _{m-1,n+1,r-1}+\chi _{m-1,n+1,r+1} \\ &\qquad{}-\chi _{m+1,n-1,r-1}-\chi _{m+1,n-1,r+1}+\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1} ), \\ &\frac{\partial ^{3} U_{m,n,r} }{\partial x\,\partial y^{2} } \\ &\quad= \frac{9 \csc (\frac{3 h}{2} ) \csc ^{2} (\frac{k}{2} ) \sec (\frac{k}{2} ) \sec (\frac{q}{2} )}{128 (2 \cos (h)+1) (2 \cos (q)+1)128 (2 \cos (k)+1) (2 \cos (q)+1)} \\ &\qquad{}\times (-4 \bigl(3 \cos (k)+1\bigr) \cos \biggl(\frac{q}{2} \biggr) \chi _{m-1,n-1,r}+12 \cos \biggl(\frac{k-q}{2} \biggr) \chi _{m-1,n,r} \\ &\qquad{}+12 \cos \biggl(\frac{k+q}{2} \biggr) \chi _{m-1,n,r}+4 \cos \biggl( \frac{1}{2} (3 k-q) \biggr) \chi _{m-1,n,r}+4 \cos \biggl( \frac{1}{2} (3 k+q) \biggr) \\ &\qquad{}\times \chi _{m-1,n,r}-6 \cos \biggl(k+\frac{q}{2} \biggr) \chi _{m-1,n+1,r}-6 \cos \biggl(k-\frac{q}{2} \biggr) \chi _{m-1,n+1,r} \\ &\qquad{}+6 \cos \biggl(k+\frac{q}{2} \biggr) \chi _{m+1,n-1,r}+6 \cos \biggl(k- \frac{q}{2} \biggr) \chi _{m+1,n-1,r}-12 \cos \biggl( \frac{k-q}{2} \biggr) \\ &\qquad{}\times \chi _{m+1,n,r}-12 \cos \biggl(\frac{k+q}{2} \biggr) \chi _{m+1,n,r}-4 \cos \biggl(\frac{1}{2} (3 k-q) \biggr) \chi _{m+1,n,r} \\ &\qquad{}-4 \cos \biggl(\frac{1}{2} (3 k+q) \biggr) \chi _{m+1,n,r}+6 \cos \biggl(k+\frac{q}{2} \biggr) \chi _{m+1,n+1,r}+6 \cos \biggl(k- \frac{q}{2} \biggr) \\ &\qquad {}\times\chi _{m+1,n+1,r}-\bigl(3 \cos (k)+1\bigr) \chi _{m-1,n-1,r-1}-3 \cos (k) \chi _{m-1,n-1,r+1} \\ &\qquad{}+6 \cos \biggl(\frac{k}{2} \biggr) \chi _{m-1,n,r-1}+2 \cos \biggl( \frac{3 k}{2} \biggr) \chi _{m-1,n,r-1}+6 \cos \biggl(\frac{k}{2} \biggr) \chi _{m-1,n,r+1} \\ &\qquad{}+2 \cos \biggl(\frac{3 k}{2} \biggr) \chi _{m-1,n,r+1}-3 \cos (k) \chi _{m-1,n+1,r-1}-3 \cos (k) \chi _{m-1,n+1,r+1} \\ &\qquad{}+3 \cos (k) \chi _{m+1,n-1,r-1}+3 \cos (k) \chi _{m+1,n-1,r+1}-6 \cos \biggl( \frac{k}{2} \biggr) \chi _{m+1,n,r-1} \\ &\qquad{}-2 \cos \biggl(\frac{3 k}{2} \biggr) \chi _{m+1,n,r-1}-6 \cos \biggl( \frac{k}{2} \biggr) \chi _{m+1,n,r+1}-2 \cos \biggl(\frac{3 k}{2} \biggr) \chi _{m+1,n,r+1} \\ &\qquad{}+3 \cos (k) \chi _{m+1,n+1,r-1}+3 \cos (k) \chi _{m+1,n+1,r+1}-4 \cos \biggl( \frac{q}{2} \biggr) \chi _{m-1,n+1,r} \\ &\qquad{}+4 \cos \biggl(\frac{q}{2} \biggr) \chi _{m+1,n-1,r}+4 \cos \biggl( \frac{q}{2} \biggr) \chi _{m+1,n+1,r}-\chi _{m-1,n-1,r+1} \\ &\qquad{}-\chi _{m-1,n+1,r-1}-\chi _{m-1,n+1,r+1}+\chi _{m+1,n-1,r-1} \\ &\qquad{}+\chi _{m+1,n-1,r+1}+\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1} ), \end{aligned}
(15)
\begin{aligned} & \frac{\partial ^{3} U_{m,n,r} }{\partial x^{2}\,\partial z } \\ &\quad = \frac{9 \csc ^{2} (\frac{h}{2} ) \sec (\frac{h}{2} ) \sec (\frac{k}{2} ) \csc (\frac{3 q}{2} )}{128 (2 \cos (h)+1) (2 \cos (k)+1)} (-6 \cos \biggl(h+\frac{k}{2} \biggr) \chi _{m-1,n,r-1} \\ &\qquad{}-6 \cos \biggl(h-\frac{k}{2} \biggr) \chi _{m-1,n,r-1}+6 \cos \biggl(h+ \frac{k}{2} \biggr) \chi _{m-1,n,r+1}+6 \cos \biggl(h- \frac{k}{2} \biggr) \\ &\qquad{}\times\chi _{m-1,n,r+1}+12 \cos \biggl(\frac{h-k}{2} \biggr) \chi _{m,n,r-1}+12 \cos \biggl(\frac{h+k}{2} \biggr) \chi _{m,n,r-1} \\ &\qquad{}+4 \cos \biggl(\frac{1}{2} (3 h-k) \biggr) \chi _{m,n,r-1}+4 \cos \biggl(\frac{1}{2} (3 h+k) \biggr) \chi _{m,n,r-1}-12 \cos \biggl( \frac{h-k}{2} \biggr) \\ &\qquad{}\times\chi _{m,n,r+1}-12 \cos \biggl(\frac{h+k}{2} \biggr) \chi _{m,n,r+1}-4 \cos \biggl(\frac{1}{2} (3 h-k) \biggr) \chi _{m,n,r+1} \\ &\qquad{}-4 \cos \biggl(\frac{1}{2} (3 h+k) \biggr) \chi _{m,n,r+1}-6 \cos \biggl(h+\frac{k}{2} \biggr) \chi _{m+1,n,r-1}-6 \cos \biggl(h- \frac{k}{2} \biggr) \\ &\qquad{}\times\chi _{m+1,n,r-1}+6 \cos \biggl(h+\frac{k}{2} \biggr) \chi _{m+1,n,r+1}+6 \cos \biggl(h-\frac{k}{2} \biggr) \chi _{m+1,n,r+1} \\ &\qquad{}-\bigl(3 \cos (h)+1\bigr) \chi _{m-1,n-1,r-1}+\bigl(3 \cos (h)+1\bigr) \chi _{m-1,n-1,r+1}-3 \cos (h) \\ &\qquad{}\times\chi _{m-1,n+1,r-1}+3 \cos (h) \chi _{m-1,n+1,r+1}+6 \cos \biggl( \frac{h}{2} \biggr) \chi _{m,n-1,r-1}+2 \cos \biggl(\frac{3 h}{2} \biggr) \\ &\qquad{}\times \chi _{m,n-1,r-1}-6 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n-1,r+1}-2 \cos \biggl(\frac{3 h}{2} \biggr) \chi _{m,n-1,r+1}+6 \cos \biggl( \frac{h}{2} \biggr) \\ &\qquad {}\times\chi _{m,n+1,r-1}+2 \cos \biggl(\frac{3 h}{2} \biggr) \chi _{m,n+1,r-1}-6 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n+1,r+1}-2 \cos \biggl( \frac{3 h}{2} \biggr) \\ &\qquad{}\times\chi _{m,n+1,r+1}-3 \cos (h) \chi _{m+1,n-1,r-1}+3 \cos (h) \chi _{m+1,n-1,r+1}-3 \cos (h) \\ &\qquad{}\times\chi _{m+1,n+1,r-1}+3 \cos (h) \chi _{m+1,n+1,r+1}-4 \cos \biggl( \frac{k}{2} \biggr) \chi _{m-1,n,r-1}+4 \cos \biggl(\frac{k}{2} \biggr) \\ &\qquad{}\times \chi _{m-1,n,r+1}-4 \cos \biggl(\frac{k}{2} \biggr) \chi _{m+1,n,r-1}+4 \cos \biggl(\frac{k}{2} \biggr) \chi _{m+1,n,r+1} \\ &\qquad{}-\chi _{m-1,n+1,r-1}+\chi _{m-1,n+1,r+1}-\chi _{m+1,n-1,r-1}+\chi _{m+1,n-1,r+1} \\ &\qquad{}-\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1} ), \\ &\frac{\partial ^{3} U_{m,n,r} }{\partial x\,\partial z^{2} } \\ &\quad = \frac{9 \csc (\frac{3 h}{2} ) \sec (\frac{k}{2} ) \csc ^{2} (\frac{q}{2} ) \sec (\frac{q}{2} )}{128 (2 \cos (k)+1) (2 \cos (q)+1)} (8 \cos \biggl(\frac{k}{2} \biggr) \cos ^{3} \biggl(\frac{q}{2} \biggr) \chi _{m-1,n,r} \\ &\qquad{}-8 \cos \biggl(\frac{k}{2} \biggr) \cos ^{3} \biggl( \frac{q}{2} \biggr) \chi _{m+1,n,r}+24 \cos \biggl(\frac{k}{2} \biggr) \cos \biggl(\frac{q}{2} \biggr) \chi _{m-1,n,r} \\ &\qquad{} -24 \cos \biggl(\frac{k}{2} \biggr) \cos \biggl(\frac{q}{2} \biggr) \chi _{m+1,n,r}-12 \cos \biggl(\frac{k}{2} \biggr) \cos (q) \chi _{m-1,n,r-1} \\ &\qquad{}-12 \cos \biggl(\frac{k}{2} \biggr) \cos (q) \chi _{m-1,n,r+1}+12 \cos \biggl(\frac{k}{2} \biggr) \cos (q) \chi _{m+1,n,r-1} \\ &\qquad{} +12 \cos \biggl(\frac{k}{2} \biggr) \cos (q) \chi _{m+1,n,r+1}-6 \sin (k) \csc \biggl(\frac{k}{2} \biggr) \sin \biggl(\frac{q}{2} \biggr) \sin (q) \chi _{m-1,n,r} \\ &\qquad{}+6 \sin (k) \csc \biggl(\frac{k}{2} \biggr) \sin \biggl( \frac{q}{2} \biggr) \sin (q) \chi _{m+1,n,r}-4 \cos \biggl( \frac{k}{2} \biggr) \chi _{m-1,n,r-1} \\ &\qquad{} -4 \cos \biggl(\frac{k}{2} \biggr) \chi _{m-1,n,r+1}+4 \cos \biggl( \frac{k}{2} \biggr) \chi _{m+1,n,r-1}+4 \cos \biggl(\frac{k}{2} \biggr) \\ &\chi _{m+1,n,r+1}-3 \sin \biggl( \frac{q}{2} \biggr) \sin (q) \chi _{m-1,n+1,r}+3 \sin \biggl( \frac{q}{2} \biggr) \sin (q) \chi _{m+1,n-1,r} \\ &\qquad{}+3 \sin \biggl(\frac{q}{2} \biggr) \sin (q) \chi _{m+1,n+1,r}+8 \cos ^{3} \biggl(\frac{q}{2} \biggr) \chi _{m-1,n-1,r}+2 \cos ^{3} \biggl(\frac{q}{2} \biggr) \chi _{m-1,n+1,r} \\ &\qquad{}-2 \cos ^{3} \biggl(\frac{q}{2} \biggr) \chi _{m+1,n-1,r}-2 \cos ^{3} \biggl(\frac{q}{2} \biggr) \chi _{m+1,n+1,r}+6 \cos \biggl( \frac{q}{2} \biggr) \chi _{m-1,n+1,r} \\ &\qquad{}-6 \cos \biggl(\frac{q}{2} \biggr) \chi _{m+1,n-1,r}-6 \cos \biggl( \frac{q}{2} \biggr) \chi _{m+1,n+1,r}-\bigl(3 \cos (q)+1\bigr) \chi _{m-1,n-1,r-1} \\ &\qquad{}-3 \cos (q) \chi _{m-1,n-1,r+1}-3 \cos (q) \chi _{m-1,n+1,r-1}-3 \cos (q) \chi _{m-1,n+1,r+1} \\ &\qquad{}+3 \cos (q) \chi _{m+1,n-1,r-1}+3 \cos (q) \chi _{m+1,n-1,r+1}+3 \cos (q) \chi _{m+1,n+1,r-1} \\ &\qquad{}+3 \cos (q) \chi _{m+1,n+1,r+1}-\chi _{m-1,n-1,r+1}-\chi _{m-1,n+1,r-1}- \chi _{m-1,n+1,r+1} \\ &\qquad{}+\chi _{m+1,n-1,r-1}+\chi _{m+1,n-1,r+1}+\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1} ), \\ & \frac{\partial ^{3} U_{m,n,r} }{\partial y^{2}\,\partial z } \\ &\quad= \frac{9 \sec (\frac{h}{2} ) \csc ^{2} (\frac{k}{2} ) \sec (\frac{k}{2} ) \csc (\frac{3 q}{2} )}{128 (2 \cos (h)+1) (2 \cos (k)+1)}-6 \cos \biggl(\frac{h}{2}+k \biggr) \chi _{m,n-1,r-1} \\ &\qquad{}-6 \cos \biggl(\frac{1}{2} (h-2 k) \biggr) \chi _{m,n-1,r-1}+6 \cos \biggl(\frac{h}{2}+k \biggr) \chi _{m,n-1,r+1} \\ &\qquad{}+6 \cos \biggl(\frac{1}{2} (h-2 k) \biggr) \chi _{m,n-1,r+1}+12 \cos \biggl(\frac{h-k}{2} \biggr) \chi _{m,n,r-1} \\ &\qquad{}+12 \cos \biggl(\frac{h+k}{2} \biggr) \chi _{m,n,r-1}+4 \cos \biggl( \frac{1}{2} (h+3 k) \biggr) \chi _{m,n,r-1} \\ &\qquad{}+4 \cos \biggl(\frac{1}{2} (h-3 k) \biggr) \chi _{m,n,r-1}-12 \cos \biggl(\frac{h-k}{2} \biggr) \chi _{m,n,r+1} \\ &\qquad{}-12 \cos \biggl(\frac{h+k}{2} \biggr) \chi _{m,n,r+1}-4 \cos \biggl( \frac{1}{2} (h+3 k) \biggr) \chi _{m,n,r+1} \\ &\qquad{}-4 \cos \biggl(\frac{1}{2} (h-3 k) \biggr) \chi _{m,n,r+1}-6 \cos \biggl(\frac{h}{2}+k \biggr) \chi _{m,n+1,r-1} \\ &\qquad{}-6 \cos \biggl(\frac{1}{2} (h-2 k) \biggr) \chi _{m,n+1,r-1}+6 \cos \biggl(\frac{h}{2}+k \biggr) \chi _{m,n+1,r+1} \\ &\qquad{}+6 \cos \biggl(\frac{1}{2} (h-2 k) \biggr) \chi _{m,n+1,r+1}-4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n-1,r-1} \\ &\qquad{}+4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n-1,r+1}-4 \cos \biggl( \frac{h}{2} \biggr) \chi _{m,n+1,r-1}+4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n+1,r+1} \\ &\qquad{}-\bigl(3 \cos (k)+1\bigr) \chi _{m-1,n-1,r-1}+\bigl(3 \cos (k)+1\bigr) \chi _{m-1,n-1,r+1} \\ &\qquad{}+6 \cos \biggl(\frac{k}{2} \biggr) \chi _{m-1,n,r-1}+2 \cos \biggl( \frac{3 k}{2} \biggr) \chi _{m-1,n,r-1}-6 \cos \biggl(\frac{k}{2} \biggr) \chi _{m-1,n,r+1} \\ &\qquad{}-2 \cos \biggl(\frac{3 k}{2} \biggr) \chi _{m-1,n,r+1}-3 \cos (k) \chi _{m-1,n+1,r-1}+3 \cos (k) \chi _{m-1,n+1,r+1} \\ &\qquad{}-3 \cos (k) \chi _{m+1,n-1,r-1}+3 \cos (k) \chi _{m+1,n-1,r+1}+6 \cos \biggl( \frac{k}{2} \biggr) \chi _{m+1,n,r-1} \\ &\qquad{}+2 \cos \biggl(\frac{3 k}{2} \biggr) \chi _{m+1,n,r-1}-6 \cos \biggl( \frac{k}{2} \biggr) \chi _{m+1,n,r+1}-2 \cos \biggl(\frac{3 k}{2} \biggr) \chi _{m+1,n,r+1} \\ &\qquad{}-3 \cos (k) \chi _{m+1,n+1,r-1}+3 \cos (k) \chi _{m+1,n+1,r+1} \\ &\qquad{}-\chi _{m-1,n+1,r-1}+ \chi _{m-1,n+1,r+1} \\ &\qquad{}-\chi _{m+1,n-1,r-1}+\chi _{m+1,n-1,r+1}-\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1}, \\ &\frac{\partial ^{3} U_{m,n,r} }{\partial y\,\partial z^{2} } \\ &\quad = \frac{9 \sec (\frac{h}{2} ) \csc (\frac{3 k}{2} ) \csc ^{2} (\frac{q}{2} ) \sec (\frac{q}{2} )}{(128 (1 + 2 \operatorname{Cos}[h]) (1 + 2 \operatorname{Cos}[q]))}8 \cos \biggl(\frac{h}{2} \biggr) \cos ^{3} \biggl(\frac{q}{2} \biggr) \chi _{m,n-1,r} \\ &\qquad{}-8 \cos \biggl(\frac{h}{2} \biggr) \cos ^{3} \biggl( \frac{q}{2} \biggr) \chi _{m,n+1,r}+24 \cos \biggl(\frac{h}{2} \biggr) \cos \biggl(\frac{q}{2} \biggr) \chi _{m,n-1,r} \\ &\qquad{}-24 \cos \biggl(\frac{h}{2} \biggr) \cos \biggl(\frac{q}{2} \biggr) \chi _{m,n+1,r}-12 \cos \biggl(\frac{h}{2} \biggr) \cos (q) \chi _{m,n-1,r-1} \\ &\qquad{}-12 \cos \biggl(\frac{h}{2} \biggr) \cos (q) \chi _{m,n-1,r+1}+12 \cos \biggl(\frac{h}{2} \biggr) \cos (q) \chi _{m,n+1,r-1} \\ &\qquad{}+12 \cos \biggl(\frac{h}{2} \biggr) \cos (q) \chi _{m,n+1,r+1}-6 \sin (h) \csc \biggl(\frac{h}{2} \biggr) \sin \biggl(\frac{q}{2} \biggr) \sin (q) \chi _{m,n-1,r} \\ &\qquad{}+6 \sin (h) \csc \biggl(\frac{h}{2} \biggr) \sin \biggl( \frac{q}{2} \biggr) \sin (q) \chi _{m,n+1,r}-4 \cos \biggl( \frac{h}{2} \biggr) \chi _{m,n-1,r-1} \\ &\qquad{}-4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n-1,r+1}+4 \cos \biggl( \frac{h}{2} \biggr) \chi _{m,n+1,r-1}+4 \cos \biggl(\frac{h}{2} \biggr) \chi _{m,n+1,r+1} \\ &\qquad{}+3 \sin \biggl(\frac{q}{2} \biggr) \sin (q) \chi _{m-1,n+1,r}-3 \sin \biggl(\frac{q}{2} \biggr) \sin (q) \chi _{m+1,n-1,r} \\ &\qquad{}+3 \sin \biggl(\frac{q}{2} \biggr) \sin (q) \chi _{m+1,n+1,r}+8 \cos ^{3} \biggl(\frac{q}{2} \biggr) \chi _{m-1,n-1,r}-2 \cos ^{3} \biggl(\frac{q}{2} \biggr) \chi _{m-1,n+1,r} \\ &\qquad{}+2 \cos ^{3} \biggl(\frac{q}{2} \biggr) \chi _{m+1,n-1,r}-2 \cos ^{3} \biggl(\frac{q}{2} \biggr) \chi _{m+1,n+1,r}-6 \cos \biggl( \frac{q}{2} \biggr) \chi _{m-1,n+1,r} \\ &\qquad{}+6 \cos \biggl(\frac{q}{2} \biggr) \chi _{m+1,n-1,r}-6 \cos \biggl( \frac{q}{2} \biggr) \chi _{m+1,n+1,r}-\bigl(3 \cos (q)+1\bigr) \chi _{m-1,n-1,r-1} \\ &\qquad{}-3 \cos (q) \chi _{m-1,n-1,r+1}+3 \cos (q) \chi _{m-1,n+1,r-1}+3 \cos (q) \chi _{m-1,n+1,r+1} \\ &\qquad{}-3 \cos (q) \chi _{m+1,n-1,r-1}-3 \cos (q) \chi _{m+1,n-1,r+1}+3 \cos (q) \chi _{m+1,n+1,r-1} \\ &\qquad{}+3 \cos (q) \chi _{m+1,n+1,r+1}-\chi _{m-1,n-1,r+1}+\chi _{m-1,n+1,r-1}+ \chi _{m-1,n+1,r+1} \\ &\qquad{}-\chi _{m+1,n-1,r-1}-\chi _{m+1,n-1,r+1}+\chi _{m+1,n+1,r-1}+\chi _{m+1,n+1,r+1}, \\ & \quad\vdots \end{aligned}
(16)

The above analysis yields the following theorem.

### Theorem 3

The solution of a three-dimensional DE using the collocation method with basis trigonometric cubic B-spline can be determined by equations (9)(16).

## The error estimates

### Lemma 1

Suppose that Û is an estimation of smoothness class $$C^{2}$$. At that point the error gauges of the insertion on a square work of side h are

\begin{aligned} &\Vert U-\hat{U} \Vert \leq \beta _{0} h^{4},\qquad \biggl\Vert \frac{\partial U}{\partial x}-\frac{\partial \hat{U}}{\partial x} \biggr\Vert \leq \beta _{1} h^{3},\\ & \biggl\Vert \frac{\partial U}{\partial z}- \frac{\partial \hat{U}}{\partial z} \biggr\Vert \leq \beta _{2} h^{3},\qquad \biggl\Vert \frac{\partial U}{\partial y}-\frac{\partial \hat{U}}{\partial y} \biggr\Vert \leq \beta _{3} h^{3}, \\ &\biggl\Vert \frac{\partial ^{2} U}{\partial x^{2}}- \frac{\partial ^{2} \hat{U}}{\partial x^{2}} \biggr\Vert \leq \beta _{4} h^{2},\qquad \biggl\Vert \frac{\partial ^{2} U}{\partial y^{2}}- \frac{\partial ^{2} \hat{U}}{\partial y^{2}} \biggr\Vert \leq \beta _{5} h^{2},\qquad \biggl\Vert \frac{\partial ^{2} U}{\partial z^{2}}- \frac{\partial ^{2} \hat{U}}{\partial z^{2}} \biggr\Vert \leq \beta _{6} h^{2}, \\ &\biggl\Vert \frac{\partial ^{2} U}{\partial x\,\partial y}- \frac{\partial ^{2} \hat{U}}{\partial x\,\partial y} \biggr\Vert \leq \beta _{7} h^{2},\qquad \biggl\Vert \frac{\partial ^{2} U}{\partial x\,\partial z}- \frac{\partial ^{2} \hat{U}}{\partial x\,\partial z} \biggr\Vert \leq \beta _{8} h^{2},\qquad \biggl\Vert \frac{\partial ^{2} U}{\partial y\,\partial z}- \frac{\partial ^{2} \hat{U}}{\partial y\,\partial z} \biggr\Vert \leq \beta _{9} h^{2}, \end{aligned}

where $$\beta _{i}$$ are constants.

For a proof of the lemma, see .

## The numerical outcomes

Presently, we must know whether this method, developed by presenting its constructions in different dimensions, is accurate and effective or not. To prove that this method is of high accuracy, we present in this section various numerical examples in different dimensions. We also show some figures of the results obtained in addition to comparison of our results with preexisting results.

The first test problem . We take the first test problem in the two dimensions in the form

\begin{aligned} \begin{aligned} &u_{xx}(x,y)+u_{yy}(x,y)+u_{x}(x,y)+u_{y}(x,y)-3 e^{2 x+3 y} \bigl(x^{2} \bigl(18y^{2}-4y-5\bigr) \\ &\quad{}+x \bigl(5-8y^{2} -6y\bigr)\bigr)-3 y^{2}+3y)=0,\quad x,y\in [a,b]. \end{aligned} \end{aligned}
(17)

The exact solution to this problem is

\begin{aligned} \begin{aligned} u(x,y)=3 e^{2 x+3y} \bigl(x-x^{2}\bigr) \bigl(y-y^{2}\bigr). \end{aligned} \end{aligned}
(18)

We take the boundary conditions to the first problem of the form

\begin{aligned} \begin{aligned} u(a,y)=u(x,a)=\alpha,\qquad u(b,y)=u(x,b)= \beta. \end{aligned} \end{aligned}
(19)

By substitution of (4)–(7) into (17) with (19) we obtain the numerical results presented Table 1.

We compared the exact solutions with the results of the two-dimensional trigonometric cubic B-spline technique using a mesh divided into $$50 \times 50$$ in Table 1. Figures 1 and 2 display the numerical results with exact results at $$y=0.5$$ and $$x=0.5$$, respectively. A three-dimensional graph for numerical results is shown in Fig. 3.

MHD duct flow is the second test issue [79, 15]. We take the cross-section of a rectangular duct. The duct is 2a wide and 2b tall, and both sides have the equations $$x = \pm a$$ and $$y = \pm b$$. A conducting fluid flows through the duct in the z direction while being exposed to a constant applied magnetic field M that operates in the xy plane and creates an angle ϕ with the y axis. In the standardized form [7, 14] the equations governing the flow can be expressed as

\begin{aligned} \frac{ \partial P}{\partial z}=\mu \nu \nabla ^{2}\nabla _{z}+ \frac{A_{0x}}{\mu _{0}}\frac{ \partial P_{z}}{\partial x'}+ \frac{A_{0y}}{\mu _{0}} \frac{ \partial P_{z}}{\partial y'}, \end{aligned}
(20)

and the curl of Ohm’s law z-component as

\begin{aligned} \nabla ^{2}A_{z}+\xi \mu _{0} \biggl(A_{0x} \frac{ \partial U_{z}}{\partial x'}+A_{0y} \frac{ \partial U_{z}}{\partial y'} \biggr)=0 \end{aligned}
(21)

with the boundary conditions: $$U = A = 0$$ at $$x' = \pm \alpha, y' = \pm b$$, where ν, μ, and ξ, respectively, denote the fluid kinematic viscosity, density, and electric conductivity. The magnetic permeability in vacuum is $$\mu _{0}$$, the constant axial pressure gradient is $$dP/dz$$, the applied magnetic field $$x'$$ and $$y'$$ components are $$B_{0x}$$ and $$B_{0y}$$, respectively, and the velocity and induced magnetic field z components are $$U_{z}$$ and $$A_{z}$$, respectively. Equations (20) and (21)take on a dimensionless form following the notation of Lu , who used the Kantorovieh method to solve this problem:

\begin{aligned} \begin{aligned} \biggl(\frac{\partial ^{2}}{\partial x^{2}}+ \frac{\partial ^{2}}{\partial y^{2}}\biggr)U+M_{x} \frac{\partial A}{\partial x}+M_{y} \frac{\partial A}{\partial y}=-1 \end{aligned} \end{aligned}
(22)

and

\begin{aligned} \begin{aligned} \biggl(\frac{\partial ^{2}}{\partial x^{2}}+ \frac{\partial ^{2}}{\partial y^{2}}\biggr)A+M_{x} \frac{\partial U}{\partial x}+M_{y} \frac{\partial U}{\partial y}=-1 \end{aligned} \end{aligned}
(23)

with boundary conditions $$U=A=0, x=\pm \alpha, y= \pm 1$$. The distance was scaled to the duct semiheight b so that $$x= x'/ b$$, $$y = y'/b$$, and $$\alpha = a/b$$. The following normalizations were also used:

\begin{aligned} \begin{aligned} &U=\frac{U_{z}}{\frac{-b^{2}}{\nu \mu }\frac{dP}{dz}}, \\ & A= \frac{A_{z}}{\frac{-b^{2}}{\nu \mu }\frac{dP}{dz}\mu _{0}(\nu \mu \xi )^{\frac{1}{2}}}, \\ & M_{x}=A_{0x'}b \biggl(\frac{\xi }{\nu \mu } \biggr)^{\frac{1}{2}}=M \sin ( \phi ), \\ & M_{y}=A_{0y'}b \biggl(\frac{\xi }{\nu \mu } \biggr)^{\frac{1}{2}}=M \cos ( \phi ), \\ & M=\text{Hartmann no.} = \bigl(M_{x}^{2}+M_{y}^{2} \bigr)^{\frac{1}{2}}= A_{0}b \biggl(\frac{\xi }{\nu \mu } \biggr)^{\frac{1}{2}}. \end{aligned} \end{aligned}
(24)

The ratio of magnetic to fluid viscosity is known as the Hartmann number. The flow field is the classical laminar pipe flow if $$M = 0$$. The flow field is primarily determined by the $$E \times A$$ drift when $$M = 1$$. The functions (22) and (23) must be decoupled as

\begin{aligned} &\begin{aligned} H_{1}=U+A, \end{aligned} \end{aligned}
(25)
\begin{aligned} &\begin{aligned} H_{2}=U-A, \end{aligned} \end{aligned}
(26)
\begin{aligned} &\begin{aligned} \biggl(\frac{\partial ^{2}}{\partial x^{2}}+ \frac{\partial ^{2}}{\partial y^{2}}\biggr)H_{1}+M_{x} \frac{\partial H_{1}}{\partial x}+M_{y} \frac{\partial H_{1}}{\partial y}=-1, \end{aligned} \end{aligned}
(27)

and

\begin{aligned} \begin{aligned} \biggl(\frac{\partial ^{2}}{\partial x^{2}}+ \frac{\partial ^{2}}{\partial y^{2}}\biggr)H_{2}-M_{x} \frac{\partial H_{2}}{\partial x}-M_{y} \frac{\partial H_{2}}{\partial y}=-1, \end{aligned} \end{aligned}
(28)

with respect to boundary conditions $$H_{1}=H_{2}=0, x=\pm \alpha, y= \pm 1$$.

Thus, if $$H_{1}$$ is solved as $$H_{1} ( M_{x}, M_{y})$$ from (28), then

\begin{aligned} \begin{aligned} H_{2}( M_{x}, M_{y})=H_{1} ( -M_{x}, -M_{y}). \end{aligned} \end{aligned}
(29)

When either $$H_{1}$$ or $$H_{2}$$ is known, the answer is absolutely decided. After determining $$H_{1}$$, the function $$H_{2}$$ is obtained from (29), and thus the velocity field U is obtained of the form

\begin{aligned} \begin{aligned} U=\frac{1}{2}(H_{1}+H_{2}). \end{aligned} \end{aligned}
(30)

The flow in a square duct with a magnetic field parallel to the x-axis and $$M_{y} = 0$$ can now be calculated numerically. To compare with earlier findings [79, 13], we give M the values $$M_{x} = 0, 2, 5$$, and 8.

The numerical solutions are obtained by substituting from (4) to (7) into (27) and (28) as follows:

Table 2 introduce comparison of the results of the two-dimensional trigonometric cubic B-spline method using mesh of $$20 \times 20$$ to the numerical [79, 15] and Shercliff analytic solutions.

Figures 4 and 5 display the velocity profile with Hartmann numbers 0 (top curve) to 8 (bottom curve) at $$[-1,1]$$ using a $$20 \times 20$$ mesh.

Table 3 shows some additional results, where the interval is modified from $$[-1, 1]$$ to $$[-0.5, 0.5]$$, and we compare these results to those obtained using the finite difference method  and the analytical solution used in the study .

In Figs. 6 and 7, we display the velocity profile with various Hartmann numbers at $$[-0.5,0.5]$$ using a mesh of $$50 \times 50$$.

Figures 4, 5, 6, and 7 display the course of action for the speed profile along the x-axis for various values of the Hartmann number. Increasing the enticing field (increasing the Hartmann number) decreases the fluid speed near the channel center, as one would expect; however, the direct effect of the alluring field concentrated is unknown. As a consequence, we can see that the outcomes are completely in line with the physical sense of the alluring field effect.

The third test problem: [17, 3235]. We take the third test problem in dimension two of the form

\begin{aligned} \begin{aligned} u_{xx}(x,y)+u_{yy}(x,y)- \sin (\pi x) \sin (\pi y)=0,\quad x,y\in [a,b]. \end{aligned} \end{aligned}
(31)

The exact solution to the problem is

\begin{aligned} \begin{aligned} u(x,y)=-\frac{\sin (\pi x) \sin (\pi y)}{2 \pi ^{2}}. \end{aligned} \end{aligned}
(32)

We take the boundary conditions to the third problem of the form

\begin{aligned} \begin{aligned} u(a,y)=u(x,a)=\alpha,\qquad u(b,y)=u(x,b)= \beta. \end{aligned} \end{aligned}
(33)

By substitution of (4)–(7) into (31) with (33) we obtain the numerical results as in Table 4.

Table 4 present the results of the two-dimensional trigonometric cubic B-spline technique at $$15\times 15$$. In terms of results, we can assume that the results are acceptable. Figures 8 and 9 display the numerical results with exact results at $$y=0.4$$. The three-dimensional graph for numerical results is shown in Fig. 10.

Now, we compare the results of the proposed method to the results of various methods [17, 3235], which are shown in Table 5 using mesh $$15\times 15$$ grid points.

The fourth test problem: . We take the fourth test problem in dimension three of the form

\begin{aligned} \begin{aligned} &u_{xx}(x,y,z)+u_{yy}(x,y,z)+u_{zz}(x,y,z)-x y z \bigl(e^{x+y+z}\bigr) ( 3 yx z+yx+zx-5x \\ &\quad{}+ zy-5y-5 z+9)=0,\quad x,y,z\in [a,b]. \end{aligned} \end{aligned}
(34)

The exact solution to that problem is

\begin{aligned} \begin{aligned} u(x,y,z)=\bigl(x-x^{2}\bigr) \bigl(y-y^{2}\bigr) \bigl(z-z^{2}\bigr) e^{x+y+z}. \end{aligned} \end{aligned}
(35)

We take the boundary conditions to the fourth problem of the form

\begin{aligned} \begin{aligned} u(a,y,z)=u(x,a,z)=u(x,y,a)=\alpha,\qquad u(b,y,z)=u(x,b,z)=u(x,y,b)= \beta. \end{aligned} \end{aligned}
(36)

By substitution of (12)–(14) into (34) with (36) we obtain the numerical results as in Table 6.

Table 6 presents comparison of our results with the results of the quadratic cubic B-spline technique using mesh $$20 \times 20$$. In terms of the results based on our observations, we can see that the results are acceptable. Figure 11 shows the numerical results with exact solutions at $$y=z=0.5$$. The three-dimensional graph of numerical results is shown in Fig. 12.

The fifth test problem: . We take the fifth test problem in the dimension two of the form

\begin{aligned} \begin{aligned} &u_{xx}(x,y,z)+u_{yy}(x,y,z)+u_{zz}(x,y,z) \\ &\quad{}-\sin (\pi x) \sin (\pi y)\sin (\pi z)=0, \quad x,y,z\in [a,b]. \end{aligned} \end{aligned}
(37)

The exact solution to that problem is

\begin{aligned} \begin{aligned} u(x,y,z)=- \frac{\sin (\pi x) \sin (\pi y)\sin (\pi z)}{2 \pi ^{2}}. \end{aligned} \end{aligned}
(38)

We take the boundary conditions to the third problem of the form

\begin{aligned} \begin{aligned} u(a,y,z)=u(x,a,z)=u(x,y,a)=\alpha,\qquad u(b,y,z)=u(x,b,z)=u(x,y,b)= \beta. \end{aligned} \end{aligned}
(39)

By substitution of (12)–(14) into (37) with (39) we obtain the numerical results as in Table 7.

In Table 7, we present our results of the two-dimensional trigonometric cubic B-spline technique using mesh $$15\times 15$$. In terms of observation, we can see that the results are acceptable. Figure 13 displays the numerical results with exact results at $$y=z=0.5$$. The three-dimensional graph for numerical results is shown in Fig. 14.

## Conclusion

At the end of this work, we will make a clear contribution to solving some of the problems facing most researchers in various fields of how to deal with n-dimensional mathematical models. The topic studied is very important, and we believe that most researchers are waiting for its results. Thinking about this work came after we followed what was presented by some researchers on solutions of one-, two-, and three-dimensional partial differential equations, and we noticed how difficult it is for them to deal with these models as the dimension increases. As a result, we decided to expand on the trigonometric cubic B-spline method, which had previously been used to solve one-dimensional mathematical problems, and we were able to present two- and three-dimensional forms for it. To assess the accuracy and efficacy of the derived shapes, we used numerical examples of different measurements. The inferred formulas were found to be accurate and precise when the numerical results were compared to the actual solution. We may infer that a major contribution has been made toward solving problems involving partial differential equations in various dimensions from this perspective. As part of our long-term research, we have generalized a few other B-Splines shapes to serve as solutions to n-dimensional differential equations.

## Availability of data and materials

Data sharing not applicable to this paper as no datasets were generated or analyzed during the current study.

## References

1. Nuruddeen, R.I., Suliman, K., Ali, K.K.: Analytical investigation of soliton solutions to three quantum Zakharov–Kuznetsov equations. Commun. Theor. Phys. 70(4), 405–412 (2018)

2. Ali, K.K., Nuruddeen, R.I., Raslan, K.R.: New structures for the space–time fractional simplified MCH and SRLW equations. Chaos Solitons Fractals 106, 304–309 (2018)

3. Raslan, K.R., Ali, K.K., Shallal, M.A.: The modified extended tanh method with the Riccati equation for solving the space–time fractional EW and MEW equations. Chaos Solitons Fractals 103, 404–409 (2017)

4. Raslan, K.R., El-Danaf, T.S., Ali, K.K.: Exact solution of the space–time fractional coupled EW and coupled MEW equations. Eur. Phys. J. Plus 132, 1–11 (2017)

5. Ali, K.K., Nuruddeen, R.I., Raslan, K.R.: New hyperbolic structures for the conformable time-fractional variant Bussinesq equations. Opt. Quantum Electron. 50, 61 (2018)

6. Sutton, G.W., Sherman, A.: Engineering Magnetohydrodynamics. McGraw-Hill, New York (1965)

7. Alexander, H.: An application of the extended Kantorovich method to MHD duct flow. Acta Mech. 11, 171 (1971)

8. Jones, R., Xenophontos, J.: An iterative finite element method using the Kantorovich technique. Acta Mech. 26, 91–101 (1977)

9. Gardner, L.R.T., Gardner, G.A.: A two dimensional cubic B-spline finite element: used in a study of MHD-duct flow. Comput. Methods Appl. Mech. Eng. 124, 365–375 (1995)

10. Zhang, X., Xu, Z., Pan, C.: Numerical analysis of MHD duct flow with a flow channel insert. Fusion Eng. Des. 85, 2090–2094 (2010)

11. Kim, C.N.: Numerical analysis of a magnetohydrodynamic duct flow with flow channel insert under a non-uniform magnetic field. J. Hydrodyn. 30(6), 1134–1142 (2018)

12. Fana, C.-M., Lia, P.-W.: Generalized finite difference method for solving two-dimensional Burgers’ equations. Proc. Eng. 79, 55–60 (2014)

13. Shercliff, J.A.: Steady motion of conducting fluids in pipes under transverse magnetic fields. Proc. Camb. Philos. Soc. 49, 139 (1953)

14. Lu, P.C.: A study of Kantorovich’s variational method in MHD duct flow. AIAA J. 5, 1519 (1967)

15. Raslan, K.R., Ali, K.K.: Numerical study of MHD-duct flow using the two-dimensional finite difference method. Appl. Math. Inf. Sci. 14(4), 1–5 (2020)

16. Arora, R., Singh, S., Singh, S.: Numerical solution of second-order two-dimensional hyperbolic equation by bi-cubic B-spline collocation method. Math. Sci. 14, 201–213 (2020)

17. Raslan, K.R., Ali, K.K.: On n-dimensional quadratic B-splines. Numer. Methods Partial Differ. Equ. 37(2), 1057–1071 (2021)

18. Frazer, R.A., Jones, W.P., Skan, S.W.: Springer, New York (1937, ARC R and M 1799)

19. Bickley, W.G.: Experiments in approximating to solutions of a partial differential equation. Philos. Mag. 32(7), 50–66 (1941)

20. Raslan, K.R., El-Danaf, T.S., Ali, K.K.: Collocation method with quintic B-spline method for solving the Hirota equation. J. Abstr. Comput. Math. 1, 1–12 (2016)

21. El-Danaf, T.S., Raslan, K.R., Ali, K.K.: Collocation method with cubic B-splines for solving the GRLW equation. Int. J. Numer. Methods Appl. 15(1), 39–59 (2016)

22. Raslan, K.R., El-Danaf, T.S., Ali, K.K.: Collocation method with quantic B-spline method for solving Hirota–Satsuma coupled KDV equation. Int. J. Appl. Math. Res. 5(2), 123–131 (2016)

23. Raslan, K.R., El-Danaf, T.S., Ali, K.K.: Application of septic B-spline collocation method for solving the coupled-BBM system. Appl. Comput. Math. 5(5), 2–7 (2016)

24. Raslan, K.R., El-Danaf, T.S., Ali, K.K.: Collocation method with cubic trigonometric B-splines algorithm for solving coupled Burgers’ equations. Far East J. Appl. Math. 95(2), 109–123 (2016)

25. Shallal, M., Ali, K.K., Raslan, K.R., Taqi, A.: Septic B-spline collocation method for numerical solution of the coupled Burgers’ equations. Arab J. Basic Appl. Sci. 26(1), 331–341 (2019)

26. Mittal, R.C., Tripathi, A.: Numerical solutions of two-dimensional unsteady convection–diffusion problems using modified bicubic B-spline finite elements. Int. J. Comput. Math. 94(1), 1–21 (2017)

27. Mittal, R.C., Tripathi, A.: Numerical solutions of generalized Burgers–Fisher and generalized Burgers–Huxley equations using collocation of cubic B-splines. Int. J. Comput. Math. 92(5), 1053–1077 (2015)

28. Mohammadi, A., Aghazadeh, N., Rezapour, S.: Haar wavelet collocation method for solving singular and nonlinear fractional time-dependent Emden–Fowler equations with initial and boundary conditions. Math. Sci. 13, 255–265 (2019)

29. Azarnavid, B., Emamjome, M., Nabati, M., Abbasbandy, S.: A reproducing kernel Hilbert space approach in meshless collocation method. Comput. Appl. Math. 38, Article ID 72 (2019)

30. Nojavana, H., Abbasbandya, S., Mohammadi, M.: Local variably scaled Newton basis functions collocation method for solving Burgers’ equation. Appl. Math. Comput. 330, 23–41 (2018)

31. Raslan, K.R., El-Danaf, T.S., Ali, K.K.: Trigonometric cubic B-spline. Commun. Math. Model. Appl. 1(3), 5–15 (2016)

32. Elsherbeny, A.M., El-Hassani, R.M.I., El-Badry, H., Abdallah, M.I.: Solving 2D-Poisson equation using modified cubic B-spline differential quadrature method. Ain Shams Eng. J. 9(4), 2879–2885 (2018)

33. Mohammad, G.: Spline-based DQM for multi-dimensional PDEs: application to biharmonic and Poisson equations in 2D and 3D. Comput. Math. Appl. 73(7), 1576–1592 (2017)

34. Zhi, S., Yong-Yan, C., Qing, J.: Solving 2D and 3D Poisson equations and biharmonic equations by the Haar wavelet method. Appl. Math. Model. 36(11), 5134–5161 (2012)

35. Shi, Z., Cao, Y.: A spectral collocation method based on Haar wavelets for Poisson equations and biharmonic equations. Math. Comput. Model. 54(11–12), 2858–2868 (2011)

36. Singh, I., Kumar, S.: Wavelet methods for solving three-dimensional partial differential equations. Math. Sci. 11, 145–154 (2017)

## Acknowledgements

The authors are thankful to the Taif University (supporting project number TURSP-2020/160), Taif, Saudi Arabia.

## Funding

The research was funded by Taif University TURSP-2020/160.

## Author information

Authors

### Contributions

The authors declare that the study was realized in collaboration with equal responsibility. All authors read and approved the final manuscript.

### Corresponding author

Correspondence to Khalid K. Ali.

## Ethics declarations

### Competing interests

The authors declare that they have no competing interests.

## Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and Permissions 