Skip to main content

# A new variable mesh method based on non-polynomial spline in compression approximations for 1D quasilinear hyperbolic equations

## Abstract

In this paper, we present a new three-level implicit method of order two in time and three in space on a non-uniform mesh, based on spline in compression approximation for the numerical solution of 1D quasilinear second order hyperbolic partial differential equations. We also discuss the application of the proposed method to a wave equation with singular coefficients. Stability analysis of a linear scheme and convergence analysis of a general nonlinear scheme are also discussed in this paper. Computational results are given to demonstrate the usefulness of the proposed method.

## Introduction

Consider the 1D quasilinear hyperbolic equation

$$\frac{\partial^{2}u}{\partial t^{2}} = A(x,t,u)\frac{\partial^{2}u}{\partial x^{2}} + f ( x,t,u,u_{x},u_{t} ),\quad 0 < x < 1,t > 0.$$
(1.1)

The initial conditions are given by

$$u(x,0) = \phi(x),\qquad u_{t}(x,0) = \psi(x),\quad 0 \le x \le 1,$$
(1.2)

and the boundary conditions are given by

$$u(0,t) = a_{0}(t), \qquad u(1,t) = a_{1}(t),\quad t \ge0.$$
(1.3)

We assume that the functions $$f(x,t,u,u_{x},u_{t})$$, $$\phi(x)$$, $$\psi(x)$$, $$a_{0}(t)$$ and $$a_{1}(t)$$ are sufficiently smooth and their required higher order derivatives exist.

The wave equations are important second order hyperbolic partial differential equations for the description of waves as they occur in most scientific and engineering disciplines such as sound waves, light waves, water waves, acoustics waves, electromagnetic waves, and fluid dynamics, optics, electromagnetism, solid mechanics, structural mechanics, quantum mechanics, etc. The waves for all these applications are described by solutions to either linear or nonlinear second order hyperbolic partial differential equations (1.1), which have a dependent variable $$u(x,t)$$ (representing the wave value), an independent variable time t and one independent spatial variable x. The actual form that the wave takes is strongly dependent upon the system initial conditions, the boundary conditions on the solution domain and any system disturbances. A few examples of the source of physical waves are as follows. Chemical waves occur in the concentration variations of chemical species propagating in a system. Acoustic waves occur in audible sound, medical applications of ultrasound and underwater sonar applications. Electromagnetic waves occur as electricity in various forms, radio waves, light waves in optic fibres, etc. The transmission of variations in a gravitational field in the form of waves is called gravitational waves as predicted by Einstein’s theory of general relativity. Waves resulting from earthquakes, large explosions and high velocity impacts are termed seismic waves. Small local changes in velocity occurring in high density situations can result in the propagation of traffic flow waves and even shocks. When ripples occur in water, they are manifested as waves of short length and are termed capillary waves. For waves where the wavelength is much greater than water depth, they can be modelled by coupled fluid dynamics equations known as the shallow water wave equations.

In recent years the development of numerical methods for the solution of nonlinear hyperbolic partial differential equations of type (1.1) with initial and boundary conditions of type (1.2)-(1.3) has been of great importance in many branches of science and engineering. Using spline approximations, linear and nonlinear hyperbolic equations in one dimension have been studied by several authors. During last four decades, there has been much effort to develop convergent numerical methods based on spline approximations for the solution of differential equations. First, Bickley  and Fyfe  used spline approximations on two point boundary value problems to get their numerical solutions. In 1974, Fleck, Jr.  and Raggett and Wilson  successfully applied cubic spline approximations to get the solution of one-space dimensional wave equation. During last three decades many researchers (see ) studied the solution of two point boundary value problems by using different types of spline methods. Mohanty et al.  developed three-level implicit high accuracy compact finite difference methods for the solution of one-space dimensional nonlinear hyperbolic equations. Rashidinia et al.  and Ding and Zhang  discussed the use of parametric spline methods for the solution of 1D hyperbolic equations. Unconditionally stable difference methods for the linear hyperbolic equation were discussed in . In 2011, Mohanty and Gopal  originally developed a high accuracy numerical method based on cubic spline approximations for the solution of 1D nonlinear hyperbolic equations. Mohanty et al.  and Talwar et al.  formulated the solution for one-dimensional parabolic equations with singular coefficients and nonlinear terms by using spline in compression approximations. In recent past, Gopal et al.  and Mohanty and Gopal  used spline in compression approximations for the solution of a 1D nonlinear hyperbolic equation on a uniform mesh. To our knowledge, no numerical methods based on compression spline approximations for the solution of one-space dimensional quasilinear hyperbolic equations on a variable mesh are known in the literature.

Nonlinear waves are described by nonlinear equations. This means that nonlinear wave equations are more difficult to analyze mathematically and that no general analytical method for their solution exists. Hence the only alternative to solve these equations is the application of stable numerical methods. In this paper, using three non-uniform grid points in x-direction and three uniform grid points in t-direction, we discuss a new three-level implicit method of accuracy two in time and three in space based on spline in compression approximations for the solution of 1D second order quasilinear hyperbolic equations. In this method, we require only three evaluations of function f. In Section 2, we discuss spline in compression and its properties. In Section 3, we propose a new three-level implicit method based on spline in compression approximation. In Section 4, we derive the proposed method. In Section 5, we discuss the application of our method to the wave equation in polar cylindrical coordinates. Stability and convergence analysis are discussed in Sections 6 and 7. In Section 8, we discuss the higher order approximation at first time level in order to compute the proposed numerical method of the same accuracy and compare the numerical results with the existing results. Final remarks are given in Section 9.

## Spline in compression approximation

The solution domain $$[0,1]\times[t>0]$$ is divided into $$(N+1)\times J$$ variable mesh with the variable spatial step size $$h_{l} = x_{l} - x_{l - 1}$$, $$l =1,2,\ldots,N+1$$, in x-direction and the time step size $$k>0$$ in t-direction, where N is a positive integer. Grid points are given by $$x_{l} = x_{0} + \sum_{i = 1}^{l} h_{i}$$, $$l=1,2,\ldots,N+1$$, and $$t_{j} = jk$$, $$j = 0,1,2,\ldots$$ . The mesh ratio parameter is given by $$\sigma _{l} = h_{l + 1}/h_{l}$$, $$l=1,2,\ldots,N$$. The notations $$u_{l}^{j}$$ and $$U_{l}^{j}$$ are used for the discrete approximation and the exact value of $$u(x,t)$$ at the grid point $$(x_{l},t_{j})$$, respectively. Similarly, at the grid point $$(x_{l},t_{j})$$, we define $$A_{l}^{j} = A(x_{l},t_{j}), {A_{x}}_{l}^{j} = A_{x}(x_{l},t_{j}),\ldots$$ , etc.

Let $$S_{j}(x)$$ be the non-polynomial spline in compression of the function $$u(x,t)$$ at the grid point $$(x_{l},t_{j})$$ and be given by

$$S_{j}(x) = a_{l} + b_{l}(x - x_{l}) + c_{l}\sin\omega(x - x_{l}) + d_{l}\cos\omega(x - x_{l}),\quad l = 0,1,2,\ldots,N + 1,$$
(2.1)

where $$a_{l}$$, $$b_{l}$$, $$c_{l}$$, $$d_{l}$$ are unknown coefficients and ω is a parameter to be determined. $$S^{j}(x) \in C^{2}[0,1]$$, which interpolates $$u(x,t)$$ at the grid point $$(x_{l},t_{j})$$.

The derivatives of function $$S_{j}(x)$$ are given by

\begin{aligned}& S'_{j}(x) = b_{l} + \omega c_{l} \cos\omega(x - x_{l}) - \omega d_{l}\sin \omega(x - x_{l}), \\& \quad l =0,1,2,\ldots,N+1; j = 1,2,\ldots,J, \end{aligned}
(2.2)
\begin{aligned}& S''_{j}(x) = - \omega^{2} \bigl[ c_{l}\sin\omega(x - x_{l}) + d_{l}\cos \omega(x - x_{l}) \bigr], \\& \quad l =0,1,2,\ldots,N+1; j = 1,2,\ldots,J. \end{aligned}
(2.3)

We define

$$M_{l}^{j} = S''_{j}(x_{l}), \quad l = 0,1,2,\ldots,N+1; j = 1,2,\ldots,J.$$
(2.4)

To derive expression for the coefficients of (2.1) in terms of $$U_{l}^{j}$$, $$U_{l + 1}^{j}$$, $$M_{l}^{j}$$ and $$M_{l + 1}^{j}$$, we use

$$S_{j}(x_{l}) = U_{l}^{j},\qquad S_{j}(x_{l + 1}) = U_{l + 1}^{j},\qquad M_{l}^{j} = S''_{j}(x_{l}), \qquad M_{l + 1}^{j} = S''_{j}(x_{l + 1}).$$

From algebraic manipulation, we get

\begin{aligned}& a_{l} = U_{l}^{j} + \frac{M_{l}^{j}}{\omega^{2}},\qquad b_{l} = \frac{U_{l + 1}^{j} - U_{l}^{j}}{h_{l + 1}} + \frac{M_{l + 1}^{j} - M_{l}^{j}}{\omega \theta_{l + 1}}, \\& c_{l} = \frac{M_{l}^{j}\cos\theta_{l + 1} - M_{l + 1}^{j}}{\omega^{2}\sin\theta_{l + 1}},\qquad d_{l} = \frac{ - M_{l}^{j}}{\omega^{2}}, \end{aligned}

where $$\theta_{l} = \omega h_{l}$$.

Using the continuity of the first derivative at $$(x_{l},t_{j})$$, that is, $$S'_{j}(x_{l} - ) = S'_{j}(x_{l} + )$$, we obtain the following relation:

$$\frac{U_{l + 1}^{j} - U_{l}^{j}}{h_{l}h_{l + 1}} - \frac{U_{l}^{j} - U_{l - 1}^{j}}{h_{l}^{2}} = \alpha M_{l + 1}^{j} + (\beta_{1} + \beta_{2})M_{l}^{j} + \gamma M_{l - 1}^{j},$$
(2.5)

where

\begin{aligned}& \alpha= \frac{1}{\theta_{l}\theta_{l + 1}} \biggl( \frac{\theta_{l + 1}}{\sin\theta_{l + 1}} - 1 \biggr), \\ & \beta_{1} = \frac{1}{\theta_{l}\theta_{l + 1}} ( 1 - \theta_{l + 1}\cot \theta_{l + 1} ), \\ & \beta_{2} = \frac{1}{\theta_{l}^{2}} ( 1 - \theta_{l}\cot \theta_{l} ), \\ & \gamma= \frac{1}{\theta_{l}^{2}} \biggl( \frac{\theta_{l}}{\sin\theta_{l}} - 1 \biggr). \end{aligned}

When $$\omega\to0$$, that is, $$\theta_{l} \to0$$, then $$(\alpha,\beta_{1},\beta_{2},\gamma) \to (\frac{\sigma_{l}}{6},\frac{\sigma_{l}}{3},\frac{1}{3},\frac{1}{6})$$, and relation (2.5) reduces to the cubic spline relation on the variable mesh

