# Cubic Spline Method for 1D Wave Equation in Polar Coordinates

Authors: R. K. Mohanty; Rajive Kumar; Vijay Dahiya
Journal: ISRN Computational Mathematics
 (2012)

---

## Abstract

Using nonpolynomial cubic spline approximation in space and finite difference in time direction, we discuss three-level implicit difference scheme ofO(k2+h4) for the numerical solution of 1D wave equations in polar coordinates, where k>0 and h>0 are grid sizes in time and space coordinates, respectively. The proposed method is applicable to problems with singularity. Stability theory of the proposed method is discussed, and numerical examples are given in support of the theoretical results.


---

## Body

## 1. Introduction

We consider the 1D linear singular hyperbolic equation of the form(1)∂2u∂t2=∂2u∂r2+αr∂u∂r+f(r,t),0<r<1,t>0,α=1,2
subject to the initial conditions(2)u(r,0)=ϕ(r),ut(r,0)=ψ(r),0≤r≤1
and with boundary conditions at r=0andr=1of the form(3)u(0,t)=g0(t),u(1,t)=g1(t),t≥0,
where u=u(r,t),t and r are time and distance variable, respectively. For α=1 and 2, the equation above represent, 1D wave equation in cylindrical and spherical polar coordinates, respectively. We shall assume that the initial and boundary conditions are given with sufficient smoothness to maintain the order of accuracy of the difference scheme and spline functions under consideration.In this paper, we are interested to discuss a new approximation based on cubic spline polynomial for the solution to singular hyperbolic equation (1). During last three decades, several numerical schemes for the solution of two-point boundary value problems and partial differential equations have been developed by many researchers. First Bickley [1] and Fyfe [2] have discussed the second-order accurate spline method for the solution of linear two-point boundary value problems. Jain and Aziz [3] have derived fourth-order cubic spline method for solving the nonlinear two-point boundary value problems with significant first derivative terms. Further, Khan and Aziz [4] have studied parametric cubic spline method to the solution of a system of second-order boundary value problem. In 1974, Raggett and Wilson [5] have used a cubic spline technique of lower order accuracy to solve the wave equation. Later, Fleck Jr [6] has proposed a cubic spline method for solving the wave equation of linear optics. In recent years, Mohanty [7], Gao and Chi [8], Rashidinia et al. [9, 10], Mohebbi and Dehghan [11], Ding and Zhang [12, 13], and Liu and Liu [14] have derived various numerical methods for solution of nonsingular 2D hyperbolic equations. A difference method of accuracy two in time and four in space for the solution of differential equation (1) has been studied by Mohanty [15] using finite difference method. A new discretization method of order four for the numerical solution of one-space dimensional second-order nonlinear hyperbolic equations has been studied by Mohanty et al. [16, 17]. Recently, Mohanty and Dahiya [18] have derived highly accurate cubic spline method for the solution of parabolic equations. In this paper, using nine grid points, we discuss a new three-level implicit cubic spline finite difference method of accuracy two in time and four in space for the solution of differential equation (1). To the authors’ knowledge, no cubic spline method of accuracy two in time and four in space for the solution of (1) has been discussed in the literature so far. In next section, we discuss the derivation of the proposed cubic spline method. It has been experienced in the past that the cubic spline solutions for the wave equation in polar coordinates usually deteriorate in the vicinity of the singularity. We overcome this difficulty by modifying the method in such a way that the solutions retain its order and accuracy everywhere in the vicinity of the singularity. In Section 3, we discuss the linear stability analysis of the proposed cubic spline method. In Section 4, we compare the computed results with the one obtained by the method discussed in [17]. Final remarks are given in Section 5.


## 2. The Method Based on Cubic Spline Approximation

