{'fraction_non_alphanumeric': 0.02781664521184306, 'fraction_numerical': 0.016231040465662955, 'mean_word_length': 4.710450623202301, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Comperative Numerical Study Based on Cubic Polynomial and Trigonometric B-splines for the Gardner Equation

Two cubic B-spline functions from different families are placed to the collocation method for the numerical solutions to the Gardner equation.Four models describing propagation of bell shaped single solitary, travel of a kink type wave, wave generation and interaction of two positive bell shaped solitaries propagating in the opposite directions are studied by both methods. The error between the numerical and the analytical solutions ismeasured by using the discrete maximum norm when the analytical solutions exist. The absolute changes of the lowest three conservation laws are also good indicators of valid results even when the analytical solutions do not exist. The stability of the proposed method is investigated by the Von Neumann analysis.


Introduction
The Gardner equation u t + αuu x + βu 2 u x + µu xxx = 0 (1) where α, β and µ are nonzero constants is a useful model to study some weakly nonlinear dispersive waves. Having two nonlinear quadratic and cubic terms attracts many researchers to investigate the solutions particulary the numerical ones.
Owing to this characteristic of the equation, it is widely known as the KdV-mKdV equation in the literature. The Gardner equation can be completely integrated using the properties of Lax pair and inverse scattering transform. The Miura transformation [1] reduces the it to the KdV equation [2]. The Gardner equation describes the large amplitude internal waves, too [3]. The implementatiton fields of the equation can be extended to many nonlinear phenomena covering ocean waves, plasma and fluid physics, quantum field theory [4]. Using a simple transformation, the Gardner equation can also be converted to a particular form of the modified KdV equation [4]. Thus, some solutions including multiple solitons of the equation can be derived from the modified KdV equation [4]. The Gardner equation governing the propagation of nonlinear ion-acoustic waves in negative ion loaded plasmas is derived by starting the system of the one dimensional plasma motion equations [5]. Occurence of rouge waves can also be analyzed by the Gardner equation with the same signed cubic nonlinear and the linear dispersive terms due to allowance modulational instability [6]. Diverse family of transcritical flows including kinks, rarefaction waves, classical, reversed and trigonometric undular bores of a stratified fluid over topography are examined in details in the framework of the forced Gardner equation by Kamchatnov et al. [7]. Some particular solutions to model various natural phenomena like interaction of large amplitude solitons or generation are investigated for a particular form having extra first order derivative linear term in the Gardner equation (1) [8]. The interactions of waves with different characteristics such as soliton-cnoidal wave, or soliton-periodic wave are derived by the consistent tanh method [9]. The derivation of the soliton-cnoidal wave interaction is based on the consistent Riccati expansion [10]. A perturbative study deals with the adiabatic parameter soliton dynamics for the Gardner equation with the aid of perturbation theory [11]. The perturbation parameters for the slow time-dependence of some kink type solitons and correction of order one are developed by using Green's functions [12]. So far, various solutions including soliton types, kink-anti kink types, periodic and N −soliton solutions to the Gardner equation have been suggested in the related literature. Bekir [13] derives some solutions constructed with tanh and coth functions by using the extended tanh method in which traveling wave transformation and the balance between higher order derivative terms and higher degree power term are the basic keys to the procedure to set up the solutions. In the light of the projective Riccati equations, Fu et al. [14] construct many solutions, from solitary waves in terms of hyperbolic functions to periodic ones in terms of sine and cosine functions with the aid of an intermediate transformation in some classical extension method. Combined hyperbolic ansatzes [15], exp-function [16], G/Gexpansion [17], improved G/G -expansion [18], generalized G/G -expansion [19] and the two-variable (G /G, 1/G) expansion [20] methods are also useful tools to obtain the real and complex exact solutions to the Gardner equation. The dynamics of the solitary wave type solutions of the Gardner equation is examined in details by employing the mapping method [21]. This study also deals with the integration of the perturbed form of the equation using semi inverse principle and gives some solitary waves solutions set up by a particular ansatze method. Jawad [22] also derives an exact solution to the Gardner equation in terms of the tangent function by implementing the tan-cot function algorithm. Some traveling wave solutions in terms of Weierstrass and Jacobi elliptic functions are constructed in the study of Vassilev et. al. [23]. Lie group method is applied to develop some new analytical solutions to the Gardner equation [24]. A particular similarity reduction is also derived by the Clarkson and Krustal direct method in the same study.
Even though lots of exact and analytical solutions, as summarized in the previous paragraph, are proposed for the Gardner equation, few numerical solutions seem in the literature. A conservative finite difference scheme with the help of the discrete variational methods is implemented to some initial boundary value problems, covering motion of a single soliton and interaction of solitons, for the Gardner equation [25]. Conditionally stable restrictive Taylor approximation is another interesting method used to simulate kink type solutions for the Gardner equation [26]. This study aims to fill the gap in the related literature by solving some initial boundary value problems for the Gardner equation. We construct polynomial [27,28] and trigonometric [29] cubic B-spline collocation methods to derive the numerical solutions. Having no parameter inside of both functions makes these two sets different from the exponential cubic B-splines [30][31][32][33]. Various problems covering motion of waves in different profiles, wave generation and interaction of solitary waves are studied numerically. Having no continuous third order derivatives of the cubic polynomial and trigonometric B-spline functions forces us to reduce the order of the third ordered term in the Gardner Equation. Thus, assuming v = u x leads the coupled equation system partial differential equations The initial data and the homogenous Neumann boundary conditions are selected from the set in the artifical finite problem interval [a, b].

Methodology
. The twice continuously differentiable trigonometric cubic B-spline function set {T i (x)} N +1 i=−1 , forms a basis for the functions defined in the same interval [34,35]. Similarly, the polynomial cubic B-splines are described as i=−1 also constitutes a basis for the functions defined in [a, b]. Let U (x, t) and V (x, t) be approximate solutions to u(x, t) and v(x, t) defined as where C i (x) = T i (x) or C i (x) = P i (x) and δ i and φ i are time dependent parameters that are determined from the collocation points x i , i = 0, 1, . . . , N and the complementary data. The functional and derivative values of U (x, t) and V (x, t) at a grid x i is described in terms of time dependent parameters δ and φ as When the trigonometric B-splines are chosen as basis, the coefficients of the time dependent parameters in (8) take the forms Similarly, the same coefficients are determined as when the polynomial cubic B-splines are selected as basis.
The Crank-Nicolson and the classical forward finite difference discretization converts the system (2) to (11) where the superscript n and n+1 denotes the functional or derivative values at n.th and n+1.th time levels, respectively. One should note that t n+1 equals t n +∆t and ∆t is the time step size. Substituting the approximate solutions in to the system (11) and linearizing the nonlinear terms by the Rubin and Gravis' technique [36] as where For the simplicity, we use the matrix notation with the matrix elements Even though there are 2N + 6 unknown parameters in the system (13), it consists of only 2N + 2 linear equations. In order to equalize the numbers of equations and unknowns, we eliminate some unknowns by manipulating the appropriate boundary conditions.

Stability Analysis
The stability of the method is investigated by performing the Von-Neumann analysis where Here, K 1 and K 2 represent the harmonics amplitude, k is the mode number, ρ is the amplification factor and ϕ = kh. The term U + U 2 is assumed as locally constant and replaced by ε. Substituting 14 into the system where It can be concluded from both (17) and (18) that |ρ| is less than or equal to 1. Thus, the proposed method method is unconditionally stable.

Numerical Examples
In this section, we solve some analytical and non-analytical initial boundary value problems to validate the proposed methods and compare the results produced by both methods. We give some tools below to measure the accuracies of the proposed methods for a fair comparison. The discrete maximum norm measuring the error between the numerical and the analytical solutions, if exist, defined as and are expected to remain constant as time goes [37]. Define the absolute relative changes C(M t ), C(E t ) and C(H t ) of the conservation laws M , E and H as where M 0 , E 0 and H 0 are initial, M t , E t and H t are the numerically computed values of the conserved quantities at the time t.

Propagation of Bell Type Solitary Wave
In the Gardner equation,we assume that the parameters α = 4, β = −3 and µ = 1. Thus, the analytical solution of the Gardner equation takes the form This solution is adapted from the cosh ansatze solution describing the propagation of a positive bell type solitary wave along the x-axis [15]. The initial condition is derived by substituting t = 0 into the analytical solution. The first order homogeneous Neumann conditions are applied at both end of the finite interval [−20, 30]. For the sake of comparison, the proposed routines are run up to the terminating time t = 5 with the fixed discretization parameter ∆t = 0.1 and various numbers of grids N . A three dimensional simulation of the propagation ,  Fig 1(a) and the maximum error distributions of the solution obtained by using both methods at the simulation terminating time are depicted in Fig 1(b)-1(c). The accumulation of the error around the peak position draws the attention in the trigonometric method as no clear accumulation interval for the error in the polynomial method. The comparison of the discrete maximum norms at the half and the end times of the simulation process are tabulated in the Table 1. The error is in five decimal digits in polynomial method but is in four decimal digits in trigonometric method at the simulation terminating time t = 5 for N = 100. The increase of the number of grids to 200 decreases the value of the norm but the errors are still in the same digits as the previous choice of N . Increasing the number of points to 300 improves the results of the trigonometric method more than the improvement of the polynomial method. Finally, five decimal digit accuracy of the results is obtained for both methods when N is chosen as 400. The initial values of the lowest three conservation laws are determined analytically as The approximate values of these quantities are calculated as M 0 = 1.045100915, E 0 = 0.06013455349 and H 0 = 0.004070220312 at the beginning of the numerical simulation and are expected to remain constant as time goes. The absolute relative changes of the conservation laws are reported in Table 2. Both methods can be said to generate successful results owing to the absolute relative changes reported in the table but it is not easy to decide which one gives more accurate results than the other one.

Motion of Kink Type Wave
Kink type wave solution of the Gardner equation is for the coefficient choice α = 1, β = −5 and µ = 1 [4]. This kink type wave travels to the right with the velocity 1/30, Fig 2(a). The the initial condition required to start the iteration of the time integration is determined by assuming t = 0 in the analytical solution (23). We choose homogeneous second order and first order Neumann conditions in the polynomial and trigonometric methods, respectively.    Table 4. The absolute relative changes of conservation laws seem insensitive to the increase the number of the grids for the polynomial method. On the other hand, increasing the number of grids from 100 to 200 improves the sensitivity in decimal digits for the trigonometric method. To

Wave Generation from an Initial Pulse
The perturbed Gardner equation of the form for some nonzero real can be useful to study the wave generation from an initial positive pulse. The decomposition of the balance among the nonlinear terms and the third order derivative is expected not to keep the shape or velocity as propagating. Thus, the initial condition is generated from the initial condition of the first problem sensitively as by perturbating the initial condition. We assume that α = 10, β = −3 and µ = 1 in the Gardner equation (1). We run the proposed algorithms with the discretization parameters N = 400 and ∆t = 0.01 in the artificial problem interval [−40, 60] up to the time t = 15.
The initial pulse of height 0.4305 is positioned at x = 5, Fig 3(a). This pulse is expected to generate new waves immediately at the back as it propagates to the right along the horizontal axis. When the time reaches t = 5, the height of the frontier is measured as 0.6568 and it is positioned at x = 18.25 with an observable distinct follower , Fig 3(b). The follower wave of height 0.3318 is positioned at x = 12. Moreover, a second follower, whose bulge is of height 0.1678 and whose peak is positioned at x = 6.75, begins to occur at the left of the first follower. The peak of the frontier reaches at x = 28.75 as its height is measured as 0.6871 at t = 10, Fig 3(c). Even though the third follower is not completely formed, the shape of it tends to resemble a solitary wave. One should note that both frontier and the follower waves increase their heights rapidly till they are separated from the previous one. When they are about to be separated completely from the other waves, the increase of their heights keeps but slightly. The velocity of the frontier decreases as new waves are generated as the velocities of both the first and the second followers increase slightly. The conservation laws are determined analytically as . These values are computed as M 0 = 5.225504574, E 0 = 1.503363838 and H 0 = 1.599480484 by using symbolic computational mathematical software. The absolute relative changes of the conservation laws at some specific times during the simulation process are reported in Table 5. Both polynomial and trigonometric methods seem successful to keep all conservation law values with almost the same decimal digit sensitivity when compared with each other.

Interaction of two Positive Solitary Waves Moving in the Opposite Direction
The interaction of two positive bell shape solitaries are also studied by both proposed methods. The initial condition is a particular form the N -soliton solution derived from the solution given in [4].  Table 6.

Conclusion
The collocation methods based on cubic polynomial and trigonometric B-spline functions are derived for the numerical solutions of some analytical and non-   Having no continuous derivatives of both sets of basis functions force us to reduce the order of the dispersion term u xxx to lead a coupled system of equations. Assuming the solution and its derivative in the same space satisfies to approximate to both functions by using the same basis function set. The time integration of the system is achieved by the classical Crank-Nicolson method owing to its large stability region. We measure the errors between the numerical and the analytical solutions in case the existence of the analytical solutions. The lowest three conservation laws representing momentum, energy and the Hamiltonian quantity are computed and the relative absolute changes of all laws are examined in details even for non-analytical solutions for a fair comparison of both methods.
In the first example, we investigate the numerical solution describing the propagation of a bell shaped positive solitary along the horizontal axis. Various discretization parameters are used to obtain the numerical solutions. Even though the results obtained by the polynomial method seems better when the number of grids are less, the increase of the grid numbers improved the solutions more in the trigonometric method. The comparison of absolute relative changes of conservation laws does not give a clear idea about the better method since the results obtained by both methods pretty accurate.
In the kink type solution of the Gardner equation, the polynomial method gives more accurate results for all choices of number of grids. The conservation laws obtained by both methods are sensitive in the same decimal digits in almost all cases. The perturbation of a single positive bell shaped solitary wave is derived to study wave generation for the Gardner equation successfully. Both methods generate valid solutions. The sensitivities of the absolute relative changes of the lowest conservation laws are indicators of two efficient methods. Finally, we study the interaction of two positive bell shaped solitaries propagating in the opposite directions. Both methods simulate the solutions successfully. The conservation laws are also kept during the full elastic collision and later.