ISRN.COMPUTATIONAL.MATHEMATICS ISRN Computational Mathematics 2090-7842 Hindawi Publishing Corporation 710529 10.1155/2013/710529 710529 Research Article Applying Cubic B-Spline Quasi-Interpolation to Solve 1D Wave Equations in Polar Coordinates http://orcid.org/0000-0002-2378-5782 Aminikhah Hossein Alavi Javad Peng Y. Zhou J. G. Department of Applied Mathematics School of Mathematical Sciences University of Guilan P.O. Box 1914 Rasht 41938 Iran guilan.ac.ir 2013 7 12 2013 2013 27 08 2013 14 10 2013 2013 Copyright © 2013 Hossein Aminikhah and Javad Alavi. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

We provide numerical solution to the one-dimensional wave equations in polar coordinates, based on the cubic B-spline quasi-interpolation. The numerical scheme is obtained by using the derivative of the quasi-interpolation to approximate the spatial derivative of the dependent variable and a forward difference to approximate the time derivative of the dependent variable. The accuracy of the proposed method is demonstrated by three test problems. The results of numerical experiments are compared with analytical solutions by calculating errors L2-norm and L-norm. The numerical results are found to be in good agreement with the exact solutions. The advantage of the resulting scheme is that the algorithm is very simple so it is very easy to implement.

1. Introduction

The term “spline” in the spline function arises from the prefabricated wood or plastic curve board, which is called spline, and is used by the draftsman to plot smooth curves through connecting the known point. The use of spline function and its approximation play an important role in the formation of stable numerical methods. As the piecewise polynomial, spline, especially B-spline, have become a fundamental tool for numerical methods to get the solution of the differential equations. In the past, several numerical schemes for the solution of boundary value problems and partial differential equations based on the spline function have been developed by many researchers. As early in 1968 Bickley  has discussed the second-order accurate spline method for the solution of linear two-point boundary value problems. Raggett and Wilson  have used a cubic spline technique of lower order accuracy to solve the wave equation. Chawla et al.  solved the one-dimensional transient nonlinear heat conduction problems using the cubic spline collocation method in 1975. Rubin and Khosla  first proposed the spline alternating direction implicit method to solve the partial differential equation using the cubic spline and enhanced accuracy of the approximate solution of the second derivative to the same as that of the first derivative. Jain and Aziz  have derived fourth-order cubic spline method for solving the nonlinear two-point boundary value problems with significant first derivative terms. In recent years, El-Hawary and Mahmoud , Mohanty , Mohebbi and Dehghan , Zhu and Wang , Ma et al. , Dosti and Nazemi , Wang et al. , and other researchers  have derived various numerical methods for solution of partial differential equations based on the spline function.

The hyperbolic partial differential equations model the vibrations of structures (e.g., buildings, beams, and machines) and are the basis for fundamental equations of atomic physics.

The one-dimensional linear singular hyperbolic equation is given by (1)Utt=Urr+αrUr+g(r,t),0<r<1,t>0,α=1,2, subject to the initial conditions (2)u(r,0)=φ0(r),ut(r,0)=φ1(r),0<r<1, and Dirichlet boundary conditions at r=0 and r=1 of the form (3)u(0,t)=f0(t),u(1,t)=f1(t),t0, where u=u(r,t), t is time variable and r is distance variable, and subscripts r and t denote differentiation. For α=1 and α=2, the equation above represents one-dimensional wave equation in cylindrical and spherical polar coordinates, respectively. We assume that φ0(r), φ1(r), and f0(t), f1(t) and their derivatives are continuous functions of r and t, respectively.

Mohanty et al.  have a numerical solution equation (1). In this paper, we provide a numerical scheme to solve singular hyperbolic equation (1) using the derivative of the cubic B-spline quasi-interpolation to approximate the spatial derivative of the differential equations and utilize a forward difference to approximate the time derivative such as [9, 11] shown.

This paper is organized as follows. In Section 2, the univariate spline quasi-interpolants were introduced and we obtain the numerical schemes using cubic B-spline interpolation to solve singular hyperbolic equation (1). The stability of this method is studied in Section 3. Numerical experiments for various test problems are solved to assess the accuracy of the technique and the maximum absolute errors will be presented in Section 4. Finally, we give some concluded remarks in Section 5.

2. Univariate Spline Quasi-Interpolants Applied to Singular Hyperbolic Equation