$$\frac{U_{l + 1}^{j} - U_{l}^{j}}{h_{l}h_{l + 1}} - \frac{U_{l}^{j} - U_{l - 1}^{j}}{h_{l}^{2}} = \frac{\sigma_{l}}{6}M_{l + 1}^{j} + \biggl(\frac{1 + \sigma_{l}}{3}\biggr)M_{l}^{j} + \frac{1}{6}M_{l - 1}^{j}.$$
(2.6)

From (2.5), we obtain the consistency condition $$\alpha+ \beta_{1} + \beta_{2} + \gamma= \frac{1 + \sigma_{l}}{2}$$, which is equivalent to the equation $$\tan\frac{\theta_{l}}{2} = \frac{\theta_{l}}{2}$$. This equation has an infinite number of roots. Solving graphically, we obtain the smallest nonzero positive value $$\theta_{l} = 8.986818916$$.

Now, from (2.2) we have

\begin{aligned} m_{l}^{j} =& S'_{j}(x_{l}) = {U_{x}}_{l}^{j} \\ =& \frac{U_{l + 1}^{j} - U_{l}^{j}}{h_{l + 1}} + \frac{M_{l + 1}^{j} - M_{l}^{j}}{\omega\theta _{l + 1}} + \frac{M_{l}^{j}\cos\theta_{l + 1} - M_{l + 1}^{j}}{\omega\sin \theta_{l + 1}}\cos\omega(x - x_{l}) \\ &{}+\frac{M_{l}^{j}}{\omega} \sin\omega(x - x_{l}),\quad x_{l} \le x \le x_{l + 1}, \end{aligned}
(2.7)

and replacing ‘$$h_{l+1}$$’ by ‘$$-h_{l}$$’ in (2.7), we get

\begin{aligned} \begin{aligned}[b] m_{l}^{j} ={}& S'_{j}(x_{l}) = {U_{x}}_{l}^{j} \\ ={}& \frac{U_{l}^{j} - U_{l - 1}^{j}}{h_{l}} + \frac{M_{l}^{j} - M_{l - 1}^{j}}{\omega\theta_{l}} + \frac{M_{l - 1}^{j}\cos\theta_{l} - M_{l}^{j}}{\omega\sin\theta _{l}}\cos \omega(x - x_{l - 1}) \\ &{}+ \frac{M_{l - 1}^{j}}{\omega} \sin\omega(x - x_{l - 1}),\quad x_{l - 1} \le x \le x_{l}. \end{aligned} \end{aligned}
(2.8)

Further, using the relations $$\theta_{l} = \omega h_{l}$$, $$\theta_{l + 1} = \omega h_{l + 1}$$, from (2.7) and (2.8), we have

\begin{aligned}& m_{l + 1}^{j} = S'_{j}(x_{l + 1}) = {U_{x}}_{l + 1}^{j} \\& \hphantom{m_{l + 1}^{j}}= \frac{U_{l + 1}^{j} - U_{l}^{j}}{h_{l + 1}} + \frac{h_{l + 1}}{\theta_{l + 1}^{2}} [ 1 - \theta_{l + 1}\cot\theta_{l + 1} ]M_{l + 1}^{j} - \frac{h_{l + 1}}{\theta_{l + 1}^{2}} [ 1 - \theta_{l + 1} \operatorname{cosec}\theta_{l + 1} ]M_{l}^{j} \\& \hphantom{m_{l + 1}^{j}}= \frac{U_{l + 1}^{j} - U_{l}^{j}}{h_{l + 1}} + h_{l} \bigl[ \alpha M_{l}^{j} + \beta_{1}M_{l + 1}^{j} \bigr], \end{aligned}
(2.9)
\begin{aligned}& m_{l - 1}^{j} = S'_{j}(x_{l - 1}) = {U_{x}}_{l - 1}^{j} \\& \hphantom{m_{l - 1}^{j}}= \frac{U_{l}^{j} - U_{l - 1}^{j}}{h_{l}} + \frac{h_{l}}{\theta_{l}^{2}} [ 1 - \theta_{l}\operatorname{cosec} \theta_{l} ]M_{l}^{j} - \frac{h_{l}}{\theta_{l}^{2}} [ 1 - \theta_{l}\cot\theta_{l} ]M_{l - 1}^{j} \\& \hphantom{m_{l - 1}^{j}}= \frac{U_{l}^{j} - U_{l - 1}^{j}}{h_{l}} - h_{l} \bigl[ \beta_{2}M_{l - 1}^{j} + \gamma M_{l}^{j} \bigr]. \end{aligned}
(2.10)

Note that (2.5), (2.8), (2.9) and (2.10) are important properties of the spline in a compression function $$S_{j}(x)$$.

## Variable mesh method based on spline in compression approximation

For the sake of simplicity, we choose $$\sigma_{l} = h_{l + 1}/h_{l} = \sigma$$ (a constant), that is, $$h_{l + 1} = \sigma h_{l}$$, and we consider the one-space dimensional nonlinear hyperbolic partial differential equation

$$\frac{\partial^{2}u}{\partial t^{2}} = A(x,t)\frac{\partial ^{2}u}{\partial x^{2}} + f ( x,t,u,u_{x},u_{t} ),\quad 0 < x < 1,t > 0$$
(3.1)

with the given initial conditions (1.2) and boundary conditions (1.3).

Now, we consider the following approximations:

\begin{aligned}& {\overline{U}_{t}}_{l}^{j} = \bigl(U_{l}^{j + 1} - U_{l}^{j - 1} \bigr)/(2k), \end{aligned}
(3.2)
\begin{aligned}& {\overline{U}_{t}}_{l \pm1}^{j} = \bigl(U_{l \pm1}^{j + 1} - U_{l \pm1}^{j - 1} \bigr)/(2k), \end{aligned}
(3.3)
\begin{aligned}& {\overline{U}_{tt}}_{l}^{j} = \bigl(U_{l}^{j + 1} - 2U_{l}^{j} + U_{l}^{j - 1}\bigr)/\bigl(k^{2}\bigr), \end{aligned}
(3.4)
\begin{aligned}& {\overline{U}_{tt}}_{l \pm1}^{j} = \bigl(U_{l \pm1}^{j + 1} - 2U_{l \pm 1}^{j} + U_{l \pm1}^{j - 1}\bigr)/\bigl(k^{2}\bigr), \end{aligned}
(3.5)
\begin{aligned}& {\overline{U}_{x}}_{l}^{j} = \frac{U_{l + 1}^{j} - (1 - \sigma^{2})U_{l}^{j} - \sigma^{2}U_{l - 1}^{j}}{\sigma(1 + \sigma)h_{l}}, \end{aligned}
(3.6)
\begin{aligned}& {\overline{U}_{x}}_{l + 1}^{j} = \frac{(1 + 2\sigma)U_{l + 1}^{j} - (1 + \sigma)^{2}U_{l}^{j} + \sigma^{2}U_{l - 1}^{j}}{\sigma(1 + \sigma )h_{l}}, \end{aligned}
(3.7)
\begin{aligned}& {\overline{U}_{x}}_{l - 1}^{j} = \frac{ - U_{l + 1}^{j} + (1 + \sigma )^{2}U_{l}^{j} - \sigma(2 + \sigma)U_{l - 1}^{j}}{\sigma(1 + \sigma )h_{l}}, \end{aligned}
(3.8)
\begin{aligned}& {\overline{U}_{xx}}_{l}^{j} = \frac{2[U_{l + 1}^{j} - (1 + \sigma)U_{l}^{j} + \sigma U_{l - 1}^{j}]}{\sigma(1 + \sigma)h_{l}^{2}}, \end{aligned}
(3.9)
\begin{aligned}& \overline{F}_{l}^{j} = f\bigl(x_{l},t_{j},U_{l}^{j},{ \overline{U}_{x}}_{l}^{j},{\overline {U}_{t}}_{l}^{j}\bigr), \end{aligned}
(3.10)
\begin{aligned}& \overline{F}_{l \pm1}^{j} = f\bigl(x_{l \pm1},t_{j},U_{l \pm 1}^{j},{ \overline{U}_{x}}_{l \pm1}^{j},{\overline{U}_{t}}_{l \pm1}^{j} \bigr). \end{aligned}
(3.11)

Since the derivative values of $$S_{j}(x)$$ defined by (2.7)-(2.10) are not known at each grid point $$(x_{l},t_{j})$$, we use the following approximations for the derivatives of $$S_{j}(x)$$. Let

\begin{aligned}& \overline{M}_{l}^{j} = \frac{1}{A_{l}^{j}} \bigl( { \overline{U}_{tt}}_{l}^{j} - \overline{F}_{l}^{j} \bigr), \end{aligned}
(3.12)
\begin{aligned}& \overline{M}_{l + 1}^{j} = \frac{1}{A_{l + 1}^{j}} \bigl( { \overline{U}_{tt}}_{l + 1}^{j} - \overline{F}_{l + 1}^{j} \bigr), \end{aligned}
(3.13)
\begin{aligned}& \overline{M}_{l - 1}^{j} = \frac{1}{A_{l - 1}^{j}} \bigl( { \overline{U}_{tt}}_{l - 1}^{j} - \overline{F}_{l - 1}^{j} \bigr), \end{aligned}
(3.14)
\begin{aligned}& \hat{m}_{l + 1}^{j} = \frac{U_{l + 1}^{j} - U_{l}^{j}}{\sigma h_{l}} + h_{l} \bigl[\alpha\overline{M}_{l}^{j} + \beta_{1} \overline{M}_{l + 1}^{j}\bigr], \end{aligned}
(3.15)
\begin{aligned}& \hat{m}_{l - 1}^{j} = \frac{U_{l}^{j} - U_{l - 1}^{j}}{h_{l}} - h_{l} \bigl[\beta_{2}\overline{M}_{l - 1}^{j} + \gamma \overline{M}_{l}^{j}\bigr], \end{aligned}
(3.16)
\begin{aligned}& \hat{m}_{l}^{j} = {\overline{U}_{x}}_{l}^{j} + \frac{\alpha h_{l}}{(1 + \sigma)A_{l}^{j}} \bigl[ \bigl( \overline{F}_{l + 1}^{j} - \overline{F}_{l - 1}^{j} \bigr) - \bigl( {\overline{U}_{tt}}_{l + 1}^{j} - {\overline{U}_{tt}}_{l - 1}^{j} \bigr) \bigr] + \frac{\alpha h_{l}^{2}{A_{x}}_{l}^{j}}{A_{l}^{j}}{\overline{U}_{xx}}_{l}^{j}. \end{aligned}
(3.17)

Now we define the approximations

\begin{aligned}& \hat{F}_{l \pm1}^{j} = f\bigl(x_{l \pm1},t_{j},U_{l \pm1}^{j}, \hat{m}_{l \pm 1}^{j},{\overline{U}_{t}}_{l \pm1}^{j} \bigr), \end{aligned}
(3.18)
\begin{aligned}& \hat{F}_{l}^{j} = f\bigl(x_{l},t_{j},U_{l}^{j}, \hat{m}_{l}^{j},{\overline{U}_{t}}_{l}^{j} \bigr), \end{aligned}
(3.19)

in which we use spline in a tension function $$U_{l}^{j} = S^{j}(x_{l})$$, approximation of its first order space derivative defined by (3.6)-(3.8) in x-direction and central difference approximations of time derivative defined by (3.2)-(3.5) in t-direction.

Then, at each grid point $$(x_{l},t_{j})$$, the differential equation (3.1) is discretized by

