# Applying Cubic B-Spline Quasi-Interpolation to Solve 1D Wave Equations in Polar Coordinates

Authors: Hossein Aminikhah; Javad Alavi
Journal: ISRN Computational Mathematics
 (2013)

---

## Abstract

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 errorsL2-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.


---

## Body

## 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 [1] has discussed the second-order accurate spline method for the solution of linear two-point boundary value problems. Raggett and Wilson [2] have used a cubic spline technique of lower order accuracy to solve the wave equation. Chawla et al. [3] solved the one-dimensional transient nonlinear heat conduction problems using the cubic spline collocation method in 1975. Rubin and Khosla [4] 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 [5] 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 [6], Mohanty [7], Mohebbi and Dehghan [8], Zhu and Wang [9], Ma et al. [10], Dosti and Nazemi [11], Wang et al. [12], and other researchers [13–16] 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),t≥0,
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. [17] 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 Section2, 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 [18] 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,xj≤r<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, 0≤j≤n, 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.Figure 1
The B-splines for the knot sequenceX10=(1,1,1,1,2,3,4,5,6,7,8,9,10,11,11,11,11), Bj,3, j=1,2,…,13.In [19] 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 [19], 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 ofQdf 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 [19]. For any subinterval Ik=[rk-1,rk], 1≤k≤n, 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=maxr∈Ik|f(r)-p(r)|. Therefore, forf∈Cd+1(I), this implies that [19]
(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),3≤j≤n+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 [11]. 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-321300…00-13-121-1600…00112-23023-1120…000112-23023-112…00⋮⋮⋮⋮⋮⋮⋮⋮⋮00…112-23023-112000…0112-23023-11200…0016-1121300…00-1332-3116),D2=(2-54-100…001-21000…00-1653-353-160…000-1653-353-16…00⋮⋮⋮⋮⋮⋮⋮⋮⋮00…-1653-353-16000…0-1653-353-1600…0001-2100…00-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 thatUk=(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 [20], 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+1∥L∞=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+1∥L∞≤|-16s+112w|∥uik∥L∞+|53s-23w|∥uik∥L∞+|-3s+2|∥uik∥L∞+|53s+23sα|∥uik∥L∞+|16s+112sα|∥uik∥L∞+τ2Gk+Ak-1,
where Gk=supi|g(ri,tk)| and Ak-1=supi|uik-1|. We set τ2Gk/∥uik∥L∞=dLk, Ak-1/∥uik∥L∞=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+1∥L∞≤(B+dLk+vlk-1)∥uik∥L∞.
It implies that the method is stable if B+dLk+vlk-1≤C0.


## 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 theL2 and L∞ error norms for the test problems. The error norms are defined as
(25)L2=h∑j=0n|(uje-uja)|2,L∞=max0≤j≤n|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 0≤r≤1, t≥0, α=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),t≥0.The exact solution of this example isu(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.Table 1
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
-
07Figure 2
Exact solution of Example1 for 0≤r≤1 and 0≤t≤5.Figure 3
Numerical solution of Example1 using h=0.005 and τ=0.0005 for 0≤r≤1 and 0≤t≤5.Figure 4
Absolute error of Example1 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),0≤r≤1,u(0,t)=0,u(1,t)=e-ttanh(1),t≥0.
In Figures5 and 6 exact and numerical solutions corresponding to 0≤r≤1 and 0≤t≤5 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.Table 2
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
-
06Figure 5
Exact solution of Example2 for 0≤r≤1 and 0≤t≤5.Figure 6
Numerical solution of Example2 using h=0.005 and τ=0.0005 for 0≤r≤1 and 0≤t≤5.Figure 7
Absolute error of Example2 using h=0.005 and τ=0.0005 for 0≤r≤1 and 0≤t≤5.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),t≥0.The space-time graph of the exact and estimated solution up tot=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.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
-
06Figure 8
Exact solution of Example3 for 0≤r≤1 and 0≤t≤5.Figure 9
Numerical solution of Example3 using h=0.005 and τ=0.0005 for 0≤r≤1 and 0≤t≤5.Figure 10
Absolute error of Example3 using h=0.005 and τ=0.0005 for 0≤r≤1 and 0≤t≤5.


## 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 findingL2 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.



---

*Source: 710529-2013-12-07.xml*