# Recent Developments on Operator-Difference Schemes for Solving Nonlocal BVPs for the Wave Equation

Authors: Mehmet Emir Koksal
Journal: Discrete Dynamics in Nature and Society
 (2011)

---

## Abstract

The second-order one-dimensional linear hyperbolic equation with time and space variable coefficients and nonlocal boundary conditions is solved by using stable operator-difference schemes. Two new second-order difference schemes recently appeared in the literature are compared numerically with each other and with the rather old first-order difference scheme all to solve abstract Cauchy problem for hyperbolic partial differential equations with time-dependent unbounded operator coefficient. These schemes are shown to be absolutely stable, and the numerical results are presented to compare the accuracy and the execution times. It is naturally seen that the second-order difference schemes are much more advantages than the first-order ones. Although one of the second-order difference scheme is less preferable than the other one according to CPU (central processing unit) time consideration, it has superiority when the accuracy weighs more importance.


---

## Body

## 1. Introduction

Second-order hyperbolic differential equations with variable coefficients are of common occurrence in mathematical physics, electromagnetic fluid dynamics, elasticity, and several other areas of science and engineering [1–7]. There is a tremendous amount of work for numerically solving these equations [8–14] and the equations with constant coefficients [15–19]. Difference schemes without using any necessary condition have received great importance and attention for solving these equations.Various initial-nonlocal boundary value problems for hyperbolic equations can be reduced to the initial-value problem(1.1)d2u(t)dt2+A(t)u(t)=f(t)0≤t≤T,u(0)=φ,u′(0)=ψ,
where A(t) is an unbounded self-adjoint positive linear operator with domain D(A(t)) in an arbitrary Hilbert space H. In particular, (1.1) with the Laplace operator A(t)=Δ is the well-known wave equation.In recent years, a large cycle of research has been done on the finite difference schemes for the numerical solution of the special cases of the initial-value problem (1.1); see [8–11] and the references therein for example. These methods are stable under the inequalities and contain the connection between the grid step sizes of time and space variables.The study of difference schemes for hyperbolic equations without using any necessary condition concerning the grid step sizes is of great interest. Such a difference scheme for solving the initial-value problem (1.1) was studied for the first time in [20]. The stability estimate for the solution of the following first-order difference scheme:(1.2)τ-2(uk+1-2uk+uk-1)+Akuk+1=fk,Ak=A(tk),fk=f(tk),tk=kτ,1≤k≤N-1,Nτ=T,τ-1(u1-u0)+iA11/2u1=iA01/2u0+ψ,u0=φ,
and for its first- and second-order difference derivatives was established.In [21], the numerical solution of a wave equation with Dirichlet boundary conditions using only the first type error, defined in the third section, is studied by using the first-order difference method (1.2) and one of the second-order difference method which is defined in the following section; however, the computation time is not considered therein.In the present paper, two different types of second-order difference methods considered in [22, 23] are introduced for solving the initial-value problem (1.1) in the following section. Applying these difference schemes and the first-order difference scheme (1.2), the numerical methods are supported in the third section by considering one-dimensional wave equation with time and space variable coefficients and nonlocal boundary conditions. Finally, the fourth section contains important conclusions of the paper.


## 2. Difference Schemes