\begin{aligned}& \bigl[ A_{l}^{j} + P_{1}h_{l}{A_{x}}_{l}^{j} + P_{2}h_{l}^{2}{A_{xx}}_{l}^{j} \bigr] \bigl( U_{l + 1}^{j} - (1 + \sigma)U_{l}^{j} + \sigma U_{l - 1}^{j} \bigr) \\& \quad = \frac{h_{l}^{2}}{12} \bigl[ P{\overline{U}_{tt}}_{l + 1}^{j} + Q{\overline{U}_{tt}}_{l}^{j} + R{ \overline{U}_{tt}}_{l - 1}^{j} \bigr] - \frac{h_{l}^{2}}{12} \bigl[ P\hat{F}_{l + 1}^{j} + Q \hat{F}_{l}^{j} + R\hat{F}_{l - 1}^{j} \bigr] + \hat{T}_{l}^{j}, \end{aligned}
(3.20)

where

\begin{aligned}& P_{1} = \biggl( \frac{\sigma- 1}{3} \biggr) - \bigl(1 + \sigma+ \sigma^{2}\bigr)\frac{h_{l}{A_{x}}_{l}^{j}}{18A_{l}^{j}}, \\& P_{2} = \frac{1 - \sigma+ \sigma^{2}}{12}, \\& P = \bigl(\sigma^{2} + \sigma- 1\bigr) - \bigl(1 + \sigma+ \sigma^{2}\bigr)\frac{h_{l}{A_{x}}_{l}^{j}}{3A_{l}^{j}}, \\& Q = (1 + \sigma) \bigl(\sigma^{2} + 3\sigma+ 1\bigr) + \bigl(1 - \sigma^{2}\bigr) \bigl(1 + \sigma+ \sigma^{2}\bigr) \frac{h_{l}{A_{x}}_{l}^{j}}{3A_{l}^{j}}, \\& R = \sigma\bigl(1 + \sigma- \sigma^{2}\bigr) + \sigma^{2} \bigl(1 + \sigma+ \sigma^{2}\bigr)\frac{h_{l}{A_{x}}_{l}^{j}}{3A_{l}^{j}}, \end{aligned}

and the local truncation error $$\hat{T}_{l}^{j} = O(k^{2}h_{l}^{2} + k^{2}h_{l}^{3} + h_{l}^{5})$$.

## Mathematical derivation of the method

For the derivation of method (3.20), we use spline in compression approximations in x-direction and second order finite difference approximation in t-direction.

At the grid point $$(x_{l},t_{j})$$, let us denote

$$U_{ab} = \biggl( \frac{\partial^{a + b}U}{\partial x^{a}\, \partial t^{b}} \biggr)_{l}^{j}, \qquad \psi_{l}^{j} = \biggl( \frac{\partial F}{\partial U_{x}} \biggr)_{l}^{j}.$$
(4.1)

At the grid point $$(x_{l},t_{j})$$, we denote

$${U_{tt}}_{l}^{j} - A_{l}^{j}{U_{xx}}_{l}^{j} = F_{l}^{j},$$
(4.2)

where

$$F_{l}^{j} = f\bigl(x_{l},t_{j},U_{l}^{j},{U_{x}}_{l}^{j},{U_{t}}_{l}^{j} \bigr).$$

Using the Taylor expansion, we obtain

\begin{aligned}& \bigl[ A_{l}^{j} + P_{1}h_{l}{A_{x}}_{l}^{j} + P_{2}h_{l}^{2}{A_{xx}}_{l}^{j} \bigr] \bigl( U_{l + 1}^{j} - (1 + \sigma)U_{l}^{j} + \sigma U_{l - 1}^{j} \bigr) \\& \quad = \frac{h_{l}^{2}}{12} \bigl[ P{\overline{U}_{tt}}_{l + 1}^{j} + Q{\overline{U}_{tt}}_{l}^{j} + R{ \overline{U}_{tt}}_{l - 1}^{j} \bigr] - \frac{h_{l}^{2}}{12} \bigl[ PF_{l + 1}^{j} + QF_{l}^{j} + RF_{l - 1}^{j} \bigr] \\& \qquad {}+ O\bigl(k^{2}h_{l}^{2} + k^{2}h_{l}^{3} + h_{l}^{5} \bigr). \end{aligned}
(4.3)

Simplifying (3.2)-(3.9), we get

\begin{aligned}& {\overline{U}_{t}}_{l}^{j} = {U_{t}}_{l}^{j} + O\bigl(k^{2} \bigr), \end{aligned}
(4.4)
\begin{aligned}& {\overline{U}_{t}}_{l \pm1}^{j} = {U_{t}}_{l \pm1}^{j} + O\bigl(k^{2} + k^{2}h_{l} + h_{l}^{3} \bigr), \end{aligned}
(4.5)
\begin{aligned}& {\overline{U}_{tt}}_{l}^{j} = {U_{tt}}_{l}^{j} + O\bigl(k^{2} \bigr), \end{aligned}
(4.6)
\begin{aligned}& {\overline{U}_{tt}}_{l \pm1}^{j} = {U_{tt}}_{l \pm1}^{j} + O\bigl(k^{2} + k^{2}h_{l} + h_{l}^{3} \bigr), \end{aligned}
(4.7)
\begin{aligned}& {\overline{U}_{x}}_{l}^{j} = {U_{x}}_{l}^{j} + \frac{\sigma h_{l}^{2}}{6}U_{30} + O\bigl(h_{l}^{3}\bigr), \end{aligned}
(4.8)
\begin{aligned}& {\overline{U}_{x}}_{l + 1}^{j} = {U_{x}}_{l + 1}^{j} - \frac{\sigma(1 + \sigma )h_{l}^{2}}{6}U_{30} + O\bigl(h_{l}^{3}\bigr), \end{aligned}
(4.9)
\begin{aligned}& {\overline{U}_{x}}_{l - 1}^{j} = {U_{x}}_{l - 1}^{j} - \frac{(1 + \sigma )h_{l}^{2}}{6}U_{30} + O\bigl(h_{l}^{3}\bigr), \end{aligned}
(4.10)
\begin{aligned}& {\overline{U}_{xx}}_{l}^{j} = {U_{xx}}_{l}^{j} + \frac{(\sigma- 1)h_{l}}{3}U_{30} + \frac{(1 - \sigma+ \sigma^{2})h_{l}^{2}}{12}U_{40} + O\bigl(h_{l}^{3} \bigr). \end{aligned}
(4.11)

With the help of approximations (4.4) and (4.8), from (3.10), we obtain

\begin{aligned} \begin{aligned}[b] \overline{F}_{l}^{j} &= f \biggl( x_{l},t_{j},U_{l}^{j},{U_{x}}_{l}^{j} + \frac{\sigma h_{l}^{2}}{6}U_{30} + O\bigl(h_{l}^{3} \bigr),{U_{t}}_{l}^{j} + O\bigl(k^{2} \bigr) \biggr) \\ &= f \bigl( x_{l},t_{j},U_{l}^{j},{U_{x}}_{l}^{j},{U_{t}}_{l}^{j} \bigr) + \frac{\sigma h_{l}^{2}}{6}U_{30}\psi_{l}^{j} + O \bigl(k^{2} + h_{l}^{3}\bigr) \\ &= F_{l}^{j} + \frac{\sigma h_{l}^{2}}{6}U_{30} \psi_{l}^{j} + O\bigl(k^{2} + h_{l}^{3} \bigr). \end{aligned} \end{aligned}
(4.12)

Similarly,

\begin{aligned}& \overline{F}_{l + 1}^{j} = F_{l + 1}^{j} - \frac{\sigma(1 + \sigma )h_{l}^{2}}{6}U_{30}\psi_{l}^{j} + O \bigl(k^{2} + k^{2}h_{l} + h_{l}^{3} \bigr), \end{aligned}
(4.13)
\begin{aligned}& \overline{F}_{l - 1}^{j} = F_{l - 1}^{j} - \frac{(1 + \sigma )h_{l}^{2}}{6}U_{30}\psi_{l}^{j} + O \bigl(k^{2} + k^{2}h_{l} + h_{l}^{3} \bigr). \end{aligned}
(4.14)

Now using approximations (4.12)-(4.14) in (3.12)-(3.14) and simplifying (3.15)-(3.16), we get

\begin{aligned}& \hat{m}_{l + 1}^{j} = m_{l + 1}^{j} + O \bigl(k^{2} + k^{2}h_{l} + h_{l}^{3} \bigr), \end{aligned}
(4.15)
\begin{aligned}& \hat{m}_{l - 1}^{j} = m_{l - 1}^{j} + O \bigl(k^{2} + k^{2}h_{l} + h_{l}^{3} \bigr). \end{aligned}
(4.16)

Now we define the approximation

$$\hat{m}_{l}^{j} = {\overline{U}_{x}}_{l}^{j} + ah_{l} \bigl[ \bigl( \overline{F}_{l + 1}^{j} - \overline{F}_{l - 1}^{j} \bigr) - \bigl( {\overline{U}_{tt}}_{l + 1}^{j} - {\overline{U}_{tt}}_{l - 1}^{j} \bigr) \bigr] + bh_{l}^{2}{\overline{U}_{xx}}_{l}^{j},$$
(4.17)

where ‘a’ and ‘b’ are parameters to be determined. By the help of approximations (4.7), (4.8), (4.11), (4.13) and (4.14), from (4.17) we obtain

$$\hat{m}_{l}^{j} = m_{l}^{j} + \frac{h_{l}^{2}}{6} \bigl[ \bigl(\sigma- 6a(1 + \sigma)A_{l}^{j} \bigr)U_{30} + 6\bigl(b - a(1 + \sigma){A_{x}}_{l}^{j} \bigr)U_{20} \bigr] + O\bigl(k^{2} + k^{2}h_{l} + h_{l}^{3}\bigr).$$
(4.18)

Approximation (4.18) to be of $$O(k^{2} + k^{2}h_{l} + h_{l}^{3})$$, the coefficient of $$h_{l}^{2}$$ must be zero. Thus for the values of parameters $$a = \frac{\alpha}{(1 + \sigma)A_{l}^{j}}$$ and $$b = \frac{\alpha {A_{x}}_{l}^{j}}{A_{l}^{j}}$$, approximation (4.18) reduces to

$$\hat{m}_{l}^{j} = m_{l}^{j} + O \bigl(k^{2} + k^{2}h_{l} + h_{l}^{3} \bigr).$$
(4.19)

Now, with the help of approximations (4.4) and (4.19), from (3.19), we obtain

\begin{aligned} \hat{F}_{l}^{j} =& f\bigl(x_{l},t_{j},U_{l}^{j},m_{l}^{j} + O\bigl(k^{2} + k^{2}h_{l} + h_{l}^{3} \bigr),{U_{t}}_{l}^{j} + O\bigl(k^{2} \bigr)\bigr) \\ =& f\bigl(x_{l},t_{j},U_{l}^{j},m_{l}^{j},{U_{t}}_{l}^{j} \bigr) + O\bigl(k^{2} + k^{2}h_{l} + h_{l}^{3}\bigr) \\ =& F_{l}^{j} + O\bigl(k^{2} + k^{2}h_{l} + h_{l}^{3}\bigr). \end{aligned}
(4.20)

Similarly,

