Approximate Solutions of Nonlinear Partial Differential Equations Using B-Polynomial Bases

: A multivariable technique has been incorporated for guesstimating solutions of Nonlinear Partial Differential Equations (NPDE) using bases set of B-Polynomials (B-polys). To approximate the anticipated solution of the NPD equation, a linear product of variable coefficients 𝑎𝑎 𝑖𝑖 ( 𝑡𝑡 ) and B-polys 𝐵𝐵 𝑖𝑖 ( 𝑥𝑥 ) has been employed. Additionally, the variable quantities in the anticipated solution are determined using the Galerkin method for minimizing errors. Before the minimization process is to take place, the NPDE is converted into an operational matrix equation which, when inverted, yields values of the undefined coefficients in the expected solution. The nonlinear terms of the NPDE are combined in the operational matrix equation using the initial guess and iterated until converged values of coefficients are obtained. A valid converged solution of NPDE is established when an appropriate degree of B-poly basis is employed, and the initial conditions are imposed on the operational matrix before the inverse is invoked. However, the accuracy of the solution depends on the number of B-polys of a certain degree expressed in multidimensional variables. Four examples of NPDE have been worked out to show the efficacy and accuracy of the two-dimensional B-poly technique. The estimated solutions of the examples are compared with the known exact solutions and an excellent agreement is found between them. In calculating the solutions of the NPD equations, the currently employed technique provides a higher-order precision compared to the finite difference method. The present technique could be readily extended to solving complex partial differential equations in multivariable problems.


Introduction
Using a B-polynomial basis set, one can solve very complicated 2D partial differential equations which could appear in the fields of physics, engineering, chemistry, and computer science [1,2]. The flawless integration and differentiation are the nature of B-polys that aid in the use of symbolic programming languages, such as Mathematica or Maple. Over any closed interval, B-polys are smooth functions that provide the basis to represent an arbitrary function to desirable correctness [1][2][3]. The specific details and properties of the B-polys are provided in our previous works [1][2][3]. Briefly, B-polys of nth degree are of operational matrix and B-poly basis set. In the earlier progression, the authors used Bpoly technique to calculate solutions of the single-variable differential equations [1]. In our recently extended task, two-variable dependent Hyperbolic Partial Differential (HPD) equations have been solved using the B-poly bases [13]. In the year 2011, the B-polys were expressed in terms of Legendre basis that has been used to solve the linear differential equations [14]. The authors, Bhatti and Hinojosa, have successfully applied similar progression to the linear partial differential equations and highly accurate solutions were reported [13]. It is observed that the B-poly method provides better accuracy than finite difference method. For example, Kutluay et al. [15] have presented a finite difference solution to the Burgers' equation. It is shown that the accuracy of the solution depends on h 2 in the finite difference method, where h is the step size. This requires a very large number of grid points to accurately represent the solution in that region. In reference, Bhatti and Bhatta [16], a combination of B-poly and fourth order Runge-Kutta method was applied to show that B-poly technique provided a higher order of accuracy (four orders of magnitude better) in the solution of the Burger equation.
In the present work, our goal is to apply an extended version of the technique for solving two variables (x,t) NPD equations by means of B-poly basis, operational matrix, and the Galerkin method [17]. It is well known that the continuous and unitary property of B-poly help to determine semi-analytic and, in some cases, exact solutions in a much quicker way in terms of CPU time [1]. The newly designed progression has been effectively used for solving two variables NPD equations in closed intervals, such as [0,R] and [0,T]. A complete basis set of polynomials in two variables (x,t) in terms of the product of B-poly sets has been utilized to figure out the solution of the NPDE. Two types of general second-order nonlinear partial differential equations are considered in this paper. These equations are used for modeling real-world physical phenomena in the fields of physics and mathematics. The equations have applications in various fields of science, like fluid dynamics, heat conduction, elasticity, traffic control simulations, and number theory [16], also see references therein. Further, these equations can be converted into well-known Burgers' equation if the right-hand side is set equal to zero and proper values of constants are chosen. The importance of these calculations is that sometimes they present exact solutions which can be used to judge algorithms as well as the accuracy of computational techniques [13,16]. These equations have nonlinear convective terms and second-order diffusion terms which act opposite to each other. Furthermore, these terms allow to admit distorted wave profile as a solution which is difficult to solve numerically.
The technique is explained step by step and applied to a more general two-dimensional NPDE, where , , could be constant or variables. A desired solution of the NPDE is expressed as a linear combination of B-poly basis set, as follows.
where ( ) is the i-th expansion unknown coefficient in Equation (2) that is a function of variable t. In Equation (2), we impose the initial conditions on variables (x,t). The , ( ) is the n-th degree B-poly in variable x from the basis set. Furthermore, the coefficients ( ) could be expressed in terms of the constant coefficients In Equation (3), the coefficients ( ) could be subjected to initial and boundary conditions if required. We plan to present results by using a complete set of B-polys of the different degree to a few nonlinear partial differential equations. In the following sections, the procedure is applied to solve equations, and the results of the NPD equations are compared with the available 2D exact solutions. An excellent agreement has been found between the exact and estimated solutions. In the previous work, following the notation in [1][2][3]13], the work has been protracted to include complete B-poly bases sets that were involved to approximate results of a variety of differential equations [13,16].
The current technique is applied by substituting the approximate solution, Equation (2), into the NPDE (1) to separate out inner products in variables and . Both sides of the equations are multiplied by a product of B-polys, ( ) ( ), and integration over the closed intervals is carried out. The inner products of B-polys are multiplied to form an operational matrix with a nonzero determinant. Finally, the inverse of the operational matrix is carried out to determine the unknown coefficients of the linear combination. The coveted solution of the NPDE is assembled with the initial condition imposed on the operational matrix equation. In the following sections, we shall explain the process of how to find an appropriate solution, present plots of the solutions, and calculate semi analytic solutions for each of the four examples considered in this paper. Comparisons between exact and approximate solutions will be made in Section 2 and, finally, error analysis of the final example will be presented in Section 3.