According to recurrence relation of B-spline  the jth B-spline of degree d for the knot sequence x:=(xj) is denoted by Bj,d or Bj and is obtain by the rule (4)Bj,d(r)=ωj,dBj,d-1(r)+(1-ωj+1,d)Bj+1,d-1(r) with (5)ωj,d(r)=r-xjxj+d-1-xj,Bj,0(r)={1,xjr<xj+10,othetwise. Now assume that Rn={rj,j=0,1,,n} is a uniform partition of interval I=[a,b], where r0=a, rn=b and with meshlength h=(b-a)/n and consider that Xn=(xj,j=-d,-d+1,,n+d) subject to x-d=x-d+1==x-1=a and xj=rj, 0jn, and xn=xn+1==xn+d=b. Moreover suppose that S={Bj,j=1,2,,n+d} and that Bj is the B-spline of degree d for the knot sequence Xn. We denote by Sd(Rn) the space of splines of degree d and Cd-1 on the uniform partition Rn. Let the B-spline basis of Sd(Rn) be S. With these notations, the support of Bj is supp(Bj)=[xj-d-1,xj]. Figure 1 shows the thirteen B-splines for the knot sequence X10=(1,1,1,1,2,3,4,5,6,7,8,9,10,11,11,11,11). Note that in Figure 1  B(j)=Bj(r), d=3.

The B-splines for the knot sequence X10=(1,1,1,1,2,3,4,5,6,7,8,9,10,11,11,11,11), Bj,3, j=1,2,,13.

In  univariate spline quasi-interpolants (abbreviation QIs) can be defined as operators of the form Qdf=j=1n+dμj(f)Bj. We denote by Πd the space of polynomials of total degree at most d. In general we impose that Qdp=p for all pΠd. As a consequence of this property, the approximation order is O(hd+1) on smooth functions. According to , we assume that the coefficient μj(f) is a linear combination of discrete values of f at some points in the neighborhood of supp(Bj).

The main advantage of QIs is that they have a direct construction without solving any system of linear equations. Moreover, they are local, in the sense that the value of Qdf depends only on values of f in a neighborhood of r. Finally, they have a rather small infinity norm, so they are nearly optimal approximants . For any subinterval Ik=[rk-1,rk], 1kn, and for any function f, (6)f-Qdf,Ik(1+Qd)d,Ik(f,Πd), where the distance of f to polynomials is defined by (7)d,Ik(f,Πd)=inf{f-p,Ik,pΠd}. Here f-p,Ik=maxrIk|f(r)-p(r)|. Therefore, forfCd+1(I), this implies that  (8)f-Qd=O(hd+1). Since the cubic spline has become the most commonly used spline, we use cubic B-spline quasi-interpolation in this paper.

For cubic QI, (9)Q3f=j=1n+3μj(f)Bj, and (4) implies that (10)f-Q3=O(h4). Let f(Rn)={fj=f(rj),j=0,1,,n}; the coefficient functional are, respectively, (11)μ1(f)=f0,μ2(f)=118(7f0+18f1-9f2+2f3),μj(f)=16(-fj-3+8fj-2-fj-1),3jn+1,μn+2(f)=118(2fn-3-9fn-2+18fn-1+7fn),μn+3(f)=fn. For approximate derivatives of f by derivatives of Q3f up to the order h3, we can evaluate the value of f at xi by (Q3f)=j=1n+3μj(f)Bj and (Q3f)′′=j=1n+3μj(f)Bj′′. We set Y=(f0,f1,,fn)T, Y=(f0,f1,,fn)T, and Y′′=(f0′′,f1′′,,fn′′)T where fj=(Q3f)(rj), fj′′=(Q3f)′′(rj), j=1,2,,n. Using (4), we can compute Bj(r), Bj′′(r), and d=3, j=1,2,,n+3; see . By solution of the linear systems (12)fi=j=1n+3μj(f)Bj(ri),i=0,1,,n,fi′′=j=1n+3μj(f)Bj′′(ri),i=0,1,,n, we obtain the differential formulas for cubic B-spline QI as (13)Y=1hD1Y,Y′′=1h2D2Y, where D1,D2(n+1)×(n+1) and obtain as follows:(14)D1=(-1163-32130000-13-121-160000112-23023-1120000112-23023-1120000112-23023-1120000112-23023-112000016-112130000-1332-3116),D2=(2-54-100001-2100000-1653-353-160000-1653-353-160000-1653-353-160000-1653-353-16000001-210000-14-52).Now, we present the numerical scheme for solving one-dimensional linear singular hyperbolic equation (1) with initial conditions (2) and Dirichlet boundary conditions (3) based on the cubic B-spline quasi-interpolant.

Discretizing (1), (15)Utt=Urr+αrUr+g(r,t), in time, we get (16)uik+1=τ2((urr)ik+αri(ur)ik+g(ri,tk))+2uik-uik-1, where uik is the approximation of the value u(r,t) at (ri,tk), tk=kτ, and τ is the time step. Then, we use the derivatives of the cubic B-spline quasi-interpolant Q3u(ri,tk) to approximate (ur)ik and (urr)ik.

Assume that Uk=(u0k,u1k,,unk) is known for the nonnegative integer k. We set unknown vectors as (17)Urk=((ur)0k,(ur)1k,,(ur)nk)T,Urrk=((urr)0k,(urr)1k,,(urr)nk)T. Then (18)Urk=1hD1Uk,Urrk=1h2D2Uk. From the initial conditions (2) and Dirichlet boundary conditions (3), we can compute the numerical solution of (1) step by step using the scheme and formulas (16).

3. Stability Analysis

Sharma and Singh provided a method to study the ability of the nonlinear partial equation in , which we used to study the stability of our scheme. According to (18) and D1, D2, the scheme (16) can be rewritten as (19)uik+1=τ2h2(-16ui-2k+53ui-1k-3uik+53ui+1k-16ui+2k)+τ2αhri(112ui-2k-23ui-1k+23ui+1k-112ui+2k)+τ2g(ri,tk)+2uik-uik-1. If we set τ2/h2=s, τ2α/hri=wi, then the scheme is (20)uik+1=(-16s+112wi)ui-2k+(53s-23wi)ui-1k+(-3s+2)uik+(53s+23wi)ui+1k+(-16s-112wi)ui+2k+τ2g(ri,tk)-uik-1. Therefore we obtained (21)|uik+1||-16s+112wi||ui-2k|+|53s-23wi||ui-1k|+|-3s+2||uik|+|53s+23wi||ui+1k|+|16s+112wi||ui+2k|+τ2|g(ri,tk)|+|uik-1|. Taking the norm of (21), we have (22)uik+1L=supi|uik+1|supi|-16s+112wi|supi|ui-2k|+supi|53s-23wi|supi|ui-1k|+|-3s+2|supi|uik|+supi|53s+23wi|supi|ui+1k|+supi|16s+112wi|supi|ui+2k|+τ2supi|g(ri,tk)|+supi|uik-1|. Since supiwi=supi(τ2α/hri)=τ2α/hh=sα and infiwi=τ2α/h=w, thus from (22) we have (23)uik+1L|-16s+112w|uikL+|53s-23w|uikL+|-3s+2|uikL+|53s+23sα|uikL+|16s+112sα|uikL+τ2Gk+Ak-1, where Gk=supi|g(ri,tk)| and Ak-1=supi|uik-1|. We set τ2Gk/uikL=dLk, Ak-1/uikL=vLk-1 and B=|-(1/6)s+(1/12)w|+|(5/3)s-(2/3)w|+|-3s+2|+|(5/3)s+(2/3)sα|+|(1/6)s+(1/12)sα|; then from (23) we have (24)uik+1L(B+dLk+vlk-1)uikL. It implies that the method is stable if B+dLk+vlk-1C0.

4. Numerical Experiments

In this section, some numerical solutions of the one-dimensional linear singular hyperbolic equation in the form (1) with the initial conditions (2) and boundary conditions (3) with the scheme (16) are presented.

The versatility and the accuracy of the proposed method is measured using the L2 and L error norms for the test problems. The error norms are defined as (25)L2=hj=0n|(uje-uja)|2,L=max0jn|uje-uja|, where uje and uja are the exact and approximate solution of u in rj and arbitrary value of t, respectively.

Example 1.

In this example, we consider (1) with g(r,t)=-2cosh(r)sin(t)-(α/r)sinh(r)sin(t), and 0r1, t0, α=1. The initial condition are given by (26)u(r,0)=0,ut(r,0)=cosh(r), and the boundary conditions (27)u(0,t)=sin(t),u(1,t)=cosh(1)sin(t),t0.

The exact solution of this example is u(r,t)=cosh(r)sin(t). The root-mean-square error L2 and maximum error L are presented in Table 1. The space-time graph of the exact and numerical solution up to t=5 are shown in Figures 2 and 3. Absolute error between the numerical and analytical solution is also depicted at all mesh points in Figure 4.

Error norms and invariants (h=0.005,τ=0.0005).

Time L 2 error L error
0.5 2.6709 e - 08 3.7758 e - 08
1 2.5490 e - 07 3.2418 e - 07
1.5 5.4557 e - 07 7.2273 e - 07
2 5.2798 e - 07 6.8914 e - 07
2.5 2.0113 e - 07 2.6778 e - 07
3 1.3361 e - 07 1.9905 e - 07
3.5 1.8086 e - 07 2.2871 e - 07
4 1.5529 e - 07 1.9822 e - 07
4.5 2.7865 e - 07 3.4738 e - 07
5 4.9971 e - 07 6.5922 e - 07

Exact solution of Example 1 for 0r1 and 0t5.

Numerical solution of Example 1 using h=0.005 and τ=0.0005 for 0r1 and 0t5.

Absolute error of Example 1 using h=0.005 and τ=0.0005.

Example 2.

We consider the initial and boundary conditions for (1) as follows: (28)u(r,0)=tanh(r),ut(r,0)=-tanh(r),0r1,u(0,t)=0,u(1,t)=e-ttanh(1),t0.

In Figures 5 and 6 exact and numerical solutions corresponding to 0r1 and 0t5 are depicted. In our computations, we consider that g(r,t)=-e-t(α+2rtanh3(r)-αtanh2(r)-3rtanh(r))/r and α=2. The exact solution of this example is u(r,t)=e-ttanh(r). The maximum absolute error and the L2 norm error, at some time levels, are presented in Table 2. Absolute error between the numerical and analytical solution is also depicted at all mesh points in Figure 7.

Error norms and invariants (h=0.005,τ=0.0005).

Time L 2 error L error
0.5 6.1731 e - 07 7.9634 e - 07
1 1.1177 e - 06 1.7681 e - 06
1.5 1.5496 e - 07 2.9814 e - 07
2 6.1889 e - 07 8.4069 e - 07
2.5 2.4346 e - 07 2.9344 e - 07
3 8.9203 e - 07 1.4587 e - 06
3.5 2.8372 e - 07 4.8567 e - 07
4 7.0265 e - 07 9.5449 e - 07
4.5 1.9333 e - 07 2.3307 e - 07
5 8.6156 e - 07 1.4158 e - 06

Exact solution of Example 2 for 0r1 and 0t5.

Numerical solution of Example 2 using h=0.005 and τ=0.0005 for 0r1 and 0t5.

Absolute error of Example 2 using h=0.005 and τ=0.0005 for 0r1 and 0t5.

Example 3.

As a third test problem, we consider (1) with u(r,t)=cos(πt/2)(cosh(r)+sinh(1-r)) and α=1. The initial condition is given by (29)u(r,0)=cosh(r)+sinh(1-r),ut(r,0)=0, and the boundary conditions (30)u(0,t)=cos(πt2)(1+sinh(1)),u(1,t)=cos(πt2)cosh(1),t0.

The space-time graph of the exact and estimated solution up to t=5 is presented in Figures 8 and 9. Absolute error between the numerical and analytical solution is also depicted at all mesh points in Figure 10. The root-mean-square error and maximum error are presented in Table 3.

Error norms and invariants (h=0.005,τ=0.0005).

Time L 2 error L error
0.5 3.6465 e - 07 4.4996 e - 07
1 7.7447 e - 07 1.0921 e - 06
1.5 2.2967 e - 08 4.3014 e - 08
2 1.2812 e - 06 1.7105 e - 06
2.5 1.4234 e - 06 1.9277 e - 06
3 2.6966 e - 08 3.9557 e - 08
3.5 1.4339 e - 06 1.9391 e - 06
4 1.2373 e - 06 1.6524 e - 06
4.5 2.8677 e - 08 5.6646 e - 08
5 7.4448 e - 07 1.0497 e - 06

Exact solution of Example 3 for 0r1 and 0t5.

Numerical solution of Example 3 using h=0.005 and τ=0.0005 for 0r1 and 0t5.

Absolute error of Example 3 using h=0.005 and τ=0.0005 for 0r1 and 0t5.

5. Conclusions

In this paper, a numerical scheme for the one-dimensional linear singular hyperbolic equation is proposed using cubic B-spline quasi-interpolation. The numerical solutions are compared with the exact solution by finding L2 and L errors. From the test examples, we can say that the BSQI scheme is feasible and the error is acceptable. The implementation of the present method is a very easy, acceptable, and valid scheme.

Conflict of Interests

The authors of the paper do not have a direct financial relation that might lead to a conflict of interests for any of the authors.

Bickley W. G. Piecewise cubic interpolation and two-point boundary problems Computer Journal 1968 11 2 206 208 2-s2.0-0001165367 10.1093/comjnl/11.2.206 Raggett G. F. Wilson P. D. A fully implicit finite difference approximation to the one-dimensional wave equation using a cubic spline technique IMA Journal of Applied Mathematics 1974 14 1 75 78 2-s2.0-70450224620 10.1093/imamat/14.1.75 Chawla T. C. Leaf G. Chen W. L. Grolmes M. A. The application of the collocation method using hermite cubic spline to nonlinear transient one-dimensional heat conduction problem Journal of Heat Transfer 1975 97 4 562 569 2-s2.0-0016574968 Rubin S. G. Khosla P. K. Higher-order numerical solution using cubic splines AIAA Journal 1976 14 7 851 858 2-s2.0-0016972776 Jain M. K. Aziz T. Cubic spline solution of two-point boundary value problems with significant first derivatives Computer Methods in Applied Mechanics and Engineering 1983 39 1 83 91 2-s2.0-0020776979 El-Hawary H. M. Mahmoud S. M. Spline collocation methods for solving delay-differential equations Applied Mathematics and Computation 2003 146 2-3 359 372 2-s2.0-0042691234 10.1016/S0096-3003(02)00586-6 Mohanty R. K. An unconditionally stable difference scheme for the one-space-dimensional linear hyperbolic equation Applied Mathematics Letters 2004 17 1 101 105 2-s2.0-0942300277 10.1016/S0893-9659(04)90019-5 Mohebbi A. Dehghan M. High order compact solution of the one-space-dimensional linear hyperbolic equation Numerical Methods for Partial Differential Equations 2008 24 5 1222 1235 2-s2.0-50849102362 10.1002/num.20313 Zhu C.-G. Wang R.-H. Numerical solution of Burgers' equation by cubic B-spline quasi-interpolation Applied Mathematics and Computation 2009 208 1 260 272 2-s2.0-58549091278 10.1016/j.amc.2008.11.045 Ma L. Mo Z. Xu X. Quasi-interpolation operators based on a cubic spline and applications in SAMR simulations Applied Mathematics and Computation 2010 217 8 3853 3868 2-s2.0-78650034155 10.1016/j.amc.2010.09.045 Dosti M. Nazemi A. Solving one-dimensional hyperbolic telegraph equation using cubic B-spline quasi-interpolation International Journal of Mathematical & Computer Sciences 2011 7 2 57 Wang C.-C. Huang J.-H. Yang D.-J. Cubic spline difference method for heat conduction International Communications in Heat and Mass Transfer 2012 39 2 224 230 2-s2.0-84856773862 10.1016/j.icheatmasstransfer.2011.11.003 Kadalbajoo M. K. Tripathi L. P. Kumar A. A cubic B-spline collocation method for a numerical solution of the generalized Black-Scholes equation Mathematical and Computer Modelling 2012 55 3-4 1483 1505 2-s2.0-84855199946 10.1016/j.mcm.2011.10.040 Khuri S. A. Sayfy A. A spline collocation approach for a generalized parabolic problem subject to non-classical conditions Applied Mathematics and Computation 2012 218 18 9187 9196 2-s2.0-84860462603 10.1016/j.amc.2012.02.075 Mohanty R. K. Kumar R. Dahiya V. Cubic spline iterative method for Poisson’s equation in cylindrical polar coordinates International Scholarly Research Network ISRN Mathematical Physics 2012 2012 11 10.5402/2012/234516 234516 Mittal R. C. Jain R. K. Numerical solutions of nonlinear Burgers' equation with modified cubic B-splines collocation method Applied Mathematics and Computation 2012 218 15 7839 7855 2-s2.0-84858333742 10.1016/j.amc.2012.01.059 Mohanty R. K. Kumar R. Dahiya V. Cubic spline method for 1D wave equation in polar coordinates International Scholarly Research Network ISRN Computational Mathematics 2012 2012 6 10.5402/2012/302923 302923 De Boor C. A Practical Guide to Splines 1978 New York, NY, USA Springer Sablonnière P. Univariate spline quasi-interpolants and applications to numerical analysis Rendiconti del Seminario Matematico 2005 63 3 211 222 2-s2.0-33751546174 Sharma K. K. Singh P. Hyperbolic partial differential-difference equation in the mathematical modeling of neuronal firing and its numerical solution Applied Mathematics and Computation 2008 201 1-2 229 238 2-s2.0-44649180611 10.1016/j.amc.2007.12.051