\begin{aligned}& \hat{F}_{l + 1}^{j} = F_{l + 1}^{j} + O \bigl(k^{2} + k^{2}h_{l} + h_{l}^{3} \bigr), \end{aligned}
(4.21)
\begin{aligned}& \hat{F}_{l - 1}^{j} = F_{l - 1}^{j} + O \bigl(k^{2} + k^{2}h_{l} + h_{l}^{3} \bigr). \end{aligned}
(4.22)

Using approximations (4.6)-(4.7) and (4.20)-(4.22), from (3.20) and (4.3), we obtain the local truncation error $$\hat{T}_{l}^{j} = O(k^{2}h_{l}^{2} + k^{2}h_{l}^{3} + h_{l}^{5})$$.

Now, we consider the numerical method of $$O(k^{2} + k^{2}h_{l} + h_{l}^{3})$$ for the solution of quasilinear hyperbolic equation (1.1).

Whenever the coefficient A is a function of x, t and u, i.e., $$A = A(x,t,u)$$, the difference scheme (3.20) needs to be modified. For this purpose, we use the following approximation values:

\begin{aligned}& {A_{x}}_{l}^{j} = \frac{1}{\sigma(1 + \sigma)h_{l}} \bigl[A_{l + 1}^{j} - \bigl(1 - \sigma^{2} \bigr)A_{l}^{j} - \sigma^{2}A_{l - 1}^{j} \bigr]+O\bigl(h_{l}^{2}\bigr), \end{aligned}
(4.23)
\begin{aligned}& {A_{xx}}_{l}^{j} = \frac{2}{\sigma(1 + \sigma)h_{l}^{2}} \bigl[A_{l + 1}^{j} - (1 + \sigma)A_{l}^{j} + \sigma A_{l - 1}^{j}\bigr]+O(h_{l}), \end{aligned}
(4.24)

where

\begin{aligned}& A_{l}^{j} = A\bigl(x_{l},t_{j},U_{l}^{j} \bigr), \\& A_{l \pm1}^{j} = A\bigl(x_{l \pm1},t_{j},U_{l \pm1}^{j} \bigr). \end{aligned}

Thus, substituting values (4.23)-(4.24) into (3.20), we obtain the required numerical method of $$O(k^{2} + k^{2}h_{l} + h_{l}^{3})$$ for the solution of the quasilinear hyperbolic equation (1.1), and hence the local truncation error retains its order, that is, $$\hat{T}_{l}^{j} = O(k^{2}h_{l}^{2} + k^{2}h_{l}^{3} + h_{l}^{5})$$. For $$h_{l + 1} = h_{l} = h$$, the proposed method (3.20) becomes of $$O(k^{2} + k^{2}h^{2} + h^{4})$$ (see ).

Note that the initial and Dirichlet boundary conditions are given by (1.2) and (1.3), respectively. Incorporating the initial and boundary conditions, we can write method (3.20) in a tri-diagonal matrix form. If the differential equation (1.1) is linear, we can solve the linear system using the Gauss-elimination (tri-diagonal solver) method; in the nonlinear case, we can use the Newton-Raphson iterative method to solve the nonlinear system (see Kelly , Hageman and Young ).

## Application to a wave equation in polar coordinates

We consider the one-space dimensional wave equation in polar coordinates

$$u_{tt} = u_{rr} + D(r)u_{r} + f(r,t),\quad 0 < r < 1, t > 0.$$
(5.1)

The initial and the Dirichlet boundary conditions are prescribed by

\begin{aligned}& u(r,0) = \phi(r),\qquad u_{t}(r,0) = \psi(r),\quad 0 \le r \le 1, \end{aligned}
(5.2)
\begin{aligned}& u(0,t) = q_{0}(t),\qquad u(1,t) = q_{1}(t),\quad t \ge0, \end{aligned}
(5.3)

where $$D(r) = \frac{\gamma}{r}$$. For $$\gamma=1\mbox{ and }2$$, equation (5.1) represents a wave equation in cylindrical and spherical polar coordinates, respectively. Assume that $$f(r,t) \in C^{2}(0,1) \times[t > 0]$$ and conditions (5.2) and (5.3) are given with sufficient smoothness to maintain the order of accuracy in the numerical method under consideration.

Replacing the variable x by r, applying method (3.20) to (5.1) and neglecting the local truncation error, we obtain

\begin{aligned}& \frac{12}{h_{l}^{2}}\bigl[u_{l + 1}^{j} - (1 + \sigma)u_{l}^{j} + \sigma u_{l - 1}^{j} \bigr] \\& \quad = P\bigl({\overline{u}_{tt}}_{l + 1}^{j} - D_{l + 1}{\hat{u}_{r}} {}_{l + 1}^{j} - f_{l + 1}^{j}\bigr) + Q\bigl({\overline{u}_{tt}}_{l}^{j} - D_{l}{\hat{u}_{r}} {}_{l}^{j} - f_{l}^{j}\bigr) \\& \qquad {}+ R\bigl({\overline{u}_{tt}}_{l - 1}^{j} - D_{l - 1}{\hat{u}_{r}} {}_{l - 1}^{j} - f_{l - 1}^{j}\bigr), \end{aligned}
(5.4)

where

\begin{aligned}& P = \bigl(\sigma^{2} + \sigma- 1\bigr), \qquad Q = (1 + \sigma) \bigl( \sigma^{2} + 3\sigma + 1\bigr), \qquad R = \sigma\bigl(1 + \sigma- \sigma^{2}\bigr), \\& {\hat{u}_{r}} {}_{l + 1}^{j} = \frac{u_{l + 1}^{j} - u_{l}^{j}}{\sigma h_{l}} + \frac{\sigma h_{l}}{6} \bigl[ {\overline{u}_{tt}}_{l}^{j} + 2{\overline{u}_{tt}}_{l + 1}^{j} - D_{l}{ \overline{u}_{r}}_{l}^{j} - 2D_{l + 1}{ \overline{u}_{r}}_{l + 1}^{j} - f_{l}^{j} - 2f_{l + 1}^{j} \bigr], \\& {\hat{u}_{r}} {}_{l - 1}^{j} = \frac{u_{l}^{j} - u_{l - 1}^{j}}{h_{l}} - \frac{h_{l}}{6} \bigl[ {\overline{u}_{tt}}_{l}^{j} + 2{\overline{u}_{tt}}_{l - 1}^{j} - D_{l}{ \overline{u}_{r}}_{l}^{j} - 2D_{l - 1}{ \overline{u}_{r}}_{l - 1}^{j} - f_{l}^{j} - 2f_{l - 1}^{j} \bigr], \\& {\hat{u}_{r}} {}_{l}^{j} = { \overline{u}_{r}}_{l}^{j} + \frac{\alpha h_{l}}{1 + \sigma} \bigl[ D_{l + 1}{\overline{u}_{r}}_{l + 1}^{j} - D_{l - 1}{\overline{u}_{r}}_{l - 1}^{j} - { \overline{u}_{tt}}_{l + 1}^{j} + {\overline{u}_{tt}}_{l - 1}^{j} + f_{l + 1}^{j} - f_{l - 1}^{j} \bigr], \end{aligned}

where the approximations associated with (5.4) are defined in Section 3.

Note that scheme (5.4) is of $$O(k^{2} + k^{2}h_{l} + h_{l}^{3})$$ accuracy for the solution of wave equation (5.1). Since $$r_{0} = 0$$, scheme (5.4) fails to compute at $$l = 1$$ due to zero division. In order to get a stable spline in the tension scheme of $$O(k^{2} + k^{2}h_{l} + h_{l}^{3})$$ accuracy, we need to modify scheme (5.4). Let

\begin{aligned}& D_{l} = D(r_{l}) \equiv D_{0}, \end{aligned}
(5.5)
\begin{aligned}& D_{l + 1} = D_{l} + \sigma h_{l}{D_{r}}_{l} + \frac{\sigma h_{l}^{2}}{2}{D_{rr}}_{l} + O\bigl(h_{l}^{3} \bigr) \equiv D_{1}, \end{aligned}
(5.6)
\begin{aligned}& D_{l - 1} = D_{l} - h_{l}{D_{r}}_{l} + \frac{h_{l}^{2}}{2}{D_{rr}}_{l} + O\bigl(h_{l}^{3} \bigr) \equiv D_{2}, \end{aligned}
(5.7)
\begin{aligned}& f_{l}^{j} = f(r_{l},t_{j}) \equiv F_{0}, \end{aligned}
(5.8)
\begin{aligned}& f_{l + 1}^{j} = f_{l}^{j} + \sigma h_{l}{f_{r}}_{l}^{j} + \frac{\sigma h_{l}^{2}}{2}{f_{rr}}_{l}^{j} + O \bigl(h_{l}^{3}\bigr) \equiv F_{1}, \end{aligned}
(5.9)
\begin{aligned}& f_{l - 1}^{j} = f_{l}^{j} - h_{l}{f_{r}}_{l}^{j} + \frac{h_{l}^{2}}{2}{f_{rr}}_{l}^{j} + O \bigl(h_{l}^{3}\bigr) \equiv F_{2}, \end{aligned}
(5.10)

where

\begin{aligned}& {D_{r}}_{l} = \frac{dD(r_{l})}{dr}, \qquad {D_{rr}}_{l} = \frac{d^{2}D(r_{l})}{dr^{2}}, \\& {f_{r}}_{l}^{j} = \frac{\partial f(r_{l},t_{j})}{\partial r}, \qquad {f_{rr}}_{l}^{j} = \frac{\partial^{2}f(r_{l},t_{j})}{\partial r^{2}},\qquad \ldots,\quad \textit{etc.} \end{aligned}

Now, with the help of the approximations defined in Section 3 and (5.5)-(5.10), neglecting high order terms, we can re-write scheme (5.4) in the three-level compact implicit form

\begin{aligned}& \frac{12}{h_{l}^{2}}\bigl[u_{l + 1}^{j} - (1 + \sigma)u_{l}^{j} + \sigma u_{l - 1}^{j} \bigr] \\& \quad = \biggl( P - \frac{PD_{1}\sigma h_{l}}{3} + \frac{\alpha h_{l}QD_{0}}{1 + \sigma} \biggr){ \overline{U}_{tt}}_{l + 1}^{j} + \biggl( Q - \frac{PD_{1}\sigma h_{l}}{6} + \frac{RD_{2}h_{l}}{6} \biggr){\overline{U}_{tt}}_{l}^{j} \\& \qquad {}+ \biggl( R - \frac{\alpha h_{l}QD_{0}}{1 + \sigma} + \frac{RD_{2}h_{l}}{3} \biggr){ \overline{U}_{tt}}_{l - 1}^{j} + \biggl( \frac{PD_{1}^{2}\sigma h_{l}}{3} - \frac{\alpha h_{l}QD_{0}D_{1}}{1 + \sigma} \biggr){\overline{U}_{x}}_{l + 1}^{j} \\& \qquad {}+ \biggl( \frac{PD_{0}D_{1}\sigma h_{l}}{6} - QD_{0} - \frac{RD_{0}D_{2}h_{l}}{6} \biggr){\overline{U}_{x}}_{l}^{j} + \biggl( \frac{\alpha QD_{0}D_{2}h_{l}}{1 + \sigma} - \frac{RD_{2}^{2}h_{l}}{3} \biggr){\overline{U}_{x}}_{l - 1}^{j} \\& \qquad {}- \frac{PD_{1}}{\sigma h_{l}}\bigl(u_{l + 1}^{j} - u_{l}^{j}\bigr) - \frac{RD_{2}}{h_{l}}\bigl(u_{l}^{j} - u_{l - 1}^{j}\bigr) - \biggl( P - \frac{PD_{1}\sigma h_{l}}{3} + \frac{\alpha h_{l}QD_{0}}{1 + \sigma} \biggr)F_{1} \\& \qquad {}- \biggl( Q - \frac{PD_{1}\sigma h_{l}}{6} + \frac{RD_{2}h_{l}}{6} \biggr)F_{0} - \biggl( R - \frac{\alpha h_{l}QD_{0}}{1 + \sigma} + \frac{RD_{2}h_{l}}{3} \biggr)F_{2}. \end{aligned}
(5.11)