Computations of Solutions of NPD Equations
As mentioned in the previous section, details of the B-polys will be left out to avoid duplication of the formulas. Furthermore, details on how to generate sets of B-poly basis and construct a solution from the sets are provided [1,2,13]. To make things simpler, once the degree of B-poly basis set is chosen, we may neglect subscript n representing the degree in B-polys , ( ). The current technique to estimate solution, ( , ), of the twodimensional differential Equation (1) is outlined in this section. The solution is considered as a combination of the variables, ( ) ( ). The NPDE is solved by imposing an initial condition on Equation (3), employing the Galerkin method [17], and taking the inverse of the operational matrix for calculating the unknown variables, ( ) [1,13]. The approximate solution with the initial condition ( , 0) = ( ) is given by [13], Implementing this presumed solution, Equation (4), into a nonlinear partial differential Equation (1), we may transform NPDE into an operational matrix by calculating the inner products of B-poly in both variables x and t. The initial condition at t = 0, f(x) = y(x,0) is added to the solution given in Equation (4). The solution is substituted into the differential Equation to convert it into operational matrix X which is inverted to find the solution [16]. Before we find its inverse to be applied for determining unknown coefficients, boundary/initial conditions are applied to the operational matrix and the right-hand side matrix in the interval [a, b]. This is done by deleting the first row and the first column of the operational matrix and the corresponding entry of the column matrix to ensure solution vanishes at the origin. Below  where dot (•) and prime (′) denote derivatives with respect to t and x, respectively. The Equation (5) can be further simplified by moving some of the terms that do not depend on unknown coefficients ( ) to the right-hand side of the equation, The expansion of ( ) = ∑ =0 ( ) ( ) = ∑ =0 ( ) coefficients can be used to convert Equation (6) in terms of constants, . After multiplying both sides of the Equation (6) with the product of B-polys ( ) ( ) on both sides and integrating with respect to t and x over the intervals ∈ [0, ] and ∈ [0, ], the Equation (6) is transformed into Equation (7), The integrals and inner products of B-polys including the nonlinear terms are given below: The terms & ̇ are factors that exhibit the nonlinear terms due to the appearance of the coefficients in front of them. Using the initial condition and including the nonlinear terms, we can carry out calculations of the coefficients . The converged coefficients are determined after a few iterations of the nonlinear terms in the above Equation (7). Sometimes, the initial guess to the nonlinear terms may be given zero in the first iteration. We also employ the Galerkin method [17] to minimize the error in the solution of the nonlinear partial differential equations. In this method, the coefficients in Equation (4) are minimized by increasing or decreasing a certain degree and number of polynomials in the process.
We may consider another type of general nonlinear PDE of the form in which nonlinear term appears at a different place in the equation, Notice that now the nonlinear term appears in the third term as opposed to the second term in Equation (1). Using similar steps as described above, we can change the above Equation (8) into an operational matrix, where, ̇ & are the nonlinear terms which exhibit nonlinearity via the coefficients . The results of the Equation (9) are further updated at each iteration when it is subjected to the initial condition and initial guess for the nonlinear term. The error in the solution of NPDE is minimized using the Galerkin method [17]. The current technique is applied to four nonlinear differential examples. It is demonstrated that the technique is suitable to find an accurate solution to NPDE.