Using the Taylor expansion, we can write the difference formulas(2.1)u(tk+1)-2u(tk)+u(tk-1)τ2-u′′(tk)=O(τ2),(2.2)u(tk)-u(tk+1)+2u(tk)+u(tk-1)4=O(τ2).
Using the above difference formulas in the equation(2.3)u′′(tk)=-A(tk)u(tk)+f(tk),
and the formula (2.1) in the same equation separately,(2.4)u(tk+1)-2u(tk)+u(tk-1)τ2+14A(tk)(u(tk+1)+2u(tk)+u(tk-1))=f(tk)+O(τ2),(2.5)u(tk+1)-2u(tk)+u(tk-1)τ2+A(tk)(u(tk)+τ24A(tk)u(tk+1))=f(tk)+O(τ2)
are obtained, respectively (see [22]).Further, we have(2.6)(I+τ2A(0))u(τ)-u(0)τ=τ2(-A(0)u(0)+f(0))+ψ+O(τ2).
Neglecting the small terms O(τ2) in (2.4) and (2.5), the following two-step second-order difference schemes(2.7)uk+1-2uk+uk-1τ2+12Akuk+14Ak(uk+1+uk-1)=fk,Ak=A(tk),fk=f(tk),tk=kτ,1≤k≤N-1,Nτ=T,(I+τ2A0)τ-1(u1-u0)=τ2(f0-A0u0)+ψ,f0=f(0),u0=φ,(2.8)uk+1-2uk+uk-1τ2+Akuk+τ24Ak2uk+1=fk,Ak=A(tk),fk=f(tk),tk=kτ,1≤k≤N-1,Nτ=T,(I+τ2A0)τ-1(u1-u0)=τ2(f0-A0u0)+ψ,f0=f(0),u0=φ
are obtained. The stability estimates for the solutions of the above difference methods and for their first- and second-order difference derivatives are established using the properties of an unbounded self-adjoint positive operator in Hilbert space without using any necessary condition in [22, 23], respectively. These difference schemes are also applicable to multidimensional linear hyperbolic equations with both time and space variable coefficients.Remark 2.1.
The stability estimates are satisfied in the case of operator(2.9)A(t)u=-a(t,x)∂2u∂x2+b(t,x)∂u∂x+c(t,x)u,
with nonlocal boundary conditions u(t,0)=u(t,l),ux(t,0)=ux(t,l), 0≤t≤T. In this case, A(t) is not self-adjoint operator in H=L2[0,l]. Nevertheless, A(t)u=A0(t)u+B(t)u and A0(t) is a self-adjoint positive definite operator in H and B(t)A0-1(t) is bounded in H. The proof of this statement is based on the abstract results of [22, 23] and difference analogy of integral inequality.Note that in [24, 25], the first- and second-order difference methods generated by an integer power of A are studied for solving the main equation in (1.1) for A(t)=A with various nonlocal boundary conditions with respect to time variable. In [26, 27], the first- and second-order difference methods generated by an integer power of A are studied for solving the hyperbolic-parabolic equation for A(t)=A with various nonlocal boundary conditions with respect to time variable.Finally, in [28], high-order difference methods generated by an exact difference scheme or by the Taylor’s decomposition of functions on the three points are studied for solving the initial-value problem (1.1); the stability estimates for solutions produced by these difference methods are also obtained.


## 3. Numerical Analysis