Note that the numerical scheme (5.11) based on spline in compression approximations is of $$O(k^{2} + k^{2}h_{l} + h_{l}^{3})$$ accuracy and free from the terms $$1/(r_{l \pm1})$$, hence very easily solved for $$l=1(1)N$$ in the solution region $$0< r<1$$, $$t>0$$. This technique shows that the proposed method is applicable to singular problems, and we do not require the presence of any fictitious points outside the solution region to handle the numerical scheme near the boundary.

## Stability analysis

Consider the damped wave equation in a general form

$$w_{tt} + 2\eta w_{t} = w_{xx} + f(x,t), \quad 0 < x < 1, t > 0,$$
(6.1)

where $$\eta> 0$$ is a real parameter.

The damped wave equation is a linear second order hyperbolic partial differential equation. The term $$2\eta w_{t}$$ represents a damping force proportional to the velocity $$w_{t}$$.

Replacing the variable u by w and applying scheme (3.20) to the differential equation (6.1) with $$\eta=1$$, that is, $$h_{l + 1} = h_{l} = h$$, we obtain a numerical approximation of $$O(k^{2} + h^{4})$$ as

$$\biggl( 1 + \frac{\delta_{x}^{2}}{12} \biggr)\delta_{t}^{2}w_{l}^{j} + \eta k \biggl( 1 + \frac{\delta_{x}^{2}}{12} \biggr) ( 2\mu_{t} \delta_{t} )w_{l}^{j} - \lambda^{2} \delta_{x}^{2}w_{l}^{j} = \frac{k^{2}}{12} \bigl[ f_{l + 1}^{j} + f_{l - 1}^{j} + 10f_{l}^{j} \bigr],$$
(6.2)

where we denote

$$\lambda= (k/h)>0,\qquad f_{l}^{j} = f(x_{l},t_{j})$$

and $$\delta_{t}^{2}w_{l}^{j} = w_{l}^{j + 1} - 2w_{l}^{j} + w_{l}^{j - 1}$$, $$( 2\mu_{t}\delta_{t} )w_{l}^{j} = w_{l}^{j + 1} - w_{l}^{j - 1}$$, etc.

The corresponding error equation is

$$\biggl( 1 + \frac{\delta_{x}^{2}}{12} \biggr)\delta_{t}^{2} \varepsilon_{l}^{j} + \eta k \biggl( 1 + \frac{\delta_{x}^{2}}{12} \biggr) ( 2\mu_{t}\delta_{t} )\varepsilon_{l}^{j} - \lambda^{2}\delta_{x}^{2}\varepsilon _{l}^{j} = O\bigl(k^{4} + k^{2}h^{4} \bigr).$$
(6.3)

To establish stability for scheme (6.2), it is necessary to assume that the solution of the homogeneous part of the error equation (6.3) is of the form $$\varepsilon_{l}^{j} = \xi^{j}e^{i\theta_{0}l}$$, where $$i = \sqrt{ - 1}$$, $$\theta_{0}$$ is real, and we obtain the characteristic equation

$$p\xi^{2} + q\xi+ r = 0,$$
(6.4)

where

\begin{aligned} \begin{aligned} &p = ( 1 + \eta k ) \biggl( 1 - \frac{1}{3}\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr) \biggr), \\ &q = - 2 + \frac{2}{3}\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr) + 4\lambda^{2}\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr), \\ &r = ( 1 - \eta k ) \biggl( 1 - \frac{1}{3}\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr) \biggr). \end{aligned} \end{aligned}

The necessary and sufficient condition for $$\vert \xi \vert < 1$$ is that $$p + q + r > 0$$, $$p - r > 0$$, $$p - q + r > 0$$. The conditions $$p + q + r > 0$$ and $$p - r > 0$$ are satisfied for $$\eta> 0$$ and for all $$\theta_{0}$$ except $$\theta_{0} = 0 \mbox{ or } 2\pi$$.

The condition $$p - q + r > 0$$ is satisfied if

$$0 < \lambda^{2} \le\frac{2}{3}.$$
(6.5)

In order to obtain an unconditionally stable spline in compression finite difference scheme of $$O(k^{2} + h^{4})$$ accuracy, we may re-write scheme (6.2) as

$$\biggl( 1 - \rho\lambda^{2}\delta_{x}^{2} + \frac{\delta_{x}^{2}}{12} \biggr)\delta_{t}^{2}w_{l}^{j} + \eta k \biggl( 1 + \frac{\delta_{x}^{2}}{12} \biggr) ( 2\mu_{t} \delta_{t} )w_{l}^{j} - \lambda^{2} \delta_{x}^{2}w_{l}^{j} = \frac{k^{2}}{12} \bigl[ f_{l + 1}^{j} + f_{l - 1}^{j} + 10f_{l}^{j} \bigr],$$
(6.6)

where ρ is a free parameter to be determined. The additional term $$-\rho\lambda^{2}\delta_{x}^{2}\delta_{t}^{2}w_{l}^{j}$$ is of higher order and does not affect the consistency and accuracy of the scheme. Like (6.4), the characteristic equation for (6.6) may be written as

$$p^{*}\xi^{2} + q^{*}\xi+ r^{*} = 0,$$
(6.7)

where

\begin{aligned}& p^{*} = ( 1 + \eta k ) \biggl( 1 - \frac{1}{3}\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr) \biggr) + 4\rho\lambda^{2}\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr), \\& q^{*} = - 2 + \frac{2}{3}\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr) + 4\lambda^{2}\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr) - 8\rho \lambda^{2}\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr), \\& r^{*} = ( 1 - \eta k ) \biggl( 1 - \frac{1}{3}\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr) \biggr) + 4\rho\lambda^{2}\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr). \end{aligned}

The necessary and sufficient condition for $$\vert \xi \vert < 1$$ is that $$p^{*} + q^{*} + r^{*} > 0$$, $$p^{*} - r^{*} > 0$$, $$p^{*} - q^{*} + r^{*} > 0$$.

Thus, for stability, we must have the conditions

\begin{aligned} (\mathrm{i})&\quad p^{*} + q^{*} + r^{*} = 4\lambda^{2}\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr) > 0\quad \mbox{for all } \theta_{0} \mbox{ except } \theta_{0} = 0 \mbox{ or } 2\pi. \end{aligned}

We can treat this separately:

\begin{aligned} (\mathrm{ii})&\quad p^{*} - r^{*} = \frac{2\eta k}{3} \biggl( 2 + \cos^{2} \biggl( \frac{\theta_{0}}{2} \biggr) \biggr) > 0 \quad \mbox{for }\eta>0 \mbox{ and all variable angles }\theta_{0}, \\ (\mathrm{iii})&\quad p^{*} - q^{*} + r^{*} = \frac{4}{3} \biggl( 2 + \cos^{2}\biggl(\frac{\theta_{0}}{2}\biggr) \biggr) + 4 \lambda^{2} ( 4\rho- 1 )\sin^{2} \biggl( \frac{\theta_{0}}{2} \biggr) > 0 \quad \mbox{if } \rho \ge\frac{1}{4}. \end{aligned}

Thus scheme (6.6) is stable if $$\rho\ge\frac{1}{4}$$, $$\eta> 0$$ for all $$\theta_{0}$$ except $$\theta_{0} = 0 \mbox{ or } 2\pi$$.

We treat this case separately. For $$\theta_{0} = 0 \mbox{ or } 2\pi$$, we have the characteristic equation

$$( 1 + \eta k )\xi^{2} - 2\xi+ ( 1 - \eta k ) = 0$$
(6.8)

whose roots are $$\xi_{1,2} = 1, \frac{1 - \eta k}{1 + \eta k}$$. In this case also $$\vert \xi \vert \le1$$.

Hence, for $$\eta> 0$$, $$\rho\ge\frac{1}{4}$$, scheme (6.6) is stable for all choices of $$h>0$$ and $$k>0$$.

## Convergence analysis

We consider the nonlinear hyperbolic differential equation

$$\frac{\partial^{2}w}{\partial t^{2}} = \frac{\partial^{2}w}{\partial x^{2}} + g ( x,t,w,w_{x},w_{t} ),\quad 0 < x < 1,t > 0.$$
(7.1)

The initial and boundary conditions are given by

\begin{aligned}& w(x,0) = a(x),\qquad w_{t}(x,0) = b(x),\quad 0 \le x \le1, \end{aligned}
(7.2)
\begin{aligned}& w(0,t) = a_{0}(t),\qquad w(1,t) = a_{1}(t),\quad t \ge0. \end{aligned}
(7.3)

In this section, we establish under appropriate conditions the fourth order convergence of the proposed method.

We assume that the initial value problem (7.1)-(7.3) has a unique smooth solution $$w(x,t)$$, and the following conditions (see ) are satisfied:

1. (i)

$$g ( x,t,w,w_{x},w_{t} )$$ is continuous,

2. (ii)

$$g ( x,t,w,w_{x},w_{t} )$$ satisfies the Lipschitz condition, namely

\begin{aligned}& \bigl\vert g(x,t,w + \xi_{1},w_{x} + \xi_{2},w_{t} + \xi_{3}) - g\bigl(x,t,w + \xi_{1}^{*},w_{x} + \xi_{2}^{*},w_{t} + \xi_{3}^{*}\bigr) \bigr\vert \\& \quad \le L \bigl( \bigl\vert \xi_{1} - \xi_{1}^{*} \bigr\vert + \bigl\vert \xi_{2} - \xi_{2}^{*} \bigr\vert + \bigl\vert \xi_{3} - \xi_{3}^{*} \bigr\vert \bigr), \end{aligned}

where $$\xi_{i}$$ and $$\xi_{i}^{*}$$ are arbitrary real numbers, and L is a Lipschitz constant,

3. (iii)

$$a(x)$$ and $$b(x)$$ are continuously differentiable up to order 4 and 2, respectively.

For $$h_{l + 1} = h_{l} = h$$, $$\lambda= (k/h)>0$$ and replacing the variables U by W, u by w, we may re-write scheme (3.20) as

\begin{aligned}& 12\lambda^{2} \bigl( W_{l + 1}^{j} - 2W_{l}^{j} + W_{l - 1}^{j} \bigr) - k^{2} \bigl[ {\overline{W}_{tt}}_{l + 1}^{j} + {\overline{W}_{tt}}_{l - 1}^{j} + 10{ \overline{W}_{tt}}_{l}^{j} \bigr] \\& \quad {}+ k^{2} \bigl[ \hat{G}_{l + 1}^{j} + \hat{G}_{l - 1}^{j} + 10\hat{G}_{l}^{j} \bigr] = T_{l}^{j}, \quad l = 1(1)N;j = 0,1,2,\ldots, \end{aligned}
(7.4)

