A Computational Study with Finite Difference Methods for Second Order Quasilinear Hyperbolic Partial Differential Equations in Two Independent Variables ()

Pavlos Stampolidis^{}, Maria Ch. Gousidou-Koutita^{}

Department of Mathematics, Faculty of Sciences, Aristotle University, Thessaloniki, Greece.

**DOI: **10.4236/am.2018.911079
PDF HTML XML
1,632
Downloads
2,425
Views
Citations

Department of Mathematics, Faculty of Sciences, Aristotle University, Thessaloniki, Greece.

In this paper we consider the numerical method of characteristics for the numerical solution of *initial value problems* (IVPs) for quasilinear hyperbolic Partial Differential Equations, as well as the difference scheme Central Time Central Space (CTCS), Crank-Nicolson scheme, *ω* scheme and the method of characteristics for the numerical solution of initial and boundary value prob-lems for the one-dimension homogeneous wave equation. The initial deriva-tive condition is approximated by different second order difference quotients in order to examine which gives more accurate numerical results. The local truncation error, consistency and stability of the difference schemes CTCS, Crank-Nicolson and *ω* are also considered.

Keywords

Finite Difference Method, CTCS Method, Crank-Nicolson Method, *ω*-Method, Numerical Method of Characteristics, Wave Equation

Share and Cite:

Stampolidis, P. and Gousidou-Koutita, M. (2018) A Computational Study with Finite Difference Methods for Second Order Quasilinear Hyperbolic Partial Differential Equations in Two Independent Variables. *Applied Mathematics*, **9**, 1193-1224. doi: 10.4236/am.2018.911079.

1. Introduction

A second order quasilinear PDE in two independent variables x, y is an equation of the form

$A\frac{{\partial}^{2}U\left(x,y\right)}{\partial {x}^{2}}+B\frac{{\partial}^{2}U\left(x,y\right)}{\partial x\partial y}+C\frac{{\partial}^{2}U\left(x,y\right)}{\partial {y}^{2}}+D=0,$ (1)

where A, B, C, D may be functions of x, y, $U\left(x,y\right)$, $\frac{\partial U\left(x\mathrm{,}y\right)}{\partial x}$ and $\frac{\partial U\left(x\mathrm{,}y\right)}{\partial y}$.

We assume that the PDE (1) is of hyperbolic type, which means that we are restricted to a region of the xy-plane where ${B}^{2}-4AC>0$.

The second order quasilinear hyperbolic Partial Differential Equations (PDEs) with appropriate initial and boundary conditions serve as models in many branches of physics, engineering, biology, etc. Thus, the numerical solution of such PDEs plays an important rule in the current research. During the last decades, a variety of numerical methods have been developed to solve these PDEs some of which can be found in [1] - [7] . Among those methods the classic characteristic method and its variations are used in a wide range of hyperbolic problems (see [5] [8] - [18] ).

In this paper, a modification of the numerical method of characteristics is proposed to solve special cases of initial and boundary value problems (IBVPs) for second order hyperbolic PDEs. To test the method it is applied for the numerical solution of IBVPs for the one-dimension homogeneous wave equation and it is compared with the following well-known finite difference methods: Central Time Central Space (CTCS), Crank-Nicolson and ω scheme.

The CTCS method is the classic explicit scheme to approach the wave equation which can be very accurate under certain restriction. The ω-method is an implicit scheme first introduced by von Neumann [17] . We use the term ω-method following Zauderer [18] . Crank-Nicolson method [19] is usually used in parabolic equations and is not recommended for second order hyperbolic PDEs. However, we prove the consistency and von Neumann stability for this method and compare it with the other methods.

The common thing among the schemes CTCS, Crank-Nicolson and ω is that it is required to compute the solution on the first time step before they can be employed [20] . In the literature, this is usually done by approximating the initial derivative condition by centered or forward second order divided difference without any specific preference [20] - [27] . This is justified by the fact that the initialization method has no effect on the stability of the overall method [26] . Nevertheless, from numerical point of view, the initialization method affects the accuracy of the methods as we will see.

The manuscript is organized as follows. In Section 2 we describe briefly the numerical method of characteristics and we apply it into two specific quasilinear hyperbolic PDEs, in order to examine the accuracy of the method. In Section 3 we consider the one-dimensional homogeneous wave equation

${c}^{2}\frac{{\partial}^{2}U\left(x,t\right)}{\partial {x}^{2}}-\frac{{\partial}^{2}U\left(x,t\right)}{\partial {t}^{2}}=0,\text{\hspace{1em}}0<x<L,\text{\hspace{1em}}t>0,\text{\hspace{1em}}c,L\in {\mathbb{R}}^{+},$ (2)

which is a special case of (1). We consider that (2) satisfies the following boundary (BCs) and initial conditions (ICs)