Example 1. Consider a NPDE which is obtained presuming parameters
( , ) = in the general Equation (8). The NPDE in two dimensions is given, The exact solution of the Equation (10) is For evaluating numerical solution using initial condition ( , 0) = ( ) = in intervals 0 ≤ ≤ 1 and 0 ≤ ≤ 1 , an approximate solution to Equation (10) may be assumed as After substituting this expansion into Equation (10), we get a similar equation as Equation (9) which restructures to the following equation, where, & ̇ are the nonlinear terms which exhibit nonlinearity via the unknown coefficients . This algorithm leads to an ( + 1) by ( + 1) system of equations = , in unknown variables B = { 1 1 , 2 1 , 3 1 , … , 1 2 , 2 2 , 3 2 , … , }, which are elements of matrix B. The matrices in terms of inner products of B-polys are provided below, The nonlinear partial differential Equation (12) has been converted into an operational matrix form X given in Equation (12), whose inverse is multiplied by the column matrix W to yield values of the unknown coefficients by solving the equation = −1 . Before constructing the operational matrix equation, = , initial conditions are imposed by deleting rows and the corresponding columns of the Equation (12) , so that the solution vanishes at t = 0 and x = 0. The resulting approximate solution is gathered from the B-poly basis set via Equations (3) As you may note, the above result is very accurate. To solve the NPD Equation (10), the B-polys of degree n=1 have been utilized in both variables x and t. The B-poly basis sets used are {1 − t, t} and {1 − x, x} which gave a 4 × 4 operational matrix by multiplying both sets. We have presented 3D plots of the exact and estimated results of Equation (13) for comparison, see Figure 1, which shows exact agreement between both solutions at the level of machine precision. Note that when = is replaced in the Equation (13), the error can be seen of the order 10 −17 representing the high quality of the resolution in onedimension x. The solution is essentially zero when t = x is replaced. In this example, the absolute error between the solutions is negligible, showing that both solutions are in perfect agreement.  (1). This equation has a nonlinear term associated with the first term as opposed to the nonlinearity term associated with the second term of the first example. We want to show that the current technique can handle nonlinearity terms associated to any term in the NPDE. The second example adds another level of difficulty to be considered with nonhomogeneous terms on the right-hand side of Equation (14). The NPDE in two dimensions is given by, We are searching for a solution of Equation (14) in the intervals 0 ≤ ≤ 1 and 0 ≤ ≤ 1 with initial condition y (x, 0) = ( ) = at t = 0. The exact solution to Equation (14) is known, ( , ) = ( − ). An approximate solution to Equation (14) may be assumed to be ( , ) = ∑ ( ) ( ) =0 + ( ). In the assumed solution ( , ), the coefficient ( ) is the i-th coefficient in the expansion which depends on t. By replacing the assumed solution into Equation (14) and multiplying both sides of Equation (14) with the product of B-polys ( ) ( ), we can separately perform integration over both variables t and x in the intervals ∈ [0, ] and ∈ [0, ], respectively. Applying an additional approximation to the coefficients ( ) = ∑ =0 ( ), the Equation (3) and with substitution of the term ( , ) = − − 1, we attain Equation (15) given below: where, ′ & are the nonlinear terms linked via the unknown coefficients . The Equation (15) leads to an ( + 1) by ( + 1) system of equations = , in the unknown variables = { 1 1 , 2 1 , 3 1 , … , 1 2 , 2 2 , 3 2 , … , }, elements of matrix B, where the matrices are given, The operational matrix X is provided in Equation (16), whose inversion yields values of unknown coefficients through solving the equation = −1 . Before the inverse of matrix X is called for, initial conditions are imposed by deleting the appropriate rows and columns (deleted first row and first column so that the desired solutions vanish at the origin) of the matrices X and W to make the solution vanish at t = 0 and x = 0. Using a variational property with respect to the coefficients and carrying out several iterations of the nonlinear terms the converged solution of the Equation (14) is given, ∈ [0, 1], has the accuracy of the order of 10 −27 . Again, only n = 1-degree B-polys were required for solving the differential Equation (16) in both variables (x,t). Figure 2 shows the level of agreement between both solutions at the machine precision. Note that when = is replaced in the Equation (17), the error can be seen to be zero, providing the high quality of the resolution in one-dimension x as well as in 3D.
, 0 where, ′ & are the nonlinear terms which exhibit nonlinearity via the unknown coefficients . This algorithm leads to an ( + 1) by ( + 1) order of matrix equation = , where unknown coefficients are = { 1 1 , 2 1 , 3 1 , … , 1 2 , 2 2 , 3 2 , … , }, that represent elements of matrix B, and the matrices and are given, The numerical result in Equation (21) is compared with the exact solution ( , ) = 2 2 . Obviously, the approximate solution has high precision in the closed intervals ∈ [0, 1] and ∈ [0, 1] that matched the exact solution when contributions of the small terms of the order ~10 −27 were discounted. This kind of accuracy shown in Equation (21) was achieved with n = 2-degree B-polys in both variables (x,t) which gave a 9 × 9 dimension operational matrix. To obtain such a high degree accuracy of the solution, we used three B-polynomials in x-variable {1 − 2 + 2 , 2 − 2 2 , and 2 } and a set of three B-polynomials in t-variable {1 − 2 + 2 , 2 − 2 2 , and 2 }. To observe the accuracy level of the solution in only one variable x, we replaced t = x in the approximate solution (fx) and the exact solution (sol) of Equation (18), we essentially found overlays of graphs shown on the left-hand side of Figure 3. We have also shown 3D graphs of both the exact and the estimated solutions on the right-hand side of Figure 3. It is observed that there is no appreciable difference between the graphs of both solutions as the error is very small and hence indicating the technique works for calculating the solution of the NPDE.  ( ) can also be applied to obtain the following equation, where, ′ and are the nonlinear terms that exhibit nonlinearity via the unknown coefficients . This process leads to an ( + 1) by ( + 1) order of equation = , in terms of the unknown variables = { 1 1 , 2 1 , 3 1 , … , 1 2 , 2 2 , 3 2 , … , }, where the operational matrix and the column matrix are, It is tricky to choose the number of B-polys in both variable x and t for this example because the same degree set of B-polys can't be chosen in both variable x and t. We decided to choose = 1 degree of B-polys in x-variable and = 13-degree of B-polys in tvariable. This choice gave us a total of 28 B-polys basis set because n starts from 0. So, a large set of B-polys were used to calculate the solution of Equation ( Figure 4, when t = x is substituted in both exact and the approximate solutions, we plotted a graph for comparison in linear dimension . The graph shows the absolute error is of the order of ~10 −8 between the solutions. As the number of B-poly increases from second degree through 13-degree polynomials in variable t, the error between results (exact and approximate) was further decreased. This trend will be presented in the error analysis section. On the right-hand side of Figure 4, we also present a 3D plot of both solutions, which exhibits the accuracy of results in both variables x and t. The converged approximate solution of Example-4 is,

