Applied Mathematics and Computation 206 (2008) 457–464 Contents lists available at ScienceDirect Applied Mathematics and Computation journal homepage: www.elsevier.com/locate/amc Use of modified Bernstein polynomials to solve KdV–Burgers equation numerically Dambaru Bhatta Department of Mathematics, The University of Texas-Pan American, Edinburg, TX 78541-2999, USA a r t i c l e i n f o Keywords: Bernstein polynomials Galerkin’s method Korteweg-de Vries Burgers equation Runge–Kutta method a b s t r a c t Numerical solution of Korteweg-de Veries–Burgers (KdVB) equation is presented using modified Bernstein polynomials (B-polynomials). Over the spatial domain, B-polynomials are used to expand the desired solution requiring discretization with only the time variable. Galerkin method is used to determine the expansion coefficients to construct initial trial functions. We use fourth-order Runge–Kutta method to solve the system of equations for the time variable. The accuracy of the solutions is dependent on the size of the B-polynomial basis set. Numerical results obtained using this method are compared with existing analytical results. Excellent agreement is found between the exact solution and approximate solution obtained by this method. Published by Elsevier Inc. 1. Introduction Many researchers have studied Korteweg-de Vries–Burgers (KdVB) equation because of its importance in various physical phenomena. KdVB equation models the effects of dispersion, dissipation, and nonlinearity. Johnson [1] examined the travelling wave solution to the KdVB equation in phase plane by means of a perturbation method. Bona and Schonbeck [2] studied the existence and uniqueness of bounded travelling wave solution to KdVB equation. Jeffrey and Xu [3] and Jeffrey and Mohamad [4] studied the progressive wave solution to the KdVB equation analytically and obtained right going and left going waves. Demiray [5] presented a progressive wave solution using the hyperbolic tangent method. Helal and Mehanna [6] described two methods to find the soliton solutions to the KdVB equation, one is a numerical method using finite difference and the other one is a semi-analytic method using Adomian decomposition. In this paper, we present a numerical approach to solve KdVB equation which requires discretization of the time variable t only. Modified B-polynomials are used as trial functions and Galerkin method is used with initial data to obtain a system of equations in spatial variable x. The system of equations has been solved using a smaller time step in a fourth-order Runge– Kutta scheme. In the following sections, we provide details of the numerical method to solve the nonlinear KdVB equation. We also present our results and compare with the existing analytical results. 2. Mathematical formulation We consider the following form of KdVB equation: ou ou o2 u o3 u þ l1 u þ l2 2 þ l3 3 ¼ 0; ot ox ox ox E-mail address: [email protected] 0096-3003/$ - see front matter Published by Elsevier Inc. doi:10.1016/j.amc.2008.09.031 ð1Þ 458 D. Bhatta / Applied Mathematics and Computation 206 (2008) 457–464 where l1 ; l2 , and l3 are constant coefficients with the initial condition: uðx; 0Þ ¼ u0 ðxÞ: ð2Þ The second term of Eq. (1) describes nonlinearity, the third term corresponds to dissipation, and the last term represents dispersion. As limiting cases, KdVB equation (1) reduces to KdV equation when l2 ! 0 and Burgers equation when l3 ! 0. We seek a numerical solution to (1) using modified Bernstein polynomials. 2.1. B-polynomials We use modified version of Bernstein polynomials [see Gelbaum [7]] as our basis function over a closed interval ½a; b. Modified B-polynomials over ½a; b are extension of regular B-polynomials over ½0; 1: This provides greater flexibility on the boundary. The general form of the B-polynomials of nth degree is defined as Bi;n ðxÞ ¼ n ðx aÞi ðb xÞni ðb aÞn i ð3Þ n n! ¼ i!ðniÞ! . Here n! ¼ 1 2 3 n for n P 1 and 0! ¼ 1. i B-polys defined above form a complete basis over the interval ½a; b. There are ðn þ 1Þ polynomials with degree n. For convenience, we set Bi;n ðxÞ ¼ 0 if i < 0 or i > n. The details of these polynomials with their recurrence relations can also be found in the work of Bhatti and Bracken [8]. It can easily be shown that each of the B-polys is positive and also the sum of all the BP polys is unity for all real x 2 ½a; b, i.e., ni¼0 Bi;n ðxÞ ¼ 1. It is easy to show that any given polynomial of degree n can be expressed in terms of linear combination of the basis functions. Recurrence formula and derivatives of B-polys are given by for i ¼ 0; 1; . . . ; n where the binomial coefficients are given by bx x Bi;n1 ðxÞ þ Bi1;n1 ðxÞ; ba ba n 0 Bi;n ðxÞ ¼ ½Bi1;n1 Bi;n1 ; ba nðn 1Þ B00i;n ðxÞ ¼ ½Bi2;n2 2Bi1;n2 þ Bi;n2 ; ðb aÞ2 nðn 1Þðn 2Þ ½Bi3;n3 3Bi2;n3 þ 3Bi1;n3 Bi;n3 : B000 i;n ðxÞ ¼ ðb aÞ3 Bi;n ðxÞ ¼ ð4Þ ð5Þ ð6Þ ð7Þ Bhatta and Bhatti [9] presented numerical results of the solution to the KdV equation using modified Bernstein polynomials. In the present work, an approximate solution in terms of linear combination of B-polys is assumed. The initial values of the unknown coefficients, ai , are obtained with the help of Galerkin method by using the initial data. For time variable, the system of equations is solved by using fourth-order Runge–Kutta method. In the following sections, the subscript n ¼ N of Bi;N ðxÞ is dropped for simplicity. 2.2. Galerkin formulation We assume an approximate solution of the following form: ua ðx; tÞ ¼ N X ai ðtÞBi ðxÞ ð8Þ i¼1 for a 6 x 6 b. Substitution of Eq. (8) into Eq. (1) produces a residual: R¼ X a_ i Bi þ l1 i X ! ai Bi i X j ! aj B0j þ l2 X i ! ai B00i þ l3 X ! ai B000 i : ð9Þ i Here represents differentiation with respect to time t and 0 is used to denote differentiation with respect to x. Repeated evaluation of the inner product: ðR; Bk Þ ¼ 0; k ¼ 1; . . . ; N; ð10Þ produces a system of ordinary differential equations that can be written as MA_ þ ðl1 D þ l2 E þ l3 FÞA ¼ 0; where an element of A_ is a_ i and elements of M, D, E, and F are given by ð11Þ D. Bhatta / Applied Mathematics and Computation 206 (2008) 457–464 mki ¼ ðBi ; Bk Þ ¼ Z 459 b Bi Bk dx; ! X Z X aj Bi B0j ; Bk ¼ aj ð12Þ a dki ¼ j eki ¼ ðB00i ; Bk Þ ¼ fki ¼ ðB000 i ; Bk Þ ¼ Z j Bi B0j Bk dx; ð13Þ b a Z a b B00i Bk dx; ð14Þ B000 i Bk dx: ð15Þ b a The dependence of dki on the summation of the unknown coefficients aj manifests the nonlinearity of the problem. The initial values of the coefficients ai are obtained by applying the Galerkin method to the initial data: ðua u0 ; Bk Þ ¼ 0; ð16Þ i.e., X ! ai Bi ; Bk ¼ ðu0 ; Bk Þ; i X ai ðBi ; Bk Þ ¼ ðu0 ; Bk Þ: i Here u0 ðxÞ ¼ uðx; 0Þ is the initial value of uðx; tÞ. This yields a system of equations given by MA ¼ G: ð17Þ Here the elements of M are given by (12) and the elements of G are given by g k ¼ ðu0 ; Bk Þ ¼ Z b u0 Bk dx: ð18Þ a 3. Analytical solution Let us take the initial value uðx; 0Þ as uðx; 0Þ ¼ 6l22 l2 x 1 l2 x 2 þ sech : 1 þ tanh 10l3 2 10l3 25l1 l3 ð19Þ The analytical solution of this problem with the above initial data has been obtained by various researchers as follows: uðx; tÞ ¼ 6l22 l2 6l22 t 1 l2 6l22 t 2 1 þ tanh x x þ sech : 25l3 2 25l3 25l1 l3 10l3 10l3 ð20Þ This result was presented in various works by different authors such as in Eq. (2.11a) of Jeffrey and Xu [3], in Eq. (17a) of Jeffrey and Mohamad [4], and in Eq. (18) by Demiray [5]. 4. Results and discussion In this section, we present numerical results and compare those with analytical results. We apply the current approach to nonlinear KdVB equation to compute solutions numerically and then compare these solutions with exact solutions at various times. We use B-polynomials to form our trial functions for the approximate solution. First initial values of ai are obtained by solving the system of equations given by MA ¼ G, then we use these initial values to solve the system of equations given by (11) using a fourth-order Runge–Kutta technique. We solve Eq. (17) by using initial solution u0 ðxÞ as u0 ðxÞ ¼ 6l22 l2 x 1 l2 x 2 þ sech : 1 þ tanh 10l3 2 10l3 25l1 l3 ð21Þ Table 1 Values of the constants considered for computation Case 1 Case 2 Case 3 l1 l2 l3 0.01 1.0 1.0 1.0 1.0 2.0 100.0 1.0 1.0 460 D. Bhatta / Applied Mathematics and Computation 206 (2008) 457–464 In order to demonstrate the dependency of the accuracy of the solution on the number of polynomials, we use different values of N, the number of the polynomials. We consider various values of l1 ; l2 , and l3 to show that the current numerical procedure works in all these cases. The scenarios we consider are included in Table 1. 4.1. Results for case 1 For our computations of analytical and numerical work presented here, first we use l1 ¼ 0:01; l2 ¼ 1:0; l3 ¼ 100:0. The time steps are kept smaller so that the errors associated with numerical solutions are negligible compared with the errors in the approximation of Eq. (8). We choose time step as Dt ¼ 0:001. We compute the error as the difference between the exact solution and the numerical solution. Varying N, we compute the differences between the exact solution and the numerical solution. The errors are presented in Table 2 and Fig. 1 for N ¼ 5, 7. It can be seen from Fig. 1 that the error is distributed over the entire domain and that the error diminishes with increasing order N. For this case, we need only seven polynomials (i.e. N ¼ 7) to obtain the numerical results correctly upto the order 1014 . Comparisons of the results obtained by the current numerical procedure and the exact solution with l1 ¼ 0:01; l2 ¼ 1:0; l3 ¼ 100 for different times using N ¼ 7. These results are presented in Tables 3–5 for times t ¼ 0:001, 0.08, 1.05, respectively. We see an excellent agreement of the numerical results with the analytical results. Table 2 Errors in the numerical solutions for various N for case 1 x N¼5 N¼7 10.0 9.0 8.0 7.0 6.0 5.0 4.0 3.0 2.0 1.0 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 4.25826041094978E13 4.38538094726936E15 1.533773108519653E13 1.413313910347824E13 5.639932965095795E14 4.057865155004947E14 1.121325254871408E13 1.406652572200073E13 1.233457780358549E13 6.994405055138486E14 3.219646771412954E15 7.555067682574190E14 1.267319582609616E13 1.406097460687760E13 1.083577672034152E13 3.302913498259841E14 6.727951529228449E14 1.552091788425968E13 1.713629238508929E13 2.947642130379790E14 3.859135233597044E13 2.997602166487922E15 1.110223024625156E16 6.106226635438361E16 2.220446049250313E16 4.996003610813204E16 8.326672684688674E16 7.216449660063518E16 4.996003610813204E16 1.665334536937734E16 4.996003610813204E16 7.216449660063518E16 6.661338147750939E16 2.220446049250313E16 1.665334536937734E16 6.106226635438361E16 6.661338147750939E16 4.440892098500626E16 1.665334536937734E16 6.661338147750939E16 7.216449660063518E16 1.332267629550187E15 N=7 N=5 -11 3.3*10 -11 Error 2.2*10 -11 1.1*10 0 -11 -1.1*10 -11 -2.2*10 -18 -12 -6 0 6 12 18 x -----> Fig. 1. Errors in the numerical solutions with N ¼ 5, 7 for case 1. 461 D. Bhatta / Applied Mathematics and Computation 206 (2008) 457–464 Table 3 Comparison of numerical and exact solutions of KdVB equation at t ¼ 0:001 for case 1 x Numerical Exact 10.0 9.0 8.0 7.0 6.0 5.0 4.0 3.0 2.0 1.0 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 0.3575880802150530 0.3578303382618294 0.3580723607060486 0.3583141470515330 0.3585556968039936 0.3587970094710335 0.3590380845621520 0.3592789215887491 0.3595195200641290 0.3597598795035044 0.3599999994239998 0.3602398793446566 0.3604795187864354 0.3607189172722210 0.3609580743268260 0.3611969894769939 0.3614356622514037 0.3616740921806729 0.3619122787973615 0.3621502216359760 0.3623879202329717 0.3575880802150531 0.3578303382618296 0.3580723607060488 0.3583141470515334 0.3585556968039939 0.3587970094710337 0.3590380845621522 0.3592789215887493 0.3595195200641293 0.3597598795035045 0.3599999994240000 0.3602398793446566 0.3604795187864352 0.3607189172722209 0.3609580743268257 0.3611969894769936 0.3614356622514032 0.3616740921806724 0.3619122787973610 0.3621502216359755 0.3623879202329713 Table 4 Comparison of numerical and exact solutions of KdVB equation at t ¼ 0:8 for case 1 x Numerical Exact 10.0 9.0 8.0 7.0 6.0 5.0 4.0 3.0 2.0 1.0 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 0.3575876154350110 0.3578298739331014 0.3580718968295877 0.3583136836282889 0.3585552338349122 0.3587965469570571 0.3590376225042194 0.3592784599877957 0.3595190589210860 0.3597594188192997 0.3599995391995578 0.3602394195808976 0.3604790594842763 0.3607184584325748 0.3609576159506022 0.3611965315650981 0.3614352048047378 0.3616736352001351 0.3619118222838463 0.3621497655903736 0.3623874646561693 0.3575876154350127 0.3578298739331028 0.3580718968295888 0.3583136836282899 0.3585552338349131 0.3587965469570579 0.3590376225042202 0.3592784599877962 0.3595190589210864 0.3597594188192998 0.3599995391995576 0.3602394195808969 0.3604790594842751 0.3607184584325733 0.3609576159506000 0.3611965315650955 0.3614352048047347 0.3616736352001316 0.3619118222838426 0.3621497655903700 0.3623874646561660 4.2. Results for case 2 As our second example, we use l1 ¼ 1:0; l2 ¼ 1:0; l3 ¼ 1:0. The errors are presented in Fig. 2 for N ¼ 15, 17, 21. Observing the dependence of the error on the number of polynomials used in Fig. 2, we choose the number of B-polynomials used in Galerkin method as 21 ðN ¼ 21Þ for our numerical computations in this case. Comparisons of the results obtained by the current numerical procedure and the exact solution with l1 ¼ 1:0; l2 ¼ 1:0; l3 ¼ 1:0 are presented in Table 5 for time t ¼ 0:001 and 0.08. We see that the numerical results are in agreement with the analytical results. 4.3. Results for case 3 As our third and final example, we use l1 ¼ 1:0; l2 ¼ 2:0; l3 ¼ 1:0. The errors are presented in Fig. 3 for N ¼ 11, 15, 21. Observing the dependence of the error on the number of polynomials used in Fig. 3, we choose the number of B-polynomials used in Galerkin method as 21 for our numerical computations in this case. Comparisons of the results obtained by the 462 D. Bhatta / Applied Mathematics and Computation 206 (2008) 457–464 Table 5 Comparison of numerical and exact solutions of KdVB equation at t ¼ 1:05 for case 1 x Numerical Exact 10.0 9.0 8.0 7.0 6.0 5.0 4.0 3.0 2.0 1.0 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 0.3575874700092876 0.3578297286485898 0.3580717516865861 0.3583135386270945 0.3585550889758210 0.3587964022403640 0.3590374779302182 0.3592783155567788 0.3595189146333450 0.3597592746751249 0.3599993951992382 0.3602392757247214 0.3604789157725303 0.3607183148655449 0.3609574725285726 0.3611963882883524 0.3614350616735582 0.3616734922148025 0.3619116794446406 0.3621496228975736 0.3623873221100524 0.3575874700092906 0.3578297286485922 0.3580717516865882 0.3583135386270964 0.3585550889758227 0.3587964022403655 0.3590374779302194 0.3592783155567796 0.3595189146333456 0.3597592746751250 0.3599993951992379 0.3602392757247204 0.3604789157725286 0.3607183148655425 0.3609574725285696 0.3611963882883486 0.3614350616735537 0.3616734922147975 0.3619116794446353 0.3621496228975682 0.3623873221100471 -5 3.6*10 N=15 N=17 N=21 -5 2.4*10 -5 Error 1.2*10 0 -5 -1.2*10 -5 -2.4*10 -18 -12 -6 0 6 12 18 x -----> Fig. 2. Errors in the numerical solutions with N ¼ 15, 17, 21 for case 2. N=11 N=15 N=21 -2 4.4*10 Error -2 2.2*10 0 -2 -2.2*10 -2 -4.4*10 -18 -12 -6 0 6 12 18 x -----> Fig. 3. Errors in the numerical solutions with N ¼ 11, 15, 21 for case 3. current numerical procedure and the exact solution with l1 ¼ 1:0; l2 ¼ 2:0; l3 ¼ 1:0 are illustrated in Fig. 4 for time t ¼ 0:1. Numerical results are comparable with the analytical results (see Table 6). 463 D. Bhatta / Applied Mathematics and Computation 206 (2008) 457–464 Solution ---> 2 Numerical Exact 1.5 1 0.5 0 -10 -5 5 0 10 x -----> Fig. 4. Comparison of numerical and exact solutions for case 3 at t ¼ 0:1. Table 6 Comparison of numerical and exact solutions of KdVB equation for case 2 t ¼ 0:001 t ¼ 0:08 x Numerical Exact x Numerical Exact 7.0 6.5 6.0 5.5 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 1.0 0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 0.1711146167 0.1835763299 0.1964911402 0.2098062180 0.2234589883 0.2373776517 0.2514820978 0.2656852179 0.2798946003 0.2940145643 0.3079484571 0.3216011147 0.3348813666 0.3477044549 0.3599942360 0.3716850466 0.3827231371 0.3930676049 0.4026907952 0.4115781763 0.4197277288 0.4271489190 0.4338613461 0.4398931679 0.4452794071 0.4500602374 0.4542793331 0.4579823481 0.4612155721 0.1711146186 0.1835763279 0.1964911356 0.2098062138 0.2234589869 0.2373776540 0.2514821023 0.2656852220 0.2798946017 0.2940145623 0.3079484529 0.3216011106 0.3348813650 0.3477044566 0.3599942399 0.3716850506 0.3827231391 0.3930676038 0.4026907917 0.4115781724 0.4197277267 0.4271489198 0.4338613493 0.4398931716 0.4452794091 0.4500602365 0.4542793300 0.4579823449 0.4612155708 7.0 6.5 6.0 5.5 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 1.0 0.5 0.0 0.50 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 0.1706515921 0.1830952173 0.1959937467 0.2092947262 0.2229359437 0.2368459360 0.2509448867 0.2651459237 0.2793568008 0.2934819203 0.3074246220 0.3210896394 0.3343856060 0.3472274791 0.3595387521 0.3712533352 0.3823170067 0.3926883657 0.4023392538 0.4112546498 0.4194320764 0.4268805875 0.4336194260 0.4396764558 0.4450864705 0.4498894789 0.4541290510 0.4578507913 0.4611009876 0.1706515926 0.1830952134 0.1959937407 0.2092947218 0.2229359433 0.2368459401 0.2509448933 0.2651459294 0.2793568032 0.2934819190 0.3074246184 0.3210896364 0.3343856060 0.3472274828 0.3595387582 0.3712533411 0.3823170100 0.3926883652 0.4023392504 0.4112546459 0.4194320746 0.4268805890 0.4336194301 0.4396764601 0.4450864726 0.4498894778 0.4541290475 0.4578507879 0.4611009867 t=0 t=3 t=6 Solution ---> 2 1.5 1 0.5 0 -10 -5 0 5 10 x -----> Fig. 5. Solutions at various times for case 3. 15 464 D. Bhatta / Applied Mathematics and Computation 206 (2008) 457–464 Solutions for this case at various times are depicted in Fig. 5. The solutions travel to the right as seen in Fig. 5. The numerical solutions obtained by using the procedure presented in this work show excellent agreement with exact solutions. Throughout the calculation, the time steps are kept sufficiently smaller that the errors associated with the numerical integration are negligible. During the calculation, it is noticed that with larger time steps, the solution may not converge. References [1] [2] [3] [4] [5] [6] [7] [8] [9] R.S. Johnson, A nonlinear equation incorporating damping and dispersion, J. Fluid Mech. 42 (1970) 49–60. J.L. Bona, M.E. Schonbeck, Travelling solutions to the Korteweg–de Vries–Burgers equation, Proc. R. Soc. Edinburgh 101 (1985) 207–226. A. Jeffrey, S. Xu, Exact solutions to the Korteweg–de Vries–Burgers equation, Wave Motion 11 (1989) 559–564. A. Jeffrey, M.N.B. Mohamad, Exact solutions to the Korteweg–de Vries–Burgers equation, Wave Motion 14 (1991) 369–375. H. Demiray, A note on the exact travelling wave solution to the KdV–Burgers equation, Wave Motion 38 (2003) 367–369. M.A. Helal, M.S. Mehanna, A comparison between two different methods for solving KdV–Burgers equation, Chaos Soliton Fract. 28 (2006) 320–326. B.R. Gelbaum, Modern Real and Complex Analysis, John Wiley & Sons Inc., NY, 1995. M.I. Bhatti, P. Bracken, Solutions of differential equations in a B-polynomial basis, 2005, J. Comput. Appl. Math. 205 (2007) 272–280. D.D. Bhatta, M.I. Bhatti, Numerical solution of KdV equation using modified Bernstein polynomials, Appl. Math. Comput. 174 (2006) 1255–1268.
© Copyright 2026 Paperzz