where

\begin{aligned}& \overline{G}_{l}^{j} = g\bigl(x_{l},t_{j},W_{l}^{j},{ \overline{W}_{x}}_{l}^{j},{\overline{W}_{t}}_{l}^{j} \bigr),\qquad \hat{G}_{l}^{j} = g\bigl(x_{l},t_{j},W_{l}^{j},{ \hat{W}_{x}} {}_{l}^{j},{\overline{W}_{t}}_{l}^{j} \bigr),\quad \textit{etc.},\qquad \ldots \quad \mbox{and} \\& T_{l}^{j} = O\bigl(k^{4} + k^{4}h^{2} + k^{2}h^{4}\bigr). \end{aligned}

Let $$\mathbf{W}^{j} = [W_{1}^{j},W_{2}^{j},\ldots,W_{N}^{j}]^{T}$$ (T denotes transpose) and $$\mathbf{w}^{j} = [w_{1}^{j},w_{2}^{j},\ldots,w_{N}^{j}]^{T}$$ be the exact and approximate solution vectors of the solution $$w(x,t)$$ at the grid point $$(x_{l},t_{j})$$, respectively, and let $$\mathbf{T} = [T_{1}^{j},T_{2}^{j},\ldots,T_{N}^{j}]^{T}$$ be the local truncation error vector.

Let

$$\boldsymbol{\phi} (\mathbf{W}) \equiv\boldsymbol{\phi} \bigl( \mathbf{W}^{j + 1},\mathbf{W}^{j},\mathbf{W}^{j - 1} \bigr)=k^{2} \bigl[ \hat{G}_{l + 1}^{j} + \hat{G}_{l - 1}^{j} + 10\hat{G}_{l}^{j} \bigr]$$

and

$$\boldsymbol{\phi} (\mathbf{w}) \equiv\boldsymbol{\phi} \bigl( \mathbf{w}^{j + 1},\mathbf{w}^{j},\mathbf{w}^{j - 1} \bigr)=k^{2} \bigl[ \hat{g}_{l + 1}^{j} + \hat{g}_{l - 1}^{j} + 10\hat{g}_{l}^{j} \bigr],$$

where

$$\overline{g}_{l}^{j} = g\bigl(x_{l},t_{j},w_{l}^{j},{ \overline{w}_{x}}_{l}^{j},{\overline{w}_{t}}_{l}^{j} \bigr),\qquad \hat{g}_{l}^{j} = g\bigl(x_{l},t_{j},w_{l}^{j},{ \hat{w}_{x}} {}_{l}^{j},{\overline{w}_{t}}_{l}^{j} \bigr),\quad \textit{etc.},\qquad \ldots.$$

Then the spline in compression method described by (7.4) can be expressed in a matrix form as follows:

$$\mathbf{DW}^{j + 1} + 2\mathbf{CW}^{j} + \mathbf{DW}^{j - 1} + \boldsymbol{\phi} (\mathbf{W}) = \mathbf{T},$$
(7.5)

where $$\mathbf{D} = [ - 1, - 10, - 1]^{T}$$ and $$\mathbf{C} = [1 + 6\lambda^{2},10 - 12\lambda^{2},1 + 6\lambda^{2}]^{T}$$ are tri-diagonal matrices of order N.

The method consists of obtaining an approximation $$\mathbf{w}^{j + 1}$$ for $$\mathbf{W}^{j + 1}$$ by solving the tri-diagonal system

$$\mathbf{Dw}^{j + 1} + 2\mathbf{Cw}^{j} + \mathbf{Dw}^{j - 1} + \boldsymbol{\phi} (\mathbf{w}) = \mathbf{0}.$$
(7.6)

Let $$\varepsilon_{l}^{j} = w_{l}^{j} - W_{l}^{j}$$ and $$\mathbf {E}^{j} = \mathbf{w}^{j} - \mathbf{W}^{j} = [\varepsilon_{1}^{j},\varepsilon_{2}^{j},\ldots,\varepsilon_{N}^{j}]^{T}$$.

We may write

\begin{aligned}& {\overline{w}_{t}}_{l}^{j} - { \overline{W}_{t}}_{l}^{j} = \bigl(\varepsilon _{l}^{j + 1} - \varepsilon_{l}^{j - 1} \bigr)/(2k),\qquad {\overline{w}_{x}}_{l}^{j} - { \overline{W}_{x}}_{l}^{j} = \bigl( \varepsilon_{l + 1}^{j} - \varepsilon_{l - 1}^{j} \bigr)/(2h),\qquad \ldots,\quad \textit{etc.}, \\& \overline{g}_{l \pm1}^{j} - \overline{G}_{l \pm1}^{j} = \varepsilon_{l \pm1}^{j}H_{l \pm1}^{j} + \frac{1}{2h}\bigl( \pm3\varepsilon_{l \pm1}^{j} \mp4 \varepsilon_{l}^{j} \pm\varepsilon_{l \mp1}^{j} \bigr)I_{l \pm1}^{j} + \frac{1}{2k}\bigl( \varepsilon_{l \pm1}^{j + 1} - \varepsilon_{l \pm1}^{j - 1} \bigr)J_{l \pm1}^{j}, \end{aligned}
(7.7a)
\begin{aligned}& \overline{g}_{l}^{j} - \overline{G}_{l}^{j} = \varepsilon_{l}^{j}H_{l}^{j} + \frac{1}{2h}\bigl(\varepsilon_{l + 1}^{j} - \varepsilon_{l - 1}^{j}\bigr)I_{l}^{j} + \frac{1}{2k}\bigl(\varepsilon_{l}^{j + 1} - \varepsilon_{l}^{j - 1}\bigr)J_{l}^{j}, \end{aligned}
(7.7b)
\begin{aligned}& \hat{g}_{l \pm1}^{j} - \hat{G}_{l \pm1}^{j} = \varepsilon_{l \pm 1}^{j}H_{l \pm1}^{j} \pm \frac{1}{h}\bigl(\varepsilon_{l \pm1}^{j} - \varepsilon_{l}^{j}\bigr)I_{l \pm1}^{j} \pm \frac{\alpha h}{k^{2}}\bigl(\varepsilon_{l}^{j + 1} - 2 \varepsilon_{l}^{j} + \varepsilon_{l}^{j - 1} \bigr)I_{l \pm1}^{j} \\& \hphantom{\hat{g}_{l \pm1}^{j} - \hat{G}_{l \pm1}^{j}={}}{}\pm\frac{\beta h}{k^{2}}\bigl( \varepsilon_{l \pm1}^{j + 1} - 2\varepsilon_{l \pm1}^{j} + \varepsilon_{l \pm1}^{j - 1}\bigr)I_{l \pm1}^{j} \\& \hphantom{\hat{g}_{l \pm1}^{j} - \hat{G}_{l \pm1}^{j}={}}{}\mp\alpha h\biggl[\varepsilon_{l}^{j}H_{l}^{j} + \frac{1}{2h}\bigl(\varepsilon_{l + 1}^{j} - \varepsilon_{l - 1}^{j}\bigr)I_{l}^{j} + \frac{1}{2k}\bigl(\varepsilon_{l}^{j + 1} - \varepsilon_{l}^{j - 1}\bigr)J_{l}^{j} \biggr]I_{l \pm1}^{j} \\& \hphantom{\hat{g}_{l \pm1}^{j} - \hat{G}_{l \pm1}^{j}={}}{}\mp\beta h\biggl[\varepsilon_{l \pm1}^{j}H_{l \pm1}^{j} + \frac{1}{2h}\bigl( \pm 3\varepsilon_{l \pm1}^{j} \mp4 \varepsilon_{l}^{j} \pm\varepsilon_{l \mp 1}^{j} \bigr)I_{l \pm1}^{j} + \frac{1}{2k}\bigl( \varepsilon_{l \pm1}^{j + 1} - \varepsilon_{l \pm1}^{j - 1} \bigr)J_{l \pm1}^{j}\biggr]I_{l \pm1}^{j} \\& \hphantom{\hat{g}_{l \pm1}^{j} - \hat{G}_{l \pm1}^{j}={}}{}+\frac{1}{2k}\bigl(\varepsilon_{l \pm1}^{j + 1} - \varepsilon_{l \pm1}^{j - 1}\bigr)J_{l \pm1}^{j}, \end{aligned}
(7.7c)
\begin{aligned}& \hat{g}_{l}^{j} - \hat{G}_{l}^{j} = \varepsilon_{l}^{j}H_{l}^{j} + \frac{1}{2h}\bigl(\varepsilon_{l + 1}^{j} - \varepsilon_{l - 1}^{j}\bigr)I_{l}^{j} \\& \hphantom{\hat{g}_{l}^{j} - \hat{G}_{l}^{j} ={}}{}- \frac{\alpha h}{2k^{2}}\bigl[\bigl(\varepsilon_{l + 1}^{j + 1} - 2 \varepsilon_{l + 1}^{j} + \varepsilon_{l + 1}^{j - 1} \bigr) - \bigl(\varepsilon_{l - 1}^{j + 1} - 2\varepsilon_{l - 1}^{j} + \varepsilon_{l - 1}^{j - 1}\bigr)\bigr]I_{l}^{j} \\& \hphantom{\hat{g}_{l}^{j} - \hat{G}_{l}^{j} ={}}{}+ \frac{\alpha h}{2}\biggl[\varepsilon_{l + 1}^{j}H_{l + 1}^{j} + \frac{1}{2h}\bigl(3\varepsilon_{l + 1}^{j} - 4 \varepsilon_{l}^{j} + \varepsilon_{l - 1}^{j} \bigr)I_{l + 1}^{j} + \frac{1}{2k}\bigl( \varepsilon_{l + 1}^{j + 1} - \varepsilon_{l + 1}^{j - 1} \bigr)J_{l + 1}^{j}\biggr]I_{l}^{j} \\& \hphantom{\hat{g}_{l}^{j} - \hat{G}_{l}^{j} ={}}{}- \frac{\alpha h}{2}\biggl[\varepsilon_{l - 1}^{j}H_{l - 1}^{j} + \frac {1}{2h}\bigl( - 3\varepsilon_{l - 1}^{j} + 4 \varepsilon_{l}^{j} - \varepsilon_{l + 1}^{j} \bigr)I_{l - 1}^{j} + \frac{1}{2k}\bigl( \varepsilon_{l - 1}^{j + 1} - \varepsilon_{l - 1}^{j - 1} \bigr)J_{l - 1}^{j}\biggr]I_{l}^{j} \\& \hphantom{\hat{g}_{l}^{j} - \hat{G}_{l}^{j} ={}}{}+\frac{1}{2k}\bigl(\varepsilon_{l}^{j + 1} - \varepsilon_{l}^{j - 1}\bigr)J_{l}^{j} \end{aligned}
(7.7d)

for suitable H, I, J, and $$\alpha= \frac{1}{\theta^{2}} ( \frac{\theta}{\sin\theta} - 1 )$$, $$\beta= \frac{1}{2} - \alpha$$, $$\theta= 8.986818916$$.

Further, we may write