The solution domain[0,1]×[t>0] is divided into (N+1)×J mesh with the spatial step size h=1/(N+1)in r-direction and the time step size k>0 in t-direction, respectively, where N and J are positive integers. The mesh ratio parameter is given by λ=k/h>0. Grid points are defined by (rl,tj)=(lh,jk),l=0,1,2,…,J. The notations uljandUlj are used for the discrete approximation and the exact value of u(r,t) at the grid point (rl,tj), respectively.At the grid point(rl,tj), we denote(4)Uab=∂a+bU∂rla∂tjb,fab=∂a+bf∂rla∂tjb.LetSj(r) be the cubic spline interpolating polynomial of the function u(r,tj) between the grid points (rl-1,tj) and (rl,tj) and be given by(5)Sj(r)=(rl-r)36hMl-1j+(r-rl-1)36hMlj+(Ul-1j-h26Ml-1j)(rl-rh)+(Ulj-h26Mlj)(r-rl-1h),rl-1≤r≤rl,l=1,2,…,N+1,j=1,2,…,J,
which satisfies at jth level the following properties:(i)
Sj(r) coincides with a polynomial of degree three on each [rl-1,rl], l=1,2,…,N+1, j=1,2,…J,(ii)
Sj(r)∈C2[0,1], and(iii)
Sj(rl)=Ulj, l=0,1,2,…,N+1, j=1,2,…,J.The derivatives of cubic spline functionSj(r) are given by (6)Sj′(r)=-(rl-r)22hMl-1j+(r-rl-1)22hMlj+Ulj-Ul-1jh-h6[Mlj-Ml-1j],Sj′′(r)=(rl-r)hMl-1j+(r-rl-1)hMlj,
where(7)Mlj=Sj′′(rl)=Urrlj=Uttlj-αrlUrlj-flj,l=0,1,2,…,N+1,j=1,2,…,J,(8)mlj=Sj′(rl)=Urlj=Ulj-Ul-1jh+h6[Ml-1j+2Mlj],rl-1≤r≤rl,
and replacing h by “-h,” we get(9)mlj=Sj′(rl)=Urlj=Ul+1j-Uljh-h6[Ml+1j+2Mlj],rl-1≤r≤rl.
Combining (8) and (9), we obtain (10)mlj=Sj′(rl)=Urlj=Ul+1j-Ul-1j2h-h12[Ml+1j-Ml-1j].
Further, from (8), we have(11)ml+1j=Sj′(rl+1)=Url+1j=Ul+1j-Uljh+h6[Mlj+2Ml+1j],
and, from (9), we have(12)ml-1j=Sj′(rl-1)=Url-1j=Ulj-Ul-1jh-h6[Mlj+2Ml-1j].
We consider the following approximations:(13)U̅tlj=(Ulj+1-Ulj-1)2k=Utlj+O(k2),U̅tl+1j=(Ul+1j+1-Ul+1j-1)2k=Utl+1j+O(k2+k2h),U̅tl-1j=(Ul-1j+1-Ul-1j-1)2k=Utl-1j+O(k2-k2h),U̅ttlj=(Ulj+1-2Ulj+Ulj-1)k2=Uttlj+O(k2),U̅ttl+1j=(Ul+1j+1-2Ul+1j+Ul+1j-1)k2=Uttl+1j+O(k2+k2h),U̅ttl-1j=(Ul-1j+1-2Ul-1j+Ul-1j-1)k2=Uttl-1j+O(k2-k2h),U̅rlj=(Ul+1j-Ul-1j)2h=Urlj+h26U30+O(k2+h4),U̅rl+1j=(3Ul+1j-4Ulj+Ul-1j)2h=Url+1j-h23U30+O(k2+k2h),U̅rl-1j=(-3Ul-1j+4Ulj-Ul+1j)2h=Url-1j-h23U30+O(k2-k2h).
Since the derivative values of Sj(r) defined by (7), (10), (11), and (12) are not known at each grid point (rl,tj), we use the following approximations for the derivatives of Sj(r).Let(14)M̅lj=U̅ttlj-αrlU̅rlj-flj,M̅l+1j=U̅ttl+1j-αrl+1U̅rl+1j-fl+1j,M̅l-1j=U̅ttl-1j-αrl-1U̅rl-1j-fl-1j,m̂lj=Ul+1j-Ul-1j2h-h12[M̅l+1j-M̅l-1j],m̂l+1j=Ul+1j-Uljh+h6[M̅lj+2M̅l+1j],m̂l-1j=Ulj-Ul-1jh-h6[M̅lj+2M̅l-1j],
where m̂lj and M̅lj are approximations to urlj and urrlj, respectively.We may rewrite the differential equation (1) as(15)∂2u∂r2=∂2u∂t2-αr∂u∂r-f(r,t)≡ϕ(r,t)(say).Let us denoteϕlj=ϕ(rl,tj).A fourth-order method (see [3]) based on cubic spline approximations for the differential equation (15) may be written as(16)Ul+1j-2Ulj+Ul-1j=h212[ϕ̂l+1j+ϕ̂l-1j+10ϕ̂lj],
where(17)ϕ̂l+1j=U¯ttl+1j-αrl+1m̂l+1j-fl+1j,ϕ̂l-1j=U¯ttl-1j-αrl-1m̂l-1j-fl-1j,ϕ̂lj=U¯ttlj-αrlm̂lj-flj.Multiplying throughout by 6λ2 and by the help of the approximations (17), from (16), we obtain a cubic spline finite difference method with accuracy of O(k2+h4) for the solution of differential equation (1) as(18)6λ2[Ul+1j-2Ulj+Ul-1j]=k22[U̅ttl+1j+U̅ttl-1j+10U̅ttlj]-k22[αrl+1m̂l+1j+αrl-1m̂l-1j+10αrlm̂lj]-k22[fl+1j+fl-1j+10flj].Note that the method (18) is of O(k2+h4) for the numerical solution of (1). However, the method fails to compute at l=1. We modify the method in such a manner that it retains its order and accuracy in the vicinity of the singularity.We use the following approximations:(19)1rl+1=1rl-hrl2+h2rl3-O(h3),1rl-1=1rl+hrl2+h2rl3+O(h3),fl+1j=flj+hf10+h22f20+O(h3),fl-1j=flj-hf10+h22f20-O(h3),αrl+1U̅rl+1j+fl+1j=12hαrl+1(2μrδr+2δr2)Ulj+fl+1j,αrl-1U̅rl-1j+fl-1j=12hαrl-1(2μrδr-2δr2)Ulj+fl-1j,αrlU̅rlj+flj=12hαrl(2μrδr)Ulj+flj.
where μrul=(1/2)(u1+(1/2)+u1-(1/2)) and δrul=(u1+(1/2)-u1-(1/2)). Substituting the approximations (19) into (18) and neglecting higher order terms, we get(20)(12+δr2)δt2Ulj-12λ2δr2Ulj=λ2h2(12αrl+2h2αrl3)(2μrδr)Ulj+λ2h2(α(α-1)rl2)δr2Ulj-h2αrl2δt2Ulj-hα2rl(δt22μrδr)Ulj+k2[12f00+h2(f20+αrl(f10-f00))].Note that the cubic spline method (20) is of O(k2+h4) for the numerical solution of differential equation (1), which is free from the terms 1/rl±1 hence can be computed for l=1(1)N,j=0,1,2,….