We have not been able to obtain a sharp estimate for the constants figuring in the stability inequalities in [22, 23]. So, we will provide the following results of numerical experiments of the initial-nonlocal boundary value problem(3.1)utt-(1+t+x)(uxx-u)=(1+5(1+t+x))e-tsin⁡(2x),0<t<1,0<x<π,u(0,x)=sin⁡⁡(2x),u′(0,x)=-sin⁡(2x),0≤x≤π,u(t,0)=u(t,π),ux(t,0)=ux(t,π),0≤t≤1,
by using the second-order difference schemes (2.7) and (2.8) and compare the results with those obtained by the first-order difference scheme (1.2).The exact solution of this problem is(3.2)u(t,x)=e-tsin⁡(2x).
As the first step, using the simple formulas(3.3)u′(x0)=u(x0+h)-u(x0)h+O(h),u′(xM)=u(xM)-u(xM-h)h+O(h),
and applying the first-order difference scheme (1.2), we obtain a system of linear equations, then writing them in the matrix form, we get the second-order difference equation(3.4)Ak+1Uk+1+BUk+CUk-1=Dfk,1≤k≤M-1,U0=φ̃,U1=(1-τ)U0.
In this equation,(3.5)Ak+1=[100⋯00-1a1k+1b1k+1a1k+1⋯0000a2k+1b2k+1⋯000⋮⋮⋮⋱⋮⋮⋮000⋯bM-2k+1aM-2k+10000⋯aM-1k+1bM-1k+1aM-1k+11-10⋯0-11](M+1)×(M+1),B is a diagonal matrix with B(1,1)=B(M+1,M+1)=0, all the other diagonal elements are c,C is a diagonal matrix with C(1,1)=C(M+1,M+1)=0, all the other diagonal elements are d,D is an identity matrix with order (M+1)×(M+1), and(3.6)fk=[f0kf1k⋯fMk]1×(M+1)T,φ=[φ0φ1⋯φM]1×(M+1)T,(3.7)Us=[U0sU1s⋯UMs]1×(M+1)T,fors=k±1,k.
Further,(3.8)ank+1=-1+tk+1+xnh2,bnk+1=1τ2+(1+tk+1+xn)(2h2+1),0≤k≤N-1,0≤n≤M,c=-2τ2,d=1τ2,(3.9)fnk={0,n=0,(1+5(1+tk+xn))e-tsin⁡⁡(2xn),1≤n≤M-1,φn=sin⁡⁡(2xn),0≤n≤M,0,n=M.
To solve the resulting difference equation (3.4), we apply iterative method.Second, using the difference formulas(3.10)u′(x0)=-3u(x0)+4u(x0+h)-u(x0+2h)2h+O(h2),u′(xM)=3u(xM)-4u(xM-h)+u(xM-2h)2h+O(h2),
and applying the second-order difference scheme (2.7), we obtain again a system of linear equations, then writing them in the matrix form, we get the second-order difference equation(3.11)AkUk+1+BkUk+CkUk-1=Dfk,1≤k≤M-1,U0=φ̃,EU1=vU0+γ̃.
In (3.11),(3.12)Ak=[1000⋯000-1a1kb1ka1k0⋯00000a2kb2ka2k⋯0000⋮⋮⋮⋮⋱⋮⋮⋮⋮0000⋯aM-2kbM-2kaM-2k00000⋯0aM-1kbM-1kaM-1k-34-10⋯0-143](M+1)×(M+1),Bk=[000⋯000c1kd1kc1k⋯0000c2kd2k⋯000⋮⋮⋮⋱⋮⋮⋮000⋯dM-2kcM-2k0000⋯cM-1kdM-1kcM-1k000⋯000](M+1)×(M+1),E=[1000⋯000-1p1q1p10⋯00000p2q2p2⋯0000⋮⋮⋮⋮⋱⋮⋮⋮⋮0000⋯pM-2qM-2pM-200000⋯0pM-1qM-1pM-1-3410⋯0-14-3](M+1)×(M+1),Ck is the same with Ak excluding the first and last rows which are zeros, D is an identity matrix with order (M+1)×(M+1);fk, φ and Us are as defined before in (3.6) and (3.7), respectively, and(3.13)v=1τ,γ=[γ0γ1⋯γM]1×(M+1)T.
Further,(3.14)ank=-1+tk+xn4h2,bnk=1τ2+1+tk+xn2h2+1+tk+xn4h,0≤k≤N,0≤n≤M,cnk=-1+tk+xn2h2,dnk=-2τ2+1+tk+xnh2+1+tk+xn2,0≤k≤N,0≤n≤M,pn=-τ(1+xn)2h2,qn=1τ2+τ(1+xn)h2+τ(1+xn)2,0≤n≤M,γn=(-1+τ2(1+5(1+xn)))sin⁡⁡(2xn),0≤n≤M,fnk and φn are as defined before in (3.9).To solve the difference equation (3.11), we apply the same procedure used for (3.4).Finally, using the formulas (3.10) and the difference formulas(3.15)u′′(x0)=2u(x0)-5u(x0+h)+4u(x0+2h)-u(x0+3h)h2+O(h2),u′′(xM)=2u(xM)-5u(xM-h)+4u(xM-2h)-u(xM-3h)h2+O(h2),u′′′(x0)=-5u(x0)+18u(x0+h)-24u(x0+2h)+14u(x0+3h)-3u(x0+4h)2h3+O(h2),u′′′(xM)=5u(xM)-18u(xM-h)+24u(xM-2h)-14u(xM-3h)+3u(xM-4h)2h3+O(h2),
and applying the second-order difference scheme (2.8), we get the same system of linear equations in the matrix form(3.16)AkUk+1+BkUk+CUk-1=Dfk,1≤k≤M-1,U0=φ̃,EU1=vU0+γ̃..
In these equations,(3.17)Ak=[100000⋯00000-1-34-1000⋯000-14-3a2kb2kc2kd2ke2k0⋯0000000a3kb3kc3kd3ke3k⋯000000⋮⋮⋮⋮⋮⋮⋱⋮⋮⋮⋮⋮⋮000000⋯aM-3kbM-3kcM-3kdM-3keM-3k0000000⋯0aM-2kbM-2kcM-2kdM-2keM-2k2-54-100⋯001-45-2-518-2414-30⋯0-314-2418-5](M+1)×(M+1),Bk=[00000⋯0000000000⋯0000000y2kj2ky2k⋯00000000y3kj3k⋯00000⋮⋮⋮⋮⋮⋱⋮⋮⋮⋮⋮00000⋯yM-3kjM-3kyM-3k0000000⋯0yM-2kjM-2kyM-2k000000⋯0000000000⋯00000](M+1)×(M+1),C is a diagonal matrix with C(1,1)=C(2,2)=C(M,M)=C(M+1,M+1)=0, all the other diagonal elements are z,D is an identity matrix as defined before, fk, φ, and Us are the same as defined in (3.6) and (3.7), respectively, and E and v, γ are also the same as defined in (3.12) and (3.13). Further,(3.18)ank=(1+tk+xn)2τ24h4-(1+tk+xn)τ24h3,0≤k≤N,0≤n≤M,bnk=-(1+tk+xn)2τ2h4+(1+tk+xn)τ22h3-(1+tk+xn)2τ22h2+(1+tk+xn)τ24h,0≤k≤N,0≤n≤M,cnk=1τ2+6(1+tk+xn)2τ24h4+(1+tk+xn)2τ2h2+(1+tk+xn)2τ24,0≤k≤N,0≤n≤M,dnk=-(1+tk+xn)2τ2h4-(1+tk+xn)τ22h3-(1+tk+xn)2τ22h2-(1+tk+xn)τ24h,0≤k≤N,0≤n≤M,enk=(1+tk+xn)2τ24h4+(1+tk+xn)τ24h3,0≤k≤N,0≤n≤M,ynk=-(1+tk+xn)h2,jnk=-2τ2+2(1+tk+xn)h2+(1+tk+xn),z=1τ2,0≤k≤N,0≤n≤M,fnk, φn, and γn are as defined before.To solve the difference equation (3.16), we again apply the same procedure used for (3.11).The exact solution and the numerical solutions obtained by using the first-order difference scheme (1.2) and the second-order difference schemes (2.7) and (2.8) are shown in Figures 1, 2, 3, and 4, respectively, for N=M=15 as an example. The difference between Figures 1 and 2 is fairly obvious; however, the solutions of the second-order difference schemes shown in Figures 3 and 4 are hardly differentiable from each other and from the exact solution in Figure 1 as well. For higher values of N=M, these differences are not so obvious, and the errors should be computed for the accurate comparison of the numerical and exact solutions as well as for the comparison of the three different difference schemes.Figure 1
Exact solution of the initial-nonlocal boundary value problem (3.1).Figure 2
Numerical solution obtained by using the first-order difference scheme.Figure 3
Numerical solution obtained by using the second-order difference scheme (2.7).Figure 4
Numerical solution obtained by using the second-order difference scheme (2.8).The errors in the numerical solutions are computed by(3.19)E0=max⁡⁡1≤k≤N-1(∑n=1M-1|u(tk,xn)-unk|2h)1/2,E1=max⁡⁡1≤k≤N-1(∑n=1M-1|ut(tk,xn)-unk+1-unk-12τ|2h)1/2,E2=max⁡⁡1≤k≤N-1(∑n=1M-1|utt(tk,xn)-unk+1-2unk+unk-1τ2|2h)1/2,
where N and M are the step numbers for the time and space variables respectively. Here, u(tk,xn) represents the exact solution, and unk represents the numerical solution at (tk,xn). The values of the errors E0,E1, and E2 and the relevant CPU times are shown in Tables 1, 2, 3, 4, 5, and 6, respectively, for N=M=20,30,40,50,60,70,80,90, and 100. In these Tables and the sequel, FO, SO1 and SO2 refer to the first-order difference scheme (2.1), the first type of second-order difference scheme (2.7), and the second type of the second-order difference scheme (2.8), respectively. The executions are carried by MATLAB 7.01 and obtained by a PC Pentium (R) 2CPV, 2.00 6 Hz, 2.87 GB of RAM.Table 1
Comparison of errors (E0) for approximate solutions.
Method2030405060708090100FO0.05960.03990.02990.02400.02000.01710.01500.01330.0120SO10.01340.00600.00340.00210.00150.00110.00080.00060.0005SO20.01400.00600.00340.00210.00150.00110.00080.00060.0005Table 2
CPU times.
Method2030405060708090100FO0.00000.01560.04690.07810.12500.18750.25000.34380.4331SO10.01560.03130.07810.15630.23340.35940.51560.70310.9375SO20.03130.07810.15630.28130.42190.62500.85941.14061.4844Table 3
Comparison of errors (E1) for approximate solutions.
Method2030405060708090100FO0.12700.08460.06330.05050.04200.03590.03140.02790.0251SO10.04050.01840.01040.00670.00460.00340.00260.00210.0017SO20.03220.01350.00750.00470.00330.00240.00180.00140.0012Table 4
CPU times.
Method2030405060708090100FO0.00000.03130.06250.09380.14060.20310.28130.37500.4844SO10.01560.04690.09380.17190.25000.37500.53130.71880.9531SO20.03130.09380.17190.29690.43750.64060.87501.15631.5000Table 5
Comparison of errors (E2) for approximate solutions.
Method2030405060708090100FO0.65650.42040.30750.24190.19920.16920.14700.13000.1165SO10.14370.06460.03650.02340.01630.01200.00920.00730.0059SO20.17240.05500.02920.01860.01290.00950.00730.00580.0047Table 6
CPU times.
Method2030405060708090100FO0.00000.03130.06250.09380.14060.20310.28130.37500.4844SO10.01560.04690.09380.17190.25000.37500.53130.71880.9531SO20.03130.09380.17190.29690.43750.64060.87501.15631.5000Though the CPU times do not seem reliable forN≤20, the following observations deserve to be noted for the comparison of the numerical results appearing in these tables.(i)
In Tables1 and 2, it is seen that almost the same accuracy is achieved by FO (E=0.0133,N=90) and by SO1 (E=0.0134,N=20) in different CPU times; 0.3438 s and 0.0156 s, respectively. This means the use of the SO1 difference scheme accelerates the computation with a ratio of more than 22 times, that is SO1 is much faster than FO.(ii)
During the same CPU time (0.0781 s, Table2), SO1 reaches the solution with an error (0.0034, N=40, Table 1), which is almost 7 times smaller than the error (0.0240, N=50, Table 1) reached by FO. Roughly speaking, this means SO1 yields 7 times more accurate results than FO does.(iii)
Although both types of the second-order difference schemes reaches approximately the same accuracy for the sameN=M (≥30, Table 1), the CPU time for the second type is always greater than that of the first one (Table 2). The ratio of the CPU times start from 2.5 when N=30 and decreases to the approximate value 1.6 when N is increased to 100. Hence, SO1 seems superior than SO2 with respect to the computation time.(iv)
The same conclusion relevant to the same accuracy for the sameN=M mentioned in the above item is not valid for the errors E1 and E2. Considering E1 in Table 3, the ratio of the error for SO1 to that for SO2 increases from 1.25 to 1.4, as N changes from 20 to 100 and SO2 seems better due to its lower error for the same N. In opposition to this advantage, SO2 has longer CPU times (starting from 2 times decreasing to 1.57 times as N is changing from 20 to 100, Table 4). For the same order of errors (0.0046,N=60;0.0047,N=50; for SO1 and SO2, resp., Table 3), their CPU times are 0.2500 s and 0.2969 s, respectively (Table 4). Hence, SO1 is still better than the type SO2 slightly. This conclusion does not change when the error E2 is considered. For example, during the same CPU time (0.1719 s, N=50 for SO1, N=40 for SO2, Table 2), the error E2 (Table 5) for SO2 is 0.0292 whilst for SO1 is smaller (0.0234 s).(v)
Finally, we need to mention that the execution times for the solution of the problem with different difference schemes are taken approximately as the CPU times which also include the computation times of the different errorsE0,E1, and E2. In fact, the time spent for computing the error is very small as compared to the time spent for solving the problem. This is obvious from the CPU times recorded in Tables 2, 4, and 6, especially for more reliable range of the CPU times, as N gets larger where the numerical results become approximately the same for each difference scheme. This indicates that the approximation made for the execution time is valid. The small differences are due to the computation times spent for the different error formulas. Even this difference does not appear in Tables 4 and 6 according to 4 decimal digits.Though SO1 seems superior over that of SO2, SO2 may be preferable in cases where the accuracy plays a dominant role; in fact when the figure of merit is defined as 1/CPU time × error2, SO2 gets superior over SO1 especially when E1 is considered and N≥40.It is certainly true that the speed and accuracy levels recorded in the above observations depend on the chosen grid numbers, error levels, and specific problem. But this fact does not prevent us from arriving to the following result: the second-order difference schemes are much more advantages than the first-order one, and the first type of the second-order scheme is more preferable than the second type as far as the CPU time and the error level are considered simultaneously. However, SO2 may get superior over SO1 depending on the type of the error defined and the weight of the error on the figure of merit.Though grid step numbersN and M for time and space variables, respectively, are chosen equal in the given example, this is not necessary for the stability of the difference schemes and to get the solutions. Further, there is no relationship between the grid step sizes of time and space variables in contrast to many other methods (see [8–11] and the references therein).


## 4. Concluding Remarks

In this work, two second-order difference schemes recently appeared in the literature are compared numerically with each other and with a first-order difference scheme to solve abstract Cauchy problem for hyperbolic partial differential equations with time-dependent unbounded operator coefficient. The numerical example for solving one-dimensional wave equation with time and space variable coefficients and nonlocal boundary conditions illustrates that both of the second-order difference schemes are absolutely stable and more accurate compared to the first-order difference scheme. Although the first type of the second-order difference method is more preferable than the second type in regard of execution time, the second type second-order difference method gets advantages when the accuracy is more important than the computation time. Similarly, the numerical solution of multidimensional linear hyperbolic differential equations with time or space variable coefficients and nonlocal boundary conditions would be explored in the future work.



---

*Source: 210261-2011-11-24.xml*