$$H_{l \pm1}^{j} = H_{l}^{j} \pm {H_{x}}_{l}^{j} + O\bigl(h^{2}\bigr), \qquad I_{l \pm 1}^{j} = I_{l}^{j} \pm {I_{x}}_{l}^{j} + O\bigl(h^{2}\bigr) \quad \mbox{and} \quad J_{l \pm 1}^{j} = J_{l}^{j} \pm {J_{x}}_{l}^{j} + O\bigl(h^{2} \bigr).$$

With the help of (7.7c) and (7.7d), we obtain

$$\boldsymbol{\phi} (\mathbf{w}) - \boldsymbol{\phi} (\mathbf{W}) = \mathbf{PE}^{j + 1} + 2\mathbf{QE}^{j} + \mathbf{RE}^{j - 1},$$
(7.8)

where P, Q and R are the coefficient matrices of error vectors $$\mathbf{E}^{j + 1}$$, $$\mathbf{E}^{j}$$ and $$\mathbf{E}^{j - 1}$$, respectively.

Subtracting (7.5) from (7.6), we have

$$(\mathbf{D} + \mathbf{P})\mathbf{E}^{j + 1} + 2(\mathbf{C} + \mathbf{Q}) \mathbf{E}^{j} + (\mathbf{D} + \mathbf{R})\mathbf{E}^{j - 1} = - \mathbf{T}.$$
(7.9)

Assume that the exact solution values of $$w(x,t)$$ are known exactly at initial and first time levels so that $$\mathbf{E}^{j} = \mathbf{E}^{j - 1} = \mathbf{0}$$. Then from (7.9) we obtain the error equation

$$( \mathbf{D} + \mathbf{P} )\mathbf{E}^{j + 1} = - \mathbf{T}.$$
(7.10)

Let $$P_{ l, m}$$ be the $$(l,m)$$th element of matrix P, then it is easy to verify that

$$- 1 + P_{ l, l \pm1} < 0 \quad \mbox{for } l = 1(1)N - 1, 2(1)N,$$

and hence $$\mathbf{D} + \mathbf{P}$$ is irreducible (see Varga ).

Let $$S_{m}$$ be the sum of the elements of the mth row of $$\mathbf {D} + \mathbf{P}$$ and $$I_{*} = \operatorname{Min}[(5\alpha- \beta)I_{l}^{j}\cdot J_{x_{l}}^{j} - (2\alpha + \beta J_{l}^{j})I_{x_{l}}^{j}]$$, then, for sufficiently small h and k, we obtain

\begin{aligned}& S_{m} > \frac{kh^{2}I_{*}}{2}, \quad m = 1\mbox{ and } N, \end{aligned}
(7.11a)
\begin{aligned}& S_{m} \ge kh^{2}I_{*},\quad m = 2(1)N - 1 \end{aligned}
(7.11b)

and hence $$\mathbf{D} + \mathbf{P}$$ is also monotone.

Then $$( \mathbf{D} + \mathbf{P} )^{ - 1}$$ exists $$( \mathbf{D} + \mathbf{P} )^{ - 1} \ge0$$ (see Varga ).

Since

$$\sum_{m = 1}^{N} ( \mathbf{D} + \mathbf{P} )_{l,m}^{ - 1}\cdot S_{m} = 1,\quad l = 1(1)N,$$

hence

$$( \mathbf{D} + \mathbf{P} )_{l,m}^{ - 1} \le \frac{1}{S_{m}} \le\frac{2}{kh^{2}I_{*}},\quad l = 1(1)N; m = 1 \mbox{ and } N$$
(7.12a)

and

$$\sum_{m = 2}^{N} ( \mathbf{D} + \mathbf{P} )_{l,m}^{ - 1} \le\frac{1}{\operatorname{Min} S_{m}} \le\frac{1}{kh^{2}I_{*}}, \quad l = 1(1)N.$$
(7.12b)

From (7.10), we have

$$\bigl\Vert \mathbf{E}^{{j} + 1} \bigr\Vert \le\bigl\Vert ( \mathbf{D} + \mathbf{P} )^{ - 1} \bigr\Vert \Vert \mathbf{T} \Vert .$$
(7.13)

Now,

$$\bigl\vert \varepsilon_{l}^{j + 1} \bigr\vert \le ( \mathbf{D} + \mathbf{P} )_{l,1}^{ - 1}\vert \mathbf{T}_{1} \vert + \sum_{m = 2}^{N - 2} ( \mathbf{D} + \mathbf{P} )_{l,m}^{ - 1}\cdot \vert \mathbf{T}_{ m} \vert + ( \mathbf{D} + \mathbf{P} )_{l,N}^{ - 1} \vert \mathbf{T}_{ N} \vert ,\quad l = 1(1)N.$$
(7.14)

Let $$\Vert E^{j + 1} \Vert = \max \{ \vert \varepsilon _{l}^{j + 1} \vert :l = 1(1)N \}$$.

With the help of (7.12a) and (7.12b) and when $$k \propto h^{2}$$, from (7.14), we obtain, for sufficiently small h and k,

$$\bigl\Vert \mathbf{E}^{{j} + 1} \bigr\Vert = O\bigl(h^{4} \bigr).$$
(7.15)

This establishes the fourth order convergence of the method.

## Numerical results

Substituting approximations (4.4), (4.6), (4.8) and (4.11) directly into the differential equation (1.1), we obtain a method

$${\overline{U}_{tt}}_{l}^{j} = A_{l}^{j}{\overline{U}_{xx}}_{l}^{j} + f\bigl(x_{l},t_{j},U_{l}^{j},{ \overline{U}_{x}}_{l}^{j},{\overline{U}_{t}}_{l}^{j} \bigr) + O\bigl(k^{2} + h_{l}\bigr), \quad l=1(1)N, j=1,2, \ldots.$$
(8.1)

In this section, we solve some benchmark problems using the method described by equation (3.20) and compare our results with the results obtained by using the method discussed in . The exact solutions are provided in each case. The right-hand side homogeneous functions, initial and boundary conditions may be obtained using the exact solution as a test procedure. The linear difference equations have been solved using a direct method, that is, tri-diagonal solver; whereas nonlinear difference equations have been solved using the Newton-Raphson iteration method. For the Newton-Raphson iteration method, we have chosen zero vector as the initial guess and the iterations were stopped when the error tolerance ≤10−12 was achieved. All computations were carried out using double precision arithmetic. All computations were done using MATLAB codes. Throughout computation, we have used $$\omega_{l} = \omega_{l + 1} = \omega$$. From consistency condition, we found the relation $$\tan ( \frac{\omega h_{l}}{2} ) = \frac{\omega h_{l}}{2}$$. This equation has an infinite number of roots, the smallest positive nonzero root being given by $$\omega h_{l}= 8.986818916$$. We have used $$\omega h_{l}= 8.986818916$$ (fixed) throughout the computation, that is, $$\omega= (8.986818916)/h_{l}$$. For different values of ‘$$h_{l}$$’, we have different values of ‘ω’. That would not affect the accuracy of the scheme.

Note that the proposed method (3.20) for second order quasilinear hyperbolic equations is a three-level scheme. 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(k^{2})$$ for u at first time level, i.e., at $$t=k$$ in order to solve the differential equation (1.1) using method (3.20), which is applicable to problems in Cartesian and polar coordinates.

Since the values of u and $$u_{t}$$ are known explicitly at $$t=0$$, this implies that all their successive tangential derivatives are known at $$t=0$$, i.e., the values of $$u, u_{x}, u_{xx},\ldots,u_{t}, u_{tx},\ldots$$ , etc. are known at $$t=0$$.

An approximation for u of $$O(k^{2})$$ at $$t=k$$ may be written as

$$u_{l}^{1} = u_{l}^{0} + {ku_{t}}_{l}^{0} + \frac {k^{2}}{2}(u_{tt})_{l}^{0} + O\bigl(k^{3}\bigr).$$
(8.2)

From equation (1.1), we have

$$(u_{tt})_{l}^{0} = \bigl[ A(x,t,u)u_{xx} + f(x,t,u,u_{x},u_{t}) \bigr]_{l}^{0}.$$
(8.3)

Thus, using the initial values and their successive tangential derivative values, from (8.3) we can obtain the value of $$(u_{tt})_{l}^{0}$$, and then, ultimately, from (8.2) we can compute the value of u at first time level, i.e., at $$t=k$$. Replacing the variable x by r in (8.2), we can also obtain an approximation of $$O(k^{2})$$ for u at $$t=k$$ for problems in polar coordinates.

We discretize the solution domain $$\Omega= \{ (x,t)|0 < x < 1,t > 0 \}$$ such that $$0 = x_{0} < x_{1} <\cdots < x_{N} < x_{N + 1} = 1$$, where $$h_{l} = x_{l} - x_{l - 1}$$ and $$\sigma= h_{l + 1}/h_{l} > 0$$, $$l = 1(1)N$$,

\begin{aligned} 1 =& x_{N + 1} - x_{0} = x_{N + 1} - x_{N} + x_{N} - x_{N - 1} + \cdots+ x_{1} - x_{0} \\ =& h_{N + 1} + h_{N} + h_{N - 1} + \cdots+ h_{1} \\ =& \bigl( 1 + \sigma+ \sigma^{2} + \cdots+ \sigma^{N} \bigr)h_{1}. \end{aligned}
(8.4)

Thus

$$h_{1} = \frac{1 - \sigma}{1 - \sigma^{N + 1}}, \quad \sigma\ne1.$$
(8.5)

Hence, by prescribing the total number of mesh points $$N+2$$, we can compute the value of $$h_{1}$$ from (8.5). The remaining mesh is determined by $$h_{l + 1} = \sigma h_{l}$$, $$l = 1,2,\ldots,N$$. We have chosen $$\sigma=1.02$$. We have taken $$N+1=8, 16, 32, 64$$ as the total number of grid points in the x-direction. Therefore, to obtain the numerical solution at $$t=1.0$$, we choose the time step $$k = 1.6 / (N + 1)^{2}$$.

### Example 1

(Wave equation in polar coordinates)

$$\frac{\partial^{2}u}{\partial t^{2}} = \frac{\partial^{2}u}{\partial r^{2}} + \frac{\gamma}{r}\frac{\partial u}{\partial r} + f(r,t),\quad 0 < r < 1, t > 0.$$
(8.6)

The initial and boundary conditions are given by

\begin{aligned}& u(r,0) = 0,\qquad u_{t}(r,0) = \cosh r,\quad 0 \le r \le1, \end{aligned}
(8.7)
\begin{aligned}& u(0,t) = \sin t, \qquad u(1,t) = \cosh1\sin t,\quad t \ge0. \end{aligned}
(8.8)

The exact solution is given by $$u(r,t) = \cosh r \sinh t$$. The maximum absolute errors (MAE) are tabulated in Table 1 at $$t = 1.0$$ for $$\gamma=1\mbox{ and }2$$.

### Example 2

(Van der Pol type nonlinear wave equation)

$$\frac{\partial^{2}u}{\partial t^{2}} = \frac{\partial^{2}u}{\partial x^{2}} + \gamma\bigl(u^{2} - 1\bigr) \frac{\partial u}{\partial t} + f(x,t),\quad 0 < x < 1,t > 0.$$
(8.9)

The initial and boundary conditions are given by