Error Analysis
It should be noted that the calculations based on B-polys are performed without a grid representation in the intervals. Numerical results depend on the number of B-polys and the degree of the polynomials chosen. In this section, we would like to show that as the number of B-polys are increased, the accuracy starts to improve. Both solutions, exact and approximate, start to overlap each other and the precision is achieved after a certain number of iterations of the nonlinear terms. We are going to present an error analysis for the approximate and exact solutions of the fourth example. The same error analysis can be performed on other NPD equations. As you have seen in Example 4, only a set of two B-polys of degree n = 1 was used in variable x, because by increasing the size of the B-poly basis set in variable x did not help improve error. However, by increasing the set of Bpolys in variable t greatly helped improve the accuracy of the results of the NPDE. We can observe from the graphs that the absolute error decreases between the solutions as we steadily increase the set of B-polys basis in variable t. We are presenting two graphs for n = 4 and n = 9 degrees set of B-poly in variable t, while n = 1-degree of B-poly set was unchanged. These graphs are depicted in Figures 5 and 6 showing that how the error steadily decreases as we increase the number of B-polys from n = 4 through n = 13 degrees. The desired agreement between exact solutions started to converge as n is increased for the inclusion of additional B-polys in variable t, see Figures 4-6. All the calculations are carried out without a grid on the intervals of integration. When n = 4 degrees of B-polys are used and calculations are iterated 15 times, the absolute error is found to be of the order of 10 −3 which is shown in Figure 5. We have also presented the 3D graph of the absolute error in terms of two variables (x,t) in Figure 6. In Figure 6, n = 9 degrees of polynomials were used to show that the error further decreased to the order 10 −6 . We have already shown a graph of the absolute error between the solutions, when n = 13 degrees of B-polys were chosen, see Figure 4. Clearly, the error is systematically decreased as the number of B-polys are increased in the calculations and each time results were iterated 15 times to achieve convergence of the solution. It indicates that the technique works to provide a converged solution that is comparable with the exact solution. The CPU time for the calculation significantly increased as we included a larger set of B-polys in the calculations.