$\text{BCs}\text{\hspace{1em}}(\begin{array}{l}U\left(0,t\right)=0\\ U\left(L,t\right)=0\end{array},\text{\hspace{1em}}t>0$ (3)

$\text{ICs}\text{\hspace{1em}}(\begin{array}{l}U\left(x,0\right)=f\left(x\right)\\ \frac{\partial U\left(x,0\right)}{\partial t}=g\left(x\right)\end{array},\text{\hspace{1em}}0\le x\le L.$ (4)

and we give the numerical schemes for the methods CTCS, Crank-Nicolson, ω and characteristics. For each of the methods CTCS, Crank-Nicolson and ω we use second order forward, centered and backward differences to approximate the initial derivative condition. In Section 4 we use the methods mentioned in Section 3 to solve an IBVP for (2) for different values of c ( $c=0.2,1,2$ ). Firstly, we investigate which of the forward, centered and backward differences give better results from numerical aspect. Secondly, we compare the methods mentioned previously taking into consideration the accuracy of the numerical results and the machine time needed for the calculations. In Section 5 we summarize the results of the present work.

Finally, we note that the algorithms of the numerical methods presented in the current paper were written in Fortran 95 and were tested on a 32-bit processor Intel Celeron E1200, 1.60 GHz with 3 GB RAM. A “slow” processor was chosen intentionally to distinguish time consuming methods.

2. Numerical Method of Characteristics

Consider the hyperbolic PDE (1). It is well-known [16] [18] that in this case there are exactly two characteristics curves, say $y=y\left(x\right)$, through every point $\left(x\mathrm{,}y\right)$ of the solution domain which satisfy the equation

$A{\left(\frac{\text{d}y}{\text{d}x}\right)}^{2}-B\left(\frac{\text{d}y}{\text{d}x}\right)+C=0.$ (5)

Let us denote by $\xi =\frac{\text{d}y}{\text{d}x}$ the slope at every point of the first characteristic curve through a point $P\left(x,y\right)$ of the solution domain (which is said to be a ξ-characteristic) and by $\eta =\frac{\text{d}y}{\text{d}x}$ the slope at every point of the other characteristic through the point P (η-characteristic).We also assume that along an initial curve, say φ, (non characteristic) U, $p=\frac{\partial U}{\partial x}$ and $q=\frac{\partial U}{\partial y}$ are known.

Let $Q\left({x}_{Q}\mathrm{,}{y}_{Q}\right)$, $R\left({x}_{R}\mathrm{,}{y}_{R}\right)$ be points on φ and let us denote by $P\left({x}_{P}\mathrm{,}{y}_{P}\right)$ the intersection point of the ξ-characteristic through Q and the η-characteristic through R (see Figure 1, left). Then we can calculate approximation values for U, p and q at the point P by the following algorithm. Firstly, we compute approximation values for the coordinates $\left({x}_{P}\mathrm{,}{y}_{P}\right)$ by the equations

$(\begin{array}{l}{y}_{P}-{y}_{Q}={\xi}_{Q}\left({x}_{P}-{x}_{Q}\right),\\ {y}_{P}-{y}_{R}={\eta}_{R}\left({x}_{P}-{x}_{R}\right).\end{array}$ (6)

Then, we calculate approximation values for p and q at P by the equations

$(\begin{array}{l}{A}_{Q}{\xi}_{Q}\left({p}_{P}-{p}_{Q}\right)+{C}_{Q}\left({q}_{P}-{q}_{Q}\right)+{D}_{Q}\left({y}_{P}-{y}_{Q}\right)=\mathrm{0,}\\ {A}_{R}{\eta}_{R}\left({p}_{P}-{p}_{R}\right)+{C}_{R}\left({q}_{P}-{q}_{R}\right)+{D}_{R}\left({y}_{P}-{y}_{R}\right)=0.\end{array}$ (7)

Finally, to obtain an approximation value for U at P we can use the following approximation

${U}_{P}={U}_{Q}+{p}_{Q}\left({x}_{P}-{x}_{Q}\right)+{q}_{Q}\left({y}_{P}-{y}_{Q}\right).$ (8)

An improved approximation to ${U}_{P}$ is obtained by averaging the values of p and q at the points P, Q and P, R respectively and is given by the equation

${U}_{P}={U}_{Q}+\frac{1}{2}\left({p}_{Q}+{p}_{P}\right)\left({x}_{P}-{x}_{Q}\right)+\frac{1}{2}\left({q}_{Q}+{q}_{P}\right)\left({y}_{P}-{y}_{Q}\right).$ (9)

A similar averaging approach can be used to improve the accuracy of the approximation values of ${x}_{P}$, ${y}_{P}$, ${p}_{P}$ and ${q}_{P}$ computed by the equations (6), (7). Then we can calculate an improved approximation value of ${U}_{P}$ by the Equation (9). With this way an iteration scheme is developed. The iterations are terminated when the errors from one step to the next are less than a prespecified error tolerance or an upper limit is placed on the number of iterations. Suppose three points are given on the initial curve φ, say Q, R, S, instead of two (see Figure 1, right). Then we can compute approximation values for U at a grid of three points in the xy-plane. By the previous algorithm we can calculate solution values at the grid points P and T and then proceed to the grid point V. In general, given $n\ge 2$ points on φ then solution values can be computed at a grid of

$\frac{n\left(n-1\right)}{2}$ points.

Example 2.1. Consider the PDE

$\frac{{\partial}^{2}U}{\partial {x}^{2}}+\left(1-2\frac{\partial U}{\partial x}\right)\frac{{\partial}^{2}U}{\partial x\partial y}+\left({\left(\frac{\partial U}{\partial x}\right)}^{2}-\frac{\partial U}{\partial x}\right)\frac{{\partial}^{2}U}{\partial {y}^{2}}+\frac{1}{4\sqrt{{x}^{3}}}=0.$ (10)

This has the general form of the PDE (1) with $A=1$, $B=1-2\frac{\partial U}{\partial x}$, $C={\left(\frac{\partial U}{\partial x}\right)}^{2}-\frac{\partial U}{\partial x}$ and $D=\frac{1}{4\sqrt{{x}^{3}}}$. The PDE (10) is hyperbolic since ${B}^{2}-4AC=1>0$. We consider the initial curve as $\phi =\left\{\left(x,y\right)|x\in {\mathbb{R}}^{+},y=0\right\}$

Figure 1. A grid is defined by the number of points on initial curve.

with $U=\sqrt{x}-1$, $p=\frac{1}{2\sqrt{x}}$ and $q=1$ on φ. In view of (5), the slope of the characteristics is given by

$\frac{\text{d}y}{\text{d}x}=1-\frac{\partial U}{\partial x}=\xi \text{\hspace{1em}}\text{and}\text{\hspace{1em}}\frac{\text{d}y}{\text{d}x}=-\frac{\partial U}{\partial x}=\eta \mathrm{.}$ (11)

At first we start with $n=10$ points ${Q}_{i}$, $1\le i\le 10$, on φ with ${Q}_{1}\left(\mathrm{0.5,0}\right)$ and a step size of $h=0.1$. Hence a grid of 45 points is created. The calculation of the approximation value for U at a grid point is terminated when

$\left|\frac{{U}^{\left(r\right)}-{U}^{\left(r-1\right)}}{{U}^{\left(r\right)}}\right|\cdot 100\le \frac{1}{2}{10}^{-3}$ (where ${U}^{\left(r\right)}$ is the approximation value for U at the point after r iterations) or when the number of iterations exceeds 100. The machine time needed for the calculation of x, y, U, p and q at 45 grid points is less than 0.01s. The actual solution of (10) with the given initial conditions is $U\left(x,y\right)=\sqrt{x}+y-1$. Hence in view of (11) we see that the characteristics are given as $y\left(x\right)=x-\sqrt{x}+{c}_{1}$ and $y\left(x\right)=-\sqrt{x}+{c}_{2}$, ${c}_{1}\mathrm{,}{c}_{2}\in \mathbb{R}$ and the grid that they form is shown in Figure 2, left. We can also see the solution U along ξ, η-characteristics and the approximation values for U at the grid points in Figure 2, right. Table 1 gives selected values of x, y, U, p and q. The arrangement in the table has the two points on φ (from which the characteristics pass through and intersect at a specific grid point) in each line followed by the approximation values of x, y, U, p, and q, the number r of iterations and the absolute percent relative error e for U given by $e=\left|\frac{t-a}{t}\right|\cdot 100\%$, where t, a are the true and approximation values, respectively. If $\left|t\right|\le {10}^{-8}$ then e is replaced by the absolute percent error $\left|t-a\right|\cdot \mathrm{100\%}$. Example 2.1 was also run using $n=46$, ${Q}_{1}\left(\mathrm{0.5,0}\right)$ and $h=0.02$. The grid consists of 1035 points and the machine time needed for the calculation at those points is 0.016 s. Selected values are given in

Figure 2. n = 10, h = 0.1, 45 Grid Points.

Table 1. n = 10, h = 0.1, Number of grid points = 45, Machine time < 0.01 s.

Table 2 and approximate and exact solutions are illustrated in Figure 3, Figure 4.

As we can see for smaller step size the number of iterations as well as the error e at same grid points are decreased.

Example 2.2. Consider the PDE

$\frac{{\partial}^{2}U}{\partial {x}^{2}}-{U}^{2}\frac{{\partial}^{2}U}{\partial {y}^{2}}=0.$

The above PDE is quasilinear and is hyperbolic away from $U=0$. We consider the initial curve as $\phi =\left\{\left(x,y\right)|0\le x\le 1,y=0\right\}$ with $U=0.2+5{x}^{2}$, $p=10x$ and $q=3x$ along φ. The slope of the characteristics is given by $\frac{\text{d}y}{\text{d}x}=U=\xi $ and $\frac{\text{d}y}{\text{d}x}=-U=\eta $. As in the previous example, we use two different step sizes of $h=0.1$ and $h=0.01$ with starting point ${Q}_{1}\left(\mathrm{0.1,0}\right)$ and the same stopping criteria. The number of initial points taken on φ is $n=10$ and $n=91$, respectively. In the first case the grid consists of 45 points and in the second of 4095 points. Figure 5 provides a visual representation for the second case and a selection of computed values of x, y, U, p and q is given in Table 3, Table 4 for $h=0.1$ and $h=0.01$, respectively. In these Tables the absolute percent relative error e for U is given by $e=\left|\frac{{U}^{\left(r\right)}-{U}^{\left(r-1\right)}}{{U}^{\left(r\right)}}\right|\cdot 100\%$, if $\left|{U}^{\left(r\right)}\right|>{10}^{-8}$ and the absolute percent error by $e=\left|{U}^{\left(r\right)}-{U}^{\left(r-1\right)}\right|\cdot 100\%$ if $\left|{U}^{\left(r\right)}\right|\le {10}^{-8}$.

Even though the number of iterations is smaller by decreasing the step size, there is no significant difference between the errors, approximately 1/10 of the corresponding error of the first case.

Table 2. n = 46, h = 0.02, Number of grid points = 1035, Machine time = 0.016 s.

Figure 3. Approximated and exact solutions (h = 0.02).

Figure 4. Approximated and exact solutions (h = 0.02).

Figure 5. Approximated solutions (h = 0.01).

Table 3. n = 10, h = 0.1, Number of grid points = 45, Machine time < 0.01 s.

Table 4. n = 91, h = 0.01, Number of grid points = 4095, Machine time = 0.078 s.

3. Finite Difference Methods for the Wave Equation

Consider the IBVP (2)-(4). Approximating $\frac{{\partial}^{2}U}{\partial {x}^{2}}$ and $\frac{{\partial}^{2}U}{\partial {t}^{2}}$ by various divided differences formulae, a number of difference schemes is created and some of them are presented below. Before doing that, we need to discretize the space of solutions. Let $h>0$ be an increment in x and $k>0$ be an increment in t. The grid in xt-plane on which a numerical solution is to be computed is given as $\left({x}_{i},{t}_{j}\right)=\left(ih,jk\right)$, with $i=0,1,\cdots ,n$, $j=0,1,\cdots ,m$. The x step size is $h=\frac{L}{n}$ and the time step is k. We denote by ${U}_{i\mathrm{,}j}$ the value of U at the grid point $\left(ih\mathrm{,}jk\right)$ and by ${u}_{i\mathrm{,}j}$ the approximation value for ${U}_{i\mathrm{,}j}$. We also denote by ${f}_{i}$ and ${g}_{i}$ the values of $f\left({x}_{i}\right)=f\left(ih\right)$ and $g\left(ih\right)$, respectively.

3.1. The CTCS Explicit Difference Scheme

We approximate $\frac{{\partial}^{2}U}{\partial {x}^{2}}$ and $\frac{{\partial}^{2}U}{\partial {t}^{2}}$ by centered second order divided differences in x and t, respectively. This yields

${c}^{2}\frac{{u}_{i+1,j}-2{u}_{i,j}+{u}_{i-1,j}}{{h}^{2}}=\frac{{u}_{i,j+1}-2{u}_{i,j}+{u}_{i,j-1}}{{k}^{2}}.$ (12)

We put $r={\left(\frac{ck}{h}\right)}^{2}$ and express (12) as

${u}_{i,j+1}=r{u}_{i-1,j}+\left(2-2r\right){u}_{i,j}+r{u}_{i+1,j}-{u}_{i,j-1}.$ (13)

Putting $j=0$ in (13) yields

${u}_{i,1}=r{u}_{i-1,0}+\left(2-2r\right){u}_{i,0}+r{u}_{i+1,0}-{u}_{i,-1}$ (14)

and approximating the initial derivative condition by a centered second order divided difference in t gives

${g}_{i}=\frac{{u}_{i,1}-{u}_{i,-1}}{2k}.$ (15)

Eliminating ${u}_{i\mathrm{,}-1}$ between (14), (15), the values ${u}_{i\mathrm{,1}}$ can be computed from the equation

${u}_{i,1}=\frac{1}{2}\left(r{u}_{i-1,0}+\left(2-2r\right){u}_{i,0}+r{u}_{i+1,0}+2k{g}_{i}\right).$ (16)

In view of (14), Equation (16) is expressed as

${u}_{i,1}=\frac{1}{2}\left(r{f}_{i-1}+\left(2-2r\right){f}_{i}+r{f}_{i+1}+2k{g}_{i}\right).$ (17)

After calculating the values ${u}_{i\mathrm{,1}}$ from (17), we continue with the scheme (13) for $j\ge 1$. We consider also two alternative ways of calculating the values ${u}_{i\mathrm{,1}}$. We do this by approximating the initial derivative condition by a backward and forward second order divided differences in t. By Taylor’s expansion of U with respect to t about the point $\left(ih\mathrm{,}-k\right)$ and solving for ${\left(\frac{\partial U}{\partial t}\right)}_{i\mathrm{,0}}$ the result

${\left(\frac{\partial U}{\partial t}\right)}_{i\mathrm{,0}}=\frac{{U}_{i\mathrm{,0}}-{U}_{i\mathrm{,}-1}}{k}+\frac{1}{2}k{\left(\frac{{\partial}^{2}U}{\partial {t}^{2}}\right)}_{i\mathrm{,0}}+\mathcal{O}(k2)$

is obtained, which in view of (2) and (4) becomes (provided f is smooth enough)

${\left(\frac{\partial U}{\partial t}\right)}_{i\mathrm{,0}}=\frac{{U}_{i\mathrm{,0}}-{U}_{i\mathrm{,}-1}}{k}+\frac{1}{2}k{c}^{2}{{f}^{\u2033}}_{i}+\mathcal{O}\left({k}^{2}\right)\mathrm{.}$

So, the initial derivative condition can be approximated by a backward second order divided difference formula

${g}_{i}=\frac{{u}_{i\mathrm{,0}}-{u}_{i\mathrm{,}-1}}{k}+\frac{1}{2}k{c}^{2}{{f}^{\u2033}}_{i}$. (18)

Eliminating ${u}_{i\mathrm{,}-1}$ between (14), (18) and considering (4) gives

${u}_{i,1}=r{f}_{i-1}+\left(1-2r\right){f}_{i}+r{f}_{i+1}+k{g}_{i}-\frac{1}{2}{k}^{2}{c}^{2}{{f}^{\u2033}}_{i}$.

Similarly, expanding U about the point $\left(ih\mathrm{,}k\right)$ in a Taylor series with respect to t, the initial derivative condition can be approximated by a forward second order divided difference formula

${g}_{i}=\frac{{u}_{i,1}-{u}_{i,0}}{k}-\frac{1}{2}k{c}^{2}{{f}^{\u2033}}_{i}$.

Solving for ${u}_{i\mathrm{,1}}$ and considering (4) we get

${u}_{i,1}={f}_{i}+k{g}_{i}+\frac{1}{2}{k}^{2}{c}^{2}{{f}^{\u2033}}_{i}$.

To summarise, the CTCS numerical scheme can be given as

Expanding (13) by Taylor’s theorem about the point $\left(ih\mathrm{,}jk\right)$, $j\ge 1$, and considering (2), the truncation error ${T}_{i\mathrm{,}j}$ is found to be

${T}_{i,j}=\frac{1}{12}{c}^{2}{h}^{2}\left(1-r\right){\left(\frac{{\partial}^{4}U}{\partial {x}^{4}}\right)}_{i,j}+\frac{2}{6!}{c}^{2}{h}^{4}\left(1-{r}^{2}\right){\left(\frac{{\partial}^{6}U}{\partial {x}^{6}}\right)}_{i,j}+\mathcal{O}\left({h}^{6}+{k}^{6}\right)$ (23)

We notice that for $r=1$ the truncation error vanishes completely. As $h\mathrm{,}k\to 0$ (with r constant), ${T}_{i\mathrm{,}j}\to 0$, so the difference scheme (13) is consistent with the wave Equation (2). The CTCS method is also stable for $r\le 1$, [22] hence by Laxs equivalence theorem [21] it is also convergent for $r\le 1$.

3.2. The Crank-Nicolson Implicit Difference Scheme

The Crank-Nicolson scheme is obtained by approximating $\frac{{\partial}^{2}U}{\partial {t}^{2}}$ by a centered second order divided difference in t and $\frac{{\partial}^{2}U}{\partial {x}^{2}}$ by the mean of centered second order divided difference in x evaluated at the jth and (j + 1)th time levels. The difference scheme is given as

$\frac{{u}_{i,j+1}-2{u}_{i,j}+{u}_{i,j-1}}{{k}^{2}}=\frac{1}{2}{c}^{2}\left(\frac{{u}_{i+1,j+1}-2{u}_{i,j+1}+{u}_{i-1,j+1}}{{h}^{2}}+\frac{{u}_{i+1,j}-2{u}_{i,j}+{u}_{i-1,j}}{{h}^{2}}\right)$ (24)

As with the CTCS method, the Crank-Nicolson can be written as

The truncation error at the point $\left(ih\mathrm{,}jk\right)$, $j\ge 1$ is defined by

$\begin{array}{c}{T}_{i,j}=\frac{{c}^{2}}{2}\left(\frac{{U}_{i+1,j+1}-2{U}_{i,j+1}+{U}_{i-1,j+1}}{{h}^{2}}+\frac{{U}_{i+1,j}-2{U}_{i,j}+{U}_{i-1,j}}{{h}^{2}}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-\frac{{U}_{i,j+1}-2{U}_{i,j}+{U}_{i,j-1}}{{k}^{2}}\end{array}$ (29)

Expansion of the terms ${U}_{i+\mathrm{1,}j+1}$, ${U}_{i-\mathrm{1,}j+1}$ about the point $\left(ih\mathrm{,}\left(j+1\right)k\right)$ and the terms ${U}_{i+\mathrm{1,}j}$, ${U}_{i-\mathrm{1,}j}$, ${U}_{i\mathrm{,}j+1}$, ${U}_{i\mathrm{,}j-1}$ about the point $\left(ih\mathrm{,}jk\right)$ by Taylors series and substitution into (29) leads to

$\begin{array}{c}{T}_{i,j}={c}^{2}{\displaystyle \underset{\nu =1}{\overset{3}{\sum}}}\frac{{h}^{2\left(\nu -1\right)}}{\left(2\nu \right)!}{\left(\frac{{\partial}^{2\nu}U}{\partial {x}^{2\nu}}\right)}_{i,j+1}+{c}^{2}{\displaystyle \underset{\nu =1}{\overset{3}{\sum}}}\frac{{h}^{2\left(\nu -1\right)}}{\left(2\nu \right)!}{\left(\frac{{\partial}^{2\nu}U}{\partial {x}^{2\nu}}\right)}_{i,j}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-{\displaystyle \underset{\nu =1}{\overset{3}{\sum}}}\frac{2{k}^{2\left(\nu -1\right)}}{\left(2\nu \right)!}{\left(\frac{{\partial}^{2\nu}U}{\partial {t}^{2\nu}}\right)}_{i,j}+\mathcal{O}\left({h}^{6}+{k}^{6}\right)\end{array}$

Expansion of the terms ${\left(\frac{{\partial}^{2\nu}U}{\partial {x}^{2\nu}}\right)}_{i\mathrm{,}j+1}$, for $\nu =1,2,3$, about the point $\left(ih\mathrm{,}jk\right)$ and substitution into the expression for ${T}_{i\mathrm{,}j}$ then gives

$\begin{array}{c}{T}_{i,j}=\frac{{c}^{2}}{2}{\displaystyle \underset{\nu =0}{\overset{4}{\sum}}}\frac{{k}^{\nu}}{\nu !}\frac{{\partial}^{\nu}}{\partial {t}^{\nu}}{\left(\frac{{\partial}^{2}U}{\partial {x}^{2}}\right)}_{i,j}+\frac{{c}^{2}{h}^{2}}{24}{\displaystyle \underset{\nu =0}{\overset{4}{\sum}}}\frac{{k}^{\nu}}{\nu !}\frac{{\partial}^{\nu}}{\partial {t}^{\nu}}{\left(\frac{{\partial}^{4}U}{\partial {x}^{4}}\right)}_{i,j}+\frac{{c}^{2}{h}^{4}}{6!}{\displaystyle \underset{\nu =0}{\overset{4}{\sum}}}\frac{{k}^{\nu}}{\nu !}\frac{{\partial}^{\nu}}{\partial {t}^{\nu}}{\left(\frac{{\partial}^{6}U}{\partial {x}^{6}}\right)}_{i,j}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+{c}^{2}{\displaystyle \underset{\nu =1}{\overset{3}{\sum}}}\frac{{h}^{2\left(\nu -1\right)}}{\left(2\nu \right)!}{\left(\frac{{\partial}^{2\nu}U}{\partial {x}^{2\nu}}\right)}_{i,j}-{\displaystyle \underset{\nu =1}{\overset{3}{\sum}}}\frac{2{k}^{2\left(\nu -1\right)}}{\left(2\nu \right)!}{\left(\frac{{\partial}^{2\nu}U}{\partial {t}^{2\nu}}\right)}_{i,j}+\mathcal{O}\left({k}^{5}+{h}^{2}{k}^{5}+{h}^{4}{k}^{5}+{h}^{6}\right)\end{array}$

Finally, taking into consideration (2), ${T}_{i\mathrm{,}j}$ can be written as

${T}_{i,j}=\frac{1}{12}{c}^{2}{h}^{2}\left(1+2r\right){\left(\frac{{\partial}^{4}U}{\partial {x}^{4}}\right)}_{i,j}+\frac{1}{2}k{\left(\frac{{\partial}^{3}U}{\partial {t}^{3}}\right)}_{i,j}+\mathcal{O}\left({h}^{3}+{k}^{3}+{h}^{2}k+{h}^{4}k\right).$ (30)

As $h\mathrm{,}k\to 0$ (with r constant), ${T}_{i\mathrm{,}j}\to 0$, so the scheme (24) is consistent with the wave equation (2). To determine the von Neumann stability condition for the scheme, we insert ${u}_{i\mathrm{,}j}={\xi}^{i}{\text{e}}^{\text{i}\beta jh}$ ( $\xi \in \u2102$, $\text{i}=\sqrt{-1}$, $\beta \ge 0$ ) into (24) and after some simplification we obtain the quadratic equation $A{\xi}^{2}+\left(A-3\right)\xi +1=0$, where $A=2rsi{n}^{2}\left(\beta h/2\right)+1\ge 1$, $r={\left(ck/h\right)}^{2}$. Hence, the values of ξ are ${\xi}_{1,2}=\left(-A+3\pm \sqrt{\left(A-1\right)\left(A-9\right)}\right)/2A$. If $A\ge 9$, then $rsi{n}^{2}\left(\beta h/2\right)\ge 4$ which gives no useful result for r. When $A<9$, i.e., $r{\mathrm{sin}}^{2}\left(\beta h/2\right)<4$, which is true for $r<4$, the two roots are complex conjugates and the squared modulus of ${\xi}_{\mathrm{1,2}}$ satisfy ${\left|{\xi}_{\mathrm{1,2}}\right|}^{2}\le 1/A\le 1$. Thus a necessary condition for von Neumann stability is $r<4$.

3.3. The ω Implicit Difference Scheme

The ω scheme is obtained by approximating $\frac{{\partial}^{2}U}{\partial {t}^{2}}$ by a centered second order divided difference in t and $\frac{{\partial}^{2}U}{\partial {x}^{2}}$ by a weighted average of centered divided difference in x evaluated at the (j − 1)th, jth and (j + 1)th time levels, with the nonnegative weights ω, $1-2\omega $, and ω ( $0\le \omega \le \frac{1}{2}$ ), respectively. The ω scheme is given as

$\begin{array}{l}\frac{{u}_{i,j+1}-2{u}_{i,j}+{u}_{i,j-1}}{{k}^{2}}\\ ={c}^{2}[\omega \frac{{u}_{i+1,j-1}-2{u}_{i,j-1}+{u}_{i-1,j-1}}{{h}^{2}}+\left(1-2\omega \right)\frac{{u}_{i+1,j}-2{u}_{i,j}+{u}_{i-1,j}}{{h}^{2}}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.05em}}+\omega \frac{{u}_{i+1,j+1}-2{u}_{i,j+1}+{u}_{i-1,j+1}}{{h}^{2}}]\end{array}$ (31)

We note that for $\omega =0$ the ω scheme coincide with the CTCS scheme. Similarly, the ω scheme can be written as

The truncation error at the point $\left(ih\mathrm{,}jk\right)$, $j\ge 1$ is given by

$\begin{array}{c}{T}_{i,j}=\frac{1}{12}{c}^{2}{h}^{2}\left(1-r+12\omega r\right){\left(\frac{{\partial}^{4}U}{\partial {x}^{4}}\right)}_{i,j}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{2}{6!}{c}^{2}{h}^{4}\left(1-{r}^{2}+30\omega \left({r}^{2}+r\right)\right){\left(\frac{{\partial}^{6}U}{\partial {x}^{6}}\right)}_{i,j}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\mathcal{O}\left({k}^{5}+{h}^{6}+{h}^{2}{k}^{4}\right)\end{array}$ (36)

As $h\mathrm{,}k\to 0$ (with r constant), the truncation error tends to zero, so the scheme (24) is consistent with the wave Equation (2). If $0\le \omega <\frac{1}{4}$ the scheme is von Neumann stable for $r\le \frac{1}{1-4\omega}$. For $\frac{1}{4}\le \omega \le \frac{1}{2}$ the scheme is unconditionally von Neumann stable.

3.4. The Numerical Method of Characteristics

Equation (2) has the form of the PDE (1) and is hyperbolic. The initial curve is $\phi =\left\{\left(x,t\right)|0\le x\le L,t=0\right\}$ with $U=f$, $p={f}^{\prime}$ (provided f is smooth enough) and $q=\frac{\partial U}{\partial t}=g$ on φ. In view of (5), the slope of the characteristics is given by

$\frac{\text{d}t}{\text{d}x}=\frac{1}{c}=\xi \text{\hspace{1em}}\text{and}\text{\hspace{1em}}\frac{\text{d}t}{\text{d}x}=-\frac{1}{c}=\eta \mathrm{.}$

and therefore the characteristics are

$t\left(x\right)=\frac{1}{c}x+{c}_{1}\text{\hspace{1em}}\text{and}\text{\hspace{1em}}t\left(x\right)=-\frac{1}{c}x+{c}_{2}\mathrm{,}\text{\hspace{1em}}{c}_{1}\mathrm{,}{c}_{2}\in \mathbb{R}\mathrm{.}$ (37)

Let $P\left({x}_{P}\mathrm{,}{t}_{P}\right)$ be a point in the xt-plane. Then the ξ,η-characteristics through P are given by

$t\left(x\right)=\frac{1}{c}\left(x-{x}_{P}\right)+{t}_{P}\text{\hspace{1em}}\text{and}\text{\hspace{1em}}t\left(x\right)=-\frac{1}{c}\left(x-{x}_{P}\right)+{t}_{P}\mathrm{,}$ (38)

respectively. Hence, the grid of points is always inside the triangle defined by the lines $t=0$, $t\left(x\right)=\frac{1}{c}x$ and $t\left(x\right)=-\frac{1}{c}\left(x-L\right)$ no matter how many initial points are considered along φ. However, we will see in the next section that approximation values for U can be calculated at any point $P\left({x}_{P}\mathrm{,}{t}_{P}\right)$, $0\le {x}_{P}\le L$, $t\ge 0$. We also notice that we can have only one iteration of the scheme due to the fact that the coefficients of (2) and the slope of characteristics are constants. Therefore, in view of (6), (7), and (9), the scheme takes the form

$(\begin{array}{l}{t}_{P}-{t}_{Q}=\frac{1}{c}\left({x}_{P}-{x}_{Q}\right)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(39)\\ {t}_{P}-{t}_{R}=-\frac{1}{c}\left({x}_{P}-{x}_{R}\right)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.05em}}\text{\hspace{0.05em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(40)\end{array}$

$(\begin{array}{l}c\left({p}_{P}-{p}_{Q}\right)-\left({q}_{P}-{q}_{Q}\right)=0\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(41)\\ c\left({p}_{P}-{p}_{R}\right)+\left({q}_{P}-{q}_{R}\right)=0\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(42)\end{array}$

${U}_{P}={U}_{Q}+\frac{1}{2}\left({p}_{Q}+{p}_{P}\right)\left({x}_{P}-{x}_{Q}\right)+\frac{1}{2}\left({q}_{Q}+{q}_{P}\right)\left({t}_{P}-{t}_{Q}\right)$ (43)

Finally, it is easy to verify that the solutions of (39)-(42) give also the true values of ${x}_{P}$, ${t}_{P}$ and ${p}_{P}$, ${q}_{P}$, respectively.

4. Numerical Study of the Wave Equation

Consider the wave Equation (2) with $L=1$, $f\left(x\right)=\mathrm{sin}\left(\text{\pi}x\right)$ and $g\left(x\right)=0$. The analytical solution of (2) satisfying these conditions is

$U\left(x\mathrm{,}t\right)=sin\left(\text{\pi}x\right)cos\left(c\text{\pi}t\right)\mathrm{.}$ (44)

In the following, we apply the methods discussed in the previous section for $c=2,1,0.2$. We also mention that the implicit schemes Crank-Nicolson and ω lead to tridiagonal systems of equations, which we solve by the method of Gauss-Seidel [28] [29] .

4.1. The CTCS, Crank-Nicolson and ω Schemes

We apply these schemes for different x-step sizes and time steps. For each step size and time step we run the schemes three times considering the center, backward and forward approximation for the 1^{st} time level in order to examine which one produce better results. In the following Tables by Error we mean the absolute percent relative error for U (or the absolute percent error if
$\left|U\right|\le {10}^{-7}$).

Studying Table 5 one would expect that the errors would be vanished for $r=1$ as was mentioned in section 3.1. However, the errors are vanished only if we initiate the scheme with the centered difference approximation. To analyze this behavior more closely we need to examine the truncation errors for the ICs (19)-(21). The truncation error at the point $\left(ih\mathrm{,0}\right)$ for (19 ) is defined by

${T}_{i,0}^{cd}=r\left({U}_{i-1,0}+{U}_{i+1,0}\right)+\left(2-2r\right){U}_{i,0}+2k{\left(\frac{\partial U}{\partial t}\right)}_{i,0}-2{U}_{i,1}.$ (45)

Expansion of the terms ${U}_{i-\mathrm{1,0}}$, ${U}_{i+\mathrm{1,0}}$, ${U}_{i\mathrm{,1}}$ about the point $\left(ih\mathrm{,0}\right)$ by Taylors series and substitution into (45) gives

$\begin{array}{c}{T}_{i,0}^{cd}=r\left[{\displaystyle \underset{\nu =0}{\overset{3}{\sum}}}\frac{2{h}^{2\nu}}{\left(2\nu \right)!}{\left(\frac{{\partial}^{2\nu}U}{\partial {x}^{2\nu}}\right)}_{i,0}\right]+\left(2-2r\right){U}_{i,0}+2k{\left(\frac{\partial U}{\partial t}\right)}_{i,0}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-2\left[{\displaystyle \underset{\nu =0}{\overset{6}{\sum}}}\frac{{k}^{\nu}}{\nu !}{\left(\frac{{\partial}^{\nu}U}{\partial {t}^{\nu}}\right)}_{i,0}\right]+\mathcal{O}\left({h}^{8}+{k}^{7}\right).\end{array}$

In view of (2), and few algebraic steps lead to an expression for ${T}_{i\mathrm{,0}}^{cd}$

Table 5. CTCS scheme ( $c=2,1,0.2$ ).

$\begin{array}{c}{T}_{i,0}^{cd}=\frac{1}{12}{h}^{4}r\left(1-r\right){\left(\frac{{\partial}^{4}U}{\partial {x}^{4}}\right)}_{i,0}+\frac{2}{6!}{h}^{6}r\left(1-{r}^{2}\right){\left(\frac{{\partial}^{6}U}{\partial {x}^{6}}\right)}_{i,0}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-\frac{1}{3}{k}^{3}{\left(\frac{{\partial}^{3}U}{\partial {t}^{3}}\right)}_{i,0}+\mathcal{O}\left({h}^{8}+{k}^{5}\right).\end{array}$ (46)

Similarly, the truncation errors at the point $\left(ih\mathrm{,0}\right)$ for (20) and (21) are found to be

${T}_{i,0}^{fd}=-\frac{1}{3}{k}^{3}{\left(\frac{{\partial}^{3}U}{\partial {t}^{3}}\right)}_{i,0}+\mathcal{O}\left({k}^{4}\right),$ (47)

$\begin{array}{l}{T}_{i,0}^{bd}=\frac{1}{4!}{h}^{4}r\left(2-r\right){\left(\frac{{\partial}^{4}U}{\partial {x}^{4}}\right)}_{i,0}+\frac{1}{6!}{h}^{6}r\left(2-{r}^{2}\right){\left(\frac{{\partial}^{6}U}{\partial {x}^{6}}\right)}_{i,0}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-\frac{1}{6}{k}^{3}{\left(\frac{{\partial}^{3}U}{\partial {t}^{3}}\right)}_{i,0}+\mathcal{O}\left({h}^{8}+{k}^{5}\right),\end{array}$ (48)

respectively. We also notice that, according to (44), $\frac{{\partial}^{k}U\left(x,0\right)}{\partial {t}^{k}}=0$, for $k=2n+1$,

$n\in \mathbb{N}$. This yields,
${T}_{i,0}^{cd}=0$,
${T}_{i,0}^{fd}=\mathcal{O}\left({k}^{4}\right)$ and
${T}_{i,0}^{bd}=\mathcal{O}\left({h}^{4}\right)$ for
$r=1$. Thus, in view of (23),
${T}_{i,j}=0$, for
$j\ge 0$,
$r=1$ and using the centered difference approach. Hence the errors vanish completely. We assume that, initiating the scheme with (20) or (21) introduces an error of order h^{4} and k^{4}, respectively at the 1^{st} time level which affect the rest calculations for
$j\ge 1$. To confirm the latter assertion we run the scheme computing the values
${u}_{i\mathrm{,1}}$ from (44) and then proceed with (13) for
$j\ge 1$. As we can see in Table 6, the errors vanish.

For
$r<1$, the forward difference approach gives more accurate results. This is possibly due to the fact that
${T}_{i\mathrm{,0}}^{cd}$ and
${T}_{i\mathrm{,0}}^{bd}$ are of order h^{4} and
${T}_{i\mathrm{,0}}^{fd}$ is of order k^{4} with
$k<h$, usually. We also notice that when
$U\left(ih,jk\right)=0$ the error increases considerably at points near to
$\left(ih,jk\right)$. From (44) we have that for
$c=2$,
$U\left(x,0.25\right)=0=U\left(x,0.75\right)$ and
$U\left(x,0.5\right)=0$ for
$c=1$. The results in Table 5 show that errors are increased significantly at
$t=0.2,0.3,0.7,0.8$ for
$c=2$ and at
$t=0.4,0.6$ for
$c=1$. This is not the case for
$c=0.2$ and as we can see
$U\left(x\mathrm{,}t\right)\ne 0$ for

$x\mathrm{,}t\in \left(\mathrm{0,1}\right]$. The methods Crank-Nicolson and ω also follow this behavior as it is illustrated in Figures 6-8. These Figures provide also a visual representation of which of the FD, BD and CD is more accurate. This was done by assigning the red, blue and black color for the FD, CD, BD errors, respectively and selecting the smallest error among them for each time step. In the next tables numerical results are presented only for the first two and the last time steps.

The Crank-Nicolson scheme is not quite as good as the CTCS scheme. Small values of h and k were employed in order to provide adequate numerical

Table 6. Initiating the scheme using analytical solution.

Table 7. Crank-Nicolson scheme ( $c=2,1,0.2$ ).

Table 8. ω scheme, $\omega =0.25$, ( $c=2,1,0.2$ ).

Table 9. ω scheme, $\omega =0.5$, ( $c=2,1,0.2$ ).

solutions. However, this is not true for $c=0.2$. Bigger value of h still provides satisfactory results.

As we can see the ω implicit scheme is more accurate than the Crank-Nicolson implicit scheme. A visual inspection of the Figures 6-8 indicates that initiating with CD is preffered only when using the ω-method, $\omega =0.5$, for $c=2,1$ and the method Crank-Nicolson for $c=2$. For the other cases FD give the smallest error.

4.2. The Numerical Method of Characteristics

As was mentioned in section 3.4, the grid of points will always be inside a triangle. A special case which computes approximation values at a specific point outside the triangle is presented by Smith [16] . We extend the idea and compute approximation values for U at any point $P\left({x}_{P}\mathrm{,}{t}_{P}\right)$, $0\le {x}_{P}\le L$, $t\ge 0$, $L>0$, $c>0$ and then adjust the method to improve accuracy. For convenience of calculation, we will demonstrate it in the following example. Let $c=2$ and $P\left(\mathrm{0.3,1}\right)$ a point in the xt-plane (Figure 9, left). Then, by (43), for $Q={D}_{1}$, we get

${U}_{P}=\frac{1}{2}\left({p}_{{D}_{1}}+{p}_{P}\right)0.3,$ (49)

where ${p}_{{D}_{1}}\mathrm{,}{p}_{P}$ can be calculated (as we will see). Obviously, in ${x}_{P}$ closer to 0.5, the bigger magnitude of the error is observed. In order to improve the level of accuracy we modify the previous method. We start by forming a sequence of points ${P}_{1},{P}_{2},\cdots ,{P}_{\nu}=P$ on the segment ${D}_{1}P$ at which we compute approximation values for U. Therefore, a step size of $l=0.1$ is employed to approach the point P (decreasing l improves the accuracy). Thus, the sequence ${P}_{1}\left(\mathrm{0.1,1}\right)$, ${P}_{2}\left(\mathrm{0.2,1}\right)$, ${P}_{3}\left(0.3,1\right)=P$ is defined. By (43) we get

Figure 6. Percent relative errors at $x=0.2$, $0\le t\le 1$, with $c=2$, $h=0.01$, $k=0.001$.

Figure 7. Percent relative errors at $x=0.3$, $0\le t\le 1$, with $c=1$, $h=0.01$, $k=0.001$.

Figure 8. Percent relative errors at $x=0.4$, $0\le t\le 1$, with $c=0.2$, $h=0.01$, $k=0.001$. ( Forward Differences (FD) with red color, Central Differences (CD) with blue color, Backward Differences (BD) with black color).

${U}_{{P}_{1}}=\frac{1}{2}0.1\left({p}_{{D}_{1}}+{p}_{{P}_{1}}\right),$ (50)

where ${p}_{{D}_{1}}$ and ${p}_{{P}_{1}}$ are computed as follows (Figure 9, right): Consider the η-characteristic through ${P}_{1}$ (Equation (38)) which intersects the line $x=1$ at the point ${A}_{1}\left(\mathrm{1,0.55}\right)$. Then, along this characteristic, Equation (42) implies

$2{p}_{{P}_{1}}+{q}_{{P}_{1}}=2{p}_{{A}_{1}}+{q}_{{A}_{1}}.$ (51)

The ξ-characteristic through ${A}_{1}$ (Equation (38)) intersects the line $x=0$ at ${A}_{2}\left(\mathrm{0,0.05}\right)$ and Equation (41) implies

$2{p}_{{A}_{1}}=2{p}_{{A}_{2}}-{q}_{{A}_{2}}+{q}_{{A}_{1}}.$ (52)

The η-characteristic through ${A}_{2}$ intersects the x axis at ${A}_{3}\left(\mathrm{0.1,0}\right)$ and by (42) we get

$2{p}_{{A}_{2}}=2{p}_{{A}_{3}}+{q}_{{A}_{3}}-{q}_{{A}_{2}}.$ (53)

In view of (52) and (53), Equation (51) is given by

$2{p}_{{P}_{1}}+{q}_{{P}_{1}}=2{p}_{{A}_{3}}+{q}_{{A}_{3}}-2{q}_{{A}_{2}}+2{q}_{{A}_{1}},$

which, according to the ICs and BCs, can be written as

$2{p}_{{P}_{1}}+{q}_{{P}_{1}}=2{f}^{\prime}\left(0.1\right).$ (54)

Similarly, initiating with ξ-characteristic through ${P}_{1}$, we get the sequence ${B}_{1}\left(\mathrm{0,0.95}\right)$, ${B}_{2}\left(\mathrm{1,0.45}\right)$, ${B}_{3}\left(\mathrm{0.1,0}\right)$ and by Equations (41), (42) the result

$2{p}_{{P}_{1}}-{q}_{{P}_{1}}=2{f}^{\prime}\left(0.1\right),$ (55)

is obtained. Hence, approximation values for p and q at ${P}_{1}$ are determined by solving (54), (55). This way ${p}_{{D}_{1}}$ can also be estimated. Then we proceed with the next point ${P}_{2}$. Equation (43) yields ${U}_{{P}_{2}}={U}_{{P}_{1}}+\frac{1}{2}0.1\left({p}_{{P}_{1}}+{p}_{{P}_{2}}\right)$, where ${p}_{{P}_{2}}$ is evaluated in a similar way. Finally, this procedure calculates ${U}_{{P}_{3}}$. A comparison between the usual method (UM) (Equation (49)) and the modified method (MM) is provided in Table 10 by giving the absolute percent relative errors.

The advantage of using the modified method is evident. If the point $P\left({x}_{P}\mathrm{,}{t}_{P}\right)$ lies on the segment ${D}_{2}P$ (i.e., $0.5<{x}_{P}\le 1$ ), we form the sequence of points ${P}_{1}\mathrm{,}{P}_{2}\mathrm{,}\cdots \mathrm{,}{P}_{\nu}$ on the segment ${D}_{2}P$ in order to reduce the computational effort. This procedure was programmed and used to compute approximation values for U on an orthogonal grid. We also note that in case the point P lies inside the triangle, then ${U}_{P}$ is calculated by the Equations (39)-(43) because they produce more accurate results. Numerical results are presented in Table 11 where by error we mean absolute percent relative error for U (or the absolute percent error if $\left|U\right|\le {10}^{-7}$ ).

4.3. Comparison of the Methods

Among the methods discussed in section 4, the most accurate results are obtained

Table 10. A comparison between the usual and the modified method of characteristics.

Table 11. Numerical method of characteristics.

Figure 9. Characteristics.

with the CTCS method for $r=1$ and by approximating the initial derivative condition with centered differences. For $r<1$, the forward difference approximation is preffered with the exception that centered differences are used for the methods ω, $\omega =0.5$ ( $c=1,2$ ) and Crank-Nicolson ( $c=2$ ). In order to compare the methods, numerical results from Table 5, Tables 7-9, Table 11 are summarized in Table 12 where we give the absolute percent relative errors for U (or the absolute percent errors if $\left|U\right|\le {10}^{-7}$ ). Each method was initiated by the forward difference approximation except for the ones mentioned above. Machine time needed for the calculations is also considered. It should be mentioned that this time includes the computations at all grid points within the rectangle $0\le x\mathrm{,}t\le 1$ which are formed by the given step size h and time step k.

Inspection of Table 12 leads us to the following conclusions:

・ The ω method for $\omega =0.5$ gives the most accurate solutions in most of the cases.

・ The method of characteristics is the second best in precision. However, taking into consideration the machine time, the (modified) method of the

Table 12. r < 1, Comparison of the methods with respect to percent relative errors.

characteristics is considerably faster with slightly bigger errors.

・ The third best choice seems to be the ω scheme for $\omega =0.25$, with the exception of the case where $c=2$. In this case the CTCS scheme is more accurate.

・ Even though there is no significant difference in the errors between the methods CTCS and ω, $\omega =0.25$, for the specific problems, the difference in machine time is considerable, and as follows it will increase for more complicated problems with more large number of grid points.

・ Finally, the method of Crank-Nicolson is the least accurate for hyperbolic problems.

5. Conclusions

In the present work, finite difference methods were considered for the numerical solution of PDEs. Firstly, the method of characteristics was employed to solve IVPs for second order genuine quasilinear hyperbolic PDEs. The method was applied into two specific examples and provided adequate numerical results which were improved by decreasing the step sizes.

Secondly, the methods of CTCS, Crank-Nicolson, ω and characteristics were analyzed to solve numerically the homogeneous wave Equation (2) satisfying (3) and (4). These methods were applied for specific values of c,L and given functions f,g. Three different approaches were employed to approximate the initial derivative condition. The numerical results that were obtained indicated that the most accurate method is the CTCS scheme for $r=1$ and employing the centered difference approach. This conclusion was confirmed after a theoretical investigation. It is easily verified that this is also the case for arbitrary function f and g being the zero function. For $r<1$, the methods seem to be more accurate if they initiate with the forward difference approximation with the exception of the methods Crank-Nicolson and ω, $\omega =0.5$, for $c=2$ and $c=1,2$, respectively, where the centered difference approach is more accurate. In this case ( $r<1$ ) the ω scheme for $\omega =0.5$ is the most accurate with the (modified) method of characteristics being the second best but much faster. We also observe that for $r<{10}^{-2}$ the errors increase, probably due to the large number of grid points and the great number of computations, which increase the round-off errors.

Finally, for further research, other values of ω can be tested. In addition, forward third or higher order differences can be used to approximate the initial derivative condition. Moreover, we can test the above in problems of 2D, 3D and more complicated problems.

Acknowledgements

The authors would like to thank the reviewers for their helpful suggestions for revising this paper. Research of Pavlos Stampolidis has been financially supported by General Secretariat for Research and Technology (GSRT) and the Hellenic Foundation for Research and Innovation (HFRI). This support is greatly appreciated.

Fund

Research of Pavlos Stampolidis has been financially supported by General Secretariat for Research and Technology (GSRT) and the Hellenic Foundation for Research and Innovation (HFRI).

Conflicts of Interest

The authors declare no conflicts of interest.

[1] |
Mohanty, R.K., Arora, U. and Jain, M.K. (2001) Linear Stability Analysis and Fourth-Order Approximations at First Time Level for the Two Space Dimensional Mildly Quasilinear Hyperbolic Equations. Numerical Methods for Partial Differential Equations, 17, 607-618. https://doi.org/10.1002/num.1029 |

[2] |
Kumar, V., Jiwari, R. and Gupta, R.K. (2013) Numerical Simulation of Two Dimensional Quasilinear Hyperbolic Equations by Polynomial Differential Quadrature Method. Engineering Computations, 30, 892-909.
https://doi.org/10.1108/EC-02-2012-0030 |

[3] |
Mohanty, R.K., Jain, M.K. and Singh, S. (2013) A New Three-Level Implicit Cubic Spline Method for the Solution of 1D Quasilinear Hyperbolic Equations. Computational Mathematics and Modeling, 24, 452-470.
https://doi.org/10.1007/s10598-013-9190-1 |

[4] |
Mohanty, R. K. and Kumar, R. (2014) A New Fast Algorithm Based on Half-Step Discretization for One Space Dimensional Quasilinear Hyperbolic Equations. Applied Mathematics and Computation, 244, 624-641.
https://doi.org/10.1016/j.amc.2014.07.020 |

[5] |
Simpson, D.L. (1967) A Numerical Method of Characteristics for Solving Hyperbolic Partial Differential Equations. Retrospective Theses and Dissertations, 3430.
https://lib.dr.iastate.edu/cgi/viewcontent.cgi?referer= https://www.google.ae/& httpsredir=1&article=4429&context=rtd |

[6] | Kartsiotis, G. (2013) Numerical Methods of solution of Partial Differential Equations Finite Element Method-Applications in MATLAB. Master’s Thesis, Aristotle University, Thessaloniki. |

[7] |
Papanikos, G. and Gousidou-Koutita, M. (2015) A Computational Study with Finite Element Method and Finite Difference Method for 2D Elliptic Partial Differential Equations. Applied Mathematics, 6, 2104-2124.
https://doi.org/10.4236/am.2015.612185 |

[8] |
Lucier, B.J. (1986) A Moving Mesh Numerical Method for Hyperbolic Conservation Laws. Mathematics of Computation, 46, 59-69.
https://doi.org/10.1090/S0025-5718-1986-0815831-4 |

[9] |
Bercovier, M., Pironneau, O. and Sastri, V. (1983) Finite Elements and Characteristics for Some Parabolic-Hyperbolic Problems. Applied Mathematical Modelling, 7, 89-96. https://doi.org/10.1016/0307-904X(83)90118-X |

[10] |
Yang, H.Q. (1990) Characteristics-Based, High-Order Accurate and Nonoscillatory Numerical Method for Hyperbolic Heat Conduction. Numerical Heat Transfer, Part B: Fundamentals, 18, 221-241. https://doi.org/10.1080/10407799008944951 |

[11] |
Suli, E. and Ware, A. (1991) A Spectral Method of Characteristics for Hyperbolic Problems. SIAM Journal on Numerical Analysis, 28, 423-445.
http://www.jstor.org/stable/2157822 https://doi.org/10.1137/0728024 |

[12] |
Shoucri, R.M. and Shoucri, M.M. (2007) Application of the Method of Characteristics for the Study of Shock Waves in Models of Blood Flow in the Aorta. Cardiovascular Engineering, 7, 1-6. https://doi.org/10.1007/s10558-007-9024-x |

[13] |
Surov, V.S. (2010) On a Variant of the Method of Characteristics for Calculating One-Velocity Flows of a Multicomponent Mixture. Journal of Engineering Physics and Thermophysics, 83, 366372. https://doi.org/10.1007/s10891-010-0353-z |

[14] |
Acosta, S., Puelz, C., Rivière, B., Penny, D.J. and Rusin C.G. (2015) Numerical Method of Characteristics for One-Dimensional Blood Flow. Journal of Computational Physics, 294, 96-109. https://doi.org/10.1016/j.jcp.2015.03.045 |

[15] | Papanikos, G. (2015) Numerical Study with Methods of Characteristic Curves and Finite Element for Solving Partial Differential Equations with Matlab. Master’s Thesis, Aristotle University, Thessaloniki. |

[16] | Smith, G.D. (1986) Numerical Solution of Partial Differential Equations: Finite Difference Methods. 3rd Edition, Oxford University Press, Oxford. |

[17] |
O’Brien, G.G., Hyman, M.A. and Kaplan, S. (1950) A Study of the Numerical Solution of Partial Differential Equations. Journal of Mathematics and Physics, 29, 223-251. https://doi.org/10.1002/sapm1950291223 |

[18] |
Zauderer, E. (2006) Partial Differential Equations of Applied Mathematics. 3rd Edition, Wiley Interscience, Hoboken. https://doi.org/10.1002/9781118033302 |

[19] |
Crank, J. and Nicolson, P. (1947) A Practical Method for Numerical Evaluation of Solutions of Partial Differential Equations of the Heat-Conduction Type. Mathematical Proceedings of the Cambridge Philosophical Society, 43, 50-67.
https://doi.org/10.1017/S0305004100023197 |

[20] | Gousidou-Koutita, M. (2008) Numerical Methods with Applications to Ordinary and Partial Differential Equations. Lecture Notes, Aristotle University of Thessaloniki, Thessaloniki. |

[21] | Richtmyer, R.D. and Morton, K.W. (1967) Difference Methods for Initial-Value Problems. 2nd Edition, Wiley Interscience, New York. |

[22] | Mitchell, A.R. (1969) Computational Methods in Partial Differential Equations. John Wiley & Sons, Hoboken. |

[23] | Tveito, A. and Winther, R. (2005) Introduction to Partial Differential Equations. A Computational Approach. Springer. |

[24] |
Griffiths, D.F., Dold, J.W. and Silvester, D.J. (2015) Essential Partial Differential Equations. Analytical and Computational Aspects. Springer.
https://doi.org/10.1007/978-3-319-22569-2 |

[25] |
Li, Z., Qiao, Z. and Tang, T. (2017) Numerical Solution of Differential Equations. Introduction to Finite Difference and Finite Element Methods. Cambridge University Press, Cambridge. https://doi.org/10.1017/9781316678725 |

[26] | Strikwerda, J.C. (2004) Finite Difference Schemes and Partial Differential Equations. 2nd Edition, SIAM. |

[27] | Gousidou-Koutita, M. (2004, 2016) Numerical Analysis. Kyriakidis Bros Publications S.A., Thessaloniki. |

[28] | Burden, R.L. and Faires, J.D. (2010) Numerical Analysis. 9th Edition, Brooks/Cole, Cengage Learning, Boston. |

[29] | Gousidou-Koutita, M. (2014) Computational Mathematics. Tziola Publications, Thessaloniki. |

Journals Menu

Copyright © 2021 by authors and Scientific Research Publishing Inc.

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.