Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

In this chapter we deal with time-dependent problems of hyperbolic type. For their origin and an in-depth analysis see e.g. [Sal08, Chap. 4]. We will limit ourselves to considering the numerical approximation using the finite difference method, which was historically the first one to be applied to this type of equations. To introduce in a simple way the basic concepts of the theory, most of our presentation will concern problems depending on a single space variable. Finite element approximations will be addressed in Chapter 14, the extension to nonlinear problems in Chapter 15.

1 13.1 A scalar transport problem

Let us consider the following scalar hyperbolic problem

$$\left\{ {\begin{array}{*{20}{l}} {\frac{{\partial u}}{{\partial t}} + a\frac{{\partial u}}{{\partial x}} = 0,\quad x \in R,t > 0,} \\ {u\left( {x,0} \right) = {u_0}\left( x \right),\quad x \in R,} \end{array}} \right.$$
(13.1)

where a \ {0}. The solution of such problem is a wave travelling at velocity a, given by

$${{u(x, t) = u_0(x-at), {\qquad} t \geq 0.}}$$

We consider the curves x(t) in the plane (x,t), solutions of the following ordinary differential equation

$$\left\{ {\begin{array}{*{20}{l}} {\frac{{dx}}{{dt}} = a,\quad t > 0,} \\ {x\left( 0 \right) = {x_0},} \end{array}} \right.$$

for varying values of x 0 ∈ ℝ.

Such curves are called characteristic lines (often simply characteristics) and the solution along these lines remains constant, for

$${{{du \over{dt}}={{\partial}u \over{{\partial}t}}+{{\partial}u \over{{\partial}x}}{dx \over{dt}}=0.}}$$

In the case of the more general problem

$$\left\{ {\begin{array}{*{20}{l}} {\frac{{\partial u}}{{\partial t}} + a\frac{{\partial u}}{{\partial x}} + {a_0}u = f,\quad x \in R,t > 0,} \\ {u\left( {x,0} \right) = {u_0}\left( x \right),\quad \quad \,\,\,\,x \in R,} \end{array}} \right.$$
(13.2)

where a,a 0, and f are given functions of (x, t), the characteristic lines x(t) are the solutions of the Cauchy problem

$$\left\{ {\begin{array}{*{20}{l}} {\frac{{dx}}{{dt}} = a\left( {x,t} \right),\quad t > 0,} \\ {x\left( 0 \right) = {x_0}} \end{array}} \right.$$

In such case, the solutions of (13.2) satisfy the following relation

$$ {{{d \over{dt}}u(x(t), t) = f (x(t), t)-a_0(x(t), t)u(x(t), t).}}$$

Therefore it is possible to extract the solution u by solving an ordinary differential equation on each characteristic curve (this approach leads to the so-called characteristic method).

Let us now consider problem (13.1) in a bounded interval. For instance, let us suppose x [0, 1] and a > 0. As u is constant on the characteristics, from Fig. 13.1 we deduce that the value of the solution at a point P coincides with the value of u 0 at the foot P 0 of the characteristic outgoing from P. Instead, the characteristic outgoing from Q intersects the straight line x = 0 for t > 0. The point x = 0 is therefore an inflow point at which we must necessarily assign the value of u. Note that if a < 0, the inflow point would be x = 1.

Fig. 13.1.
figure 1

Examples of characteristic lines (straight lines in this case) issuing from P and Q

By referring to problem (13.1) it is useful to observe that if u 0 were a discontinuous function at x 0, then such discontinuity would propagate along the characteristic outgoing from x 0 (this process can be rigorously formalized from a mathematical viewpoint by introducing the concept of weak solution for hyperbolic problems). In order to regularize the discontinuity, one could approximate the initial datum u 0 with a sequence of regular functions \({\sl u}^{\varepsilon}_{0}(x),{\varepsilon}>0. \). However, this procedure is only effective if the hyperbolic problem is linear. The solutions of nonlinear hyperbolic problems can indeed develop discontinuities also for regular initial data (as we will see in Chapter 15). In this case the strategy (which also inspires numerical methods) is to regularize the differential equation itself, rather than the initial datum. We can consider the following diffusion-transport equation

$${{{{\partial}u^{\varepsilon} \over{{\partial}t}}+a{{\partial}u^{\varepsilon} \over{{\partial}x}}= {\varepsilon}{{\partial}^{2}u^{{\varepsilon}} \over{{\partial}x^2}}, {\qquad} x \in {\bf R}, t>0,}}$$

for small values of e > 0, which can be regarded as a parabolic regularization of equation (13.1). If we set u e(x, 0) = u 0(x), we can prove that

$${{{\lim_{{\varepsilon}{\rightarrow}0^{+}}}u^{{\varepsilon}}(x,t) = u_{0}(x-at), t>0, x {\in} {\bf R}.}}$$

1.1 13.1.1 An a priori estimate

Let us now return to the transport-reaction problem (13.2) on a bounded interval

$$\left\{ {\begin{array}{*{20}{l}} {\frac{{\partial u}}{{\partial t}} + a\frac{{\partial u}}{{\partial x}} + {a_0}u = f,\quad x \in \left( {\alpha ,\beta } \right),t > 0,} \\ {u\left( {x,0} \right) = {u_0}\left( x \right),\quad \quad \,\,\,\,x \in \left[ {\alpha ,\beta } \right],} \\ {u\left( {\alpha ,t} \right) = \varphi \left( t \right),\quad \quad \quad \,t > 0,} \end{array}} \right.$$
(13.3)

where a(x), f(x, t) and f(t) are assigned functions; we have made the assumption that a(x) > 0, so that x = a is the inflow point (where to impose the boundary condition), while x = ß is the outflow point.

By multiplying the first equation of (13.3) by u, integrating in x and using the formula of integration by parts, we obtain for each t > 0

$$ {{ {1 \over{2}}{d \over{dt}}\int_{\alpha}^{\beta}u^{2}dx + \int^{\beta}_{\alpha} (a_0 - {1 \over{2}}a_x)u^{2}\ dx + {1 \over{2}}(au^{2})({\beta})-{1 \over{2}}(au^{2})({\alpha})= \int_{\alpha}^{\beta} fu\ dx. }} $$

By supposing that there exists a µ 0 = 0 such that

$${{a_0 -{1 \over{2}}a_x {\geq} {\mu}_0 {\qquad} {\forall}x \in [{\alpha}, {\beta}],}}$$

we find

$$ {{{1 \over{2}}{d \over{dt}}||u(t)||{2\atop{L^{2}}}({\alpha},{\beta})+ {\mu}_{0}||u(t)||{2\atop{L^{2}}}({\alpha},{\beta})+{1 \over{2}}(au^{2})({\beta}) {\leq} {\int^{{\beta}}_{{\alpha}}}fu dx + {1 \over{2}}a({\alpha}){\varphi}^{2}(t).}}$$

If f and f are identically zero, then

$${{||u(t)||_{L^{2}({\alpha},{\beta})} {\leq} ||u_0||_{L^{2}({\alpha},{\beta})} \qquad {\forall}t > 0.}}$$

In the case of the more general problem (13.2), if we suppose that µ 0 > 0, thanks to the Cauchy-Schwarz and Young inequalities we have

$${{\int^{\beta}_{\alpha}fu\ dx{\leq}||f||_{L^{2}({\alpha},{\beta})}||u||_{L^{2}({\alpha},{\beta})}{\leq}{{\mu}_{0} \over2}||u||{2\atop{L^{2}}}_{({\alpha},{\beta})}+ {1 \over2{\mu}_{0}}||f||{2\atop{L^{2}}}_{({\alpha},{\beta})}.}}$$

Integrating over time we get the following a priori estimate

$${{\matrix{||{\sl u}(t)||{2\atop{L^{2}}}_{({\alpha},{\beta})}+{\mu}_{0}{\mathop{\int}^{t}_{0}}||{\sl u}(s)||{2\atop{L^{2}}}_{({\alpha},{\beta})}ds+a({\beta}){\mathop{\int}^{t}_{0}}{\sl u}^{2}({\beta},s) ds\cr {\qquad}{\qquad}{\qquad}{\qquad}{\qquad}{\qquad}{\leq}||{\sl u}_{0}||{2\atop{L^{2}}}_{({\alpha},{\beta})}+a({\alpha}){\mathop{\int}^{t}_{0}}{\varphi}^{2}(s)ds+{1 \over {\mu}_{0}}{\mathop{\int}^{t}_{0}}||f||{2\atop{L^{2}}}_{({\alpha},{\beta})}ds.\cr} }} $$

An alternative estimate that does not require the differentiability of a(x), but uses, instead, the hypothesis that a 0 = a(x) = a 1 for two suitable positive constants a 0 and a 1, can be obtained by multiplying the equation by a - 1,

$${{a^{-1}{{\partial}u \over{{\partial}t}} + {{\partial}u \over{{\partial}x}}=a^{-1}f.}}$$

By multiplying by u and integrating between a and ß we obtain, after a few simple steps,

$${{{1 \over{2}}{d \over{dt}}\int_{{\alpha}}^{{\beta}}a^{-1}(x)u^{2}(x,t)dx+{1 \over{2}}u^{2}({\beta},t)=\int_{{\alpha}}^{{\beta}}a^{-1}(x)f(x,t)u(x,t)dx+{1 \over{2}}{\varphi}^{2}(t).}}$$

If f = 0 we immediately obtain

$${{||u(t)||{2\atop{a}}+\int_{0}^{t}u^{2}({\beta},s)ds=||u_{0}||{2\atop{a}}+\int_{0}^{t}{\varphi}^{2}(s)ds, t > 0.}}$$

We have defined

$${{||{v}||_{a}=\biggr({\mathop{\int}_{{\alpha}}^{{\beta}}}a^{-1}(x)v^{2}(x)dx\biggr)^{1 \over {2}}.}}$$

Thanks to the lower and upper bounds of a - 1, the latter is equivalent to the norm of L2(a, ß). On the other hand, if f ≠ 0, we can proceed as follows

$${{||u(t)||{2\atop{a}}+\int_{0}^{t}u^{2}({\beta},s)ds {\leq} ||u_{0}||{2\atop{a}} + \int_{0}^{t}{\varphi}^{2}(s)ds + \int_{0}^{t}||f||{2\atop{a}} ds + \int_{0}^{t}||u(s)||{2\atop{a}}ds,}}$$

having used the Cauchy-Schwarz inequality.

By now applying Gronwall’s lemma (see Lemma 2.2) we obtain, for each t > 0,

$${{||u(t)||{2\atop{a}}+\int_{0}^{t}u^{2}({\beta},s)ds{\leq}e^{t}\biggr(||u_{0}||{2\atop{a}}+\int_{0}^{t}{\varphi}^{2}(s)ds+\int_{0}^{t}||f||{2\atop{a}}ds\biggr).}}$$
(13.4)

2 13.2 Systems of linear hyperbolic equations

Let us consider a linear system of the form

$$\left\{ {\begin{array}{*{20}{l}} {\frac{{\partial u}}{{\partial t}} + A\frac{{\partial u}}{{\partial x}} = 0,\quad \quad x \in R,t > 0,} \\ {u\left( {0,x} \right) = {u_0}\left( x \right),\quad \,\,x \in R,} \end{array}} \right.$$
(13.5)

where u : [0,∞)× ℝ → ℝ π, A : ℝ → ℝ p×p is a given matrix, and u 0 : ℝ → ℝ p is the initial datum.

Let us first consider the case where the coefficients of A are constant (i.e. independent of both x and t). System (13.5) is called hyperbolic if A can be diagonalized and has real eigenvalues. In such case, there exists a non-singular matrix T : ℝ → ℝ p×psuch that

$${{{\rm A}={\rm T}{\sl \Lambda}{\rm T}^{-1},}}$$

where Λ = diag(λ 1,...,λ p), with λ i ∈ ℝ for i = 1,..., p, is the diagonal matrix of the eigenvalues of A while T = [ω 1,ω 2,...,ω p] is the matrix whose column vectors are the right eigenvectors of A, that is

$${{A{\omega}^{k}={\lambda}_{k}{\omega}^{k}, {\qquad} k=1,...,p.}}$$

Through this similarity transformation it is possible to rewrite system (13.5) in the form

$${{{{\partial}\bf{w}\over{{\partial}\it{t}}}+\it{{\Lambda}}{{\partial}\bf{w}\over{{\partial}\it{x}}}=\bf{0},}}$$
(13.6)

where w = T-1 u are called characteristic variables. In this way we obtain p independent equations of the form

$${{{{\partial}wk\over{{\partial}t}}+ {\lambda}_{k}{{\partial}wk\over{{\partial}x}}=0, {\qquad}k=1,...,p,}}$$

analogous in all to the equation of problem (13.1) (provided that we suppose a 0 and f null). The solution w k is therefore constant along each characteristic curve x = x(t), solution of the Cauchy problem

$$\left\{ {\begin{array}{*{20}{l}} {\frac{{dx}}{{dt}} = {\lambda _k},\quad t > 0,} \\ {x\left( 0 \right) = {x_0}.} \end{array}} \right.$$
(13.7)

Since the λ k are constant, the characteristic curves are in fact the lines x(t) = x 0 + λ kt and the solutions read w k(x,t) = Ψ k(x - λkt), where Ψ k is a function of a single variable determined by the initial conditions. In the case of problem (13.5), we have that Ψ k(x) = w k(x,0), thus the solution u = Tw will be of the form

$${{{\bf u}(x,t)={{p\atop{\sum}}\atop{k=1}}{\sl w}_{k}(x-{\lambda}_{k}t,0){\omega}^{k}.}}$$

The latter is composed by p travelling, non-interacting waves.

Since a strictly hyperbolic system admits p different characteristic lines each point \(({\bar x},{\bar t})\) of the plane \((x,t),{\sl u}({\bar x},{\bar t})\) will only depend on the initial datum at the points \({\bar x}-{\lambda}_{k}{\bar t},\ {\rm for}\ k=1,{\ldots},{\sl p}.\), For this reason, the set of the p points that form the feet of the characteristics outgoing from \(({\bar x},{\bar t})\), that is

$${{D(\bar{x},\bar{t})=\{{x {\in} R|x=\bar{x}-{\lambda}_{k}\bar{t}, k=1,...,p}\},}}$$
(13.8)

is called domain of dependence of the solution u at the point \(({\bar x},{\bar t})\).

In case we consider a bounded interval (a, ß) instead of the whole real line, the sign of λ k , k= 1, … ,p, denotes the inflow point for each of the characteristic variables. The function Ψ k in the case of a problem set on a bounded interval will be determined not only by the initial conditions, but also by the boundary conditions at the inflow of each characteristic variable. Having considered a point \(({\bar x},{\bar t})\) with \({\bar x}{\in}({\alpha},{\beta})\) and \({\bar t}>0\), if \({\bar x}-{\lambda}_{k}{\bar t}{\in}({\alpha},{\beta})\) then \({\sl w}_{k}({\bar x},{\bar t})\) is determined by the initial condition, in particular we have \({\sl w}_{k}({\bar x},{\bar t})={\sl w}_{k}({\bar x}-{\lambda}_{k}{\bar t}, 0)\). Conversely, if \({\bar x}-{\lambda}_{k}{\bar t}{\not\in}({\alpha},{\beta})\) then the value of \({\sl w}_{k}({\bar x}, {\bar t})\) will depend on the boundary condition (see Fig. 13.2):

$${{\matrix{{\rm if}\ {\lambda}_{k} > 0, {\sl w}_{k}(\bar{x},\bar{t})={\sl w}_{k}({\alpha},{\bar{x}-{\alpha}\over{\lambda}_{k}}),\cr {\rm if}\ {\lambda}_{k} < 0, {\sl w}_{k}(\bar{x},\bar{t})={\sl w}_{k}({\beta},{\bar{x}-{\beta}\over{\lambda}_{k}}).\cr}}}$$
Fig. 13.2.
figure 2

The value of w k at a point in the plane (x, t) depends either on the boundary condition or on the initial condition, depending on the value of x-λ kt. Both signs of λ k, the positive (right) and negative (left), are shown

As a consequence, the number of positive eigenvalues determines the number of boundary conditions to be assigned at x = a, while at x = ß we will need to assign as many conditions as the number of negative eigenvalues.

In the case where the coefficients of the matrix A in (13.5) are functions of x and t, we denote respectively by

$${\rm L}=\left[\matrix{{\bf l}_{1}^{T}\cr \vdots \cr {\bf l}_{p}^{T}}\right] \quad {\rm and}\quad {\rm R}={[{\bf r}_{1}\dots {\bf r}_{p}]}$$

the matrices containing the left resp. right eigenvectors of A, whose elements satisfy the relations

$${{{\bf Ar}_{k}={\lambda}_{k}{\bf r}_{k}, {\qquad}{\bf l}_{k}^{T}A = {\lambda}_{k}{\bf l}^{T}_{k},}}$$

that is

$${{{\rm AR=R}{\sl \Lambda}, {\qquad}{\rm LA}={\sl \Lambda}{\rm L}.}}$$

Without loss of generality, we can suppose that LR = I. Let us now suppose that there exists a vector function w satisfying the relations

$${{{{\partial}{\bf w} \over{{\partial}{\bf u}}}={\rm R}^{-1}, {\qquad}{\rm that \ is} {\qquad}{{\partial}{\bf u}_{k}\over{{\partial}{\bf w}}}={\bf r}_{k}, {\qquad}k=1,\ldots,{\sl p}.}}$$

Proceeding as we did initially, we obtain

$${{{\rm R}^{-1}{{\partial}{\bf u}\over{{\partial}{\it t}}}+{\sl \Lambda}{\rm R}^{-1}{{\partial}\bf{u}\over{{\partial}\it{x}}}=0,}}$$

hence the new diagonal system (13.6). By reintroducing the characteristic curves (13.7) (the latter will no longer be straight lines as the eigenvalues λ k vary for different values of x and t), w is constant along them. The components of w are therefore still called characteristic variables. As R-1 = L (thanks to the normalization relation) we obtain

$${{{{\partial}w_{k}\over{{\partial}{\bf u}}}.{\bf r}_{m}={\bf l}_{k}.{\bf r}_{m}={\delta}_{km}, {\qquad}k,m=1,\ldots,{\sl p}.}}$$

The functions w k, k = 1, … , p are called Riemann invariants of the hyperbolic system.

2.1 13.2.1 The wave equation

Let us consider the following second order hyperbolic equation

$${{{{\partial}^{2}u\over{{\partial}t^{2}}}-{\gamma}^{2}{{\partial}^{2}u\over{{\partial}x^{2}}}=f, {\quad} x \in({\alpha},{\beta}),{\quad} t > 0.}}$$
(13.9)

Let

$${{u(x,0)=u_{0}(x){\quad}{\rm and}{\quad}{{\partial}u\over{{\partial}t}}(x,0)=v_{0}(x),{\quad} x {\in}({\alpha},{\beta}),}}$$

be the initial data and let us suppose, moreover, that u is identically null at the boundary

$${{u({\alpha},t)=0{\quad} {\rm and}{\quad} u({\beta},t) = 0,{\quad} t > 0.}}$$
(13.10)

In this case, u can represent the vertical displacement of a vibrating elastic chord with lenght ß - a, fixed at the endpoints, and λ is a coefficient that depends on the specific mass of the chord and on its tension. The chord is subject to a vertical force whose density is f. The functions u 0(x) and v 0(x) describe the initial displacement and the velocity of the chord.

For simplicity of notation, we denote by u t the derivative \({\partial u \over \partial t}\), by u x the derivative \({\partial u \over \partial x}\) and we use similar notations for the second derivatives.

Let us now suppose that f is null. From equation (13.9) we deduce that the kinetic energy of the system is preserved, that is (see Exercise 1)

$${{||u_{t}(t)||{2\atop{{\rm L}^{2}}}_{({\alpha},{\beta})}+{\gamma}^{2}||u_{x}(t)||{2\atop{{\rm L}^{2}}}_{({\alpha},{\beta})}=||v_{0}||{2\atop{{\rm L}^{2}}}_{({\alpha},{\beta})}+{\gamma}^{2}||u_{0x}||{2\atop{{\rm L}^{2}}}_{({\alpha},{\beta})}.}}$$
(13.11)

With the change of variables

$${{{\omega}_{1}=u_{x}, {\quad}{\omega}_{2}=u_{t},}}$$

the wave equation (13.9) becomes the following first-order system

$${{{{\partial}{\omega}\over{{\partial}t}}+{\rm A}{{\partial}{\omega}\over{{\partial}x}}={\bf f}, {\quad}x{\in}({\alpha},{\beta}), {\quad}t > 0,}}$$
(13.12)

where

$${{{\omega}=\Bigg[\matrix{{\omega}_{1}\cr{{\omega}_{2}}\cr}\Bigg], {\bf A}=\Bigg[\matrix{0 &-1\cr-{\gamma}^{2}&0}\Bigg],{\bf f}=\Bigg[\matrix{0\cr f \cr}\Bigg],}}$$

whose initial conditions are \({\omega}_{1}(x, 0)={\sl u}^{\prime}_{0}(x)\) and ω 2(x, 0) = v 0(x).

Since the eigenvalues of A are distinct real numbers ±λ (representing the wave propagation rates), system (13.12) is hyperbolic.

Note that, also in this case, to regular initial data correspond regular solutions, while discontinuities in the initial data will propagate along the characteristic lines \({dx \over{dt}}={\pm}{\gamma}\).

3 13.3 The finite difference method

Out of simplicity we will now consider problem (13.1). To solve the latter numerically, we can use spatio-temporal discretizations based on the finite difference method. In this case, the half-plane {t > 0} is discretized choosing a temporal step Δt, a spatial discretization step h and defining the gridpoints (x j, tn) in the following way

$${{x_{j}=jh,{\qquad}j{\in}Z,{\qquad}t^{n}=n{\Delta}t,{\qquad}n{\in}N.}}$$

Set

$${{{\lambda}={\Delta}t/h,}}$$

and let us define

$${{x_{j+1/2}=x_{j}+h/2.}}$$

We seek discrete solutions \(u^{n}_{j}\) which approximate u(x j, tn) for each j and n.

The hyperbolic initial value problems are often discretized in time using explicit methods. Of course, this imposes restrictions on the values of λ that implicit methods generally do not have. For instance, let us consider problem (13.1). Any explicit finite difference method can be written in the form

$${{u_{j}^{n+1}=u_{j}^{n}-{\lambda}(H^{n}_{j+1/2}-H^{n}_{j-1/2}),}}$$
(13.13)

where \(H^{n}_{j+1{/}2}=H(u^{n}_{j},u^{n}_{j+1})\) for a suitable function H(•,•) called numerical flux.

The numerical scheme (13.13) is basically the outcome of the following consideration. Suppose that a is constant and let us write equation (13.1) in conservation form

$${{{{\partial}u\over{{\partial}t}}+{{\partial}(au)\over{{\partial}x}}=0,}}$$

au being the flux associated to the equation. By integrating in space, we obtain

$${{{\mathop{\int}_{x_{j-1/2}}^{x_{j+1/2}}}{{\partial}\sl{u}\over{{\partial}t}}dx + [au]^{x_{j+1/2}}_{x_{j-1/2}}=0, {\quad}j{\in}Z,}}$$

that is

$${{{{\partial}\over{{\partial}t}}U_{j}+{(au)(x_{j+{1\over{2}}})-(au)(x_{j-{1\over{2}}})\over{h}}=0,{\quad}{\rm where}{\quad}U_{j}=h^{-1}{\mathop{\int}_{x_{j-{1\over 2}}}^{x_{j+{1\over 2}}}}u(x)dx.}}$$

Equation (13.13) can now be interpreted as an approximation where the temporal derivative is discretized using the forward Euler finite difference scheme, U j is replaced by u j and H j +1/2 is a suitable approximation of \((a{\sl u})(x_{j+{1 \over{2}}})\).

3.1 13.3.1 Discretization of the scalar equation

In the context of explicit methods, numerical methods are distinguished by how the numerical flux H is chosen. In particular, we cite the following methods:

  • forward/centered Euler (FE/C)

    $${{u^{n+1}_{j}=u^{n}_{j}-{{\lambda}\over{2}}a(u^{n}_{j+1}-u^{n}_{j-1}),}}$$
    (13.14)

    that takes the form (13.13) provided we define

    $${{H_{j+1{/}2}={1\over{2}}a(u_{j+1}+u_{j}).}}$$
    (13.15)
  • Lax-Friedrichs (LF)

    $${{u^{n+1}_{j}={1\over{2}}(u^{n}_{j+1}+u^{n}_{j-1})-{{\lambda}\over{2}}a(u^{n}_{j+1}-u^{n}_{j-1}),}}$$
    (13.16)

    also of the form (13.13) with

    $${{H_{j+1{/}2}={1\over{2}}[a(u_{j+1}+u_{j})-{\lambda}^{-1}(u_{j+1}-u_{j})].}}$$
    (13.17)
  • Lax-Wendroff (LW)

    $${{u^{n+1}_{j}=u^{n}_{j}-{{\lambda}\over{2}}a(u^{n}_{j+1}-u^{n}_{j-1})+{{\lambda}^{2}\over{2}}a^{2}(u^{n}_{j+1}-2u^{n}_{j}+u^{n}_{j-1}),}}$$
    (13.18)

    that can be rewritten in the form (13.13) provided that we take

    $${{H_{j+1{/}2}={1\over{2}}[a(u_{j+1}+u_{j})-{\lambda}a^{2}(u_{j+1}-u_{j})].}}$$
    (13.19)
  • Upwind (or forward/decentered Euler) (U)

    $${{u^{n+1}_{j}=u^{n}_{j}-{{\lambda}\over{2}}a(u^{n}_{j+1}-u^{n}_{j-1})+{{\lambda}\over{2}}|a|(u^{n}_{j+1}-2u^{n}_{j}+u^{n}_{j-1}),}}$$
    (13.20)

    corresponding to the form (13.13) provided that we choose

    $${{H_{j+1{/}2}={1\over{2}}[a(u_{j+1}+u_{j})-|a|(u_{j+1}-u_{j})].}}$$
    (13.21)

The LF method represents a modification of the FE/C method consisting in replacing the nodal value \({\sl u}^{n}_{j}\) in (13.14) with the average of the previous nodal value \({\sl u}^{n}_{j-1}\) and of the following one, \({\sl u}^{n}_{j+1}\).

The LW method derives from the Taylor expansion in time

$${{u^{n+1}=u^{n}+({\partial}_{t}u)^{n}{\Delta}t+({\partial}_{tt}u)^{n}{{\Delta}t^{2}\over{2}}+{\cal O}({\Delta}t^{3}),}}$$

where ( tu)n denotes the partial derivative of u at time t n. Then, using equation (13.1), we replace tu by -a∂ xu, and ttu by a 2 xx u. Neglecting the remainder \({\cal O}({\sl \Delta}t^{3})\) and approximating the spatial derivatives with centered finite differences, we get to (13.18). Finally, the U method is obtained by discretizing the convective term a∂ x u of the equation with the upwind finite difference, as seen in Chapter 12, Sect. 12.6.

All of the previously introduced schemes are explicit. An example of implicit method is the following:

  • Backward/centered Euler (BE/C)

    $${{u^{n+1}_{j}={{\lambda}\over{2}}a(u^{n+1}_{j+1}-u^{n+1}_{j-1})=u^{n}_{j}.}}$$
    (13.22)

Naturally, the implicit schemes can also be rewritten in a general form that is similar to (13.13) where H n is replaced by H n +1. In the specific case, the numerical flux will again be defined by (13.15).

The advantage of formulation (13.13) is that it can be extended easily to the case of more general hyperbolic problems.

In particular, we will examine the case of linear systems in Sect. 13.3.2. The extension to the case of nonlinear hyperbolic equations will instead be considered in Sect. 15.2. Finally, we point out the following schemes for approximating the wave equation (13.9), again in the case f = 0:

  • Leap-Frog

    $${{u^{n+1}_{j}-2u^{n}_{j}+u^{n-1}_{j}=({\gamma}{\lambda})^{2}(u^{n}_{j+1}-2u^{n}_{j}+u^{n}_{j-1}).}}$$
    (13.23)
  • Newmark

    $${{u^{n+1}_{j}-2u^{n}_{j}+u^{n-1}_{j}={({\gamma}{\lambda})^{2}\over{4}}(w^{n-1}_{j}+2w^{n}_{j}+w^{n+1}_{j}),}}$$
    (13.24)

    where \({{w^{n}_{j}=u^{n}_{j+1}-2u^{n}_{j}+u^{n}_{j-1}}}\).

3.2 13.3.2 Discretization of linear hyperbolic systems

Let us consider the linear system (13.5). Generalizing (13.13), a numerical scheme for a finite difference approximation can be written in the form

$${{{\bf u}^{n+1}_{j}={\bf u}^{n}_{j}-{\lambda}({\bf H}^{n}_{j+1{/}2}-{\bf H}^{n}_{j-1{/}2}),}}$$

where \({\bf u}^{n}_{j}\) is the vector approximating u(x j, t n). Now, H j+1/2 is a vector numerical flux. Its formal expression can be easily derived by generalizing the scalar case and replacing a, a 2, and |a| in (13.15), (13.17), (13.19), (13.21) respectively with A, A2, and |A|, where

$${{|{\rm A}|={\rm T}|{\sl \Lambda}|{\rm T}^{-1},}}$$

|Λ| = diag( 1 |, … ,|λ p|) and T is the matrix of eigenvectors of A.

For instance, transforming system (13.5) in p independent transport equations and approximating each of these with an upwind scheme for scalar equations, we obtain the following upwind numerical scheme for the initial system

$${{{\bf u}^{n+1}_{j}={\bf u}^{n}_{j}-{{\lambda} \over{2}}A({\bf u}^{n}_{j+1}-{\bf u}^{n}_{j-1})+{{\lambda} \over{2}}|A|({\bf u}^{n}_{j+1}-2{\bf u}^{n}_{j}+{\bf u}^{n}_{j-1}).}}$$

The numerical flux of such scheme is

$${{{\bf H}_{j+{1 \over{2}}}={1 \over{2}}[{\rm A}({\bf u}_{j+1}+{\bf u}_{j})-|{\rm A}|({\bf u}_{j+1}-{\bf u}_{j})].}}$$

The Lax-Wendroff method becomes

$${{{\bf u}^{n+1}_{j}={\bf u}^{n}_{j}-{1 \over{2}}{\lambda}{\rm A}({\bf u}^{n}_{j+1}-{\bf u}^{n}_{j-1})+{1 \over{2}}{\lambda}^{2}{\rm A}^{2}({\bf u}^{n}_{j+1}-2{\bf u}^{n}_{j}+{\bf u}^{n}_{j-1})}}$$

and its numerical flux is

$${{{\bf H}_{j+{1 \over{2}}}={1 \over{2}}[{\rm A}({\bf u}_{j+1}+{\bf u}_{j})-{\lambda}{\rm A}^{2}({\bf u}_{j+1}-{\bf u}_{j})].}}$$

3.3 13.3.3 Boundary treatment

In case we want to discretize the hyperbolic equation (13.3) on a bounded interval, we will obviously need to use the inflow node x = α to impose the boundary condition, say \({{{\sl u}^{n+1}_{0}={\varphi}(t^{n+1})}}\), while at all other nodes x j, 1 = j = m (including the outflow node x m = ß) we will write the finite difference scheme.

However, schemes using a centered discretization of the space derivative require a particular treatment at x m. Indeed, they would require the value u m+1, which is unavailable as it relates to the point with coordinates ß + h, outside the integration interval. The problem can be solved in various ways. An option is to use only the upwind decentered discretization on the last node, as such discretization does not require knowing the datum in x m+1; this approach however is only a first-order one. Alternatively, the value \({{{\sl u}^{n+1}_{m}}}\) can be obtained through extrapolation from the values available at the internal nodes. An example could be an extrapolation along the characteristic lines applied to a scheme for which λa = 1; this provides \({{{\sl u}^{n+1}_{m}={\sl u}^{n}_{m-1}{\lambda}a+{\sl u}^{n}_{m}(1-{\lambda}a)}}\).

A further option consists in applying the centered finite difference scheme to the outflow node x m as well, and use, in place of \({{{\sl u}^{n}_{m+1}}}\), an approximation based on a constant extrapolation \({{({\sl u}^{n}_{m+1}={\sl u}^{n}_{m})}}\), or on a linear one ${{({\sl u}^{n}_{m+1}=2{\sl u}^{n}_{m}-{\sl u}^{n}_{m-1})}}$.

This matter becomes more problematic in the case of hyperbolic systems, where we must resort to compatibility equations. To shed more light on these aspects and to analyze their possible instabilities deriving from the numerical boundary treatment, the reader can refer to Strickwerda [Str89], [QV94, Chap. 14] and [LeV07].

4 13.4 Analysis of the finite difference methods

We analyze the consistency, stability and convergence properties of the finite difference methods we introduced previously.

4.1 13.4.1 Consistency and convergence

For a given numerical scheme, the local truncation error is the error generated by expecting the exact solution to verify the numerical scheme itself.

For instance, in the case of scheme (13.14), having denoted by u the solution of the exact problem (13.1), we can define the truncation error at the point (x j,tn) as follows

$${{{\tau}^{n}_{j}={u(x_{j},t^{n+1})-u(x_{j},t^{n}) \over{{\Delta}t}}+a{u(x_{j+1},t^{n})-u(x_{j-1},t^{n}) \over{2h}}.}}$$

If the truncation error

$${{{\tau}({\sl \Delta}t,h)={\max_{j,n}}|{\tau}^{n}_{j}|}}$$

tends to zero when Δt and h tend to zero, independently, then the numerical scheme will be said to be consistent.

Moreover, we will say that a numerical scheme is accurate to order p in time and to order q in space (for suitable integers p and q), if for a sufficiently regular solution of the exact problem we have

$${{{\tau}({\sl \Delta}t,h)= {\cal O}({\sl \Delta}t^{p}+h^{q}).}}$$

Using Taylor expansions suitably, we can then see that the truncation error of the previously introduced methods is:

  • Euler (forward or backward) / centered: \({\cal O}({\sl \Delta}t+h^{2})\);

  • Upwind: O(Δt + h);

  • Lax-Friedrichs: \({{{\cal O} \Big({h^{2} \over{{\Delta}t}}+{\Delta}t+h^{2} \Big)}}\);

  • Lax-Wendroff: \({\cal O}(\Delta t^{2}+h^{2}+h^{2}\Delta t)\).

Finally, we will say that a scheme is convergent (in the maximum norm) if

$${{{\mathop{\lim}_{{\Delta}t,h{\rightarrow}0}}({\mathop{{\max}}_{j,n}}|{\sl u}(x_{j},t^{n})-{\sl u}^{n}_{j}|)=0.}}$$

Obviously, we can also consider weaker norms, such as ‖ • ‖Δ, 1 and ‖ • ‖Δ,2, which we will introduce in (13.26).

4.2 13.4.2 Stability

We will say that a numerical method for a linear hyperbolic problem is stable if for each instant T there exists a constant C T > 0 (possibly depending on T) such that for each h > 0, there exists δ 0 > 0 (possibly dependent on h) such that for each 0 < Δt < δ 0we have

$${{||{\bf u}^{n}||_{{\Delta}}{\leq}C_{T}||{\bf u}^{0}||_{{\Delta}},}}$$
(13.25)

for each n such that nΔt = T, and for each initial datum u0. Note that C T should not depend on Δt and h. Often (always, in the case of explicit methods) we will have stability only if the temporal step is sufficiently small with respect to the spatial one, that is for δ 0 = δ 0(h).

The notation ‖ · ‖Δ denotes a suitable discrete norm, for instance

$${{||{\bf v}||_{{\Delta},p} = (h {\mathop{\sum}^{{\infty}}_{j=-{\infty}}}|v_{j}|^{p})^{{1 \over{p}}}{\quad}{\rm for}{\quad} p=1,2,{\quad}||{\bf v}||_{{\Delta},{\infty}}={\mathop{{\sup}}_{j}}|v_{j}|.}}$$
(13.26)

Note how ‖v‖Δ, p represents an approximation of the Lπ(ℝ) norm, for p = 1, 2 or + .

The implicit backward/centered Euler scheme (13.22) is stable in the norm ‖ · ‖Δ,2 for any choice of the parameters Δt and h (see Exercise 2).

A scheme is called strongly stable with respect to the norm ‖ · ‖Δ if

$${{||{\bf u}^{n}||_{{\Delta}}{\leq}||{\bf u}^{n-1}||_{{\Delta}},}}$$
(13.27)

for each n such that nΔt = T, and for each initial datum u 0, which implies that (13.25) is verified with C T = 1.

Remark 13.1. In the context of hyperbolic problems, one often wants long-time solutions (solutions with T » 1). Such cases usually require a strongly stable scheme, as this guarantees that the numerical solution is bounded for each value of T.•

As we will see, a necessary condition for the stability of an explicit numerical scheme of the form (13.13) is that the temporal and spatial discretization steps satisfy

$$|a\lambda | \leqslant 1,\,or\,\Delta t \leqslant \frac{h}{{\left| a \right|}},$$
(13.28)

called CFL condition (from Courant, Friedrichs and Lewy). The number is commonly called CFL number and is a physically dimensionless quantity (a being a velocity).

The geometrical interpretation of the CFL stability condition is the following. In a finite difference scheme, the value of \({{{\sl u}^{n+1}_{j}}}\) generally depends on the values \({\sl u}^{n}_{j+i}\) of u n at the three points x j +i , i = -1, 0, 1. Proceeding backwards, we deduce that the solution \({{{\sl u}^{n+1}_{j}}}\) will only depend on the initial data at the points x j +i , for i = -(n+1), ,(n+1) (see Fig. 13.3).

Fig. 13.3.
figure 3

Geometric interpretation of the CFL condition for a system with p = 2, where \({{r_{i}={\bar x}-{\lambda}_{i}(t-{\bar t})i=1,2}}\). The CFL condition is satisfied on the left, and violated on the right

Calling numerical domain of dependence D Δt(x j, tn) the domain of dependence of \({{{\sl u}^{n}_{j}}}\), which will therefore be called numerical dependence domain of \({{{\sl u}^{n}_{j}}}\), the former will verify

$${{D_{{\Delta}t}(x_{j},t^{n}){\subset}\{x{\in}R:|x-x_{j}|{\leq}nh={t^{n} \over{{\lambda}}}\}.}}$$

Consequently, for each given point \({{({\bar x},{\bar t})}}\) we have

$${{D_{{\Delta}t}(\bar{x},\bar{t}){\subset}\{x{\in}R:|x-\bar{x}|{\leq}{\bar{t} \over{{\lambda}}}\}.}}$$

In particular, taking the limit for Δt → 0, and fixing λ, the numerical dependency domain becomes

$${{D_{0}(\bar{x},\bar{t})=\{x{\in}R:|x-\bar{x}|{\leq}{\bar{t} \over{{\lambda}}}\}.}}$$

The condition (13.28) is then equivalent to the inclusion

$${{D(\bar{x},\bar{t}){\subset}D_{0}(\bar{x},\bar{t}),}}$$
(13.29)

where \({{D({\bar x},{\bar t})}}\) is the dependency domain of the exact solution defined in (13.8). Note that in the scalar case, p = 1 and λ 1 = a.

Remark 13.2. The CFL condition establishes, in particular, that there is no explicit finite different scheme for hyperbolic initial value problems that is unconditionally stable and consistent. Indeed, suppose the CFL condition is violated. Then there exists at least a point x* in the dependency domain that does not belong to the numerical dependency domain. Then changing the initial datum to x* will only modify the exact solution and not the numerical one. This implies non-convergence of the method and therefore also instability. Indeed, for a consistent method, the Lax-Richtmyer equivalence theorem states that stability is a necessary and sufficient condition for its convergence.

Remark 13.3. In the case where a = a(x, t) is no longer constant in (13.1), the CFL condition becomes

$${{{\Delta}t{\leq}{h \over{{{\sup}\atop{x{\in}R, t>0}}|a(x,t)|}}.}}$$

If the spatial discretization step varies, we have

$${{{\Delta}t{\leq}{{{\min}\atop{k}}}{{h_{k}} \over{{{{\sup}}\atop{x{\in}(x_{k},x_{k+1}),t>0}}|a(x,t)|}},}}$$

with h k = xk+1 -xk.

Referring to the hyperbolic system (13.5), the CFL stability condition, in analogy to (13.28), will be

$${{\biggr|{\lambda}_{k}{{\sl \Delta}t \over{h}}\biggr|{\leq}1, k=1,\ldots,p,{\qquad}{\rm or, equivalently,}{\qquad}{\sl \Delta}t{\leq}{h \over{{\rm max}_{k}|{\lambda}_{k}|}},}}$$

where {λ k , k = 1 … ,p} are the eigenvalues of A.

This condition, as well, can be written in the form (13.29). The latter expresses the requirement that each line of the form \({{x={\bar x}-{\lambda}_{k}({\bar x}-t),\ k=1,{\ldots},{\sl p},}}\) must intersect the horizontal line \({{t={\bar t}-{\Delta}t}}\) at points x (k) which lie within the numerical dependency domain.

Theorem 13.1. If the CFL condition (13.28) is satisfied, the upwind, Lax-Friedrichs and Lax-Wendroff schemes are strongly stable in the norm ‖ · ‖Δ,1.

Proof. To prove the stability of the upwind scheme (13.20) we rewrite it in the following form (having supposed a > 0)

$${{u^{n+1}_{j}=u^{n}_{j}-{\lambda}a(u^{n}_{j}-u^{n}_{j-1}).}}$$

Then

$${{||{\bf u}^{n+1}||_{{\Delta},1}{\leq}h{{\sum}\atop {j}}|(1-{\lambda}a)u^{n}_{j}|+h{{\sum}\atop {j}}|{\lambda}au^{n}_{j-1}|.}}$$

Under the hypothesis (13.28) both values λa and 1 -λa are non-negative. Hence,

$${{||{\bf u}^{n+1}||_{{\Delta},1}{\leq}h(1-{\lambda}a){{\sum} \atop{j}}|u^{n}_{j}|+h{\lambda}a{{\sum} \atop{j}}|u^{n}_{j-1}|=||{\bf u}^{n}||_{{\Delta},1,}}}$$

that is, inequality (13.25) holds with C T = 1. The scheme is therefore strongly stable with respect to the norm ‖ · ‖Δ = ‖ · ‖Δ,1.

For the Lax-Friedrichs scheme, always under the CFL condition (13.28), we derive from (13.16) that

$${{u^{n+1}_{j}={1 \over{2}}(1-{\lambda}a)u^{n}_{j+1}+{1 \over{2}}(1+{\lambda}a)u^{n}_{j-1},}}$$

so

$${{\matrix{||{\bf u}^{n+1}||_{{\Delta},1} {\leq}{1 \over{2}}h \Bigg[{{\sum} \atop{j}}|(1-{\lambda}a)u^{n}_{j+1}|+{{\sum} \atop{j}}|(1+{\lambda}a)u^{n}_{j-1}|\Bigg]\cr {\qquad}{\qquad}{\qquad}{\quad}{\quad}{\leq}{1 \over{2}}(1-{\lambda}a)||{\bf u}^{n}||_{{\Delta},1}+{1 \over{2}}(1+{\lambda}a)||{\bf u}^{n}||_{{\Delta},1}=||{\bf u}^{n}||_{{\Delta},1}.\cr} }}$$

For the Lax-Wendroff scheme, the proof is analogous (see e.g. [QV94, Chap. 14] or [Str89]).

Finally, we can prove that if the CFL condition is verified, the upwind scheme satisfies

$${{||{\bf u}^{n}||_{{\Delta},{\infty}}{\leq}||{\bf u}^{0}||_{{\Delta},{\infty}}{\quad}{\forall}n{\geq}0,}}$$
(13.30)

i.e. it is strongly stable in the norm ‖ · ‖Δ,∞. Relation (13.30) is called discrete maximum principle (see Exercise 4).

Theorem 13.2. The backward Euler scheme BE/C is strongly stable in the norm || · ||Δ,2, with no restriction on Δt. The forward Euler scheme FE/C, instead, is never strongly stable. However, it is stable with constant C T = eT/2 provided that we assume that Δt satisfies the following condition (more restrictive than the CFL condition)

$${{{\Delta}t{\leq}\biggr({h \over {a}}\biggr)^{2}.}}$$
(13.31)

Proof. We observe that

$${{(B-A)B={1 \over {2}}(B^{2}-A^{2}+(B-A)^{2}){\quad}{\forall}A, B {\in}R.}}$$
(13.32)

As a matter of fact

$${{(B-A)B=(B-A)^{2}+(B-A)A={1 \over{2}}((B-A)^{2}+(B-A)(B+A)).}}$$

Multiplying (13.22) by \(u^{n+1}_{j}\) we find

$${{(u^{n+1}_{j})^{2}+(u^{n+1}_{j}-u^{n}_{j})^{2}=(u^{n}_{j})^{2}-{\lambda}a(u^{n+1}_{j+1}-u^{n+1}_{j-1})u^{n+1}_{j}.}}$$

Observing that

$${{{{\sum} \atop{j{\in}Z}}(u^{n+1}_{j+1}-u^{n+1}_{j-1})u^{n+1}_{j}=0}}$$
(13.33)

(telescopic sum), we immediately obtain that \({{||{\bf u}^{n+1}||{2 \atop{\Delta}}_{,2}{\leq}||{\bf u}^{n}||{2 \atop{\Delta}}_{,2}}}\), which is the result sought for the BE/C scheme.

Let us now move to the FE/C scheme and multiply (13.14) by \({{{\sl u}^{n}_{j}}}\). Observing that

$${{(B-A)A={1 \over {2}}(B^{2}-A^{2}-(B-A)^{2}){\quad}{\forall}A, B {\in}R,}}$$
(13.34)

we find

$${{(u^{n+1}_{j})^{2}=(u^{n}_{j})^{2}+(u^{n+1}_{j}-u^{n}_{j})^{2}-{\lambda}a(u^{n}_{j+1}-u^{n}_{j-1})u^{n}_{j}.}}$$

On the other hand, we obtain once again from (13.14) that

$${{u^{n+1}_{j}-u^{n}_{j}=-{{{\lambda}a} \over{2}}(u^{n}_{j+1}-u^{n}_{j-1})}}$$

and therefore

$${{(u^{n+1}_{j})^{2}=(u^{n}_{j})^{2}+ \biggr({{\lambda}a \over{2}}\biggr)^{2}(u^{n}_{j+1}-u^{n}_{j-1})^{2}-{\lambda}a(u^{n}_{j+1}-u^{n}_{j-1})u^{n}_{j}.}}$$

Now summing on j and observing that the last addendum yields a telescopic sum (hence it does not provide any contribution) we obtain, after multiplying by h,

$${{||{\bf u}^{n+1}||{2 \atop {\Delta}}_{,2}=||{\bf u}^{n}||{2 \atop {\Delta}}_{,2}+ \biggr({{{\lambda}a} \over{2}}\biggr)^{2}h{\mathop{\Sigma}_{j{\in}Z}}(u^{n}_{j+1}-u^{n}_{j-1})^{2},}}$$

from which we infer that there is no value of Δt for which the method is strongly stable.

However, as

$${{(u^{n}_{j+1}-u^{n}_{j-1})^{2}{\leq}2[(u^{n}_{j+1})^{2}+(u^{n}_{j-1})^{2}],}}$$

we find that, under the hypothesis (13.31),

$${{||{\bf u}^{n+1}||{2 \atop {\Delta}}_{,2}{\leq}(1+{\lambda}^{2}a^{2})||{\bf u}^{n}||{2 \atop {\Delta}}_{,2}{\leq}(1+{\Delta}t)||{\bf u}^{n}||{2 \atop {\Delta}}_{,2}.}}$$

By recursion, we find

$${{||{\bf u}^{n}||^{2}_{\Delta,2}{\leq}(1+{\Delta}t)^{n}||{\bf u}^{0}||^{2}_{\Delta,2}{\leq}e^{T}||{\bf u}^{0}||^{2}_{\Delta,2},}}$$

where we have used the inequality

$${{(1+{\Delta}t)^{n}{\leq}e^{n{\Delta}t}{\leq}e^{T}{\quad}{\forall}n {\qquad}{\rm such}{\ }{\rm that}{\qquad} t^{n}{\leq}T.}}$$

We conclude that

$${{||{\bf u}^{n}||_{{\Delta},2}{\leq}e^{T{/}2}||{\bf u}^{0}||_{{\Delta},2,}}}$$

which is the stability result sought for the FE/C scheme.

4.3 13.4.3 Von Neumann analysis and amplification coefficients

Von Neumann’s analysis is useful to investigate the stability of a scheme in the norm ‖·‖ Δ, 2. To this purpose, we assume that the function u 0(x) is 2π-periodic and thus it can be written as a Fourier series as follows

$${{u_{0}(x)={\mathop{\sum}^{{\infty}}_{k=-{\infty}}}{\alpha}_{k}e^{ikx},}}$$
(13.35)

where

$${{{\alpha}_{k}={1 \over{2{\pi}}}{\mathop{\int}^{2{\pi}}_{0}}u_{0}(x)e^{-ikx}dx}}$$

is the k-th Fourier coefficient. Hence,

$${{u^{0}_{j}=u_{0}(x_{j})={\mathop{\sum}^{\infty}_{k=-{\infty}}}{\alpha}_{k}e^{ikjh},{\qquad}j=0, {\pm}1, {\pm}2, {\ldots}}}$$

It can be verified that applying any of the difference schemes seen in Sect. 13.3.1 we get the following relation

$${{u^{n}_{j}={\mathop{\sum}^{\infty}_{k=-{\infty}}}{\alpha}_{k}e^{ikjh}{\gamma}^{n}_{k},{\qquad}j=0, {\pm}1, {\pm}2,{\ldots},{\qquad}n{\geq}1.}}$$
(13.36)

The number λ k ∈ C is called amplification coefficient of the k-th frequency (or harmonic), and characterizes the scheme under exam. For instance, in the case of the forward centered Euler method (FE/C) we find

$${{\matrix{u^{1}_{j}={\mathop{\sum}^{{\infty}}_{k=-{\infty}}}{\alpha}_{k}e^{ikjh}\biggr(1-{{a{\Delta}t} \over{2h}}(e^{ikh}-e^{-ikh})\biggr)\cr={\mathop{\sum}^{{\infty}}_{k=-{\infty}}}{\alpha}_{k}e^{ikjh}\biggr(1-{{a{\Delta}t} \over{h}}i {\sl sin}(kh)\biggr).\cr}}}$$

Hence,

$${{{\gamma}_{k}=1-{{a{\sl \Delta}t} \over {h}}i {\rm sin}(kh){\qquad}{\rm and}{\quad}{\rm thus}{\qquad}|{\gamma}_{k}|= \biggl \{1+ \biggl({{a{\sl \Delta}t} \over{h}} {\rm sin}(kh) \biggr)^{2} \biggr \}^{1 \over{2}}.}}$$

As there exist values of k for which |λk| > 1, there is no value of Δt and h for which the scheme is strongly stable.

Proceeding in a similar way for the other schemes, we find the coefficients reported in Table 13.1.

Table 13.1.
figure a

Amplification coefficient for the different numerical schemes in Sect. 13.3.1. We recall that λ = Δt/ h

We will now see how the von Neumann analysis can be applied to study the stability of a numerical scheme with respect to the || · ||Δ,2 norm and to ascertain its dissipation and dispersion properties.

To this purpose, we prove the following result:

Theorem 13.3. If there exist a number ß = 0 and a positive integer m such that, for suitable choices of Δt and h, we have \({{|{\gamma}_{k}|{\leq}(1+{\beta}{\Delta}t)^{{1 \over{m}}}}}\) for each k, then the scheme is stable with respect to the norm ‖ · ‖Δ, 2 with stability constant C T = eßT/m. In particular, if we can take ß = 0 (and therefore |γ k | ≤ 1 ∀k) then the scheme is strongly stable with respect to the same norm.

Proof. We will suppose that problem (13.1) is formulated on the interval [0,2π]. In such interval, let us consider N +1 equidistant nodes,

$${{x_{j}=jh,{\quad}j=0,{\ldots},N,{\quad}{\rm with}{\quad}h={2{\pi} \over{N}},}}$$

(N being an even positive integer) where to satisfy the numerical scheme (13.13). Moreover, we will suppose for simplicity that the initial datum u 0 is periodic. As the numerical scheme only depends on the values of u 0 at the nodes x j, we can replace u 0 by the Fourier polynomial of order N/2,

$${{{\tilde u}_{0}(x)={\mathop{\sum}^{{N \over{2}}-1}_{k=-{N \over{2}}}}{\alpha}_{k}e^{ikx}}}$$
(13.37)

which interpolates it at the nodes. Note that \({{{\sl{\tilde u}}_{0}}}\) is a periodic function with period 2π. We will have, thanks to (13.36),

$${{u^{0}_{j}=u_{0}(x_{j})={\mathop{\sum}^{{N \over{2}}-1}_{k=-{N \over{2}}}}{\alpha}_{k}e^{ikjh},{\quad}u^{n}_{j}={\mathop{\sum}^{{N \over{2}}-1}_{k=-{N \over{2}}}}{\alpha}_{k}{\gamma}^{n}_{k}e^{ikjh}.}}$$

We note that

$${{||{\bf u}^{n}||{2 \atop{{\Delta}}},2=h{\mathop{\sum}^{N-1}_{j=0}}{\mathop{\sum}^{{N \over{2}}-1}_{k,m=-{N \over{2}}}}{\alpha}_{k}{\bar {\alpha}}_{m}({\gamma}_{k}{\bar {\gamma}}_{m})^{n}e^{i(k-m)jh}.}}$$

As

$${{h{\mathop{\sum}^{N-1}_{j=0}}e^{i}(k-m)jh=2{\pi}{\delta}_{km},{\quad}-{N \over{2}}{\leq}k,m{\leq}{N \over{2}}-1,}}$$

(see e.g. [QSS07, Lemma 10.2]) we find

$${{||{\bf u}^{n}||^{2}_{\Delta,2}=2{\pi}{\mathop{\sum}^{{N \over{2}}-1}_{k=-{N \over{2}}}}|{\alpha}_{k}|^{2}|{\gamma}_{k}|^{2n}.}}$$

Thanks to the assumption made on k| we have

$${{||{\bf u}^{n}||^{2}_{{\Delta}{,2}}{\leq}(1+{\beta}{\Delta}t)^{{2n \over{m}}}2{\pi}{\mathop{\sum}^{{N \over{2}}-1}_{k=-{N \over{2}}}}|{\alpha}_{k}|^{2}=(1+{\beta}{\Delta}t)^{{2n \over{m}}}||{\bf u}^{0}||^{2}_{{\Delta}{,2}}{\quad}{\forall}n{\geq}0.}}$$

As 1+ßΔt = e ßΔt, we deduce that

$${{||{\bf u}^{n}||_{{\Delta},2}{\leq}e^{{{\beta}{\Delta}tn \over{m}}}||{\bf u}^{0}||_{{\Delta},2}=e^{{{\beta}T \over{m}}}||{\bf u}^{0}||_{{\Delta},2}{\quad}{\forall}n{\quad}{\rm such}{\quad}{\rm that}{\quad}n{\Delta}t{\leq}T.}}$$

This proves the theorem.

Remark 13.4. Should strong stability be required, the condition |γk | = 1 indicated in Theorem 13.3 is also necessary.

In the case of the upwind scheme (13.20), as

$${{|{\gamma}_{k}|^{2}=[1-|a|{\lambda}(1-{\cos}kh)]^{2}+a^{2}{\lambda}^{2}{\sin}^{2}kh,{\quad}k{\in}Z,}}$$

we obtain

$$|{\gamma _k}| \leqslant 1\quad {\text{if}}\quad \Delta t \leqslant \frac{h}{{\left| a \right|}},\quad k \in Z,$$
(13.38)

that is, the CFL condition guarantees strong stability in the ‖ · ‖ Δ, 2 norm.

Proceeding in a similar way, we can verify that (13.38) also holds for the Lax-Friedrichs scheme.

The centered backward Euler scheme BE/C instead is unconditionally strongly stable in the norm ‖ · ‖Δ,2, as |γk | = 1 for each k and for each possible choice of Δt and h, as we previously obtained in Theorem 13.2 by following a different procedure.

In the case of the centered forward Euler method FE/C we have

$${{|{\gamma}_{k}|^{2}=1+{a^{2}{\Delta}t^{2} \over{h^{2}}}{\rm sin}^{2}(kh){\leq}1+{a^{2}{\Delta}t^{2} \over{h^{2}}},{\quad}k {\in}Z.}}$$

If ß > 0 is a constant such that

$$\Delta t \leqslant \beta \frac{{{h^2}}}{{{a^2}}}$$
(13.39)

then k| = (1 + ß Δt)1/2. Hence, applying Theorem 13.3 (with m = 2) we deduce that the FE/C scheme is stable, albeit with a more restrictive CFL condition, as previously obtained following a different path in Theorem 13.2.

We can find a strong stability condition for the centered forward Euler method applied to the transport-reaction equation

$${{{{\partial}u \over{{\partial}t}}+a{{\partial}u \over{{\partial}x}}+a_{0}u=0,}}$$
(13.40)

with a 0 > 0. In this case we have for each k ∈ ℤ

$${{|{\gamma}_{k}|^{2}=1-2a_{0}{\Delta}t+{\Delta}t^{2}a^{2}_{0}+{\lambda}^{2}{\rm sin}^{2}(kh){\leq}1-2a_{0}{\Delta}t+{\Delta}t^{2}a^{2}_{0}+\Bigg({a{\Delta}t \over{h}}\Bigg)^{2},}}$$

and thus the scheme is strongly stable in the || . ||Δ,2 norm under the condition

$${{{\Delta}t<{2a_{0} \over{a^{2}_{0}+h^{-2}a^{2}}}.}}$$
(13.41)

Example 13.1. In order to verify numerically the stability condition (13.41), we have considered equation (13.40) in the interval (0, 1) with periodic boundary conditions. We have chosen a = a 0 = 1 and the initial datum u 0 equal to 2 in the interval (1/3, 2/3) and 0 elsewhere. As the initial datum is a square wave, its Fourier expansion has all its a k coefficients not null. On the right of Fig. 13.4, we report ‖u n‖ Δ,2 in the time interval (0, 2.5) for two values of Δt, one larger and one smaller than the critical value Δt* = 2/(1+h -2), provided by (13.41). Note that for Δt < Δt* the norm is decreasing, while, in the opposite case, after an initial decrease it grows exponentially. Fig. 13.5 shows the result for a 0 = 0 obtained with FE/C using the same initial datum. In the figure on the left, we display the behaviour of ‖u n‖ Δ,2 for different values of h and using Δt = 10h 2, that is varying the time step based on the restriction provided by inequality (13.39) and taking ß = 10. Note how the norm of the solution remains bounded for decreasing values of h. On the right-hand side of the same figure, we illustrate the result obtained for the same values of h taking as condition Δt = 0.1h, which corresponds to a constant CFL number equal to 0.1. In this case, the discrete norm of the numerical solution blows up as h decreases, as expected. ¦

Fig. 13.4.
figure 4

The figure on the right displays the behaviour of ‖u n Δ,2, where u n is the solution of equation (13.40) (with a = a 0 = 1) obtained using the FE/C method, for two values of Δt, one smaller and one greater than the critical value Δt*. On the left, the initial datum used

Fig. 13.5.
figure 5

Behaviour of ‖u n Δ,2 where u n is the solution obtained using the FE/C method for a 0 = 0 and for different values of h. On the left, the case where Δt satisfies the stability condition (13.39). On the right, the results obtained by maintaining the CFL number constant and equal to 0.1, violating condition (13.39)

4.4 13.4.4 Dissipation and dispersion

Besides allowing to enquire about the stability of a numerical scheme, the analysis of the amplification coefficients is also useful to study its dissipation and dispersion properties.

To clarify the matter better, let us consider the exact solution of problem (13.1); for such solution, we have the following relation

$${{u(x,t^{n})=u_{0}(x-an{\Delta}t),{\quad}n{\geq}0,{\quad}x{\in}R,}}$$

with t n = nΔt. In particular, using (13.35) we obtain

$$u\left( {{x_j},{t^n}} \right) = \sum\limits_{k = - \infty }^\infty {{\alpha _k}{e^{ikjh}}{{\left( {{g_k}} \right)}^n}with\quad {g_k} = {e^{ - iak\Delta t}}.} $$
(13.42)

Comparing (13.42) with (13.36) we can note that the amplification coefficient γ k (generated by the specific numerical scheme) is the correspondent of g k.

We observe that |g k| = 1 for each k ∈ ℤ, while k| = 1 in order to guarantee the strong stability of the scheme. Thus, γ k is a dissipative coefficient. The smaller |γ k | is, the larger will be the reduction of the amplitude a k and, consequently, the larger will be the dissipation of the numerical scheme.

The ratio \({{{\varepsilon}_{a}(k)={|{\gamma}_{k}| \over{|g_{k}|}}}}\) is called amplification error (or dissipation error) of the k-th harmonic associated to the numerical scheme (and in our case it coincides with the amplification coefficient).

Having set

$${{{\phi}_{k}=kh,}}$$

as kΔt = λ k we obtain

$${{gk=e^{-ia{\lambda}{\phi}_{k}}.}}$$
(13.43)

The real number ϕ k, here expressed in radians, is called phase angle of the k-th har¬monic. We rewrite γ k in the following way

$${{{\gamma}_{k}=|{\gamma}_{k}|e^{-i{\omega}{\Delta}t}=|{\gamma}_{k}|e^{-i{{\omega} \over{k}}{\lambda}{\phi}_{k}},}}$$

and comparing such relation to (13.43), we can deduce that the ratio \({{{{\omega}\over{k}}}}\) represents the propagation rate of the numerical scheme, relatively to the k-th harmonic. The ratio

$${{{\varepsilon}_{d}(k)={{\omega} \over{ka}}={{\omega}h \over{{\phi}_{k}a}}}}$$

between the numerical propagation and the propagation a of the exact solution is called dispersion error ε d relative to the k-th harmonic.

The amplification (or dissipation) error and the dispersion error for the numerical schemes analyzed up to now are function of the phase angle ϕ k and of the CFL number , as reported in Fig. 13.6. For symmetry reasons we have considered the interval 0 ≤ ϕ kπ and we have used degrees instead of radians on the x-axis to indicate ϕ k. Note how the forward/centered Euler scheme gives a curve of the amplification factor with values above one for all the CFL schemes we have considered, in accordance with the fact that such scheme is never strongly stable.

Fig. 13.6.
figure 6

Amplification and dispersion errors for different numerical schemes in terms of the phase angle ϕ k = kh and for different values of the CFL number

Example 13.2. In Fig. 13.7 we compare the numerical results obtained by solving equation (13.1) with a = 1 and initial datum u 0. The solutions are composed by a packet of two sinusoidal waves of equal length l centered at the origin (x = 0). In the figures on the left l = 20h, while in the right ones we have l = 8h. As \({{k={2{\pi} \over{l}}}}\), we have \({{{\phi}_{k}={2{\pi} \over{l}}h}}\) and therefore the values of the phase angle of the wave packet are ϕ k = π/20 on the left and ϕ k = p/8 on the right. The numerical solution has been computed for the value 0.75 of the CFL number, using the different (stable) schemes illustrated previously. We can note how the dissipative effect is very strong at high frequencies (ϕ k = p/4) and in particular for the first-order upwind, backward/centered Euler and Lax-Friedrichs methods.

Fig. 13.7.
figure 7

Numerical solution of the convective transport equation of a sine wave packet with different wavelengths (l = 20h left, l = 8h right) obtained with different numerical schemes. The numerical solution for t = 1 is displayed by the solid line, while the exact solution at the same time instant is displayed by the dashed line

In order to appreciate the dispersion effects, the solution for ϕ k = π/4 after 8 time steps is reported in Fig. 13.8. We can note how the Lax-Wendroff method is the least dissipative. Moreover, by observing attentively the position of the numerical wave crests with respect to those of the numerical solution, we can verify that the Lax-Friedrichs method features a positive dispersion error. Indeed, the numerical wave anticipates the exact one. The upwind method is also weakly dispersive for a CFL number equal to 0.75, while the dispersion of the Lax-Friedrichs and backward Euler methods is evident (even after only 8 time steps!). ¦

Fig. 13.8.
figure 8

Numerical solution of the convective transport of a packet of sinusoidal waves. The solid line represents the solution after 8 time steps. The etched line represents the corresponding exact solution at the same time level

5 13.5 Equivalent equations

To each numerical scheme, we can associate a family of differential equations, called equivalent equations.

5.1 13.5.1 The upwind scheme case

Let us first focus on the upwind scheme. Suppose there exists a regular function v(x,t) satisfying the difference equation (13.20) at each point (x,t) → ℝ × ℝ+ (and not only at the grid nodes (x j,t n)!). We can then write (in the case where a > 0)

$${{{v(x,t+{\Delta}t)-v(x,t) \over{{\Delta}t}}+a{v(x,t)-v(x-h,t) \over{h}}=0.}}$$
(13.44)

Using the Taylor expansions with respect to x and t relative to the point (x, t) and supposing that v is of class C 4 with respect to x and t, we can write

$${{\matrix{{v(x,t+{\Delta}t)-v(x,t) \over{{\Delta}t}}=v_{t}+{{\Delta}t \over{2}}v_{tt}+{{\Delta}t^{2} \over{6}}v_{ttt}+({\cal O}{\Delta}t^{3}),\cr a{v(x,t)-v(x-h,t) \over{h}}=av_{x}-{ah \over{2}}v_{xx}+{ah^{2} \over{6}}v_{xxx}+{\cal O}(h^{3}),\cr} }}$$

where the right-hand side derivatives are all evaluated at (x, t). Thanks to (13.44) we deduce that, at each point (x, t), the function v satisfies the relation

$${v_t} + a{v_x} = {R^U} + \mathcal{O}\left( {\Delta {t^3} + {h^3}} \right),$$
(13.45)

with

$${{R^{U}={1 \over{2}}(ah{\sl v}_{xx}-{\Delta}t{\sl v}_{tt})-{1 \over{6}}(ah^{2}{\sl v}_{xxx}+{\Delta}t^{2}{\sl v}_{ttt}).}}$$

Formally differentiating such equation in t, we find

$${{{\sl v}_{tt}+a{\sl v}_{xt}=R^{U}_{t}+{\cal O}({\Delta}t^{3}+h^{3}).}}$$

Instead, differentiating it in x, we have

$${v_{xt}} + a{v_{xx}} = R_x^U + \mathcal{O}\left( {\Delta {t^3} + {h^3}} \right).$$
(13.46)

Hence

$${v_{tt}}{a^2}{v_{xx}} + R_t^U - aR_x^U + \mathcal{O}\left( {\Delta {t^3} + {h^3}} \right),$$
(13.47)

which allows to obtain from (13.45)

$${v_t} + a{v_x} = \mu {v_{xx}} - \frac{1}{6}\left( {a{h^2}{v_{xxx}} + \Delta {t^2}_{ttt}} \right) - \frac{{\Delta t}}{2}\left( {R_t^U - aR_x^U} \right) + \mathcal{O}\left( {\Delta {t^3} + {h^3}} \right),$$
(13.48)

having set

$${{{\mu}={1 \over{2}}ah(1-(a{\lambda}))}}$$
(13.49)

and, as usual, λ = Δt/h. Now, differentiating (13.47) with respect to t formally, and (13.46) with respect to x, we find

$$\begin{array}{*{20}{c}} {{v_{ttt}} = {a^2}{v_{xxt}} + R_{tt}^U - aR_{xt}^U + \mathcal{O}\left( {\Delta {t^3} + {h^3}} \right)} \\ { = - {a^3}{v_{xxx}} + {a^2}R_{xx}^U + R_{tt}^U - aR_{xt}^U + \mathcal{O}\left( {\Delta {t^3} + {h^3}} \right).} \end{array}$$
(13.50)

Moreover, we have that

$$\begin{array}{*{20}{c}} {R_t^U = \frac{1}{2}ah\,{v_{xxt}} - \frac{{\Delta t}}{2}{v_{ttt}} - \frac{{a{h^2}}}{6}{v_{xxxt}} - \frac{{\Delta {t^2}}}{6}{v_{ttt}},} \\ {R_x^U = \frac{1}{2}ah\,{v_{xxx}} - \frac{{\Delta t}}{2}{v_{ttx}} - \frac{{a{h^2}}}{6}{v_{xxx}} - \frac{{\Delta {t^2}}}{6}{v_{tttx}}.} \end{array} $$
(13.51)

Using relations (13.50) and (13.51) in (13.48) we obtain

$$\begin{array}{*{20}{c}} {{v_t} + a{v_x} = \mu {v_{xx}} - \frac{{a{h^2}}}{6}\left( {1 - \frac{{{a^2}\Delta {t^2}}}{{{h^2}}} - \frac{{3a\Delta t}}{{2h}}} \right){v_{xxx}}} \\ { + \underbrace {\frac{{\Delta t}}{4}(\Delta t{v_{ttt}} - ah\,{v_{xxt}} - a\Delta t\,{v_{ttx}})}_{({\text{A}})}} \\ { + \frac{{\Delta t}}{{12}}\left( {\Delta {t^2} - a\Delta {t^2}{v_{ttx}} + a{h^2}{v_{xxxt}} - {a^2}{h^2}{v_{xxx}}} \right)} \\ { - \frac{{{a^2}\Delta {t^2}}}{6}R_{xx}^U - \frac{{\Delta {t^2}}}{6}R_{tt}^U + a\frac{{\Delta {t^2}}}{6}R_{xt}^U + \mathcal{O}\left( {\Delta {t^3} + {h^3}} \right).} \end{array} $$
(13.52)

Let us now focus on the third derivatives of v contained in the term (A). Thanks to (13.50), (13.46) and (13.47), respectively, we find:

$${{\matrix{{\sl v}_{ttt}=-a^{3}{\sl v}_{xxx}+r_{1},\cr {\sl v}_{xxt}=-a{\sl v}_{xxx}+r_{2},\cr {\sl v}_{ttx}=a^{2}{\sl v}_{xxx}+r_{3},\cr} }} $$

where r 1, r 2 and r 3 are terms containing derivatives of v of order no less than four, as well as terms of order \({\cal O}({\sl \Delta}t^{3}+h^{3})\)(Δt 3 + h 3). (Note that it follows from the definition of R U that its derivatives of order two are expressed through derivatives of v of order no less than four.) Regrouping the coefficients that multiply v xxx, we therefore deduce from (13.52) that

$${v_t} + a{v_x} = \mu {v_{xx}} + v{v_{xxx}} + {R_4}\left( v \right) + \mathcal{O}\left( {\Delta {t^3} + {h^3}} \right),$$
(13.53)

having set

$$v = - \frac{{a{h^2}}}{6}(1 - 3a\lambda + 2{(a\lambda )^2}),$$
(13.54)

and having indicated with R 4(v) the set of terms containing the derivatives of v of order at least four.

We can conclude that the function v satisfies, respectively, the equations:

$${v_t} + a{v_x} = 0$$
(13.55)

if we neglect the terms containing derivatives of order above the first;

$${v_t} + a{v_x} = \mu {v_{xx}}$$
(13.56)

if we neglect the terms containing derivatives of order above the second;

$${v_t} + a{v_x} = \mu {v_{xx}} + v{v_{xxx}}$$
(13.57)

if we neglect the derivatives of order above the third. The coefficients µ and v are in (13.49) and (13.54). Equations (13.55), (13.56) and (13.57) are called equivalent equations (at the first, second resp. third order) relative to the upwind scheme.

5.2 13.5.2 The Lax-Friedrichs and Lax-Wendroff case

Proceeding in a similar way, we can derive the equivalent equations of any numerical scheme. For instance, in the case of the Lax-Friedrichs scheme, having denoted by v a hypothetic function that verifies equation (13.16) at each point (x, t), having observed that

$${{\matrix{{1 \over{2}}({\sl v}(x+h,t)+{\sl v}(x-h,t))={\sl v}+{h^{2} \over{2}}{\sl v}_{xx}+{\cal O}(h^{4}),\cr{\qquad}{1 \over{2}}({\sl v}(x+h,t)-{\sl v}(x-h,t))=h{\sl v}_{x}+{h^{3} \over{6}}{\sl v}_{xxx}+{\cal O}(h^{4}}}}$$

we obtain

$${v_t} + a{v_x}{R^{LF}} + \mathcal{O}\left( {\frac{{{h^4}}}{{\Delta t}} + \Delta {t^3}} \right),$$
(13.58)

having set

$${{R^{LF}={h^{2} \over{2{\Delta}t}}({\sl v}_{xx}-{\lambda}^{2}{\sl v}_{tt})-{ah^{2} \over{6}}({\sl v}_{xxx}+{{\lambda}^{2} \over{a}}{\sl v}_{ttt}).}}$$

Proceeding as we did previously, tedious computation allows us to deduce from (13.58) the equivalent equations (13.55)(13.57), in this case having

$${{{\mu}={h^{2} \over{2{\Delta}t}}(1-(a{\lambda})^{2}),{\quad}{\sl v}={ah^{2} \over{3}}(1-(a{\lambda})^{2}).}}$$

In the case of the Lax-Wendroff scheme, the equivalent equations are characterized by the following parameters

$${{{\mu}=0,{\quad}{\sl v}={ah^{2} \over{6}}((a{\lambda})^{2}-1).}}$$

5.3 13.5.3 On the meaning of coefficients in equivalent equations

In general, in the equivalent equations the term µv xx represents a dissipation, while vv xxx represents a dispersion. We can provide a heuristic proof of this by examining the solution to the problem

$$\left\{ {\begin{array}{*{20}{c}} {{v_t} + a{v_x} = \mu {v_{xx}} + v{v_{xxx}},\quad x \in R,t > 0,} \\ {v\left( {x,0} \right) = {e^{ikx}},\quad \quad \quad \quad k \in Z.} \end{array} } \right.$$
(13.59)

By applying the Fourier transform we find, if µ = v = 0,

$${{{\sl v}(x,t)=e^{ik(x-at)},}}$$

while for µ and v arbitrary real numbers (with µ > 0) we have

$${{v(x,t)=e^{-{\mu}k^{2}t}e^{ik[x-(a+vk^{2})t]}.}}$$

Comparing these two relations, we see that for growing µ the modulus of the solution gets smaller. Such effect becomes more remarkable as the frequency k increases (a phenomenon we have already registered in the previous section, albeit with partly different arguments).

The term µv xx in (13.59) therefore has a dissipative effect on the solution. In turn, v modifies the propagation rate of the solution, increasing it in the v > 0 case, and decreasing it if v < 0. Also in this case, the effect is more notable at high frequencies. Hence, the third derivative term vv xxx introduces a dispersive effect.

In general, in the equivalent equation, even-order spatial derivatives represent diffusive terms, while odd-order derivatives represent dispersive terms. For first-order schemes (such as the upwind scheme) the dispersive effect is often barely visible, as it is disguised by the dissipative one. Taking Δt and h of the same order, from (13.56) and (13.57) we evince that v « µ for h → 0, as v = O(h 2) and µ = O(h). In particular, if the CFL number is \({1\over 2}\), the third-order equivalent equation of the upwind method features a null dispersion, in accordance with the numerical results seen in the previous section.

Conversely, the dispersive effect is evident for the Lax-Friedrichs scheme, as well as for the Lax-Wendroff scheme which, being of second order, does not feature a dissipative term of type µv xx. However, being stable, the latter cannot avoid being dissipative. Indeed, the fourth-order equivalent equation for the Lax-Wendroff scheme is

$${{{\sl v}_{t}+a{\sl v}_{x}={ah^{2} \over{6}}[(a{\lambda})^{2}-1]{\sl v}_{xxx}-{ah^{3} \over{6}}a{\lambda}[1-(a{\lambda})^{2}]{\sl v}_{xxxx},}}$$

where the last term is dissipative if |aλ| < 1, as one can easily verify by applying the Fourier transform. We then recover, also for the Lax-Wendroff scheme, the CFL condition.

5.4 13.5.4 Equivalent equations and error analysis

The technique applied to obtain the equivalent equation denotes a strong analogy with the so-called backward analysis that we encounter during the numerical solution of linear systems, where the computed (not exact) solution is interpreted as the exact solution of a perturbed linear system (see [QSS07, Chap. 3]). As a matter of fact, the perturbed system plays a similar role to that of the equivalent equation.

Moreover, we observe that an error analysis of a numerical scheme can be carried out by using the equivalent equation associated to it. Indeed, by generically denoting by r = µv xx + vv xxx the right-hand side of the equivalent equation, by comparison with (13.1) we obtain the error equation

$${{e_{t}+ae_{x}=r,}}$$

where e = v - u. Multiplying such equation by e and integrating in space and time (between 0 and t) we obtain

$${{||e(t)||_{L^{2}(R)}{\leq}C(t) \biggr(||e(0)||_{L^{2}(R)}+\sqrt {{\int}^{t}_{0}||r(s)||{2 \atop{L^{2}}}(R)ds} \biggr),{\quad}t>0}}$$

having used the a priori estimate (13.4). We can assume e(0) = 0 and therefore observe that ‖e(t )‖L2(ℝ) tends to zero (for h and Δt tending to zero) with order 1 for the upwind or Lax-Friedrichs schemes, and with order 2 for the Lax-Wendroff scheme (having supposed v to be sufficiently regular).

6 13.6 Exercises

  1. 1.

    Verify that the solution to the problem (13.9)(13.10) (with f = 0) satisfies identity (13.11).

    [Solution: Multiplying (13.9) by u t and integrating in space we obtain

    $$0 = \int\limits_\alpha ^\beta {{u_{tt}}{u_t}\,dx - } \int\limits_\alpha ^\beta {{\gamma ^2}{u_{xx}}{u_t}\,dx = \frac{1}{2}\int\limits_\alpha ^\beta {{{\left[ {{{\left( {{u_t}} \right)}^2}} \right]}_t}dx + \int\limits_\alpha ^\beta {{\gamma ^2}{u_x}{u_{xt}}dx - \left[ {{\gamma ^2}{u_x}{u_t}} \right]_\alpha ^\beta .} } } $$
    (13.60)

    As

    $${{{\mathop{\int}^{{\beta}}_{{\alpha}}}{\sl u}_{tt}{\sl u}_{t}dx={1 \over{2}}{\mathop{\int}^{{\beta}}_{{\alpha}}}[({\sl u}_{t})^{2}]_{t} dx= {\rm and} {\mathop{\int}^{{\beta}}_{{\alpha}}}{\gamma}^{2}{\sl u}_{x}{\sl u}_{xt}dx={1 \over{2}}{\mathop{\int}^{{\beta}}_{{\alpha}}}{\gamma}^{2}[({\sl u}_{x})^{2}]_{t}dx,}}$$

    integrating (13.60) in time we have

    $$\int\limits_\alpha ^\beta {y_t^2\left( t \right)dx + \int\limits_\alpha ^\beta {{\gamma ^2}u_x^2\left( t \right)dx - \int\limits_\alpha ^\beta {v_0^2dx - \int\limits_\alpha ^\beta {u_{0x}^2dx = 0.} } } }$$
    (13.61)

    Hence (13.11) immediately follows from the latter relation.]

  2. 2.

    Verify that the solution provided by the backward/centered Euler scheme (13.22) is unconditionally stable; more precisely,

    $${{||{\bf u}||_{{\Delta},2}{\leq}||{\bf u}^{0}||_{{\Delta},2}{\qquad}{\forall}{\Delta}t,h>0.}}$$

    [Solution: Note that, thanks to (13.32),

    $${{(u^{n+1}_{j}-u^{n}_{j})u^{n+1}_{j}{\geq}{1 \over{2}} \bigg(|u^{n+1}_{j}|^{2}-|u^{n}_{j}|^{2} \bigg){\quad}{\forall}j,n.}}$$

    Then, multiplying (13.22) by \({{{\sl u}^{n+1}_{j}}}\), summing over the index j and using (13.33) we find

    $${{{\mathop{\sum}_{j}}|u^{n+1}_{j}|^{2}{\leq}{\mathop{\sum}_{j}}|u^{n}_{j}|^{2}{\quad}{\forall}n{\geq}0,}}$$

    from which the result follows.]

  3. 3.

    Prove (13.30)

    [Solution: We note that, in the case where a > 0, the upwind scheme can be rewritten in the form

    $${{u^{n+1}_{j}=(1-a{\lambda})u^{n}_{j}+a{\lambda}u^{n}_{j-1}.}}$$

    Under hypothesis (13.28) both coefficients and 1 - aλ are non-negative, hence

    $${{{\rm min}({\sl u}^{n}_{j}, {\sl u}^{n}_{j-1}){\leq}{\sl u}^{n+1}_{j}{\leq}{\rm max}({\sl u}^{n}_{j}, {\sl u}^{n}_{j-1}).}}$$

    Then

    $${{{\mathop{{\rm inf}}_{l{\in}Z}} \{u^{0}_{l} \}{\leq}u^{n}_{j}{\leq}{\mathop{{\rm sup}}_{l{\in}Z}} \{u^{0}_{l} \}{\quad}{\forall}j{\in}Z,{\quad}{\forall}n{\geq}0,}}$$

    from which (13.30) follows.]

  4. 4.

    Study the accuracy of the Lax-Friedrichs scheme (13.16) for the solution of problem (13.1).

  5. 5.

    Study the accuracy of the Lax-Wendroff scheme (13.18) for the solution of problem (13.1).