Solving Ordinary Differential Equations (ODEs) Using Least Square Method Based on Wang Ball Curves

Numerical methods are regularly established for the better approximate solutions of the ordinary differential equations (ODEs). The best approximate solution of ODEs can be obtained by error reduction between the approximate solution and exact solution. To improve the error accuracy, the representations of Wang Ball curves are proposed through the investigation of their control points by using the Least Square Method (LSM). The control points of Wang Ball curves are calculated by minimizing the residual function using LSM. The residual function is minimized by reducing the residual error where it is measured by the sum of the square of the residual function of the Wang Ball curve's control points. The approximate solution of ODEs is obtained by exploring and determining the control points of Wang Ball curves. Two numerical examples of initial value problem (IVP) and boundary value problem (BVP) are illustrated to demonstrate the proposed method in terms of error. The results of the numerical examples by using the proposed method show that the error accuracy is improved compared to the existing study of Bézier curves. Successfully, the convergence analysis is conducted with a two-point boundary value problem for the proposed method.


Introduction
In real-world applications like various fields of engineering and computer science, many problems involve mathematical models which contain an ordinary differential equation (ODE). Most ODEs' problems, which evolve in such applications, are difficult to achieve an exact or analytical solution due to the complexity of exponent, trigonometric and polynomial functions. Many research scholars have come up with the approximate solution of ODEs in the form of polynomial or piecewise polynomial functions by employing various numerical methods such as series, finite element method, shooting, segmentation and LSM [5,8,30,32,[41][42]48].
Polynomial and piecewise polynomial functions are obtained as an approximate solution by using the control points of Bézier curves. The Bézier curve's control points have computational advantages in terms of error accuracy [1,8,30,48]. Moreover, a useful strategy is to increase the Bézier curve's degree if the approximate solution is not on the desired level and contrarily, it can be decreased to reduce the extra calculation burden if the solution is already on the desired level [2]. Since the Bézier curve's control points' structure becomes an important geometric feature of the Bézier shape, computational performance is improved while solving ODEs based on the control points [2,30]. Thus, the Bézier parametric curve is an outstanding technique of getting the solution to a problem that involves parametric surfaces and curves.
Since the 1970s, some scholars have been establishing the basis functions of generalized Ball curves in their studies. According to the Ball curve's history, in 1974, Alan Ball developed and introduced the cubic Ball curve's basis functions for conic lofting surface program CONSURF while working at the British Aircraft Corporation (BAC) [4,7,11]. In 1987, Wang increased the degrees of the cubic Ball basis functions to the generalized higher level [13]. Further in 1989, Said proposed the general odd degree to the cubic Ball basis functions to generalize the Ball curves [12]. Then, in 1991, Goodman and Said's studies showed that the basis functions of generalized Ball curves with the odd degree are totally positive and the preservative properties of the curves are uniform between the generalized Ball curves and Bézier curves [9,12,21]. Furthermore, in another study, they proved that the degree reducing and raising of the generalized Ball curves is more suitable compared to that of the Bézier curves [15]. Since then, the degree raising and lowering of the Ball curve's control points was found to be a wonderful geometric instrument for obtaining the exact shape of the curve -the computations are regarded as an attractive technique [2,12,[16][17]19]. Therefore, by using the increment and decrement of degrees, generalized Ball curves were found to be more efficient than Bézier curves while applying the de Casteljau algorithm as well as a recursive algorithm [12,14].
The study of the Ball curve inspired many scholars to explore its accurate shape by increasing or decreasing its degree through theoretical computation [3,12,[15][16][17][18][19][20]. Hence, the generalized Ball curves extended to Wang Ball curves, Said Ball curves, DP Ball curves and rational Ball curves with higher degree polynomials [10,[12][13]16]. The highest degree of Wang Ball curves, Said Ball curves, DP Ball curves and rational Ball curves can be found by overlying their control points [22].
The mathematical of the Ball curve's basis function of a cubic polynomial curve is as follows: Two advantages of the generalized Ball curves are observed: the Ball function's degree three polynomial, combined with their internal control points, can be reduced to the Bézier function's degree two polynomials; and the computational competence is found to be better than that of the Bézier curves' while using the generalized Ball curves [12].
At any rate, the Wang Ball curve is proposed to approximate the solution of ODEs. Since the Ball curves sparked global interest, research scholars started to find the approximate solutions of higher order ODEs by developing the algorithms through different numerical methods such as the reduction method [24][25][26][27]. However, there are many hurdles found in the reduction method such as lengthy writeup because of its numerous iterations, taking more time while developing the program on a computer and the error accuracy affected because of its computational load [24][25]. Hence, research scholars created the direct method to overcome these hurdles while solving higher order ODEs approximately [25]. The direct method has the capability to efficiently solve the higher order ODEs without reducing them to the first order ODEs [41,[43][44][45][46].
The Least Squares Methods (LSM) is one of the direct methods. The better accuracy in terms of error for the approximate solution of higher order ODEs can be obtained by using LSM through the polynomial or piecewise polynomial functions [32]. Meanwhile, many researchers used LSM in solving different types of differential equations approximately [33][34][35][36][37][38][39][40]. The LSM is employed based on the control points of Bézier curves by developing the least square objective function for the discretization of integrals to improve the approximate solutions of higher order ODEs [29]. Furthermore, the LSM was applied for solving two-point boundary value problems through two different schemes: degree raising and subdivision. The convergence analysis of the control point-based methods LSM to the two-point boundary value problem showed that the LSM is a reliable method [30].
Lyche and Morken [31] stated that the LSM is an efficient and simple method when employed to solve higher order ODEs approximately. From past reviews, the application of the LSM to find the approximate solution of higher order ODEs based on the Bézier curve's control points, the result is only satisfied, but not on the required level in terms of error [30,36,[39][40]47].
The structural preservative properties between the Bézier curves and generalized Wang Ball curves are similar; furthermore, the Wang Ball curves based on the control points have yet to be investigated to find the approximate solution of higher order ODEs.
Thus, we propose the LSM to solve higher order ODEs by exploring the control points of Wang Ball curves to improve the accuracy in terms of error. The remainder of this paper is structured as follows: the Bézier curve's representation in Section 2, the representations of Wang Ball curves along with their properties are briefly discussed in Section 3 while in Section 4, the new method is proposed for solving ODEs approximately by investigating the control points of Wang Ball curves; thereafter in Section 5, numerical examples are provided to demonstrate the newly proposed method; furthermore, in Section 6, the convergence of the proposed method for the two-point value problem is analyzed; Finally, in Section 7 the conclusion is presented.

Bézier Curves Representations
The Bézier curves of degree and ( + 1) control points � � = can be defined as follows [30]: where , the Bézier coefficient called the Bézier control 76 Solving Ordinary Differential Equations (ODEs) Using Least Square Method Based on Wang Ball Curves point and the Bézier curves Polynomials ( ) over the interval a ≤ ≤ b is as follows:

Wang Ball Curves Representations
The Wang Ball curves with degree and ( + 1) control points � � = are as follows [13]: where the Wang Ball Polynomials ( ) are defined as follows: when is odd and when is even.    The properties of the Wang Ball curve's basis functions are: i.
The basis function of Wang Ball curves is non-negative. ii.
The partition of the Wang Ball curve's basis function is unity.
The above two properties, non-negativity, and unity of partition of Wang Ball curve's basis function in the above equations (3.4) and (3.5) satisfied the convex combination of the control points, as well as the curve of the Wang Ball basis function, lie in the convex hull with its control polygon [16][17].

The Wang Ball curve's Control Points-Based Approach
Since then, the Wang Ball curve has more computational competence than the Bézier curve and the constructional properties of the shape preservative are similar between the Wang Ball curve basis function and Bézier curve basis function. The control point based approach is proposed to represent the approximate solution of ODEs in the form of the Wang Ball curve by using the LSM. We take the sum of squares of the control points of Wang Ball curves of the residual function ( ) = ( ) − ( ) to compute the residual error by constructing the objective function with the LSM. By minimizing the objective function, if the residual error is equal to zero then the residual function is also equal to zero, which implies that the approximate solution is equal to the exact solution of ODEs.
To demonstrate the proposed method, the following IVP and BVP are considered for the approximate solution: with initial value problem as follows: and with boundary value problem as follows: where: is a differential operator of (2 ) ℎ order along with the ( ), polynomial coefficients in terms of , and ( ), the polynomial function in terms of .
The aim of this paper is to develop a generalized method to solve the higher order ODEs approximately by computing the residual error through minimization of the objective function based on the control points of Wang Ball curves in the residual function ( ) = ( ) − ( ) . Thereafter, an algorithm for the approximate solution of ODEs in the form of polynomial function ( ), satisfying the conditions of IVPs (4.2) and BVPs (4.3), is developed.
The algorithm to solve the ODEs by using the LSM through computing the control points of Wang Ball curves is shown in the following steps: Step 1: Suppose that a degree and symbolically express ( ), the approximate solution of ODEs in the form of Wang Ball curves with degree , respectively, is: are to be determined. Step can be expressed with degree ≤ in the form of Wang Ball curves. We note that = � − + deg� � , deg� ( )�� and where the linear functions are control points in terms of unknowns and = 0, 1, 2, 3, … … . . . . , . These functions will be found by implementing the techniques of multiplication, degree elevation and reduction, and differentiation of the Wang Ball curves.
Step 3: Constructing the objective functions for Wang Ball curves.
Step 4: Solving the constrained optimization problems for The Lagrange Multiplier method or any other suitable method will be employed which can reduce this constrained optimization problem into a problem of solving a system of linear equations.
Step 5: By replacing the minimum solutions which we find in last Step 4 back into the solutions ( ) into equation (4.4) in Step 1, which is the form of Wang Ball curves, the approximate solutions of the ODEs will be found.

The Degree Raising Strategy
Using the control point-based approach in Section 3.1 allows us to obtain the approximate solution of higher order ODEs using LSM. By replacing all the control points into the objective function , we can either obtain the Euclidean norm of the Wang Ball curve's control points, or according to the convex hull property of Wang Ball curves, obtain the upper bound on the residual function ( ) from the values of as follows: The approximate solution is not on the desired level if the above values in (4.5) sufficiently not small. Then, by raising the degree of approximate solution and again running the Wang Ball curve's control point base approach using the LSM in Section 4.1, an approximate solution will be improved in terms of error accuracy.

Numerical Examples
The proposed method is demonstrated in solving two numerical examples by computing the control points of Wang Ball curves using LSM. The resulting accuracy can be verified in terms of error and efficiency in terms of computation.

Problem 1: Boundary Value Problem of Second
Order ODE [30].

First
Step 2: Determining A polynomial of degree 2 will be obtained to solve the IVP of order 2 ODE through LSM based on the Wang Ball curve's control points. Suppose that the following Wang Ball curve = ( ) of degree 2 is the approximate solution of this numerical example.

Example 2: A Boundary Value Problem of a Fourth-Order ODE Involved in a Mathematical Model for Transversal Bending of Clamped Beam [30]
�( 2 + 1) ′′ ( )� ′′ = + 1, 0 < < 1, The graph of the approximate and exact solution is presented in the following figure 6.  Hence, the approximate solution is not on the desired level with degree 5. By raising the degree, we suppose that the approximate solution of the fourth order ODE is the Wang Ball curve of degree 8 as follows: The values of control points 0 , 1 , 2 , 3 , 4 , , 6 , 7 and 8 of the Wang Ball curves are found through solving the constrained optimization problem in LSM by minimizing the objective function with the boundary value conditions and their values are tabulated in Table 1.    Table  2 given below: The maximal error 0.0000030955 is found between the exact and approximate solutions based on the Wang Ball basis function with degree 8 at = 0.40 ∈ [0, 1] . The error accuracy is improved up to the level 0.000017404 by using LSM based on the basis function of the Wang Ball curve of degree 8 as compared to the basis function of the Bézier curve in [30].

Convergence Analysis
We conduct the convergence analysis for the proposed method based on the control points of Wang Ball curves while it's employed to the two-point boundary value problem or the higher order ODEs.
We consider the following two-point boundary value problem, which has a unique 2 smooth solution, to analyse the convergence: where , + are the control points of Wang Ball curves after raising the degree to + k.

Proof:
By using the rule of the degree raising as The sequence is decreasing monotonically and it is convergent as → +∞ because zero is its lower bound. Now, the limit of the above sequence being equal to needs to be proven. According to the fundamental theorem of calculus: The degree raising property of the Wang Ball curve for convergence is that there exists an arbitrary small quantity , = 0, 1, 2, 3, . . . . . . . . . . , + such that: Therefore: Hence, it is proven that the limit of the sequence is equal to

Theorem:
Let ( ) be the 2 continuous solution and unique solution of two-point boundary value problem (6.1), then the approximate solution ( ) be computed based on the control point of Wang Ball curves which converges to the exact solution as the degree of the approximate solution tends to infinity.

Proof:
Step 1: There exists an arbitrary small quantity > 0. We obtain the polynomial with degree which satisfies the ∞ − over 0 ≤ ≤ 1, such as by using the Weierstrass theorem [49][50][51] where generally, ( ) does not fulfil the boundary value conditions. We can find another polynomial ( ) = ( ) + + with a small modification such that ( ) justifies the boundary value conditions (0) = and (1) = . Then: Hence, the residual function can be estimated as follows: Step 2: Now in this step, we represent the residual in the form of the Wang Ball curve as follows: Step 3: Now, suppose that ( ) is the approximate solution of (5.1) with degree ≥ which is found based on the control points of Wang Ball curves: with degree ≥ ≥ . Further, we estimate the Sobolev norm for the difference of exact solution ( ) and approximate solution ( ) as follows: where is constant. Since the average squares of the residual of the control point of Wang Ball curves are minimized by using the control point based method, the average of the approximate solution ( ) is smaller than ( ). Thus: Hence, the approximate solution converges to the exact solution as the degree of the approximate solution approaches infinity.

Conclusions
The LSM is described to represent the Wang Ball basis function for the approximate solution of higher order ODEs by using the control points of Wang Ball curves. We compute the control points of Wang Ball curves through minimization of the residual function by decreasing the residual dual error. Therefore, the Wang Ball basis function presented being as the approximate solution of ODEs. We employed the Wang Ball control point base approach to approximate solution of 4th order linear ODE with a polynomial coefficient problem. The Wang Ball basis function shows efficient performance in the numerical problems and a significant improvement in error accuracy than that of the Bézier curve is observed in [30]. The convergence analysis of the proposed method to the two-point boundary value problem is successfully analysed. The proposed method is Intuitive and very simple in terms of Computation, and its operation can be completed without any explicit instructions. Furthermore, as suggested in [30,47], this study recommends extending the proposed method for finding the approximate solution of other types of differential equations.