\begin{aligned}& u(x,0) = \sin\pi x, \qquad u_{t}(x,0) = - \gamma\sin\pi x,\quad 0 \le x \le 1, \end{aligned}
(8.10)
\begin{aligned}& u(0,t) = \sin t,\qquad u(1,t) = \cosh1\sin t,\quad t \ge0. \end{aligned}
(8.11)

The exact solution is given by $$u(x,t) = e^{- \gamma t} \sin \pi x$$. The MAE are tabulated in Table 2 at $$t = 2.0$$ for $$\gamma=1, 2\mbox{ and }3$$.

### Example 3

(Dissipative nonlinear wave equation)

$$\frac{\partial^{2}u}{\partial t^{2}} = \frac{\partial^{2}u}{\partial x^{2}} - 2u\frac{\partial u}{\partial t} + f(x,t),\quad 0 < x < 1,t > 0.$$
(8.12)

The initial and boundary conditions are given by

\begin{aligned}& u(x,0) = 0, \qquad u_{t}(x,0) = \sin\pi x,\quad 0 \le x \le1, \end{aligned}
(8.13)
\begin{aligned}& u(0,t) = 0,\qquad u(1,t) = 0,\quad t \ge0. \end{aligned}
(8.14)

The exact solution is given by $$u(x,t) = \sin \pi x \sin t$$. The MAE are tabulated in Table 3 at $$t =1\mbox{ and }2$$.

### Example 4

(Quasi-linear hyperbolic equation)

\begin{aligned} \frac{\partial^{2}u}{\partial t^{2}} =& \bigl(1 + x^{2} + u^{2}\bigr) \frac{\partial^{2}u}{\partial x^{2}} + \gamma u \biggl( \frac {\partial u}{\partial x} + \frac{\partial u}{\partial t} \biggr) \\ &{}+ f(x,t),\quad 0 < x < 1,t > 0. \end{aligned}
(8.15)

The initial and the boundary conditions are given by

\begin{aligned}& u(x,0) = \cosh x, \qquad u_{t}(x,0) = \cosh x,\quad 0 \le x \le1, \end{aligned}
(8.16)
\begin{aligned}& u(0,t) = e^{t},\qquad u(1,t) = e^{t}\cosh1,\quad t \ge0. \end{aligned}
(8.17)

The exact solution is given by $$u = e^{t}\cosh x$$. The MAE are tabulated in Table 4 for $$\gamma= 5 \mbox{ and } 10$$ at $$t = 1$$.

## Final remarks

Available numerical methods based on spline in compression approximations for the numerical solution of second order quasilinear hyperbolic equations on a variable mesh are of $$O(k^{2} + h_{l})$$ accuracy only. In this article, using the same number of grid points and three evaluations of the function F, we have derived a new stable method of $$O(k^{2} + k^{2}h_{l} + h_{l}^{3})$$ accuracy for the solution of second order quasilinear hyperbolic equation (1.1). To demonstrate the efficiency and the applicability of the proposed method, we have applied it to a few benchmark problems and have obtained convergent results. The results were compared with the results obtained by using a Numerov type method discussed in , and they show superiority over the latter. The non-polynomial basis $$\{ 1, x, \sin x, \cos x \}$$ consists of $$C^{\infty}$$-differentiable functions, which compensates the loss of smoothness inherited by standard Numerov type discretization discussed in . Therefore, the numerical method (3.20) based on non-polynomial spline approximations gives better results compared with the results given in .

## References

1. 1.

Bickley, WG: Piecewise cubic interpolation and two point boundary value problems. Comput. J. 11, 206-208 (1968)

2. 2.

Fyfe, DJ: The use of cubic splines in the solution of two point boundary value problems. Comput. J. 12, 188-192 (1969)

3. 3.

Fleck, JA Jr.: A cubic spline method for solving the wave equation of nonlinear optics. J. Comput. Phys. 16, 324-341 (1974)

4. 4.

Raggett, GF, Wilson, PD: A fully implicit finite difference approximation to the one-dimensional wave equation using a cubic spline technique. J. Inst. Math. Appl. 14, 75-77 (1974)

5. 5.

Jain, MK, Aziz, T: Spline function approximation for differential equations. Comput. Methods Appl. Mech. Eng. 26, 129-143 (1981)

6. 6.

Jain, MK, Aziz, T: Cubic spline solution of two-point boundary value problems with significant first derivatives. Comput. Methods Appl. Mech. Eng. 39, 83-91 (1983)

7. 7.

Al-Said, EA: Spline methods for solving a system of second order boundary value problems. Int. J. Comput. Math. 70, 717-727 (1999)

8. 8.

Kadalbajoo, MK, Bawa, RK: Cubic spline method for a class of non-linear singularly perturbed boundary value problems. J. Optim. Theory Appl. 76, 415-428 (1993)

9. 9.

Al-Said, EA: The use of cubic splines in the numerical solution of a system of second order boundary value problem. Comput. Math. Appl. 42, 861-869 (2001)

10. 10.

Aziz, T, Khan, A: A spline method for second-order singularly perturbed boundary value problems. J. Comput. Appl. Math. 147, 445-452 (2002)

11. 11.

Jain, MK, Iyengar, SRK, Pillai, ACR: Difference schemes based on splines in compression for the solution of conservation laws. Comput. Methods Appl. Mech. Eng. 38, 137-151 (1983)

12. 12.

Kadalbajoo, MK, Patidar, KC: Numerical solution of singularly perturbed non-linear two point boundary value problems by spline in compression. Int. J. Comput. Math. 79, 271-288 (2002)

13. 13.

Kadalbajoo, MK, Patidar, KC: Variable mesh spline in compression for the numerical solution of singular perturbation problems. Int. J. Comput. Math. 80, 83-93 (2003)

14. 14.

Kadalbajoo, MK, Aggarwal, VK: Cubic spline for solving singular two-point boundary value problems. Appl. Math. Comput. 156, 249-259 (2004)

15. 15.

Talwar, J, Mohanty, RK: Spline in compression method for non-linear two point boundary value problems on a geometric mesh. Neural Parallel Sci. Comput. 21, 553-570 (2013)

16. 16.

Mohanty, RK, Jha, N, Evans, DJ: Spline in compression method for the numerical solution of singularly perturbed two point singular boundary value problems. Int. J. Comput. Math. 81, 615-627 (2004)

17. 17.

Mohanty, RK, Jha, N: A class of variable mesh spline in compression methods for singularly perturbed two point singular boundary value problems. Appl. Math. Comput. 168, 704-716 (2005)

18. 18.

Tirmizi, IA, Haq, FI, Islam, SU: Non-polynomial spline solution of singularly perturbed boundary-value problems. Appl. Math. Comput. 196, 6-16 (2008)

19. 19.

Mohanty, RK, Jain, MK, George, K: On the use of high order difference methods for the system of one space second order non-linear hyperbolic equations with variable coefficients. J. Comput. Appl. Math. 72, 421-431 (1996)

20. 20.

Mohanty, RK, Arora, U: A new discretization method of order four for the numerical solution of one space dimensional second order quasi-linear hyperbolic equation. Int. J. Math. Educ. Sci. Technol. 33, 829-838 (2002)

21. 21.

Mohanty, RK, Singh, S: High accuracy Numerov type discretization for the solution of one-space dimensional non-linear wave equations with variable coefficients. J. Adv. Res. Sci. Comput. 3, 53-66 (2011)

22. 22.

Mohanty, RK, Gopal, V: An off-step discretization for the solution of 1D mildly nonlinear wave equations with variable coefficients. J. Adv. Res. Sci. Comput. 4, 1-13 (2012)

23. 23.

Mohanty, RK, Singh, S: High order variable mesh approximation for the solution of 1D non-linear hyperbolic equation. Int. J. Nonlinear Sci. 14, 220-227 (2012)

24. 24.

Mohanty, RK, Kumar, R: A new fast algorithm based on half-step discretization for one space dimensional quasilinear hyperbolic equations. Appl. Math. Comput. 244, 624-641 (2014)

25. 25.

Rashidinia, J, Jalilian, R, Kazemi, V: Spline methods for the solutions of hyperbolic equations. Appl. Math. Comput. 190, 882-886 (2007)

26. 26.

Ding, H, Zhang, Y: Parametric spline methods for the solution of hyperbolic equations. Appl. Math. Comput. 204, 938-941 (2008)

27. 27.

Mohanty, RK: An unconditionally stable difference scheme for the one space dimensional linear hyperbolic equation. Appl. Math. Lett. 17, 101-105 (2004)

28. 28.

Mohanty, RK: New unconditionally stable difference schemes for the solution of multi-dimensional telegraphic equations. Int. J. Comput. Math. 86, 2061-2071 (2009)

29. 29.

Ding, H, Zhang, Y: A new unconditionally stable compact difference scheme of $$O(\tau^{2} + h^{4})$$ for the 1D linear hyperbolic equation. Appl. Math. Comput. 207, 236-241 (2009)

30. 30.

Ding, H, Zhang, Y, Cao, J, Tian, J: A class of difference scheme for solving telegraph equation by new non-polynomial spline methods. Appl. Math. Comput. 218, 4671-4683 (2012)

31. 31.

Mohanty, RK, Gopal, V: High accuracy cubic spline finite difference approximation for the solution of one-space dimensional non-linear wave equations. Appl. Math. Comput. 218, 4234-4244 (2011)

32. 32.

Mohanty, RK, Dahiya, V, Khosla, N: Spline in compression methods for singularly perturbed 1D parabolic equations with singular coefficients. J. Discrete Math. 2, 70-77 (2012)

33. 33.

Talwar, J, Mohanty, RK, Singh, S: A new spline in compression approximation for one space dimensional quasilinear parabolic equations on a variable mesh. Appl. Math. Comput. 260, 82-96 (2015)

34. 34.

Gopal, V, Mohanty, RK, Jha, N: New non-polynomial spline in compression method of $$O(k^{2} + h^{4})$$ for the solution of 1D wave equation in polar co-ordinates. Adv. Numer. Anal. 2013, Article ID 470480 (2013)

35. 35.

Mohanty, RK, Gopal, V: High accuracy non-polynomial spline in compression method for one-space dimensional quasi-linear hyperbolic equations with significant first order space derivative term. Appl. Math. Comput. 238, 250-265 (2014)

36. 36.

Kelly, CT: Iterative Methods for Linear and Nonlinear Equations. SIAM, Philadelphia (1995)

37. 37.

Hageman, LA, Young, DM: Applied Iterative Methods. Dover, New York (2004)

38. 38.

Li, WD, Sun, ZZ, Zhao, L: An analysis for a high order difference scheme for numerical solution to $$u_{tt} = A(x,t)u_{xx} + F(x,t,u,u_{t},u_{x})$$. Numer. Methods Partial Differ. Equ. 23, 484-498 (2007)

39. 39.

Varga, RS: Matrix Iterative Analysis, 2nd edn. Springer, Berlin (2009)

Download references

## Acknowledgements

The authors thank the reviewers for their valuable suggestions which substantially improved the standard of the paper.

## Author information

Authors

### Corresponding author

Correspondence to Ranjan Kumar Mohanty.

## Additional information

### Competing interests

The authors declare that they have no competing interest.

### Authors’ contributions

RKM discussed the variable mesh method based on spline in compression approximation and stability analysis. NJ discussed the convergence analysis and the application of the proposed method to singular problems. RK carried out all the computational work. All authors read and approved the final manuscript.

## Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Reprints and Permissions 