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

*Correspondence: khalidkaram2012@azhar.edu.eg 1Department of Mathematics, Faculty of Science, Al-Azhar University, Nasr-City, Cairo, Egypt Full list of author information is available at the end of the article 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 twoand 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 [1][2][3][4][5]. 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 [6][7][8][9][10][11][12][13][14][15] 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. [18] started the collocation approach in 1937. After that, Bickley [19] 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 [20][21][22][23][24][25][26][27]. 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 [20][21][22][23][24][25]. Collocation strategies such as Haar wavelet collocation technique [28], a slope replicating component collocation technique [29], and Newton premise capacities collocation technique [30] 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 [31]
Let a ≤ x ≤ b, and let φ i (x) be trigonometric cubic B-spline with knots at the points x i . Then the set of cubic B-splines φ -1 (x), φ 0 (x), . . . , φ N-1 (x), φ N (x), φ 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 where χ i are unknown coefficients. We define U i , dU i dx , d 2 U i dx 2 by where , 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 = x, k = y by the knots (x m , y n ), m = 0, 1, . . . , M, n = 0, 1, . . . , N . The approximation where χ m,n are the amplitudes of the trigonometric cubic B-splines B m,n (x, y) given by Peaks on the knot (x m , y n ) and φ m (x), φ n (y) are identical in form to the one-dimensional trigonometric cubic B-splines. Then U m,n , ∂U m,n ∂x , ∂U m,n ∂y , ∂ 2 U m,n ∂x 2 , ∂ 2 U m,n ∂y 2 , ∂ 2 U m,n ∂x ∂y , . . . are given by 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 = x, k = y, q = z by the knots (x m , y n , z r ), m = 0, 1, . . . , M, n = 0, 1, . . . , N, r = 0, 1, . . . , 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 where χ m,n,r are the trigonometric cubic B-spline amplitudes, and B m,n,r (x, y, z) are given by Also, φ m (x), φ n (y), and φ r (z) have the same shape as trigonometric cubic B-splines in one dimension.

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
where β i are constants.
For a proof of the lemma, see [9].

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 [17]. We take the first test problem in the two dimensions in the form u xx (x, y) + u yy (x, y) + u x (x, y) + u y (x, y) -3e 2x+3y x 2 18y 2 -4y -5  The exact solution to this problem is We take the boundary conditions to the first problem of the form 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 × 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 threedimensional graph for numerical results is shown in Fig. 3.
MHD duct flow is the second test issue [7][8][9]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 = ±a and y = ±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 with the boundary conditions: U = A = 0 at x = ±α, y = ±b, where ν, μ, and ξ , respectively, denote the fluid kinematic viscosity, density, and electric conductivity. The magnetic permeability in vacuum is μ 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 [14], who used the Kantorovieh method to solve this problem: and with boundary conditions U = A = 0, x = ±α, y = ±1. The distance was scaled to the duct semiheight b so that x = x /b, y = y /b, and α = a/b. The following normalizations were also used: dP dz μ 0 (νμξ ) 1 2 , 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 × A drift when M = 1. The functions (22) and (23) must be decoupled as and with respect to boundary conditions H 1 = H 2 = 0, x = ±α, y = ±1. Thus, if H 1 is solved as H 1 (M x , M y ) from (28), then 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 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 [7][8][9]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 × 20 to the numerical [7][8][9]15] and Shercliff analytic solutions.   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 [15] and the analytical solution used in the study [13].
In Figs. 6 and 7, we display the velocity profile with various Hartmann numbers at [-0.5, 0.5] using a mesh of 50 × 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,[32][33][34][35]. We take the third test problem in dimension two of the form The exact solution to the problem is We take the boundary conditions to the third problem of the form u(a, y) = u(x, a) = α, By substitution of (4)-(7) into (31) with (33) we obtain the numerical results as in Table 4.

Figure 8
The numerical results are compared to the exact results at y = 0.4

Figure 9
The numerical results are compared to the exact results at x = 0.4

Figure 10
Three-dimensional graph of numerical results Table 4 present the results of the two-dimensional trigonometric cubic B-spline technique at 15 × 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 threedimensional graph for numerical results is shown in Fig. 10. Table 5 The maximum absolute error The proposed method Quadratic B-spline approach [17] MCBDQM approach [32] Spline-based DQM approach [33] Haar wavelet approach [34] Spectral collocation approach based on Haarwavelets [35] 7.78 E- 5 3.72 E-5 2.11 E-5 1.62 E-4 3.08 E-4 3.08 E-4 Now, we compare the results of the proposed method to the results of various methods [17,[32][33][34][35], which are shown in Table 5 using mesh 15 × 15 grid points.
The exact solution to that problem is We take the boundary conditions to the fourth problem of the form 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 Bspline technique using mesh 20 × 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.
(37) Figure 11 The numerical and exact results at y = z = 0.5
We take the boundary conditions to the third problem of the form u(a, y, z) = u(x, a, z) = u(x, y, a) = α, u(b, y, z) = u(x, b, z) = u(x, y, b) = β.
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 × 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.