Several physical processes for example dispersion of long waves in shallow water waves under gravity, bubble-liquid mixtures, ion acoustic plasma waves, fluid mechanics, nonlinear optics and wave phenomena in enharmonic crystals can be expressed by the KdV equation which was first introduced by Korteweg and de Vries . The equation was solved analytically by Zabusky, Fornberg and Whitham,  . Zabusky and Kruskal  were first obtained numerical solutions of the equation with finite difference method. Gardner et al.  demonstrated existence and uniqueness of solutions of the KdV equation. Several scientists have used various numerical methods including pseudospectral method , finite difference method  , finite element method  -  and heat balance integral method  to solve the equation. Numerical solutions of the KdV equation were obtained using differential quadrature method based on cosine expansion by B. Saka . Like the KdV equation, in recent years, various numerical methods have been improved for the solution of the MKdV equation. Kaya  calculated the explicit solutions of the higher order modified Korteweg de-Vries equation by Adomian decomposition method. MKdV equation has been solved by using Galerkins’ method with quadratic B-spline finite elements by Biswas et al. . Raslan and Baghdady   indicated the accuracy and stability of the difference solution of the MKdV equation and they obtained the numerical aspects of the dynamics of shallow water waves along lakes’ shores and beaches modeled by the MKdV equation. A new variety of (3 + 1)-dimensional MKdV equations and multiple soliton solutions for each new equation were established by Wazwaz  . Lumped Petrov-Galerkin and Galerkin methods were practiced to the MKdV equation by Ak et al.  . GKdV equation has received much less attention, presumably because of its higher nonlinearity for . The symmetry group was calculated for the equation and several classes of solutions were obtained in . Liu and Yi  developed and analyzed a Hamiltonian preserving DG method for solving the generalized KdV equation. The initial value problem of a kind of GKdV equations is considered by using Sobolev space theory and finite element method by Lai et al. . Alvarado and Omel’yanov  create a finite differences scheme to simulate the solution of the Cauchy problem and present some numerical results for the problem of the solitary waves interaction. A class of fully discrete scheme for the generalized Korteweg-de Vries equation in a bounded domain has studied by Sepulveda and Villagran . Collocation finite element method based on quintic B-spline functions is applied to the generalized KdV equation by Ak et al. . Solitary wave solution for the GKdV equation by using ADM has been obtained by Ismail et al. .
In this article, we will take in consideration for the following GKdV equation
with the homogeneous boundary conditions
and an initial condition
where t is time, x is the space coordinate, and are positive parameters. One of the primary mathematical models for describing the theory of water waves in shallow channels is the following Korteweg de-Vries (KdV) equation:
The terms and in the Equation (4) stand for the nonlinear convection and dispersion, respectively. In this paper, we have numerically solved the GKdV equation using collocation method with septic B-spline finite elements. We have investigated the motion of a single soliton wave to show the performance and profiency of the proposed method. Also we have showed the suggested method is unconditionally stable applying the von-Neumann stability analysis.
2. Septic B-Spline Collocation Method
We think of a mesh as a uniform divide of the solution area by the points with . The septic B-splines , ( ) at the knots are given by 
The set of septic B-spline functions forms a basis for the problem region of solution . The approximate solution to the exact solution in the form:
where are septic B-splines and are time dependent parameters to be identified from the boundary and collocation conditions. A characteristic finite interval is turn into the interval by a domestic coordinate conversion described by , . So septic B-splines (5) in terms of over can be written as
Using Equation (5) and Equation (6), the nodal values of and at the knots are obtained as the following:
where the symbols symbolize differentiation according to x, respectively. Using (5) and (8) in the Equation (1) this guides to a set of ordinary differential equations of the form
If time parameters and its time derivatives in Equation (9) are separated by the Crank-Nicolson form and finite difference approach, respectively:
and usual finite difference approximation
we acquired a repetition relationship between two time levels n and relating two unknown parameters for
The system (12) contains of linear equations containing unknown coefficients . To acquire a solution of this system, we require six additional restrictions. These are obtained from the boundary conditions (2) and can be used to remove and from the systems (12) which occurs a matrix equation for the unknowns of the form
The resulting system is effectively solved with a version of the Thomas algorithm and we implement an inner iteration at each time step to overcome the non-linearity caused by . Before the beginning of the solution procedure, initial parameters are established by using the initial condition and following derivatives at the boundaries;
So, by taking account (18), we obtain the following matrix form for the initial vector ;
3. Stability Analysis
To implement the von Neumann stability analysis, GKdV equation is linearized by thinking about the quantity in the nonlinear term is locally invariable. Substituting the Fourier mode , ( ) in which k is a mode number and h is the element size, into the Equation (12) gives the growth factor of the form
The modulus of the (19) is found 1, hence the linearized algorithm is unconditionally stable.
4. Test Problems
In this section, we introduce some numerical examples including: motion of single soliton wave whose exact solution is known to test validity of our algorithm for solving GKdV equation. The initial boundary value problem (1)-(2) possesses following conservative quantities;
which correspond to the mass, momentum and energy of the shallow water waves, respectively  . To compare the numerical solution with the exact solution we use the following error norms:
The Motion of Single Solitary Wave
For this test problem, Equation (1) is examined with the boundary conditions as and the initial condition where is amplitude and is width of the single soliton. The exact soliton solution of the GKdV equation is
where c and are arbitrary constants. In order to exemplify the validity of our numerical algorithm, we conceive the first case of a single soliton solution for the parameters , , , , , and , , , through the interval to compare with that of previous papers     . All parameters are given in all refarans. For these parameters, the single solitary wave has the amplitude 0.9 and 0.3, respectively. The three invariants and together with the , error norms for the problem are documented and compared in Table 1 for times up to . As seen from the table that and error norms are found small enough and the conservation of the invariants can be seen to be almost constant.
Solitary wave profiles are demonstrated at in Figure 1 in which the soliton moves to the right at a nearly unchanged speed and amplitude as time increases, as expected.
Table 1. Comparisons of results for invariants and error norms with , , , , , , and , , , , .
Figure 1. Motion of single solitary wave for (a) , , , , , and (b) , , , , .
For the second set, we choose the parameters , , , , , and 0.3 throughout the interval just to be able to compare them with earlier papers   . These values yield the amplitude 1.3416 and 0.7746 and the computations are done until time and . We calculate the values of the error norms and and invariants and for different time levels and compare them with earlier papers in Table 2. This table indicates that the error norms obtained by our method are found much better than the others and the calculated values of invariants are in good conformity with the others. The motion of solitary wave using our scheme are plotted at times and in Figure 2 in which the soliton moves to the right at a nearly unchanged speed and amplitude as time increases, as expected.
Finally, we have taken the parameters , , , , , and , , , , over the region . Thereby, solitary wave has amplitude 1.44 and 1.0, respectively. Simulations are executed to time to invent the error norms and and the numerical invariants and . The calculated values are presented in Table 3. As can be seen in Table 3, the error norms and are sensibly small and the quantities of the invariants remain almost constant during the computer run. The behaviors of solutions for values of at times and 40 are depicted in Figure 3.
In this paper, a septic B-spline collocation method has been successfully applied to the GKdV equation to examine the motion of a single solitary wave whose analytical solution is known. To show how good and accurate the numerical solutions of the test problems, we have computed the error norms and and conserved quantities and . According to the tables in the paper, one can have easily seen that our error norms are enough small and the invariants are well conserved. Stability analysis has been done and the linearized numerical scheme has been obtained unconditionally stable. Thus, we can say
Figure 2. Motion of single solitary wave for (a) , , , , , and (b) , , .
Figure 3. Motion of single solitary wave for (a) , , , , , and (b) , , .
Table 2. Comparisons of results for invariants and error norms with , , , , , and , , .
Table 3. Values of the invariants and error norms for , , , , , and , , .
that our numerical scheme is useful to obtain the numerical solutions of other important nonlinear problems in various fields.
 Korteweg, D.J. and de Vries, G. (1895) On the Change of Form of Long Waves Advancing in a Rectangular Canal and on a New Type of Long Stationary Waves. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 39, 422-443.
 Zabusky, N.J. (1967) A Synergetic Approach to Problem of Nonlinear Dispersive Wave Propagation and Interaction. In: Ames, W., Ed., Proceedings of the Symposium Nonlinear Partial Differential Equation, Academic Press, 223-258.
 Fornberg, B. and Whitham, G.B. (1978) A Numerical and Theoretical Study of Certain Nonlinear Wave Phenomena. Philosophical Transactions of the Royal Society A, 289, 373-404.
 Zabusky, N.J. and Kruskal, M.D. (1965) Interaction of Solitons in a Collisionless plasma and the Recurrence of Initial States. Physical Review Letters, 15, 240-243.
 Soliman, A.A. (2004) Collocation Solution of the Korteweg-de Vries Equation Using Septic Splines. International Journal of Computer Mathematics, 81, 325-331.
 Irk, D., Dağ, I. and Saka, B. (2006) A Small Time Solutions for the Korteweg--de Vries Equation Using Spline Approximation. Applied Mathematics and Computation, 173, 834-846.
 Canıvar, A., Sari, M. and Dağ, I. (2010) A Taylor-Galerkin Finite Element Method for the KdV Equation Using Cubic B-Splines. Physica B: Condensed Matter, 405, 3376-3383.
 Aksan, E.N. and Özdeş, A. (2006) Numerical Solution of Korteweg-de Vries Equation by Galerkin B-Spline Finite Element Method. Applied Mathematics and Computation, 175, 1256-1265.
 Ersoy, O. and Dağ, I. (2015) The Exponential Cubic B-Spline Algorithm for Korteweg-de Vries Equation. Advances in Numerical Analysis, 2015, Article ID: 367056.
 Kutluay, S., Bahadir, A.R. and Özdeş, A. (2000) A Small Time Solutions for the Korteweg-de Vries Equation. Applied Mathematics and Computation, 107, 203-210.
 Saka, B. (2009) Cosine Expansion-Based Differential Quadrature Method for Numerical Solution of the KdV Equation. Chaos, Solitons and Fractals, 40, 2181-2190.
 Kaya, D. (2005) An Application for the Higher Order Modified KdV Equation by Decomposition Method. Communications in Nonlinear Science and Numerical Simulation, 10, 693-702.
 Wazwaz, A.M. (2015) New (3+1)-Dimensional Nonlinear Evolution Equations with mKdV Equation Constituting Its Main Part: Multiple Soliton Solutions. Chaos, Solitons and Fractals, 76, 93-97.
 Ak, T., Karakoc, S.B.G. and Biswas, A. (2017) Application of Petrov-Galerkin Finite Element Method to Shallow Water Waves Model: Modified Korteweg-de Vries Equation. Scientia Iranica B, 24, 1148-1159.
 Ak, T., Karakoc, S.B.G. and Biswas, A. (2017) A New Approach for Numerical Solution of Modified Korteweg-de Vries Equation. Iranian Journal of Science and Technology, Transactions A: Science, 41, 1109-1121.
 Bracken, P. (2005) Specific Solutions of the Generalized Korteweg-de Vries Equation with Possible Physical Applications. Central European Journal of Physics, 3, 127-138.
 H. Liu and Yi, N. (2016) A Hamiltonian Preserving Discontinuous Galerkin Method for the Generalized Korteweg-de Vries Equation. Journal of Computational Physics, 321, 776-796.
 Lai, X., Cao, Q. and Twizell, E.H. (2005) The Global Domain of Attraction and the Initial Value Problems of a Kind of GKdV Equations. Chaos, Solitons and Fractals, 23, 1613-1628.
 Garcia Alvarado, M.G. and Omel’yanov, G.A. (2012) Interaction of Solitary Waves for the Generalized KdV Equation. Communications in Nonlinear Science and Numerical Simulation, 17, 3204-3218.
 Ak, T., Triki, H., Dhawan, S., Bhowmik, S.K., Moshokoae, S.P., Ullah, M.Z. and Biswas, A. (2017) Computational Analysis of Shallow Water Waves with Korteweg-de Vries Equation. Scientia Iranica B, 25, 2582-2597.
 Ismail, H.N.A., Raslan, K.R. and Salem, G.S.E. (2004) Solitary Wave Solutions for the General KDV Equation by Adomian Decomposition Method. Applied Mathematics and Computation, 154, 17-29.
 Miura, R.M., Gardner, C.S. and Kruskal, M.D. (1968) Korteweg-de Vries Equation and Generalizations. II. Existence of Conservation Laws and Constants of Motion. Journal of Mathematical Physics, 9, 1204.