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.

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 [17]. There is a tremendous amount of work for numerically solving these equations [814] and the equations with constant coefficients [1519]. 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 where is an unbounded self-adjoint positive linear operator with domain in an arbitrary Hilbert space . In particular, (1.1) with the Laplace operator 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 [811] 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: 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 To solve the resulting difference equation (3.4), we apply iterative method.

Second, using the difference formulas 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 In (3.11), is the same with excluding the first and last rows which are zeros, is an identity matrix with order , and are as defined before in (3.6) and (3.7), respectively, and Further, and 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 and applying the second-order difference scheme (2.8), we get the same system of linear equations in the matrix form In these equations, is a diagonal matrix with , all the other diagonal elements are is an identity matrix as defined before, , , and are the same as defined in (3.6) and (3.7), respectively, and and , are also the same as defined in (3.12) and (3.13). Further,, , and 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 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 , 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.

The errors in the numerical solutions are computed by where and are the step numbers for the time and space variables respectively. Here, represents the exact solution, and represents the numerical solution at . The values of the errors , and  and the relevant CPU times are shown in Tables 1, 2, 3, 4, 5, and 6, respectively, for , 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.

Though the CPU times do not seem reliable for , the following observations deserve to be noted for the comparison of the numerical results appearing in these tables.(i)In Tables 1 and 2, it is seen that almost the same accuracy is achieved by FO and by SO1 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, Table 2), SO1 reaches the solution with an error (0.0034, , Table 1), which is almost 7 times smaller than the error (0.0240, , 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 same (≥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 and decreases to the approximate value 1.6 when 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 same mentioned in the above item is not valid for the errors and . Considering in Table 3, the ratio of the error for SO1 to that for SO2 increases from 1.25 to 1.4, as changes from 20 to 100 and SO2 seems better due to its lower error for the same . In opposition to this advantage, SO2 has longer CPU times (starting from 2 times decreasing to 1.57 times as is changing from 20 to 100, Table 4). For the same order of errors (; 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 is considered. For example, during the same CPU time (0.1719 s, for SO1, for SO2, Table 2), the error (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 errors , and . 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 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 is considered and .

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 numbers and 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 [811] 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.

Acknowledgment

M. E. Koksal is very grateful to Professor Ashyralyev for his valuable suggestions.