## 3. Stability Analysis

Now we discuss the stability analysis for the scheme (20). For stability, we consider the homogeneous part of the scheme (20), which can be written as (21)[R0+112(δr2+R1(2μrδr))]δt2Ulj=λ2[R2δr2+R3(2μrδr)]Ulj,
where (22)R0=1+h2α12r2,R1=hα2r,R2=1+h212[α(α-1)r2],R3=R1+h324(2αr3).It is difficult to find the stability region for the scheme (21). In order to obtain a valid stability region, we may modify the scheme (21) (see [19]) as(23)[R0+112(R2δr2+R3(2μrδr))]δt2Ulj=λ2[R2δr2+R3(2μrδr)]Ulj.The additional terms added in (23) are of high order and do not affect the accuracy of the scheme.PutUlj=Alξjeiβl=Aleiϕjeiβl (where ξ=eiϕ such that |ξ|=1) in the modified scheme (23), we get(24)ξ-2+ξ-1=-4sin2ϕ2=λ2[R2{(A+A-1)cos⁡β-2+i(A-A-1)sin⁡β}+R3{(A-A-1)cos⁡β+i(A+A-1)sin⁡β}]R0+112[R2{(A+A-1)cos⁡β-2+i(A-A-1)sin⁡β}+R3{(A-A-1)cos⁡β+i(A+A-1)sin⁡β}],where A is a nonzero real parameter to be determined. Left-hand side of (24) is a real quantity. Thus, the imaginary part of right-hand side of (24) must be zero.Thus, we obtain(25)R2(A-A-1)+R3(A+A-1)=0⟹(R2+R3)A-(R2-R3)A-1=0⟹A=R2-R3R2+R3,A-1=R2+R3R2-R3
providedR2±R3>0,thatis,-R2<R3<R2.Hence,A+A-1=2R2/R22-R32andA-A-1=-2R3/R22-R32.Substituting the values ofA,A-1,A+A-1,andA-A-1in (24) and (25), we obtain(26)-4sin2ϕ2=λ2[2R22-R32cos⁡β-2R2]R0+(1/6)[R22-R32cos⁡β-R2]=2λ2[R22-R32cos⁡β-R2]R0+(1/6)[R22-R32cos⁡β-R2]⟹sin2ϕ2=λ2[R2-R22-R32cos⁡β]2R0+(1/3)[R22-R32cos⁡β-R2]=λ2[R2+R22-R32((2sin2β/2)-1)]2R0-(1/3)[R2+R22-R32((2sin2β/2)-1)]≡ND.Since0≤sin2ϕ/2≤1, the method (23) is stable as long as N≤D, which is true if N≤Max(N)≤Min(D)≤D.Hence, the required stability condition is(27)Max⁡(λ2[R2+R22-R32(2sin2β2-1)])≤Min⁡(2R0-13[R2+R22-R32(2sin2β2-1)])⟹λ2[R2+R22-R32]≤2R0-13[R2-R22-R32]0<λ2≤2R0-(1/3)[R2-R22-R32]R2+R22-R32,
which is the required stability interval for the scheme (23).