Results and Discussions
In the present work, we have applied two-dimensional B-poly basis set technique to solve four examples of the NPD equations subjected to various initial conditions. Furthermore, A broader explanation of the 2D algorithm has been given to calculate precise results of the NPDE. We were approximating solutions employing the Galerkin method [17] in two variables (x,t) and the converged results have been found which are presented in Figures 1-4. Normally, these solutions converged after 10 to 15 iterations. For the first three examples, the approximate solutions were so precise that the solutions matched the exact solutions after ignoring the tiny contributions and a few iterations of nonlinear terms. With the increasing number of B-polys in the estimated solution, we have also observed that the accuracy of the solutions [1] increases. In the first two examples, we have used n = 1-degree set of polynomials in both variables and in the third example, n = 2degree B-polys were used to obtain converged results. For the fourth example, only 1degree polynomial in variable x and 13-degree polynomials in variable t were used to calculate the results. For Example 4, the B-poly basis set contained a total of 28 polynomials that were used to calculate the solution. We have also displayed graphs of the absolute error between the precise and the approximated results in Figures 1-4. In every case, the accuracy of the solutions has been different because different B-poly basis set have been used. When variable t is set equal to x, the absolute errors between exact and approximate solutions have been compared. The accuracy was shown to be greater for the converged solutions as shown in the Figures 1-4. Our method worked very well for solving nonlinear and linear differential equations using an operational matrix scheme [13,18], as shown by the data and graphs presented in this paper. The Wolfram Mathematica symbolic program version 12 [19] was used to perform all analytic integrations and computations over the closed intervals for both variables (x,t).
Using B-poly basis sets, our method may display enormous possibilities for solving nonlinear and linear 2D problems in physics and other disciplines. Recently, many authors [20,21] have formed an operational matrix utilizing B-poly techniques to solve onedimensional partial differential equations. We have successfully expanded this method to solving the two-dimensional NPDE. We also presented a detailed error analysis for the last example which shows how the error can be minimized as the number of B-polys are increased in the desired solution. To get a converged solution of the NPD Equation (22) In this article, we have shown an extended version of the technique [1] to solve NPD equations, based on the B-poly basis set that provided in some cases exact and suitable solutions of 2D nonlinear partial differential equations. This technique is superb for solving the problems related to a complex system of nonlinear partial differential equations where there are no known solutions that exist. We may employ this particular method in solving 2D linear and nonlinear partial differential equations as demonstrated in this paper.

Data Availability Statement:
Within the article of this study, the data that supports the findings are available.