## 4. Numerical Results

A difference method ofO(k2+h2), for the differential equation (1) may be written as(28)u̅ttlj=u̅rrlj+αru̅rlj+f(rl,tj),l=1(1)N,j=0,1,2,….Note that the proposed cubic spline method (23) and the difference method (28) for second-order hyperbolic equation (1) are three-level schemes. The value of u at t=0 is known from the initial condition. To start any computation, it is necessary to know the numerical value of u of required accuracy at t=k. In this section, we discuss an explicit scheme of O(k2) for u at first time level, that is, at t=k, in order to solve the differential equation (1) using the proposed method (23) and second-order method (28).Since the values ofu and ut are known explicitly at t=0, this implies all their successive tangential derivatives are known at t=0, that is, the values of u,ur,urr,…,ut,utr,…, and so forth, are known at t=0.An approximation foru of O(k2) at t=k may be written as(29)ul1=ul0+kutl0+k22(utt)l0+O(k3).From (1), we have(30)(utt)l0=[urr+αrur+f(r,t)]l0.Thus, using the initial values and their successive tangential derivative values, from (30), we can obtain the value of (utt)l0, and, then ultimately, from (29), we can compute the value of u at first time level, that is, at t=k.We solve the differential equation (1) in the region 0<r<1,t>0, whose exact solution is given by u(r,t)=cosh(r)·sin(t). The maximum absolute errors at t=5.0 are tabulated in Table 1 for various values of λ=k/h=0.8 and in Table 2 for γ=k/h2=4.0. We have compared the numerical results of the proposed method with the results obtained by using the method discussed in [17] in terms of accuracy. All computations were performed using double precision arithmetic.Table 1
λ=k/h=0.8, t=5.0.
hProposedO(k2+h4) methodO(k2+h2) methodα=1α=2α=1α=21/160.6222 (−4)0.3981 (−4)0.2094 (−3)0.2760 (−3)1/320.1593 (−4)0.1057 (−4)0.5404 (−4)0.6849 (−4)1/640.3997 (−5)0.2699 (−5)0.1365 (−4)0.1705 (−4)1/1280.9944 (−6)0.6797 (−6)0.3412 (−5)0.4257 (−5)Table 2
γ=k/h2=4.0, t=5.0.
hProposedO(k2+h4) methodO(k4+h4) methoddiscussed in [17]α=1α=2α=1α=21/100.3227 (−4)0.1658 (−4)0.6280 (−4)0.5558 (−4)1/200.1967 (−5)0.1019 (−5)0.3884 (−5)0.3378 (−5)1/400.1174 (−6)0.6282 (−7)0.2322 (−6)0.2084 (−6)1/800.6935 (−8)0.3897 (−8)0.1408 (−7)0.1266 (−7)A relation between the exact solutionuexact and the approximate numerical solution u(h) as given in the following equation:(31)uexact=u(h)+Ahp+⋯higher-orderterms,
where h is the measure of the mesh discretization, A is a constant, and p is the order (rate) of convergence. If the meshes to be considered are sufficiently refined, the higher-order terms can be neglected. Then, the maximum absolute errors Eh can be approximated as (32)Eh=Max⁡|uexact-u(h)|≅Ahp.Taking the logarithm of both sides of (32), we obtain(33)log⁡(Eh)=log⁡(A)+plog⁡(h).For two different refined mesh spacingh1 and h2, we have the following two relations(34a)log⁡(Eh1)=log⁡(A)+plog⁡(h1),(34b)log⁡(Eh2)=log⁡(A)+plog⁡(h2).Subtracting (34b) from (34a), we obtain the order (rate) of convergence (35)p=log⁡(Eh1)-log⁡(Eh2)log⁡(h1)-log⁡(h2),
where Eh1 and Eh2 are maximum absolute errors for two uniform mesh widths h1 and h2, respectively. For computation of order of convergence of the proposed method, we have considered h1=1/40 and h2=1/80 in Table 2, and we found the order of convergence of the proposed method for α=1is 4.08 and for α=2 is 4.01.


## 5. Final Remarks

Available numerical methods based on spline approximations for the numerical solution of 1D wave equation in polar coordinates are ofO(k2+h2) accurate, which require nine grid points. In this paper, using the same number of grid points, we have discussed a new stable three-level implicit cubic spline finite difference method of O(k2+h4) accuracy for the solution of wave equation in polar coordinates. For a fixed parameter γ=k/h2, the proposed method behaves like a fourth-order method, which is exhibited from the computed results.



---

*Source: 302923-2011-11-20.xml*