ISNM International Series of Numerical Mathematics Volume 159 Managing Editors: K.-H. Hoffmann, München G. Leugering, Erlangen-Nürnberg Associate Editors: Z. Chen, Beijing R. H. W. Hoppe, Augsburg / Houston N. Kenmochi, Chiba V. Starovoitov, Novosibirsk
Honorary Editor: J. Todd, Pasadena †
Exact and Truncated Difference Schemes for Boundary Value ODEs Ivan P. Gavrilyuk Martin Hermann Volodymyr L. Makarov Myroslav V. Kutniv
Ivan P. Gavrilyuk Staatliche Studienakademie Thüringen Berufsakademie Eisenach (University of Cooperative Education) Am Wartenberg 2 99817 Eisenach Germany
[email protected] Martin Hermann Friedrich Schiller University Institute of Applied Mathematics Ernst-Abbe-Platz 2 07743 Jena Germany
[email protected] Volodymyr L. Makarov National Academy of Sciences of Ukraine Institute of Mathematics Tereshchenkivska 3 01601 Kiev-4 Ukraine
[email protected] Myroslav V. Kutniv Lviv Polytechnical National University Institute of Applied Mathematics S. Bandery 12 79013 Lviv Ukraine
[email protected] ISBN 978-3-0348-0106-5 e-ISBN 978-3-0348-0107-2 DOI 10.1007/978-3-0348-0107-2 Library of Congress Control Number: 2011930753 2010 Mathematics Subject Classification: 65L10, 65L12, 65L20, 65L50, 65L70 © Springer Basel AG 2011 This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, re-use of illustrations, broadcasting, reproduction on microfilms or in other ways, and storage in data banks. For any kind of use whatsoever, permission from the copyright owner must be obtained. Cover design: deblik, Berlin Printed on acid-free paper Springer Basel AG is part of Springer Science+Business Media www.birkhauser-science.com
This book is dedicated to the memory of Aleksandr Andreevich Samarskii
vii
Contents Preface
ix
1 Introduction and a short historical overview
1
1.1
BVPs, Grids, Differences, Difference Schemes . . . . . . . . . . . .
2
1.2
Short history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
2 2-point difference schemes for systems of ODEs
41
2.1
Existence and uniqueness of the solution . . . . . . . . . . . . . . .
42
2.2
Existence of a two-point EDS . . . . . . . . . . . . . . . . . . . . .
52
2.3
Implementation of the 2-point EDS . . . . . . . . . . . . . . . . . .
58
2.4
A posteriori error estimation and automatic grid generation . . . .
76
3 3-point difference schemes for scalar monotone ODEs
83
3.1
Problem setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
83
3.2
Existence of a three-point EDS . . . . . . . . . . . . . . . . . . . .
87
3.3
Implementation of the three-point EDS . . . . . . . . . . . . . . . 100
3.4
Boundary conditions of 3rd kind . . . . . . . . . . . . . . . . . . . 112
3.5
Numerical examples . . . . . . . . . . . . . . . . . . . . . . . . . . 115
4 3-point difference schemes for systems of monotone ODEs
121
4.1
Problem setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
4.2
Existence of a three-point EDS . . . . . . . . . . . . . . . . . . . . 125
4.3
Implementation of the three-point EDS . . . . . . . . . . . . . . . 139
4.4
Numerical examples . . . . . . . . . . . . . . . . . . . . . . . . . . 153
viii
CONTENTS 5 Difference schemes for BVPs on the half-axis
157
5.1
Existence and uniqueness of the solution . . . . . . . . . . . . . . . 158
5.2
Existence of an EDS . . . . . . . . . . . . . . . . . . . . . . . . . . 164
5.3
Implementation of the three-point EDS . . . . . . . . . . . . . . . 174
5.4
Numerical examples . . . . . . . . . . . . . . . . . . . . . . . . . . 195
6 Exercises and solutions
203
6.1
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
6.2
Solutions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Index
239
Bibliography
241
ix
Preface Work is much more fun than fun. Noel Coward (1899–1973) In this book we present a first unified theory of finite difference methods for the solution of linear and nonlinear boundary value problems (BVPs) of ordinary differential equations (ODEs). The aim of the authors is to describe the state-ofthe-art in this important field of numerical analysis. New numerical algorithms for BVPs are developed and evaluated which have the same efficiency and accuracy as the well-known and contemporary methods for the solution of initial value problems (IVPs). Moreover, the tools from different areas of mathematics (e.g. theory of ODEs, functional analysis, theory of difference schemes, systems of nonlinear algebraic equations) are formalized and unified to construct and justify numerical methods of a high order of accuracy for BVPs. The basis of the present text is the theory of difference schemes established by the famous Russian mathematician Aleksandr Andreevich Samarskii. Some of the authors were Samarskii’s students. The new class of exact and truncated difference schemes treated in this book can be considered as further developments of the results presented in his highly respected books [71, 72, 75]. It is shown that the new Samarskii-like techniques open horizon for the numerical treatment of more complicated problems. The main focus of this text is the theory of numerical methods for BVPs that are based on the exact difference schemes (EDS) as well as on the well-studied and sophisticated solvers for IVPs. The EDS themselves are only of theoretical interest. However, they are used as a starting point for the construction of so-called truncated difference schemes (TDS) suitable for implementation on a computer. It is shown that the combination of the EDS with the modern IVP-solvers results in numerical TDS-algorithms which are highly efficient. The theory of the EDS and TDS permits the construction of a posteriori error estimators which in turn are the basis for adaptive algorithms. The EDS/TDS and the well-known multiple shooting methods (see e.g. [35, 39, 40, 79, 84]) are based on similar concepts. However, compared with the shooting methods, the advantage of the new EDS and TDS algorithms is their detailed
x
Preface theoretical analysis and the possibility of estimating the error of the approximated solution by suitable a priori and a posteriori estimators. The reason for that is the good conformity of the structure of the difference equations with the original differential equations. The book is addressed to graduate students of mathematics and physics, as well as to working scientists and engineers as a self-study tool and reference. Researchers dealing with BVPs will find appropriate and effective numerical algorithms for their needs. The book can be used as a textbook for a one- or two-semester course on numerical methods for ODEs. Advanced calculus, basic numerical analysis, some ordinary differential equations, and a smattering of nonlinear functional analysis are assumed. Mathematically experienced engineers and scientists who are only interested in the practical use of the algorithms on a computer can skip without loss of understanding, the proofs of the theorems and the more theoretical parts of the book. We now outline the contents of the book. The introductionary chapter is designed to acquaint the reader with some types of difference schemes that occur in the literature. This historical overview places the book in a proper perspective. Chapter 2 deals with BVPs for systems of first-order nonlinear ODEs on a finite interval. The existence of two-point EDS on an arbitrary non-equidistant grid is shown and its structure is described. These EDS are the basis for the construction of two-point TDS with an order of accuracy which can be given by the user. For the computation of the coefficients of these schemes (which represent systems of nonlinear equations) the well-known IVP-solvers (see e.g. [31, 8]) are used. Its accuracy defines the accuracy of the TDS. Two a posteriori error estimators (which are based on the Runge principle and on embedded IVP-solvers) are proposed along with appropriate grid generators. Some numerical examples confirming the theoretical results are given. Chapter 3 is devoted to BVPs for second-order nonlinear ODEs with a monotone operator. The appropriate EDS and TDS are constructed, theoretically analyzed and practically tested. In Chapter 4 the results of Chapter 3 are generalized to BVPs for systems of second-order nonlinear ODEs with monotone operators. The developed algorithms have been tested on a variety of numerical examples. The corresponding results indicate a good conformity with the theoretical predictions. Chapter 5 gives some results on EDS and TDS for BVPs on the half-axis. These techniques are a real alternative to those methods which are based on transformation of the original problems into a singular BVP on a finite interval, and the subsequent solution of this singular problem by various special approaches. The results of some numerical examples are presented. The knowledge gained with this book can be checked in Chapter 6 where 32 exercises and the corresponding solutions are given. Some Fortran codes of the numerical methods presented in this book can be obtained from the authors. Acknowledgment. The authors thank Dr. Dieter Kaiser for interesting comments and suggestions. Many thanks also to Ivo Hedtke for his assistence concerning
Preface the preparation in LATEX. We gratefully acknowledge the financial support provided by the German Research Foundation (DFG) for our joint research projects. Our thanks also go to all persons and institutions of the Friedrich Schiller University at Jena that have supported the stays of our colleagues from the Ukraine. We especially wish to thank our wives for tolerating the (many) years of effort that have gone into writing of this book. It has been a pleasure working with the Birkh¨auser Basel publication staff, in particular Dr. Barbara Hellriegel.
May 2011,
IPG, MH, MVK and MLM
xi
1
Chapter 1
Introduction and a short historical overview He who never starts, never finishes. William Shakespeare (1564–1616) One of the important fields of application for modern computers is the numerical solution of diverse problems arising in science, engineering, industry, etc. Here, mathematical models have to be solved which describe e.g. natural phenomena, industrial processes, nonlinear vibrations, nonlinear mechanical structures or phenomena in hydrodynamics and biophysics. A lot of such mathematical models can be formulated as initial value problems (IVPs) or boundary value problems (BVPs) for systems of nonlinear ordinary differential equations (ODEs). However, it is not possible in general to determine the solution of nonlinear problems in a closed form. Therefore the exact solution must be approximated by numerical techniques. Considerable progress has been made in developing the theory and numerical analysis of IVPs and there exist many effective IVP-solvers (see e.g. [8, 31, 32, 35]). On the other hand, there are no references in current literature providing a general approach that allows the construction of difference schemes and the associated algorithms of a prescribed order of accuracy for BVPs. The development and analysis of numerical methods for nonlinear BVPs that can be used to solve new classes of problems or that are better than the existing ones remains an actual problem of numerical analysis and scientific computing. In the last decade so-called compact difference schemes of a high order of accuracy were frequently used [41]. These schemes use a stencil consisting of k + 1 grid nodes for ODEs of the order k. An important property of compact difference schemes is their low complexity, i.e. the computational costs for their solution are low. On the other hand, if the order of accuracy is high enough these difference I.P. Gavrilyuk et al., Exact and Truncated Differences Schemes for Boundary Value ODEs, International Series of Numerical Mathematics 159, DOI 10.1007/978-3-0348-0107-2_1, © Springer Basel AG 2011
1
2
Chapter 1. Introduction and a short historical overview schemes produce very accurate approximations on relatively rough grids. Finally, it was shown in [41] that the compactness of a difference scheme implies its stability. The aim of this book is to provide an overview of the theoretical and numerical state of research on compact difference schemes of a high order of accuracy (prescribed by the user) for nonlinear BVPs on finite intervals and on the half axis. Since the given problems and the corresponding difference schemes are nonlinear, our analysis uses the linearization technique, the principle of contracting maps and the theory of monotone operators. All of our new algorithms are based on compact exact difference schemes (EDS). In order to determine the coefficients and the right-hand side of an EDS at an arbitrary node of the underlying grid, some auxiliary IVPs on a small interval around this node must be solved. The existence and uniqueness of the solutions of the EDS is proven. Effective implementations of the EDS which are based on so-called compact truncated difference schemes (TDS) and on the well-studied robust IVP-solvers are developed. The convergence of the associated iteration methods (fixed point iteration, Newton’s iteration) is shown. The effectiveness of the proposed approaches is illustrated by a series of numerical examples. Note that the theory of numerical methods for IVPs is already very advanced today. A variety of reliable and effective implementations of these methods is available. They can be used to solve non-stiff as well as stiff IVPs. In this monograph the authors will show how numerical algorithms for BVPs can be constructed which have the same accuracy and performance level as the modern IVP-solver. The idea is to use an IVP-solver of the order p to obtain a difference scheme for BVPs of the same order p.
1.1
BVPs, Grids, Differences, Difference Schemes
Without loss of generality, in the following we consider [0, 1] as the basic interval. To develop a difference scheme some grid points or nodes x0 , . . . , xN have to be chosen in [0, 1] which define a grid ωh . Definition 1.1. In this text the following grids are used: • the equidistant (uniform) grid on [0, 1]: def
ω ¯ h = {xj ∈ [0, 1],
xj = j h,
j = 0, 1, . . . , N } ,
(1.1)
where h = 1/N is the constant step-size. Moreover, we introduce the following sub-grids of ω ¯h: def
j = 1, 2, . . . , N − 1} ,
ωh+ = {xj = jh,
def
j = 1, 2, . . . , N } ,
def ωh− =
j = 0, 1, . . . , N − 1} ,
ωh = {xj = jh,
def
{xj = jh,
γh = {x0 = 0,
(1.2)
xN = 1} ;
1.1. BVPs, Grids, Differences, Difference Schemes • the non-equidistant (irregular) grid on [0, 1]: ˆ¯ h def ω = {xj ∈ [0, 1],
x0 = 0, xN = 1, xj = xj−1 + hj ,
where hj > 0 is the local step-size and h1 + h2 + · · · + hN def
j = 1, . . . , N }, (1.3) = 1. In the case of
T
a non-equidistant grid we set h = (h1 , h2 , . . . , hN ) and define def
h = khk∞ = max hj 1≤j≤N
1/2 N X def or h = khk2 = h2j . j=1
The corresponding sub-grids are def ˆ ω ˆ h = {xj ∈ ω ¯h,
j = 1, 2, . . . , N − 1},
def
j = 1, 2, . . . , N },
def
j = 0, 1, . . . , N − 1};
ˆ ω ˆ h+ = {xj ∈ ω ¯h, ˆ ω ˆ h− = {xj ∈ ω ¯h,
(1.4)
• the quasi-uniform grid (N) (N ) ˆ¯ def ω = {xj = ξ(tj ) ∈ (0, 1),
j = 0, 1, . . . , N },
(1.5)
where x = ξ(t) : t ∈ [0, 1] → x ∈ [0, 1] is a function such that ξ(t) ∈ C2 [0, 1], (N ) ξ 0 (t) ≥ ε > 0 and the grid consisting of the nodes tj = i/N is equidistant with the step-size τ = i/N . Under these assumptions we have for the (N ) (N ) (N ) step-size of the grid (1.5) hi = xi − xi−1 ≈ ξ 0 (ti )/N and it holds that (N)
hi − hi−1 ≈ ξ 00 (ti )/N 2 , i.e. the difference between two neighboring stepsizes is much smaller than the step-size itself so that they are almost equal. (N ) (N) On the other hand, the quotient of two remote steps hi /hj ≈ ξ 0 (ti )/ξ 0 (tj ) might be rather large. In order to densify a quasi-uniform grid one should choose a denser t-grid or, which is the same, N should be increased. For example, if for a given function less emphasis is placed near the center of the underlying interval (0, 1) and more emphasis when x is near the boundary points 0 and 1, one can choose x = eαt − 1 (eα − 1) . Obviously, for α > 0 the x-grid is denser on the left end and for α < 0 it is denser on the right end. The step-sizes build a geometric progression with def def the quotient q = hi /hi−1 = eα/N . The quotient q˜ = h1 /hN ≈ eα can be rather large for large values of α.
Since it is only possible to work with discrete values of a function u(x) on a computer we need the concept of the discretization of u(x).
3
4
Chapter 1. Introduction and a short historical overview Definition 1.2. The discretization of a function u(x), 0 ≤ x ≤ 1, is the projection ˆ of u(x) onto the underlying grid ω ¯ h . The result is a sequence {u(xj )}N j=0 , with ˆ¯ h . A function which is only defined on a grid is called a grid function. xj ∈ ω def
To simplify the representation we use the abbreviation uj = u(xj ). If u(x) denotes the exact solution of a BVP, the aim of each numerical method is to def def determine an approximated grid function yh = y = {yj }N j=0 , with yj ≈ uj . The set of grid functions forms a linear space Hh . If a grid contains only a finite number of nodes, then the corresponding space is finite-dimensional. Its dimension is equal to the number of grid points. The development of difference schemes for BVPs is based on the approximation of the derivatives by divided differences which are defined recursively. Definition 1.3. The (backward) divided difference of first order is def
def
ux¯,j = ux¯ (xj ) =
uj − uj−1 hj
(1.6)
and the (forward) divided difference of first order (using indices) is def
def
ux,j = ux (xj ) =
uj+1 − uj . hj+1
(1.7)
A further divided difference of first order is def
uxˆ,j =
uj+1 − uj , ~j
def
~j =
hj+1 + hj . 2
(1.8)
Without the use of indices these differences can also be written in the form def
def
def
def
def
def
ux¯ = ux¯ (x) = ux = ux (x) = uxˆ = ux¯ (x) =
u(x) − u(x − h− ) , h−
h− > 0,
u(x + h+ ) − u(x) , h+
h+ > 0,
u(x + h+ ) − u(x) , ~
~=
(1.9)
h− + h+ . 2
The differences (1.6) – (1.8) are based on the 2-point stencils (xj−1 , xj ) and (xj , xj+1 ). We have the relations ux,j = ux¯,j+1 ,
ux,j =
~j uxˆ,j hj+1
which result from (1.6) – (1.8). Using the divided differences of first order we now define divided differences of second order on a 3-point stencil (xj−1 , xj , xj+1 ): 1 uj+1 − uj uj − uj−1 def 1 . (1.10) (ux,j − ux¯,j ) = − ux¯xˆ,j = ~j ~j hj+1 hj
1.1. BVPs, Grids, Differences, Difference Schemes Note, that the equidistant grid (1.1) is a special case of the non-equidistant grid (1.3) with hj ≡ h. Thus, on the equidistant grid (1.1) the divided differences take the form uj − uj−1 uj+1 − uj , ux,j = , ux¯,j = h h (1.11) 1 uj+1 − 2uj + uj−1 ux¯x,j = (ux,j − ux¯,j ) = . h h2 The other divided differences of second and higher order can be generated in the same recursive way.
There are discrete analogues of the well-known formula (uv)0 = u0 v + uv 0 for the differentiation of a product of two functions (prove it!): (uv)x¯,i = ux¯,i vi + ui−1 vx¯,i = ux¯,i vi−1 + ui vx¯,i , (uv)x,i = ux,i vi + ui+1 vx,i = ux,i vi+1 + ui vx,i ,
(1.12)
(uv)xˆ,i = uxˆ,i vi + ui+1 vxˆ,i = uxˆ,i vi+1 + ui vxˆ,i . Using the formulas (1.12) one obtains easily the partial summation formulas N −1 X
ui vxˆ,i ~i = uN vN − u0 v1 −
i=1
N X
ux¯,i vi hi ,
i=1
(1.13) N−1 X
N −1 X
i=1
i=0
ui vx¯,i hi = uN vN −1 − u0 v0 −
uxˆ,i vi ~i ,
which are the discrete analogues of the integration by parts, Z
1
uv 0 dx = uv|10 −
0
Z
1
u0 v dx.
0
Introducing the following scalar products on the space of grid function Hh which ˆ¯ h , are defined on ω def
(u, v)ωˆ h =
N −1 X
ui vi ~i ,
i=1
def
(u, v)ωˆ + =
N X
h
ui vi hi ,
(1.14)
i=1
the formulas (1.13) can be written as (u, vxˆ )ωˆ h = uN vN − u0 v1 − (ux¯ , v)ωˆ + . h
(1.15)
5
6
Chapter 1. Introduction and a short historical overview Let us consider the linear BVP L u(x) = f (x),
x ∈ (0, 1), (1.16)
l u(x) = µ(x),
x ∈ γ = {0, 1},
where L denotes a linear differential operator and l is a linear boundary operator. Assume that (1.16) is approximated by a difference scheme Lh yh (x) = ϕh (x), lh yh (x) = χh (x),
x∈ω ˆh,
(1.17)
x ∈ γh = {0, 1}.
(1.18)
Here, Lh is an appropriate difference operator and lh is a boundary difference def ˆ operator which are defined on the grid ω ˆ h ∪ γh covering the interval [0, 1], ¯h = ω and yh , ϕh , χh are grid functions. The exact solution u(x) of the BVP (1.16) does not satisfy the difference scheme (1.17), (1.18). Let uh be the projection of ˆ h . Obviously, the error zh def the solution u(x) of (1.16) onto the grid ω = yh − uh satisfies the problem Lh zh (x) = ψh (x), x ∈ ω ˆh , (1.19) lh zh (x) = νh (x), x ∈ γh , where ψh is the so-called truncation error of the discretized ODE (1.17) and νh is the truncation error of the discretized boundary condition (1.18). In the next definition the concept of consistency is introduced. Consistency is the minimum requirement that a difference scheme should fulfill. Definition 1.4. The difference scheme (1.17), (1.18) is said to be consistent of the order p if p denotes the largest positive integer such that the truncation errors satisfy kψh kωˆ h = O(hp ), kνh kγh = O(hp ), h → 0, (1.20) where k · kωˆ h and k · kγh denote appropriate grid norms. Consistency normally means that the order p ≥ 1. Another important property of a difference scheme is its stability. Definition 1.5. The difference scheme (1.17), (1.18) is stable if there exists a h0 > 0 such that for all h ≤ h0 and for arbitrary grid functions ϕh and χh problem (1.17), (1.18) possesses a unique solution and kyh kωˆ¯ h ≤ c1 kϕh kωˆ h + c2 kχh kγh , where the constants c1 , c2 do not depend on h, nor on ϕh or χh .
(1.21)
A straightforward design of difference approximations for derivatives naturally leads to consistent approximations of the underlying ODEs. However, our real objective is convergence but not consistency.
1.1. BVPs, Grids, Differences, Difference Schemes Definition 1.6. We say that the exact solution yh of the difference scheme (1.17), (1.18) converges to the exact solution u(x) of the BVP (1.16) if kzh kωˆ¯ h → 0 as ˆ¯ h = ω h → 0, where k · kωˆ¯ h denotes some grid norm on ω ˆ h ∪ γh . The difference scheme (1.17), (1.18) has the order of accuracy p if there exists an h0 > 0 such that for all h ≤ h0 it holds that kzh kωˆ¯ h = O (hp ) or kzh kωˆ¯ h ≤ c hp , where c is a constant independent of h.
The order of accuracy is also called the degree of accuracy. In the following we use both notations. The main theorem of the linear theory of difference schemes says that in the case of a stable difference scheme the order of consistency coincides with the order of accuracy, i.e. we have kyh − uh kωˆ h = O(hp ). For nonlinear problems there does not exist such a general statement. However, it is often possible to show that a nonlinear scheme is consistent and convergent. As an example for the construction of difference schemes let us consider the following nonlinear second-order BVP u00 (x) = f (x, u(x)),
x ∈ (0, 1),
u(0) = µ1 ,
u(1) = µ2 .
(1.22)
N To obtain an approximation {yj }N j=0 of the grid function {uj }j=0 of the exact solution u(x) we consider the ODE at x = xj , where xj is a node of the equidistant grid (1.1). Then we replace the second derivative u00 (xj ) on the left-hand side by the divided difference (1.11). It results in the well-known 3-point difference scheme
yj+1 − 2yj + yj−1 = f (xj , yj ), h2 y0 = µ1 ,
j = 1, 2, . . . , N − 1, (1.23)
yN = µ2 .
If the function f is sufficiently smooth, the scheme (1.23) has an order of accuracy 2, i.e. it holds that ky − ukωh = max |yj − uj | = O h2 . 1≤j≤N −1
If the accuracy of the scheme (1.23) is not sufficient for a certain application the question arises, how one can obtain a difference scheme whose order is higher than 2. There are two main approaches to answer this question. The first one is to use a difference approximation on a stencil with more than 3 points. For example, the 5-point difference scheme for the BVP (1.22), −yj+2 + 16yj+1 − 30yj + 16yj−1 − yj−2 = f (xj , yj ), (12h)2 y0 = µ1 ,
yN = µ2 ,
(1.24)
j = 1, 2, . . . , N − 1,
possesses an order of accuracy 4. This approach can be used for the construction of difference approximations of an arbitrary order. However, to enhance the order of accuracy of a scheme, the number of points used in the corresponding stencils must be increased significantly.
7
8
Chapter 1. Introduction and a short historical overview The second approach is based on the following idea. Using the Taylor expansion of the second finite difference (1.11), ux¯x,j = u00 (xj ) +
h2 (4) h4 (6) u (xj ) + u (xj ) + O(h6 ), 12 360
(1.25)
and the relation u(4) = f 00 (x, u) (see formula (1.22)), we get the difference approximation h2 yx¯x,j = f (xj , yj ) + f 00 (xj , yj ), j = 1, 2, . . . , N − 1, 12 which possesses the order of accuracy 4. Replacing the second derivative of the function f on the right-hand side by the divided difference of second order f 00 (xj , yj ) ≈
1 (f (xj+1 , yj+1 ) − 2f (xj , yj ) + f (xj−1 , yj−1 )) , h2
we obtain the well-known difference scheme of Numerov yx¯x,j =
1 [f (xj+1 , yj+1 ) + 10f (xj , yj ) + f (xj−1 , yj−1 )] , 12
y0 = µ1 ,
yN = µ2 ,
(1.26)
j = 1, 2, . . . , N − 1.
Unfortunately, the idea of the second approach cannot be extended to the construction of difference approximations of an order of accuracy higher than 4. It is still possible to replace the derivative u(6) by f (4) in formula (1.25), but there does not exist a 3-point approximation for f (4) (xj , uj ) which uses only values of the function f . Since a difference scheme for nonlinear BVPs represents a nonlinear system of algebraic equations, an iteration method is typically used to approximate its solution. The method of choice is often Newton’s method which requires at each iteration step the solution of a system of linear algebraic equations. In case of the difference scheme (1.24) the coefficient matrix of the linear system is a 5-diagonal matrix and in the case of the difference scheme (1.26) it is a tridiagonal matrix. The solution of a system of linear equations with a tridiagonal coefficient matrix by an elimination method requires 8N + 1 flops, whereas the solution of a system with a 5-diagonal coefficient matrix requires 19N − 10 flops. Thus, for the 3-point difference scheme (1.26) the amount of work is significantly lower than for the 5-point scheme (1.24). This motivates us to introduce the following definition. Definition 1.7. A difference scheme for ODEs of the order k is called compact if it uses only k + 1 values of the grid function.
For example the schemes (1.23) and (1.26) are compact whereas the scheme (1.24) is not compact. Since the growth behavior of the solution of a BVP can be very different on various subintervals of [0, 1] the step-size should be controlled automatically. For
1.1. BVPs, Grids, Differences, Difference Schemes this, instead of the grid (1.1), the non-equidistant grid (1.3) or a quasi-uniform grid has to be used and the corresponding difference approximations must be constructed on this grid. It can be proved that the 3-point difference scheme on the grid (1.3) yx¯xˆ,j = f (xj , yj ),
j = 1, 2, . . . , N − 1,
y0 = µ1 ,
yN = µ2 ,
where yx¯xˆ,j is defined in (1.10), has only the order of accuracy 1. This simple example shows that the construction of difference approximations of a high order of accuracy on non-equidistant grids is more complicated than for equidistant ones. However, compact difference schemes on non-uniform grids are of great importance for many applications. In the past there were some attempts to develop difference schemes of a high order of accuracy for special classes of BVPs. For example, in [38] a 3-point difference scheme of the order of accuracy 4 has been developed for BVPs of the form d2 u du = f (x, u), a(x) > 0, x ∈ (0, 1), a(x) 2 + b(x) dx dx u(0) = µ1 ,
u(1) = µ2 .
However, the theoretical foundation of this difference scheme is only given for the case a(x) = const > 0 and b(x) = const. For the BVP (1.22) a 3-point difference scheme of the order of accuracy 6 has been presented in [53]. But the approaches used in [38] and [53] can not be extended to general BVPs. Moreover, a disadvantage of these schemes is the use of an equidistant grid. Real progress in the direction of difference schemes for rather general BVPs whose order of accuracy can be prescribed arbitrarily has been achieved with the papers [26, 27, 42, 43, 55, 58, 59]. Here, the concept of an exact difference scheme plays an important role. Definition 1.8. A difference scheme is called exact if its solution {yj }N j=0 coincides with the grid function of the exact solution u(x) of the given BVP, i.e., yj = uj = u(xj ).
Let us construct the exact difference scheme for the BVP u00 (x) = f (x),
x ∈ (0, 1), (1.27)
u(0) = µ1 ,
u(1) = µ2 .
ˆ¯ h . As can be easily For the discretization of (1.27) we use a non-equidistant grid ω seen, the solution of the BVP (1.27) coincides with the solution of the sequence of BVPs u00 (x) = f (x), x ∈ (xj−1 , xj+1 ), (1.28) u(xj−1 ) = uj−1 , u(xj+1 ) = uj+1 , j = 1, 2, . . . , N − 1.
9
10
Chapter 1. Introduction and a short historical overview The solution of (1.28) can be represented in the form Z xj+1 x − xj−1 xj+1 − x u(x) = − Gj (x, ξ)f (ξ)dξ + uj+1 + uj−1 , x − x x j+1 j−1 j+1 − xj−1 xj−1 (1.29) x ∈ [xj−1 , xj+1 ] , where
(x − xj−1 )(xj+1 − ξ) , xj+1 − xj−1 Gj (x, ξ) = (xj+1 − x)(ξ − xj−1 ) , xj+1 − xj−1
xj−1 ≤ x ≤ ξ, (1.30) ξ ≤ x ≤ xj+1 ,
is Green’s function for the BVP (1.28). Substituting x = xj into (1.29) we get the difference equation Z xj+1 Z hj hj+1 xj (xj+1 − ξ) f (ξ)dξ − (ξ − xj−1 ) f (ξ)dξ uj = − 2~j xj 2~j xj−1 (1.31) hj+1 hj uj+1 + uj−1 , j = 1, 2, . . . , N − 1. + 2~j 2~j If this equation is multiplied by the factor −2/(hj+1 hj ), the following difference scheme on the 3-point stencil (xj−1 , xj , xj+1 ) results: Z xj+1 Z xj 1 1 ux¯xˆ,j = − (xj+1 − ξ) f (ξ)dξ − (ξ − xj−1 ) f (ξ)dξ, ~j hj+1 xj ~j hj xj−1 j = 1, 2, . . . , N − 1. (1.32) Thus, the difference scheme Z xj+1 Z xj 1 1 yx¯xˆ,j = − (xj+1 − ξ) f (ξ)dξ − (ξ − xj−1 ) f (ξ)dξ, ~j hj+1 xj ~j hj xj−1 (1.33) y0 = µ1 , yN = µ2 , j = 1, 2, . . . , N − 1, is the exact difference scheme for the linear BVP (1.27). In the nonlinear case an exact difference scheme represents a system of nonlinear algebraic equations containing nonlinear expressions (functionals) of the problem data. In general, these expressions cannot be evaluated directly, but as we will see later, they can be defined by the solutions of some associated IVPs. Therefore, the exact difference schemes provide the basis for the development of so-called truncated difference schemes of an arbitrary (given by the user) order of accuracy. Definition 1.9. If in an exact difference scheme the parameters determined by nonlinear expressions (e.g., IVPs or nonlinear equations) are numerically approximated, a so-called truncated difference scheme results. The accuracy of a truncated difference scheme depends on how accurately these parameters are approximated.
1.1. BVPs, Grids, Differences, Difference Schemes To illustrate the idea of EDS and TDS let us consider the simple BVP d du k(x) − q(x)u(x) = −f (x, u), x ∈ (0, 1), dx dx (1.34) u(0) = µ1 ,
u(1) = µ2 .
ˆ h (see formula (1.3). On the interval [0, 1] we introduce a non-equidistant grid ω We look for a difference scheme on this grid which has a similar form as the BVP (1.34), namely ˆ h, a(x)yx xˆ − b(x)y(x) = −ϕ(x, y), x ∈ ω (1.35) y0 = µ1 , yN = µ2 , ˆ h the coefficients a(x), b(x) and ϕ(x, y) are some functionals where for each x ∈ ω of the input data of problem (1.34). The special form of (1.35) allows us to study the difference scheme with similar well-developed analytical techniques as for the BVP (1.34). Thus, the scheme (1.35) can be carefully analyzed. Our approach consists of three basic steps: • For the given BVP (1.34) determine the coefficients a(x), b(x) and ϕ(x, y), ˆ h , (in general, in closed form) and define the EDS; x∈ω • Approximate a, b and ϕ numerically and generate the corresponding TDS; • Solve the resulting TDS, i.e. solve the nonlinear system of algebraic equations (1.35). ˆ h the coefficients a(x), b(x) and ϕ(x, y) are determined We show that for each x ∈ ω by the solutions of some IVPs for the homogeneous and the inhomogeneous ODE (1.34) on small subintervals (xi−1 , xi+1 ). Therefore the coefficients of the TDS can be efficiently computed by an IVP-solver. Moreover, we show that the accuracy of the solution of (1.35) is determined by the accuracy of the corresponding IVP-solvers for the IVPs. Definition 1.10. To improve clarity of presentation, throughout the text we will use the following abbreviations: def
e¯jα = [xj−2+α , xj−1+α ], def
γ = j − 1 + α,
def
e¯j = [xj−1 , xj ],
def
e¯N 2 = [xN , ∞),
def
β = j + (−1)α .
The corresponding open intervals are denoted by ejα , ej and eN 2 , respectively. To become familiar with these abbreviations we will alert the reader at the corresponding passages of the text.
11
12
Chapter 1. Introduction and a short historical overview To construct and to analyze the compact difference schemes we use two main approaches: The theory of contractive mappings (Fixed Point Theorem) and the theory of monotone operators. In contrast to the first approach, the theory of monotone operators allows us to develop a strategy for the study of nonlinear problems with large Lipschitz constants. Let us give here a short outline of the theoretical results which will be used frequently in this book. Theorem 1.1 (Banach’s Fixed-Point Theorem) Let X be a Banach space, M a closed nonempty set in X and F : M ⊂ X → X. Suppose that: 1) M is mapped into itself by F , i.e., F : M ⊂ X → M , and 2) the operator F is q-contractive, i.e., kF (x) − F (y)k ≤ q kx − yk
(1.36)
for all x, y ∈ M and for a fixed q, 0 ≤ q < 1. Then we can conclude the following: • Existence and uniqueness: Equation x = F (x), x ∈ M , has exactly one solution x∗ , i.e., F has exactly one fixed point on M ; • Convergence of the iteration: For an arbitrary choice of the initial point x(0) ∈ M , the sequence {x(k) } constructed by x(k+1) = F (x(k) ),
k = 0, 1, . . . ,
(1.37)
converges to the unique solution x∗ of the equation x = F (x), x ∈ M ; • Error estimates: For all k = 0, 1, . . . we have the so-called a priori error estimate qn kx(1) − x(0) k, kx(k) − x∗ k ≤ 1−q and the so-called a posteriori error estimate kx(k+1) − x∗ k ≤
q kx(k+1) − x(k) k; 1−q
• Rate of convergence: For all k = 0, 1, . . . we have kx(k+1) − x∗ k ≤ q kx(k) − x∗ k.
Proof. See e.g. [86, p.17].
Banach’s Fixed Point Theorem can be modified as follows. Assume that the
1.1. BVPs, Grids, Differences, Difference Schemes nonlinear operator F maps a closed set M ⊂ X into itself. In that case, for each natural number n the n-th power of the operator F can be defined as follows. Let def us set F 2 (x) = F (F (x)) for all x ∈ M . Then, higher powers F n (x) are defined recursively by F n (x) = F (F n−1 (x)). We now have the following result. Theorem 1.2 Let X be a Banach space, M a closed nonempty set in X and F : M ⊂ X → X. Suppose that: 1) M is mapped into itself by F , i.e., F : M ⊂ X → M , and 2) for some natural number n the operator F n is q-contractive on M . Then, the sequence (1.37) converges to x∗ for each given x(0) ∈ M .
Proof. See e.g. [82, p.392–393].
It is well known that the theory of contractive operators provides a simple framework to prove the existence and uniqueness of solutions for IVPs and BVPs of ODEs as well as for systems of nonlinear difference equations. Another approach to prove the existence and uniqueness of (weak) solutions for BVPs of nonlinear ODEs is the theory of monotone operators. The central statement is formulated in the theorem of Browder and Minty. Theorem 1.3 (Browder-Minty Theorem) Let X be a reflexive Banach space and F an operator defined on X with values in the dual space X ∗ . Suppose that the following conditions are satisfied: 1) F is a bounded operator, i.e., the image of any bounded subset of X is a bounded subset of X ∗ ; 2) the operator F is demicontinuous, i.e., for arbitrary x∗ ∈ X and any sequence {xk }∞ k=1 of elements of the space X such that xk → x∗
in X
we have F (xk ) * F (x∗ )
in X ∗ ;
3) the operator is coercive, i.e., hF (x), xi = ∞; kxkX kxkX →∞ lim
13
14
Chapter 1. Introduction and a short historical overview 4) the operator F is monotone on X, i.e., for all x, y ∈ X we have hF (x) − F (y), x − yi ≥ 0.
(1.38)
Then the equation F (x) = f
(1.39) ∗
has at least one solution x ∈ X for every f ∈ X . If, moreover, inequality (1.38) is strict for all x, y ∈ X, x 6= y, then equation (1.39) has precisely one solution x ∈ X for every f ∈ X ∗ .
Proof. See e.g. [18].
Many statements about the existence of solutions are based on the assumption that the corresponding operator F is strongly monotone. Definition 1.11. An operator F : X → X ∗ where X is a Banach space is said to be strongly monotone if there exists a constant c > 0 such that hF (x) − F (y), x − yi ≥ ckx − yk2 .
If the operator F : X → X ∗ is strongly monotone, then F is coercive. In many applications the space Rn plays an important role. This particularly applies to the discretization of ODEs. Theorem 1.4 Let F : Rn → Rn be continuous everywhere in Rn . Suppose that (F (x) − F (y), x − y) ≥ ckx − yk2
for all x, y ∈ Rn .
Then the equation F (x) = 0 has a unique solution x∗ ∈ Rn . Proof. See e.g. [82, p.461–462].
The existence and uniqueness of solutions of IVPs for ODEs is often shown with the following three theorems. Theorem 1.5 ¨ f’s Theorem) (Picard-Lindelo Suppose that 1) f (x, u), u(x) ∈ Rn ; 2) f (x, u) is continuous on the parallelepiped def
S = {(x, u) ∈ R × Rn : x : 0 ≤ x ≤ x0 + a, ku − u0 k ≤ b} and uniformly Lipschitz-continuous w.r.t. u;
(1.40)
1.1. BVPs, Grids, Differences, Difference Schemes 3) kf (x, u)k ≤ M on S. Then, the IVP u0 (x) = f (x, u(x)),
u(x0 ) = u0
(1.41) def
has a unique solution on the interval [x0 , x0 + α], where α = min(a, b/M ).
Proof. See e.g. [10]. Theorem 1.6 (Peano’s Theorem) Suppose that 1) f (x, u), u(x) ∈ Rn ; 2) f (x, u) is continuous on S; 3) kf (x, u)k ≤ M on S. Then, the IVP (1.41) has a solution on the interval [x0 , x0 + α].
Proof. See e.g. [10]. Definition 1.12. (Carath´ eodory conditions; see e.g. [9]) def
Let G ⊂ Rn be an open set and J = [a, b] ⊂ R, where a < b. One says that f : J × G → Rm satisfies the Carath´eodory conditions on J × G, written as f ∈ Car(J × G), if 1) f (·, x) : J → Rm is measurable for every x ∈ G, 2) f (t, ·) : G → Rm is continuous for almost every t ∈ J, and 3) for each compact set K ⊂ G the function def
hK (t) = sup{kf (t, x)k : x ∈ K} is Lebesgue integrable on J, where k · k is the norm on Rm .
Definition 1.13. (Solution in the extended sense; see e.g. [10]) A function u(x) is called a solution in the extended sense of the IVP (1.41) if u is absolutely continuous, u satisfies the ODE almost everywhere and u satisfies the initial condition. The absolute continuity of u implies that its derivative exists almost everywhere.
15
16
Chapter 1. Introduction and a short historical overview Theorem 1.7 (Carath´ eodory’s Theorem) If the function f (x, u) satisfies the Carath´eodory conditions (see Definition 1.12), then the IVP (1.41) has a solution in the extended sense in a neighbourhood of the initial condition.
Proof. See e.g. [10]. We want to conclude this section with two important inequalities. Theorem 1.8 (Cauchy-Bunyakovsky-Schwarz inequality) Let E be an inner product space and x, y ∈ E. Then |(x, y)|2 ≤ (x, x) · (y, y)
(1.42)
where (·, ·) is the inner product. Equivalently, by taking the square root on both sides, and referring to the norms of the vectors, the inequality is written as |(x, y)| ≤ kxk · kyk.
(1.43)
If x1 , . . . , xn ∈ C and y1 , . . . , yn ∈ C are any complex numbers, the inequality may be restated as 2 n n n X X X 2 ≤ x y |x | |yk |2 . i i j i=1
j=1
k=1
Proof. See e.g. [76, p.10–11]. Theorem 1.9
(Minkowski’s inequality) For all 1 < p < ∞ and all functions f , g on an interval [a, b] for which the integrals Z b Z b Z b |f (x)|p dx and |g(x)|p dx exist, then the integral |f (x) + g(x)|p dx exists a
a
a
too, and the Minkowski’s integral inequality states that Z
b
|f (x) + g(x)|p dx
1/p
Z ≤
a
b
|f (x)|p dx
1/p
Z +
a
b
|g(x)|p dx
1/p . (1.44)
a
Similarly, if p > 1 and ak , bk > 0, then Minkowski’s sum inequality states that X n k=1
|ak + bk |p
1/p ≤
X n k=1
|ak |p
1/p +
X n
|bk |p
1/p .
k=1
Equality holds iff the sequences a1 , a2 , . . . and b1 , b2 , . . . are proportional.
(1.45)
1.2. Short history
Proof. See e.g. [15, p.11].
1.2
Short history
To gain a better understanding of the approach used in this book, we present in this section a short overview of the history of EDS and TDS. A first general approach to exact difference schemes for linear BVPs has been developed by A. N. Tikhonov and A. A. Samarskii in the early 1960s. In the papers [80, 81] dealing with linear second-order ODEs with piece-wise continuous coefficients they have developed a theory of the exact 3-point (compact) difference schemes. In [80] an exact 3-point difference scheme (EDS) is proposed for the BVP du def d L(k,q) u = k(x) − q(x)u = −f (x), 0 < x < 1, dx dx (1.46) u(0) = µ1 ,
u(1) = µ2 ,
where 0 < c1 ≤ k(x),
k(x), q(x), f (x) ∈ Q(0) [0, 1],
q(x) ≥ 0,
(1.47)
and Q(0) [0, 1] is the class of piece-wise continuous functions with a finite number of discontinuity points of first kind. Moreover, an algorithm is given that uses truncated 3-point difference schemes (TDS) of rank m for the implementation of the exact difference scheme. For an arbitrarily given m the resulting method has the same order of accuracy. These results have been generalized in [81] for a non-equidistant grid and boundary conditions of the third kind. The idea of this approach is the following: we use the non-equidistant grid (1.4,a) and assume that the set ρ of discontinuity points of k(x), q(x) and f (x) is a subset of this grid: ρ⊆ω ˆ h . The exact solution of the BVP (1.46) satisfies the following continuity conditions at these discontinuity points: du du = k(x) , xi ∈ ρ. (1.48) u(xi − 0) = u(xi + 0), k(x) dx x=xi −0 dx x=xi +0 We introduce the stencil functions vαj (x), α = 1, 2, as those solutions of the IVPs [81] L(k,q) vαj (x) = 0, vαj (xβ ) = 0,
xj−1 < x < xj+1 , dvj k(x) α = (−1)α+1 , dx x=xβ
α = 1, 2,
j = 1, 2, . . . , N − 1,
(1.49) which satisfy the continuity conditions (1.48), too. For the definition of the index β see Definition 1.10. These stencil functions possess the following properties:
17
18
Chapter 1. Introduction and a short historical overview 1) v1j (x) > 0 is monotonically increasing on (xj−1 , xj+1 ], and the function v2j (x) > 0 is monotonically decreasing on [xj−1 , xj+1 ); 2) it holds that v1j (xj+1 ) = v2j (xj−1 ),
v2j (xj ) = v1j+1 (xj+1 );
3) the relation v1j (xj+1 ) = v1j (xj ) + v2j (xj ) Z xj Z + v2j (xj ) v1j (x)q(x)dx + v1j (xj ) xj−1
xj+1
v2j (x)q(x)dx
(1.50)
xj
is satisfied. The solution of problem (1.46) can be represented in the form u(x) = Aj v1j (x) + Bj v2j (x) + v3j (x),
xj−1 ≤ x ≤ xj+1 ,
(1.51)
where Aj , Bj are constants and v3j (x) is a particular solution of (1.46) which satisfies L(k,q) v3j (x) = −f (x), xj−1 < x < xj+1 , (1.52) v3j (xj−1 ) = v3j (xj+1 ) = 0. Setting in (1.51) x = xj+1 as well as x = xj−1 , we find Aj =
u(xj+1 )
and Bj =
v1j (xj+1 )
u(xj−1 ) v2j (xj−1 )
,
(1.53)
respectively. The function v3j (x) can be written as v3j (x) =
Z
xj+1
G(x, ξ)f (ξ)dξ,
xj−1 ≤ x ≤ xj+1 ,
(1.54)
xj−1
where G(x, ξ) is Green’s function of problem (1.52) defined by G(x, ξ) =
(
1 v1j (xj+1 )
v1j (x)v2j (ξ),
xj−1 ≤ x ≤ ξ,
v1j (ξ)v2j (x),
ξ ≤ x ≤ xj+1 .
(1.55)
Substituting (1.55) into (1.54) and setting x = xj we obtain v3j (xj )
=
1 v1j (xj+1 )
" v2j (xj )
Z
xj
xj−1
v1j (ξ)f (ξ)dξ
+
v1j (xj )
Z
xj+1
# v2j (ξ)f (ξ)dξ
.
xj
(1.56)
1.2. Short history Using (1.53), (1.50) and (1.56) we obtain from (1.51) the EDS (a ux¯ )xˆ − b u = −ϕ(x),
x∈ω ˆh, (1.57)
u(0) = µ1 ,
u(1) = µ2 ,
where −1 1 j a(xj ) = v (xj ) , hj 1 h i−1 Z def Tˆ xj (w) = ~j v1j (xj ) def
def b(xj ) = Tˆxj (q), xj
def ϕ(xj ) = Tˆ xj (f ),
h i−1 Z v1j (ξ)w(ξ)dξ + ~j v2j (xj )
xj−1
xj+1
v2j (ξ)w(ξ)dξ.
xj
(1.58) This EDS cannot be used directly because we still need an algorithm to compute its coefficients. For this aim we introduce at the point x = xj a local coordinate system by choosing x = xj + ~j (s − ∆j ),
def
∆j =
hj − hj+1 hj − hj+1 = , hj+1 + hj 2~j
−1 ≤ s ≤ 1.
Thus x = x ¯j + ~j s, with x ¯j = xj − ~j ∆j . The interval [xj−1 , xj+1 ] is transformed into the reference interval −1 ≤ s ≤ 1, where the point x = xj corresponds to the value s = ∆j . We set def
v1j (x) = v1j (xj + ~j (s − ∆j )) = ~j αj (s, ~j ), (1.59) def
v2j (x) = v2j (xj + ~j (s − ∆j )) = ~j β j (s, ~j ),
−1 ≤ s ≤ 1.
The stencil functions αj (s, ~j ) and β j (s, ~j ) satisfy the equations dαj ¯ k(s) − ~2j q¯(s)αj = 0, −1 < s < 1, ds j ¯ dα = 1, αj (−1, ~j ) = 0, k(s) ds s=−1 d ¯ dβ j k(s) − ~2j q¯(s)β j = 0, −1 < s < 1, ds ds dβ j j ¯ = −1, β (1, ~j ) = 0, k(s) ds s=1 d ds
where def ¯ = k(xj + ~j (s − ∆j )), k(s)
def
q¯(s) = q(xj + ~j (s − ∆j )).
The coefficients a, b and ϕ used in the exact difference scheme (1.57) are now given
19
20
Chapter 1. Introduction and a short historical overview by
~j j a(xj ) = α (0, ~j ) hj 1 b(xj ) = j α (0, ~j )
Z
1 ϕ(xj ) = j α (0, ~j )
Z
−1 ,
∆j
−1 ∆j
1
1 α (s, ~j )¯ q (s)ds + j β (0, ~j )
Z
1 β j (0, ~j )
Z
j
α (s, ~j )f¯(s)ds + j
−1
β j (s, ~j )¯ q (s)ds,
(1.60)
∆j 1
β j (s, ~j )f¯(s)ds. ∆j
If q(x) 6= 0 the stencil functions (1.59) cannot be determined explicitly by integration. But due to the analyticity of αj (s, ~j ) and β j (s, ~j ) with respect to ~2j , we can represent these functions by the power series αj (s, ~j ) =
∞ X
αij (s)~2i j ,
β j (s, ~j ) =
i=0
∞ X
βij (s)~2i j ,
(1.61)
i=0
with αij (s) and βij (s) defined by the recurrence formulas αij (s) βij (s)
Z
s
Z
1 ¯ k(t)
Z
= −1
Z
1
= s
αj0 (s)
1 ¯ k(t)
Z
s
= −1
t −1
q¯(λ)αji−1 (λ)dλ
1 j q¯(λ)βi−1 (λ)dλ
dt,
i = 1, 2, . . . ,
dt,
i = 1, 2, . . . ,
t
1 dt, ¯ k(t)
β0j (s)
1
Z = s
1 dt. ¯ k(t)
Let def
α(m)j (s, ~j ) =
m X
αij (s)~2i j ,
def
β (m)j (s, ~j ) =
i=0
m X
βij (s)~2i j
i=0
be the truncated sums of the series (1.61). Replacing in formula (1.60) αj (s, ~j ) and β j (s, ~j ) by α(m)j (s, ~j ) and β (m)j (s, ~j ), respectively, we obtain coefficients a(m) , b(m) and ϕ(m) which are used in the following truncated difference scheme of rank m (abbreviated as m-TDS)
(m)
a(m) yx¯
− b(m) y (m) = −ϕ(m) (x),
x ˆ
y (m) (0) = µ1 ,
x∈ω ˆh, (1.62)
y (m) (1) = µ2 .
The next statement was proved in [81] and represents a convergence result for the above m-TDS.
1.2. Short history Theorem 1.10 Let k(x), q(x) and f (x) belong to the class Q(0) [0, 1] and assume that 0 < C1 ≤ Then, the m-TDS (1.62) has the
def
(m)
− u = max
y 0,∞,ˆ ωh
hj+1 ≤ C2 . hj
order of accuracy 2m + 2, i.e. it holds that (m) (1.63) yj − uj ≤ M h2m+2 , h ≤ h0 ,
1≤j≤N−1
where C1 , C2 , M and h0 are positive coefficients which do not depend on m and the grid. If we want to solve a BVP with boundary conditions of second or third kind we need the exact and truncated difference equations which correspond to these boundary conditions. Let us consider the following BVP with boundary conditions of third kind L(k,q) u = −f (x), 0 < x < 1, (1.64) du k(x) − σ1 u(0) = −µ1 , u(1) = µ2 . dx x=0 ˆ¯ h (see formula For the discretization of (1.64) we use the non-equidistant grid ω (1.3)). At first, let us find an algebraic boundary condition (in the following referred to as difference boundary condition) at x = 0 that any solution of problem (1.64) satisfies. According to the superposition principle the exact solution of the ODE (1.64,a) can be represented on an interval [0, x1 ] in the form u(x) =
v 0 (x) v20 (x) u0 + 01 u1 + v3∗ (x), 0 v2 (0) v1 (x1 )
where v10 (x), v20 (x) and v3∗ (x) are the solutions of the problems dv10 (k,q) 0 0 v1 (x) = 0, 0 < x < x1 , v1 (0) = 0, k(x) = 1, L dx x=0 dv20 (k,q) 0 0 v2 (x) = 0, 0 < x < x1 , v2 (x1 ) = 0, k(x) = −1, L dx x=x1 L(k,q) v3∗ (x) = −f (x),
0 < x < x1 ,
v3∗ (0) = v3∗ (x1 ) = 0.
(1.65)
(1.66)
(1.67) (1.68)
Let us demand that the function u(x) in (1.65) satisfies also the left boundary condition in (1.64,b), i.e., du k(x) − σ1 u(0) = −µ1 . (1.69) dx x=0
21
22
Chapter 1. Introduction and a short historical overview Substituting (1.65) into (1.69) and taking into account that v20 (0) = v10 (x1 ), we obtain the exact difference boundary condition ¯1 u0 = −¯ µ1 , a1 ux¯,1 − σ
(1.70)
with
def
a1 = a(x1 ) = Z
1 0 v (0) h1 2
−1 , (1.71)
x1
σ ¯1 = h1 a1
q(x)v20 (x)dx + σ1 ,
0
dv3∗ µ ¯1 = µ1 + k(x) . dx x=0
Therefore, the EDS for problem (1.64) takes the form (a ux¯ )xˆ − b u = −ϕ(x),
x∈ω ˆh, (1.72)
¯1 u0 = −¯ µ1 , a1 ux¯,1 − σ
uN = µ2 ,
where a(xj ), b(xj ), ϕ(xj ) are defined by formulas (1.58), and σ ¯1 , µ ¯1 by formula (1.71). To develop a TDS we introduce the local coordinate s = x/h1 at x = 0, i.e. we have x = sh1 , 0 ≤ s ≤ 1. We change the dependent variable by v20 (x) = v20 (sh1 ) = h1 β 0 (s, h1 ),
v3∗ (x) = v3∗ (sh1 ) = h1 γ 0 (s, h1 ).
The stencil functions β 0 (s, h1 ) and γ 0 (s, h1 ) satisfy the equations d ds
0
¯ dβ k(s) ds
β 0 (1, h1 ) = 0, d ds
0
¯ dγ k(s) ds
β 0 (1, h1 ) = 0,
− h21 q¯(s)β 0 = 0,
0 < s < 1,
0 ¯ dβ k(s) = −1, ds s=1 − h21 q¯(s)β 0 = h21 f (s),
0 < s < 1,
0 ¯ dβ (s, h1 ) k(s) = −1, ds s=−1
where def ¯ k(s) = k(sh1 ),
def
q¯(s) = q(sh1 ),
def f¯(s) = f (sh1 ).
The coefficients of the exact difference boundary condition of third kind take now the form −1 Z 1 0 1 0 ¯ dγ q¯(s)β 0 (s, h1 )ds, µ ¯1 = µ1 + h1 k(s) , a = v (0) . σ ¯ 1 = a1 1 ds s=0 h1 2 0
1.2. Short history Replacing the functions β 0 (s, h1 ) and γ 0 (s, h1 ) by the polynomials β (m)0 (s, h1 ) =
m X
βi0 (s)h2i 1 ,
γ (m)0 (s, h1 ) =
i=0
m X
γi0 (s)h2i 1 ,
i=0
we obtain the truncated boundary condition of rank m, (m) (m)
(m) (m) y0
¯1 a1 yx¯,1 − σ
(m)
= −¯ µ1 .
In [81] it is shown that the solution of the m-TDS (m) − b(m) y (m) = −ϕ(m) (x), a(m) yx¯ x ˆ
(m) (m) a1 yx¯,1
−
x∈ω ˆh, (1.73)
(m) (m) σ ¯ 1 y0
=
(m) −¯ µ1 ,
(m) yN
= µ2
possesses the order of accuracy 2m + 2. An analogous approach for the construction of EDS and TDS for the generalized BVP of third kind with minimal requirements on the smoothness of the coefficient was used in [23]. The papers [21, 22] deal with EDS and TDS for a class of variational inequalities as well as with the development of efficient algorithms for their implementation. The TDS enable the computation of approximations of the exact solution with an order of accuracy which can be prescribed by the user for arbitrary piece-wise continuous coefficients k(x), q(x) and f (x). The practical implementation of TDS of a higher order of accuracy obtained within this approach requires in the case of non-polynomial coefficients in the equation (1.46) the computation of multidimensional integrals. This can be done, for example, with Monte-Carlo methods but represents, in fact, a serious computational problem. In order to overcome this drawback another efficient algorithmic approach for the construction of TDS of an arbitrarily given order of accuracy for problem (1.46), (1.47) with piece-wise smooth coefficients k(x), q(x), f (x) was proposed in [60, 73]. The EDS from [80, 81] was the basis of this approach too. It was shown that at each node xj of a non-equidistant grid ω ˆ h the coefficients a(x), b(x) and the right-hand side ϕ(x) can be represented by the solutions of four auxiliary IVPs on the (small!) subinterval (xj−1 , xj+1 ). From (1.58) we obtain immediately the following representations for a(x) and b(x): a(xj ) =
1 j v (xj ) hj 1
−1 ,
b(xj ) = ~−1 j
2 X
[vαj (xj )]−1 [(−1)α+1 mjα (xj ) − 1], (1.74)
α=1
where
dvαj (x) , α = 1, 2. dx In order to obtain the representation for ϕ(x), two auxiliary functions wαj (x), α = 1, 2, were introduced as the solutions of the IVPs def
mjα (x) = k(x)
23
24
Chapter 1. Introduction and a short historical overview L(k,q) wαj (x) = −f (x), xj−2+α < x < xj−1+α , dwαj j wα (xj+(−1)α ) = = 0, α = 1, 2. dx x=xj+(−1)α
(1.75)
It was shown that the right-hand side ϕ(x) of the EDS can be represented in the following way: " # 2 X wαj (xj ) −1 α j j ϕ(xj ) = ~j (−1) lα (xj ) − mα (xj ) j , (1.76) vα (xj ) α=1 where
dwαj (x) , α = 1, 2. dx One can see from (1.74), (1.76) that, for the computation of the coefficients a(xj ), b(xj ) and the right-hand side ϕ(xj ) of the EDS, the four IVPs have to be solved for each xj ∈ ω ˆ h : (1.117), (1.75) with α = 1 on the subinterval [xj−1 , xj ] and (1.49), (1.75) with α = 2 on the subinterval [xj , xj+1 ]. These IVPs can be solved by executing only one step with an arbitrary one-step method, e.g. with the Taylor series method or a Runge-Kutta method of the order of accuracy m ¯ = 2[(m + 1)/2], where [·] denotes the entire part of the argument in these brackets. We label (m)j (m)j ¯ the thus calculated solutions with an additional index m: vα (xj ), mα (xj ), (m)j ¯ (m)j wα (xj ) and lα (xj ). Instead of the three-point EDS (1.57), (1.74), (1.76) we now have the three-point TDS lαj (x) = k(x)
(m)
(a(m) yx¯ )xˆ − b(m) y (m) = −ϕ(m) (x), y (m) (0) = µ1 ,
x∈ω ˆh, (1.77)
y (m) (1) = µ2 ,
where the coefficients are given by a(m) (xj ) =
1 (m)j v (xj ) hj 1
b(m) (xj ) = ~−1 j
2 X
−1 ,
¯ (−1)α+1 [vα(m)j (xj )]−1 [m(αm)j (xj ) + (−1)α ],
(1.78)
α=1
(m)
ϕ
(xj ) =
~−1 j
2 X α=1
" (−1)
α
(m)j lα (xj )
−
(m)j ¯ wα (xj ) ¯ m(αm)j (xj ) (m)j vα (xj )
# .
The next statement characterizes the order of accuracy of this scheme (see e.g. [73]). Theorem 1.11 Let k(x) ∈ Q(m+1) [0, 1], q(x), f(x) ∈ Q(m) [0, 1], and suppose that the homogeneous BVP (1.46), (1.47) and (1.117) possesses only the trivial solution. Then
1.2. Short history the error of TDS (1.77) satisfies (
∗
(m)
− u = max y (m) − u
y 1,∞,ˆ ωh
)
dy (m) du
≤ M hm , ,
k dx − k dx 0,∞,ˆ ωh 0,∞,ˆ ωh
where h is small enough, the constant M is independent of h and dy (m) (xj ) k(xj ) = dx #−1 2 " 2 X Xn (m)j ¯ α (m)j ¯ m(αm)j (−1) vα (xj )m3−α (xj ) (xj )y (m) (xj+(−1)α ) = α=1
α=1
h io (m)j ¯ (m)j ¯ (m)j (m)j ¯ ¯ (xj ) + m(αm)j (xj )v3−α (xj )l3−α (xj ) . +(−1)α+1 m1 (xj )m2 (xj )wα(m)j
The advantage of the scheme (1.77) compared with the schemes from [19] for piece-wise smooth k(x), q(x) and f (x) is that besides an approximation for the exact solution one obtains also a three-point approximation for k(x)du/dx of the same accuracy (measured in the Chebyshev norm) without additional computational costs (in [19] an estimate for an approximation of ux¯ is given). A new approach for the construction of 3-point EDS and the corresponding TDS of an arbitrarily given order of accuracy m for nonlinear problems of the form d du k(x) = −f (x, u), dx dx
x ∈ (0, 1),
u(0) = µ1 ,
u(1) = µ2 ,
(1.79)
was published in 1990 (see [59]). These results were generalized and further developed in [45, 49]. In [42] monotone ODEs were considered. Under the assumption that the following conditions are fulfilled, 0 < c1 ≤ k(x) for all x ∈ [0, 1] , def
fu (x) = f (x, u) ∈ Q0 [0, 1], |f (x, u) − f (x, v)| ≤ L |u − v| def
q = L/c1 < 1,
k(x) ∈ Q1 [0, 1],
|f (x, u)| ≤ K
(1.80)
for all x ∈ [0, 1], u ∈ Ω([0, 1], r), (1.81)
for all x ∈ [0, 1], u, v ∈ Ω([0, 1], r),
(1.82) (1.83)
a new implementation of the three-point EDS on an arbitrary non-equidistant grid ω ˆ h using a TDS of a desired order of accuracy was introduced in [46]. Here Qp [0, 1] denotes the class of functions which are piece-wise differentiable up to the order p and possess a finite number of discontinuity points of the first kind. Ω([0, 1], r) is
25
26
Chapter 1. Introduction and a short historical overview the set Ω([0, 1], r)
du def
1 ∈ C[0, 1], u − u(0) = u(x) : u(x) ∈ W∞ (0, 1), u(x), k(x) ≤r , dx 1,∞,(0,1) (1.84) where kuk0,∞,(0,1) )
du
, = max kuk0,∞,(0,1) , dx 0,∞,(0,1) (
def
= vrai max |u(x)| ,
kuk1,∞,(0,1)
x∈(0,1)
def
r =
K def , V1 (x) = c1
x
Z 0
def
Z
dt def , V2 (x) = k(t)
1
x
dt V1 (x) def V2 (x) , u(0) (x) = µ1 + µ2 . k(t) V1 (1) V1 (1)
The three-point EDS for (1.79) is (aux¯ )xˆ = −ϕ(xj , u) x ∈ ω ˆh,
u(0) = µ1 ,
u(1) = µ2 ,
(1.85)
where −1 1 j V1 (xj ) , hj " # 2 j X −1 α j α wα (xj , u) (−1) lα (xj , u) + (−1) . ϕ(xj , u) = ~j Vαj (xj ) α=1
a(xj ) =
The functions wαj (xj , u), lαj (xj , u), α = 1, 2, are the solutions of the following IVPs on small intervals (the interval length can be controlled): lj (x, u) d j wα (x, u) = α , dx k(x)
d j l (x, u) = −f x, Yαj (x, u) , dx α
wαj (xβ , u) = lαj (xβ , u) = 0,
x ∈ ejα ,
(1.86)
α = 1, 2,
where ejα and the index β are defined in Definition 1.10, and ˆ(x) + wαj (x, u) − Yαj (x, u) = u
Vαj (x) Vαj (xj )
wαj (xj , u),
x ∈ e¯jα ,
i h i−1 h , u ˆ(x) = u(xj )V1j (x) + u(xj−1 )V2j−1 (x) · V1j (xj ) V1j (x) =
Z
x
xj−1
dt , k(t)
V2j (x) =
Z
xj+1
x
α = 1, 2,
x ∈ e¯j ,
dt . k(t)
The practical realization of the EDS (1.85) for all xj ∈ ω ˆ h (i.e. the computation of the corresponding coefficients as input data) can be achieved by the integration
1.2. Short history of the two IVPs (1.86). The first one has to be integrated forward on the interval [xj−1 , xj ] with α = 1, whereas the second one must be integrated backward on the interval [xj , xj+1 ] with α = 2. For this integration one can use an appropriate one-step method, e.g. a Runge-Kutta method of the order of accuracy m. ¯ Note that the solutions wαj (x, u) and lαj (x, u), α = 1, 2, of the IVPs (1.86) def
depend on the parameters bjα (u) = wαj (xj , u), i.e., wαj (x, u) = wαj (x, u, bjα (u)) and lαj (x, u) = lαj (x, u, bjα (u)), α = 1, 2. Substituting the numerical solutions of the order m ¯ into the EDS (1.85) yields the TDS of the rank m, ¯ (m) ¯
¯ ¯ ¯ (a(m) yx¯ )xˆ = −ϕ(m) (x, y (m) ),
a
(m) ¯
1 (m)j ¯ (xj ) = V (xj ) hj 1
¯ (xj , u) = ~−1 ϕ(m) j
2 X
x∈ω ˆh,
¯ y (m) (0) = µ1 ,
¯ y (m) (1) = µ2 ,
−1 ,
(1.87)
"
(m)j ¯
(m)j (−1)α lα (xj , u) + (−1)α
α=1
wα
(xj , u) (m)j ¯ Vα (xj )
# .
Then, the parameters in (1.87) can be written in the form (s−1)j b(s−1) = wα (xj , u) α
=−
¯ wα(m)j (xj , u) = −
s−1 (s−2) h2γ fβ X [(−1)α+1 hγ ]p dp wαj (xβ , u, bα ) + , p 2 kβ p=3 p! dx
s = 3, 4, . . . , m, ¯
m ¯ (m−1) ¯ h2γ fβ X [(−1)α+1 hγ ]p dp wαj (xβ , u, bα ) + , 2 kβ p=3 p! dxp
(m)j lα (xj , u) = (−1)α hγ fβ +
m (m−1) ¯ X [(−1)α+1 hγ ]p dp lj (xβ , u, bα ) α
p=2
dxp
p!
.
In the next theorem (see also [46]) the accuracy of the above TDS is characterized. Theorem 1.12 Let the assumptions (1.80) – (1.83) be satisfied. Suppose that k(x) ∈ Qm+2 [0, 1],
f (x, u) ∈
N [
Cm+1 e¯j × Ω([0, 1], r + ∆) .
j=1
Then there exists h0 > 0 such that for h ≤ h0 the TDS (1.87) has a unique solution. Moreover, the following estimate of the accuracy holds: ) (
∗
(m) ¯
du dy
(m)
¯ ¯
≤ M hm = max y (m) − u , ,
y ¯ − u
k dx − k dx 1,∞,ˆ ωh 0,∞,ˆ ωh 0,∞,ˆ ωh
27
28
Chapter 1. Introduction and a short historical overview where (m) ¯
k(xj )
(m)j ¯
¯ ¯ hj yx¯,j − w1 (xj, y (m) ) (xj ) dy (m) (m)j ¯ = ), + l1 (xj, y (m) ( m)j ¯ dx V1 (xj )
and the constant M does not depend on h. In the paper [47] an EDS of the type (1.87) is introduced and justified under the conditions 0 < c1 ≤ k(x) ≤ c2
k(x) ∈ Q1 [0, 1],
for all x ∈ [0, 1],
def
for all u ∈ R,
def
for all x ∈ [0, 1],
fu (x) = f (x, u) ∈ Q0 [0, 1] fx (u) = f (x, u) ∈ C(R) |f (x, u)| ≤ g(x) + c |u|
for all x ∈ [0, 1], u ∈ R,
[f (x, u) − f (x, v)] (u − v) ≤ c3 |u − v|
2
c ≥ 0,
for all x ∈ [0, 1], u, v ∈ R,
0 ≤ c3 < π 2 c1 , where g(x) ∈ L2 (0, 1), and c, c1 , c2 , c3 are constants. A drawback of the TDS of a high order of accuracy is that derivatives of the functions wαj (x, u) and lαj (x, u), α = 1, 2, have to be computed. This can be done by an analytical differentiation of the equations in (1.86), e.g. by well-known computer algebra tools like Mathematica and Maple. EDS and TDS of an arbitrarily given order of accuracy for systems of linear second order equations du (K,Q) def d K(x) − Q(x)u(x) = −f (x) (1.88) u = L dx dx under the boundary conditions u(0) = u(1) = 0
(1.89)
were proposed in [57, 58]. The authors suppose that the matrices K(x) = m m [kij (x)]m i,j=1 , Q(x) = [qij (x)]i,j=1 and the vector f (x) = {fi (x)}i=1 satisfy the conditions 2
C1 kvk ≤ (K(x)v, v), kij (x) ∈ Qn+1 [0, 1],
C1 > 0,
for all v ∈ Rm ,
qij (x) ∈ Qn [0, 1],
for all x ∈ [0, 1],
fi (x) ∈ Qn [0, 1]
(1.90) (1.91)
and that at the discontinuity points of the coefficients xi the solution of problem (1.88)–(1.91) satisfies the conditions du du u(xi − 0) = u(xi + 0), K(x) = K(x) . dx x=xi −0 dx x=xi +0
1.2. Short history In that case the EDS can be derived from the integral corollary of differential equations in the following way. Let us introduce the matrices and vectors V1j (x), V2j (x), W j1 (x) and W j2 (x) as the solutions of the following problems (compare this with the scalar case): L(K,Q) Vαj (x) = 0, Vαj (xβ ) = 0,
x ∈ (xj−1 , xj+1 ), dVαj K(x) = (−1)α+1 E, dx x=xβ
(1.92)
L(K,Q) W jα (x) = −f (x), W jα (xβ ) = 0,
x ∈ (xj−1 , xj+1 ), dW jα K(x) = 0, α = 1, 2 dx x=xβ
(1.93)
as well as the vector-function W j (x) as the solution of the inhomogeneous BVP (on a small interval) L(K,Q) W j (x) = f (x),
x ∈ (xj−1 , xj+1 ),
W j (xj−1 ) = W j (xj+1 ) = 0. Let
dVαj (x) dW jα , Ljα (x) = K(x) , α = 1, 2, dx dx be the corresponding streams. We represent the Green’s function of problem (1.88), (1.89) in the form ( j V1 (x)V˜1j (ξ), x ≤ ξ, j ξ ∈ [xj−1 , xj+1 ], G (x, ξ) = V2j (x)V˜2j (ξ), x ≥ ξ, Mαj (x) = K(x)
where V˜αj (x), α = 1, 2, are the solutions of the IVPs " # dV˜1j (x) def d (K,Q) ˜ j ˜ K(x) − V˜1j (x)Q(x) = 0, L V1 (x) = dx dx V˜1j (xj+1 ) = 0,
dV˜1j K(x) dx
x ∈ (xj−1 , xj+1 ),
h i−1 = − V1j (xj+1 ) ,
x=xj+1
(1.94) ˜ (K,Q) V˜ j (x) = 0, L 2 V˜2j (xj−1 ) = 0,
x ∈ (xj−1 , xj+1 ), h i−1 dV˜2j K(x) = V2j (xj−1 ) . dx x=xj−1
(1.95)
29
30
Chapter 1. Introduction and a short historical overview The integral corollary of the equation (1.88) implies Z xj+1 Z xj+1 (K,Q) Gj (x, ξ)Lξ u(ξ)dξ = − Gj (x, ξ)f (ξ)dξ = −W j (x). xj−1
xj−1
By integration by parts of the left-hand side we obtain h i−1 h i−1 hj+1 V1j (xj ) V1j (xj+1 ) ux,j − hj V2j (xj ) V2j (xj−1 ) ux¯,j h i−1 h i−1 uj − E − V1j (xj ) V1j (xj+1 ) − V2j (xj ) V2j (xj−1 ) = −W j (xj ). Note that the following holds: Z xj+1 W j (xj ) = Gj (xj , ξ)f (ξ)dξ xj−1
=
V1j (xj )V˜1j (xj )
( h i−1 Z V˜2j (xj )
xj
V˜2j (ξ)f (ξ)dξ
xj−1 xj+1
i−1 Z h + V˜ j (xj ) 1
) V˜1j (ξ)f (ξ)dξ
,
xj
and
h i−1 h i−1 E − V1j (xj ) V1j (xj+1 ) − V2j (xj ) V2j (xj−1 ) =
V1j (xj )V˜1j (xj )
( h i−1 Z j ˜ V2 (xj )
xj
V˜2j (ξ)Q(ξ)dξ
xj−1
i−1 Z h + V˜1j (xj )
xj+1
) V˜1j (ξ)Q(ξ)dξ
.
xj
Thus, we arrive at the 3-point EDS (see [57]) j j ~−1 ¯,j ) − Dj u(xj ) = −Φj , j (A (xj )ux,j − B (xj )ux
xj ∈ ω ˆh, (1.96)
u0 = uN = 0, where h i−1 h i−1 V1j (xj+1 ) , Aj (xj ) = hj+1 V˜1j (xj ) h i−1 h i−1 V2j (xj−1 ) , B j (xj ) = hj+1 V˜2j (xj )
Dj = Tˆ j (Q),
Φj = Tˆj (f ),
i−1 Z xj i−1 Z xj+1 1 h˜j 1 h˜j Tˆj (w) = V2 (xj ) V1 (xj ) V˜2j (ξ)w(ξ)dξ + V˜1j (ξ)w(ξ)dξ. ~j ~j xj−1 xj
1.2. Short history The existence of EDS for problem (1.88)–(1.91) has been proven in [58], but the possibility of its transformation into the form (1.96) was only shown for self-adjoint K(x), Q(x) and under the assumption Q(x) ≥ 0. Besides, in [58] (see Lemma 4 and Theorem 2) it is shown that only the conditions K(x) = K ∗ (x),
Q(x) = Q∗ (x),
K(x)K(x1 ) = K(x1 )K(x)
for all x, x1 ∈ [xj−1 , xj+1 ]
provide the scheme (1.96) in the divergence form (Aux¯ )xˆ,j − Dj u(xj ) = −Φj ,
xj ∈ ω ˆh,
u0 = uN = 0,
def with Aj = hj+1 [V˜1j∗ (ξ)]−1 .
Let us introduce the matrix-valued functions def V¯2j (x) = V1j (xj+1 )V˜1j (x),
def V¯1j (x) = V2j−1 (xj−1 )V˜2j (x)
and the derivatives dV¯2j ¯ j (x) def K(x), = M 2 dx
dV¯1j ¯ j (x) def M K(x). = 1 dx
Then (1.94) and (1.95) imply that the functions V¯2j (x), V¯1j (x) satisfy the following IVPs on the interval [xj−1 , xj+1 ]: dV¯2j (x) j (K,Q) ¯ j ˜ ¯ K(x) L = −E, V2 (x) = 0, V2 (xj+1 ) = 0, dx x=xj+1
(1.97) ˜ (K,Q) V¯ j (x) L 1
= 0,
V¯1j (xj−1 )
dV¯1j (x) K(x) dx
= 0,
= E.
x=xj−1
The coefficients Aj (xj ), B j (xj ), Dj and Φj can be represented by the solutions of the IVPs (1.92), (1.93) and (1.97) in the form h i−1 h i−1 −1 ¯ j j ¯ j (xj ) , B (x ) = h (x ) , V V Aj (xj ) = h−1 j j 1 j+1 2 j h i ¯ j −1 1 ¯j d V 2 −E − V (xj ) Dj = ~j 2 dx
K(xj + 0)
x=xj
i−1 dV¯ j 1 h¯j 1 V (xj ) + ~j 1 dx
K(xj − 0) − E ,
x=xj
Φj =
2 X α=1
n o −1 j ¯ (xj )W j (xj ) . (−1)α Ljα (xj ) − V¯αj (xj ) M α α
31
32
Chapter 1. Introduction and a short historical overview Starting from the EDS we can now introduce in analogy to the scalar case the n-TDS (n)
(n)
(n)
(n)
(n)j ~−1 (xj )y x,j − B (n)j (xj )y x¯,j ) − Dj y j = −Φj , j (A (n)
y0
xj ∈ ω ˆh,
(n)
= y N = 0,
where h i−1 def ¯ (n)j (xj ) A(n)j (xj ) = h−1 , V 2 j+1 (n)
Dj
2 i−1 h i 1 X h ¯ (n)j ¯ (n)j (xj ) , Vα (xj ) −E − (−1)α M α ~j α=1
=
2 X
(n) def
Φj
h i−1 def ¯ (n)j (xj ) B (n)j (xj ) = h−1 , V 1 j
=
h i−1 (¯ n)j (n)j (¯ n)j ¯ ¯ (−1)α L(n)j (x ) − V (x ) (x )W (x ) , M j j j j α α α α
α=1 (n)j ¯ α(¯n)j (x), W (¯n)j (x), L(n)j (x), α = 1, 2, are approximations of the and V¯α (x), M α α solutions of the IVPs (1.92), (1.93) and (1.97) obtained e.g. by the Taylor series method of the order of accuracy n ¯.
An a priori estimate for the n-TDS gives the following theorem (see [58]). Theorem 1.13 Under the assumptions (1.90) and (1.91) the following error estimate holds: ) (
∗
du dy (n)
(n) (n)
−K ≤ M hn , = max u − y , K
u − y dx dx 0,∞,ˆ ωh 1,∞,ˆ ωh 0,∞,ˆ ωh
where (n)
dy j K(xj ) dx ×
2 X
α
(−1)
( =
2 X
)−1 (−1)
α+1
Mα(¯n)j (xj )Vα(n)j (xj )
α=1
L(n)j α (xj )
−
Mα(¯n)j (xj )
h i−1 (n)j (¯ n)j (n)j Vα (xj ) W α (xj ) + L2 (xj ),
α=1
(1.98) and h is small enough. EDS as well as their implementation in the form of TDS of an arbitrarily given order of accuracy for nonlinear second-order ODEs and Dirichlet boundary conditions du du d K(x) = −f x, u, , x ∈ (0, 1), u(0) = µ1 , u(1) = µ2 , dx dx dx (1.99)
1.2. Short history with given K(x) ∈ Rn×n , f (x, u, ξ), µ1 , µ2 ∈ Rn , and unknown u(x) ∈ Rn , were proposed and studied in [28, 29, 43, 44]. Two-point EDS and two-point TDS for systems of first-order ODEs with non-separated boundary conditions u0 (x) + A(x)u = f (x, u), A(x), B0 , B1 , ∈ Rd×d ,
x ∈ (0, 1),
B0 u(0) + B1 u(1) = d,
rank[B0 , B1 ] = d,
f (x, u), d, u(x) ∈ Rd
were introduced and analyzed in [24, 27, 55]. The next step in the development of EDS and TDS was the focus on BVPs on infinite intervals. There are some strategies to solve BVPs on an infinite interval by standard numerical techniques like finite difference methods, collocation methods or shooting methods. One possibility is to replace the boundary conditions formulated at infinity by conditions at a finite boundary point. However, it is difficult to find efficient a priori error estimates for the corresponding numerical solutions (see, e.g. [11],[17]). In some cases the BVP on an infinite interval can be replaced by a BVP on a finite interval with a free boundary (point) [16]. The next idea is to change the variables of the problem and to transform the BVP on the infinite interval into a singular BVP with an essential singularity on a finite interval [4, 5, 36]. It is shown experimentally in [4, 5] that the collocation method applied to the problem with the essential singularity provides satisfactory results. A somewhat different approach is to investigate the asymptotic behavior of the solution at infinity and to use this information to formulate asymptotic boundary conditions at a finite boundary point [37, 51, 61, 62, 63, 77]. In some cases this strategy can be useful to obtain a priori estimates (see, e.g.,[51]). A quite different approach proposed in [56] is based on the three-point EDS on a finite mesh. The idea is to add an exact difference boundary condition to these difference equations and to use the resulting system as the basis for the construction of a TDS of an arbitrarily given order of accuracy. More precisely, the paper [56] deals with the BVP L(k,q) u = −f (x),
0 < x < ∞, (1.100)
u(0) = µ1 ,
lim u(x) = 0,
x→∞
under the assumptions q(x) = q02 + q˜(x), k(x) ≥ c1 > 0,
q(x) ≥ c2 > 0,
p1 (x) p2 (x) pn (x) 1 = d2 + + + ··· + + ··· , k(x) x x2 xn q(x) = q02 +
(1.101)
q1 (x) q2 (x) qn (x) + + ··· + + ··· , 2 x x xn
(1.102) x → ∞, x→∞
(1.103)
33
34
Chapter 1. Introduction and a short historical overview |pi (x)| ≤ M,
|qi (x)| ≤ M,
i = 1, 2, . . . ,
(1.104)
and
d 1 , q˜(x) ∈ L2 (0, ∞), dx k(x) where q0 , d and M are positive constants. Here, the solution of problem (1.100) is understood as a generalized solution from the class W21 (0, ∞) satisfying the corresponding variational equation. For this problem the EDS as well as the TDS have been developed on the grid ω ˆ h , where the step-sizes hj must satisfy the conditions N+1 X def hj = xN+1 → ∞, h = max hj → 0. N →∞
j=1
1≤j≤N+1
N→∞
On each interval [xj−1 , xj ], j = 1, 2, . . . , N , the three-point EDS (1.57) of the form (aux¯ )xˆ,j − b(xj )uj = −ϕ(xj ), 0 < j < N + 1, (1.105) is used. The corresponding coefficients a, b and ϕ are given by −1 −1 , a(xj+1 ) = β j (0, hj+1 ) , a(xj ) = αj (0, hj ) hj b(xj ) = ~j αj (0, hj )
Z
(1.106)
0
αj (s, hj )q ∗ (s)ds
−1
Z 1 hj+1 β j (s, hj+1 )q ∗ (s)ds, ~j β j (0, hj+1 ) 0 Z 0 hj αj (s, hj )f ∗ (s)ds ϕ(xj ) = ~j αj (0, hj ) −1 Z 1 hj+1 + β j (s, hj+1 )f ∗ (s)ds, ~j β j (0, hj+1 ) 0 +
(1.107)
(1.108)
where ∗
def
q (s) =
s 0
∗
def
f (s) =
s 0
and αj (s, hj ), β j (s, hj+1 ) are the solutions of the IVPs d dαj k ∗ (s) − h2j q ∗ (s)αj = 0, −1 < s < 0, ds ds dαj j ∗ = 1, α (−1, hj ) = 0, k (s) ds s=−1 d dβ j ∗ k (s) − h2j+1 q ∗ (s)β j = 0, 0 < s < 1, ds ds dβ j = −1, β j (1, hj+1 ) = 0, k ∗ (s) ds s=1
1.2. Short history with
( def
∗
k (s) =
k(xj + shj ),
s0
.
The stencil functions αj (s, hj ), β j (s, hj+1 ) can be represented by the series (compare that with formula (1.61)) αj (s, hj ) =
∞ X
αij (s)h2i j ,
β j (s, hj+1 ) =
i=0
∞ X
βij (s)h2i j+1 ,
(1.109)
i=0
where the coefficients αij (s), βij (s) are given by the recurrence formulas Z t Z s 1 j ∗ q (λ)α (λ)dλ dt, i = 1, 2, . . . , αji (s) = i−1 ∗ −1 k (t) −1 Z 1 Z 1 1 j ∗ βij (s) = q (λ)β (λ)dλ dt, i = 1, 2, . . . , i−1 ∗ s k (t) t Z s Z 1 1 1 j j dt, β0 (s) = dt. α0 (s) = ∗ (t) ∗ (t) k k −1 s To complete the system of linear algebraic equations (1.105) we still need the exact boundary conditions at the points x0 and xN +1 . For x0 = 0, formula (1.100) yields u0 = µ1 . The following equation for the right boundary xN +1 is derived in [56] uN +1 − σ2 uN = σ3 , with def
σ2 = v˜1 (xN+1 ), v˜1 (xN+1 ) σ3 = D def
Z
xN +1
[˜ v2 (t) − v˜1 (t)]f (t)dt xN
v˜2 (xN+1 ) − v˜1 (xN +1 ) + D
Z
(1.110)
∞
[˜ v2 (t) − v˜1 (t)]f (t)dt, xN +1
def
v1 (xN +1 )˜ v20 (xN +1 ) − v˜10 (xN+1 )˜ v2 (xN+1 )), D = k(xN+1 )(˜ where the stencil functions v˜1 (x) and v˜2 (x) are the solutions of the following problems: L(k,q) v˜1 = 0, xN < x < ∞, v˜1 (xN ) = 1, L(k,q) v˜2 = 0, v˜2 (xN ) = 1,
lim v˜1 (x) = 0,
x→∞
xN < x ≤ xN+1 , d˜ v2 = 0. dx x=xN
35
36
Chapter 1. Introduction and a short historical overview def
def
Let us set s = (x − xN )/xN and µ = 1/xN . Then, it can be shown that the def
function v˜1 (x) = v˜1 (xN + sxN ) = v¯1 (s) solves the problem d¯ v1 1 = w, ¯ ds k(s) v¯1 (0) = 1,
µ2
dw − q¯(s)¯ v1 = 0, ds
lim v¯1 (s) = 0,
s→∞
def
lim w(s) = 0,
s→∞
def
¯ where k(s) = k(xN + sxN ), q¯(s) = q(xN + sxN ) and µ is the small parameter. ¯ The assumption (1.103) implies that 1/k(s) and q¯(s) can be represented in the form 1 = d2 + µ¯ p1 (s) + µ2 p¯2 (s) + · · · + µn p¯n (s) + · · · , ¯ k(s) (1.111) q1 (s) + µ2 q¯2 (s) + · · · + µn q¯n (s) + · · · , q¯(s) = k02 + µ¯ where |¯ pi (s)| ≤ M,
|¯ qi (s)| ≤ M,
i = 1, 2, . . . .
(1.112)
Using the algorithm of the asymptotical representation with respect to µ (see [56]) for the stencil function v˜1 (x) and its derivative on the interval [xN , ∞] one obtains v˜1 (x) = exp(−κ(x − xN ))[1 + µA1 (x) + · · · + µn An (x) + · · · ], d˜ v1 (x) = exp(−κ(x − xN ))[H + µB1 (x) + · · · + µn Bn (x) + · · · ], dx def
def
where κ = q0 d, H = −q0 /d and Ai (x), Bi (x) are defined by the recurrence equations Π0 v˜1 (τ0 ) = exp(−κτ0 ), Πi v˜1 (τ 0 ) = δ1 (τ0 ),
Π−1 w(τ0 ) = H exp(−κτ0 ),
Πi−1 w(τ 0 ) = Hδ1 (τ0 ) + δ2 (τ0 ),
τ0 = sµ,
ϕi (τ0 ) exp(−κτ0 ) = p¯1 (τ0 )Πi−2 w(τ 0 ) + · · · + p¯i (τ0 )Π−1 w(τ 0 ), ψi (τ0 ) exp(−κτ0 ) = q¯1 (τ0 )Πi−2 v˜1 (τ 0 ) + · · · + q¯i (τ0 )Π−1 v˜1 (τ 0 ), Z ∞ δ2 (τ0 ) = [Hϕi (t) − ψi (t)] exp(−κ(2t − τ0 ))dt, τ0
Z
τ0
δ1 (τ0 ) =
[d2 δ2 (t) + ϕi (t) exp(−κt)] exp(−κ(τ0 − t))dt,
0
Πi v˜1 (τ0 ) = Ai (τ0 ) exp(−κτ0 ), Πi−1 w(τ 0 ) = Bi (τ0 ) exp(−κτ0 ), |Ai (τ0 )| ≤ c1 ,
|Bi (τ0 )| ≤ cn .
i = 1, 2,
1.2. Short history def
If we set s = (x − xN )/hN+1 the following problem can be derived whose def
solution is v˜2 (x) = v˜2 (xN + shN+1 ) = v¯2 (s): d ¯ d¯ v2 k(s) − h2N+1 q¯(s)¯ v2 (s) = 0, ds ds v2 ¯ d¯ v¯2 (0) = 1, k = 0, ds s=0 def
0 < s ≤ 1,
def
¯ where k(s) = k(xN +shN +1 ), q¯(s) = q(xN +shN +1 ). This implies for the function v¯2 (s) the representation ∞ X β¯ij (s)h2i v¯2 (s) = N+1 , i=0
where β¯0j (s) = 1,
β¯ij (s) =
s
Z 0
1 ¯ k(t)
Z
t
j q¯(λ)β¯i−1 (λ)dλ dt,
i > 0.
0
Now, in the case of problem (1.100) the equations (1.105) together with the exact boundary conditions at the points x = 0 and x = xN+1 lead to the following EDS (aux¯ )xˆj − b(xj )uj = −ϕ(xj ), 0 < j < N + 1, u0 = µ1 ,
uN +1 − σ2 uN = σ3 ,
where the coefficients a, b, ϕ are given by (1.106)–(1.108), and σ2 , σ3 are given by (1.110). In order to obtain a TDS for problem (1.100) we replace the stencil functions αj (s, hj ), β j (s, hj+1 ) (see formula (1.109)) by the finite sums def
α(m)j (s, hj ) =
m X
αij (s)h2i j ,
i=0
def
β (m)j (s, hj+1 ) =
m X
βij (s)h2i j+1 ,
(1.113)
i=0
and use in (1.110) the finite series (n)
def
(m)
(x) =
v˜1 (x) = exp(−κ(x − xN ))[1 + µA1 (x) + · · · + µn An (x)], v˜2
def
m X
(1.114) β¯ij (s)h2i N +1 ,
s = (x − xN )/hN +1 ,
i=0
instead of the functions v˜1 (x) and v˜2 (x). This procedure leads to the following TDS: (m) (m) (m) (m) (a(m) yx¯ )xˆ,i − bi yi = ϕi , i = 1, 2, . . . , N − 1, (1.115) (m) (m) (m) (m) (m) y0 = µ1 , yN+1 − σ2 yN = σ3 ,
37
38
Chapter 1. Introduction and a short historical overview (m)
(m,n)
where a(m) , b(m) , ϕ(m) , σ2 and σ3 are the truncated coefficients given in (1.106), (1.110), (1.113) and (1.114). This difference scheme is sometimes called TDS of rank (m, n). The following theorem characterizes the order of accuracy of the TDS (see [56]). Theorem 1.14 Let the assumptions (1.114), (1.115), (1.111), (1.112) and k(x) ∈ Q1 [0, ∞),
q(x), f (x) ∈ Q0 [0, ∞),
f ∈ Lt (0, ∞),
t ≥ 1,
ˆ¯ N has be satisfied. Then, the TDS (1.115) of rank (m, n) which is defined on ω the order of accuracy O(max{µn+1 , xN h2m+2 }), (1.116) def
where µ = 1/xN and m, n ≥ 0. In order to estimate the accuracy of a TDS as a function of the number of grid points, we consider the finite equidistant grid ω ¯ N = {x0 = 0, x1 , . . . , xN+1 }. If we choose h = N −ε , 0 < ε < 1, then it holds that xN = N h → ∞, N→∞
µ = 1/xN → 0. N→∞
Let us set
n+2 . 2m + n + 4 Then it can be easily shown that the two arguments of the maximum function in (1.116) are equal. Thus, if m is fixed and n satisfies n ≤ m, the order of accuracy of the TDS (1.115) is a maximum. For n = 2m we have h = N −1/2 and we obtain for the order of accuracy O(h2m+1 ). ε = ε(m, n) =
The representation of the coefficients of the TDS by truncated series in powers of the mesh-size has the same disadvantages as the techniques mentioned in the former publications on this topic discussed above. The EDS as well as an alternative TDS in which the coefficients are computed with IVP-solvers have been proposed and justified in [25, 26] for the nonlinear BVP on the half-axis d2 u − m2 u = −f (x, u) , dx2 u (0) = µ1 ,
x ∈ (0, ∞) ,
lim u (x) = 0.
x→∞
Under the assumption that the coefficients of the TDS are computed by an IVPsolver of the order n, it is shown that the implementation of the EDS by the TDS has the order of accuracy n ¯ = 2[(n + 1)/2], where n is a positive natural number and [·] denotes the entire part of the argument in these brackets. There are other techniques to construct EDS and the corresponding TDS of a high order of accuracy which cannot be classified with the general approach
1.2. Short history described above. Without claim of completeness let us mention here some of them. In [13, 52] for the problem (1.46), (1.47) an interesting approach has been proposed to develop 3-point TDS for sufficiently smooth input data k(x), q(x) and f (x). This approach was modified in [19] for piece-wise smooth input data with discontinuities at the grid nodes. Moreover, the former assumption q(x) ≥ 0 is replaced in this paper by |q(x)| ≤ c2 . (1.117) In order to construct the associated TDS (i.e. to calculate their coefficients) the solution of a system of linear algebraic equations is required, the order of which depends on the desired accuracy of the approximate solution (the same is valid for the schemes proposed in [13, 52]). The recent book [3] deals with the construction and investigation of difference schemes of an arbitrarily given order of accuracy for regular and singularly perturbed BVPs for ODEs of first and second order with operator coefficients from Banach spaces. Such equations can be considered as meta-models for linear systems of ODEs as well as for linear parabolic, elliptic or hyperbolic PDEs. The authors use an EDS which is defined on two-point or three-point stencils (for the first and the second order equations, respectively) as the basis for the construction of TDS of high accuracy. They approximate the function e−z (the principal part of the EDS) by Pad´e approximations and thus obtain difference schemes of an arbitrarily given order of accuracy p with explicit coefficients which become more and more complex with increasing p. As a second approach the authors use the so-called Taylor’s decompositions (with explicitly given coefficients) on two and three points. Unfortunately, there are no numerical examples testing and comparing the robustness of both types of difference schemes. For some time dependent PDEs, special techniques to construct EDS and the related algorithms were proposed and analysed in [50, 64, 65, 66, 69].
39
41
Chapter 2
Two-point difference schemes for systems of nonlinear BVPs No amount of experimentation can ever prove me right; a single experiment can prove me wrong. Albert Einstein (1879–1955)
This chapter deals with BVPs of the form u0 (x) + A(x)u = f (x, u),
x ∈ (0, 1),
B0 u(0) + B1 u(1) = β,
(2.1)
where A(x), B0 , B1 , ∈ Rd×d ,
rank[B0 , B1 ] = d,
f (x, u), β, u(x) ∈ Rd ,
and u is an unknown d-dimensional vector-function. On an arbitrary closed nonequidistant grid (1.3) there exists a unique 2-point EDS (see Definition 1.8) such ˆ¯ h , of the that its solution coincides with the grid function {u(xj )}N j=0 , xj ∈ ω exact solution u(x). Algorithmical realizations of the EDS are the TDS (see Definition 1.9). These schemes have an order of accuracy O(hm ), with respect to the maximal step size h, which can arbitrarily be prescribed by the user. Note that the EDS and TDS are very similar to the multiple shooting method [2, 35, 39, 40, 79]. Both techniques are based on the successive solution of IVPs on small subintervals and are theoretically supported by a posteriori error estimates. However, the advantage of our difference methods is that a unified theory of a priori estimates can be established. I.P. Gavrilyuk et al., Exact and Truncated Differences Schemes for Boundary Value ODEs, International Series of Numerical Mathematics 159, DOI 10.1007/978-3-0348-0107-2_2, © Springer Basel AG 2011
41
42
Chapter 2. 2-point difference schemes for systems of ODEs
2.1
Existence and uniqueness of the solution
Let us consider the BVP (2.1). By the linear part of the ODE in (2.1) a so-called fundamental matrix (or the evolution operator) U (x; ξ) is defined. Definition 2.1. For any ξ ∈ [0, 1] a fundamental matrix U (x; ξ) ∈ Rd×d is defined as a function satisfying the matrix IVP U 0 (x; ξ) + A(x)U (x; ξ) = 0,
0 < x < 1,
U (ξ; ξ) = I,
(2.2)
where I ∈ Rd×d denotes the identity matrix. In (2.2) the differentiation is with respect to x, and ξ is a parameter. def √ In what follows we denote by kuk = uT u the Euclidian norm of u ∈ Rd and we will use the subordinate matrix norm generated by this vector norm.
Let us make the following assumptions. Assumption 2.1. (i) The linear homogeneous problem corresponding to (2.1) possesses only the trivial solution. d
(ii) For the elements of A(x) = [aij (x)]i,j=1 it holds that aij (x) ∈ C[0, 1], i, j = 1, 2, . . . , d. The Assumption 2.1,(ii) implies the existence of a constant c1 such that kA(x)k ≤ c1
for all x ∈ [0, 1].
It can easily be shown that Assumption 2.1,(i) guarantees the nonsingularity of def
the matrix Q = B0 + B1 U (1; 0), i.e. the following auxiliary statement holds. Lemma 2.1 The matrix Q is nonsingular if and only if the linear homogeneous problem corresponding to (2.1) has only the trivial solution u(x) ≡ 0.
Proof. See e.g. [70], p.226, and [2], p.91.
Some sufficient conditions which guarantee that the linear homogeneous BVP corresponding to (2.1) has only the trivial solution are given in the following two lemmas. Lemma 2.2 Let A(x) ≥ 0 for all x ∈ [0, 1], i.e., A(x) is positive semidefinite. Moreover, we assume that one of the following conditions is satisfied:
2.1. Existence and uniqueness of the solution
def
(i) B0−1 exists and B0−1 B1 = α < 1; or (ii) B1−1 exists and kB0−1 B1 B1−1 B0 (iii) (B0 + B1 )
−1
T
k < 1; or
exists and k (B0 + B1 )
−1
B1 k < 1/2.
Then, problem (2.1) with f (x, u) ≡ 0 and β = 0 has only the trivial solution.
Proof. Here we show only the statement (iii). Assumption 2.1,(ii) guarantees the existence and uniqueness of the solution to the IVP (2.2). From the homogeneous ODE we derive u(x)T u0 (x) + u(x)T A(x)u(x) = 0. Now the assumptions postulated in the lemma imply 1 d 2 kuk ≤ 0. 2 dx
(2.3)
ku(1)k ≤ ku(0)k .
(2.4)
Thus The consequences of the homogeneous boundary conditions are u(0) = (B0 + B1 )
−1
Let us define
B1 [u(0) − u(1)] , def
P = (B0 + B1 )
−1
B1 ,
u(1) = (B0 + B1 )
−1
B0 [u(1) − u(0)] . (2.5)
def
v = u(1) − u(0).
Then u(0) = −P v, u(1) = v − P v and it follows from (2.4) that k(I − P ) vk ≤ kP vk . This implies kvk ≤ kv−P vk + kP vk ≤ 2 kP vk ≤ 2kP k kvk . From the last inequality and condition (iii) we get kvk = 0, i.e., u(0) = u(1), which together with (2.5) implies u(0) = u(1) = 0. Now using (2.3) the claim u(x) ≡ 0 is proved. Lemma 2.3 Let A ∈ Rd×d be a constant matrix such that the inverse [B0 + B1 e−A ]−1 exists and the estimate Z x
−xA
e max (B0 + B1 e−A )−1 B0 eξA (A − A(x)) dξ 0≤x≤1
0
Z
1
+ x
−xA
−A −1 −(1−ξ)A (B0 + B1 e ) B1 e (A − A(x)) dξ < 1
e
holds. Then, the matrix Q is nonsingular and the linear homogeneous BVP
43
44
Chapter 2. 2-point difference schemes for systems of ODEs corresponding to (2.1) possesses only the trivial solution.
Proof. Let us write the homogeneous equation corresponding to (2.1) in the equivalent form u0 (x) + Au = [A − A(x)]u, x ∈ (0, 1). We get u(x) = e
−Ax
x
Z
e−(1−ξ)A [A − A(ξ)]u(ξ)dξ.
u(0) +
(2.6)
0
Substituting this expression into the boundary condition we obtain B0 u(0) + B1 e
−A
Z
1
e−(1−ξ)A [A − A(ξ)]u(ξ)dξ = 0.
u(0) + B1 0
Thus, u(0) = −[B0 + B1 e−A ]−1 B1
Z
1
e−(1−ξ)A [A − A(ξ)]u(ξ)dξ.
0
Using this in (2.6) we see that the solution of problem (2.1) satisfies the integral equation Z x −(x−ξ)A −xA −A −1 −(1−ξ)A u(x) = e [A − A(ξ)]u(ξ)dξ −e [B0 + B1 e ] B1 e 0
Z
1
e−xA [B0 + B1 e−A ]−1 B1 e−(1−ξ)A [A − A(ξ)]u(ξ)dξ
− x
and we obtain the estimate Z x
−xA
e [I − (B0 + B1 e−A )−1 B1 e−A ]eξA [A − A(ξ)] dξ ku(x)k ≤ 0
Z
1
+ x
−xA
−A −1 −(1−ξ)A [B0 + B1 e ] B1 e [A − A(ξ)] dξ kuk∞
e
from which the assertion of the lemma follows.
Let us introduce the vector-function def
u(0) (x) = U (x; 0)Q−1 β, (which exists due to Assumption 2.1,(i) for all x ∈ [0, 1]) and the set def T Ω (D, β(x)) = v(x) = (v1 (x), . . . , vd (x)) , vj ∈ C[0, 1], j = 1, 2, . . . , d, (2.7)
v(x) − u(0) (x) ≤ β(x), x ∈ D ,
2.1. Existence and uniqueness of the solution where D ⊆ [0, 1] is a closed set. Due to Assumption 2.1,(i) the problem (2.1) is equivalent to the integral equation Z1 (2.8) u(x) = G(x, ξ) f (ξ, u(ξ))dξ + u(0) (x), x ∈ [0, 1], 0
where G(x, ξ) is the Green’s function of the corresponding linear differential operator (see, e.g. [2], p.226), which can be written in the form ( −U (x; 0)HU (1; ξ), 0 ≤ x ≤ ξ, def (2.9) G(x, ξ) = −U (x; 0)HU (1; ξ) + U (x; ξ), ξ ≤ x ≤ 1, def
where H = Q−1 B1 . Now we can formulate the next auxiliary statement. Lemma 2.4 Let Assumption 2.1 be satisfied. Then kU (x; ξ)k ≤ exp[c1 (x − ξ)], ( exp[c1 (1 + x − ξ)] kHk , 0 ≤ x ≤ ξ, kG(x, ξ)k ≤ exp[c1 (x − ξ)] [1 + kHk exp(c1 )] , ξ ≤ x ≤ 1.
(2.10) (2.11)
Proof. In order to prove (2.10) let us rewrite the IVP (2.2) in the equivalent form Zx U (x; ξ) = I −
A(η)U (η; ξ)dη. ξ
Then we have
Zx kA(η)k kU (η; ξ)k dη.
kU (x; ξ)k ≤ 1 + ξ
With Gronwall’s Lemma (see e.g. [33], p. 24) we get (2.10). The estimate (2.11) follows from (2.9) and (2.10). In addition to Assumption 2.1 we postulate d
Assumption 2.2. The vector-function f (x, u) = {fj (x, u)}j=1 satisfies the conditions (i) fj ∈ C([0, 1] × Ω ([0, 1], r(x))), kf (x, u)k ≤ K
for all u ∈ Ω ([0, 1], r(x)),
(ii) kf (x, u) − f (x, v)k ≤ L ku − vk for all x ∈ [0, 1] and u, v ∈ Ω ([0, 1], r(x)),
45
46
Chapter 2. 2-point difference schemes for systems of ODEs def
where r(x) = K exp(c1 x) [x + kHk exp(c1 )].
Now, we discuss sufficient conditions which guarantee the existence and uniqueness of a solution of problem (2.1). Later we will use these conditions to prove the existence of an EDS and the corresponding TDS. We begin with the following statement. Theorem 2.1 Let Assumptions 2.1 and 2.2 be satisfied. Suppose def
q = L exp(c1 ) [1 + kHk exp(c1 )] < 1.
(2.12)
Then there exists a unique solution u ∈ Ω ([0, 1], r(x)) of problem (2.1) which can be determined using the iteration procedure
u
(k)
Z1 (x) =
G(x, ξ)f (ξ, u(k−1) (ξ))dξ + u(0) (x),
x ∈ [0, 1].
(2.13)
0
The corresponding error estimate is
(k)
u − u
≤ 0,∞,[0,1]
qk r(1), 1−q
(2.14)
def
where kvk0,∞,[0,1] = maxx∈[0,1] kv(x)k.
Proof. Let us show that the operator
def
Z1
0 such that for all {hj }j=1 with h ≤ h0 the following estimation holds: (m) ¯ (m) ¯ 2 2 Ah (x, u) − Ah (x, v), u − v ≥ c ku − vkB(m) ≥ 8c˜ c1 ku − vk0,2,ˆωh , ¯ ω ˆh
h
(3.45) ¯ where 0 < c < 1 and 0 < c˜1 ≤ a(m) (x) are constants. (m) ¯
Therefore the operator Ah (x, u) is strongly monotone and for h ≤ h0 the ¯ m-TDS ¯ (3.38) has a unique solution y (m) (x), x ∈ ω ˆ h (see [82, p.461]). def
¯ The error z(x) = y (m) (x) − u(x),
x ∈ ω ˆ h , of the difference scheme (3.38)
3.3. Implementation of the three-point EDS satisfies the problem h i ¯ ¯ ¯ ¯ a(m) (x)zx¯ (x) + ϕ(m) (x, y(m) ) − ϕ(m) (x, u) x ˆ
¯ = ϕ(x, u) − ϕ(m) (x, u) +
h
i ¯ a(x) − a(m) (x) ux¯ (x) ,
(3.46)
x ˆ
z(0) = z(1) = 0. Using (3.46) we obtain
(m) ¯
(m) ¯
¯ Ah (x, u) − Ah (x, y (m) ), z
¯ = ϕ(x, u) − ϕ(m) (x, u), z
ω ˆh
+ ω ˆh
¯ a(m) − a ux¯ , zx¯
(3.47) , +
ω ˆh
which together with (3.45) implies the estimation (m) ¯ (m) ¯ ¯ Ah (x, u) − Ah (x, y(m) ), z
2
ω ˆh
≥ c kzkB (m) ¯ .
(3.48)
h
Using the Cauchy-Bunyakovsky-Schwarz inequality (see Theorem 1.8) we obtain from (3.40) and (3.41) the following estimates for the summands on the right-hand side of (3.47): a
(m) ¯
− a ux¯ , zx¯ + ω ˆh
¯
≤ a(m) − a
0,2,ˆ ωh
≤
¯ kux¯ k0,2,ˆω+ kzx¯ k0,2,ˆω+ ≤ M hm kzx¯ k0,2,ˆω+ h
h
(3.49)
h
¯ M hm kzkB (m) ¯ , h c˜1
and ¯ ϕ(x, u) − ϕ(m) (x, u), z
ω ˆh
≤ M hm+1 kzx¯ k0,2,ˆω+ ≤ h
M hm+1 kzkB(m) ¯ h c˜1
(3.50)
M hm kzkB (m) ¯ h c˜1
(3.51)
if m is odd, and ¯ (x, u), z ϕ(x, u) − ϕ(m)
ω ˆh
≤ M hm kzx¯ k0,2,ˆω+ ≤ h
if m is even. ¯ The estimates (3.48)–(3.51) yield kzkB(m) ≤ M hm . Furthermore due to the ¯ h
¯ equivalence of the norms k·k1,2,ˆωh and k·kB(m) we obtain kzk1,2,ωˆ h ≤ M hm . ¯ h
107
108
Chapter 3. 3-point difference schemes for scalar ODEs (m) ¯
(m) ¯
¯ ¯ Since y0 = Y20 (x0 , y (m) ), yj = Y1j (xj , y (m) ) and the relations (3.32)–(3.34) hold, we have dz (m)0 ¯ ¯ ¯ ) − Z20 (x0 , y (m) ) + Z20 (x0 , y (m) ) − Z20 (x0 , u) ≤ Z2 (x0 , y(m) k dx x=x0 1 ¯ (m) ¯ 0 (m) ¯ Y2(m)0 (x , y ) − Y (x , y ) + 0 0 2 (m)0 ¯ (x0 ) V2 ∂ ¯ ¯ ≤M1 hm + Z20 (x0 , u) kzk0,2,ˆωh ≤ M2 hm , ∂u u=˜ u dz (m)j ¯ ¯ ¯ ) − Z1j (xj , y(m) ) + Z1j (xj , y (m) ) − Z1j (xj , u) k ≤ Z1 (xj , y(m) dx x=xj 1 (m)j ¯ ¯ (m) ¯ Y1j (xj , y (m) ) − Y (x , y ) + j 1 (m)j ¯ (xj ) V1 ∂ j m ¯ ¯ ≤M3 h + Z1 (xj , u) kzk0,2,ˆωh ≤ M4 hm , j = 1, 2, . . . , N, ∂u u=˜ u
dz
dz ¯
k k ≤ max . ≤ M hm
dx j=0,1,...,N dx ˆ 0,2,ω ¯h x=xj ∗
¯ Now, using (3.39)–(3.41), we get the claim kzk1,2,ˆωh ≤ M hm .
In order to solve the nonlinear equations of the m-TDS ¯ (3.38), we use an iteration method which is characterized in the next theorem. Theorem 3.4 Let the assumptions of Theorem 3.3 be satisfied. Then (m) ˜ ¯ (x, v) ≤ L |u − v| , ϕ ¯ (x, u) − ϕ(m) N
and there exists a h0 > 0 such that for all {hj }j=1 with h ≤ h0 the following two relations are satisfied: ¯ a(m) (x) ≥ c˜1 > 0, c˜1 ∈ R, (m) ¯ (m) ¯ Ah (x, u) − Ah (x, v), u − v
ω ˆh
≥ cku − vk2B (m) ¯ ,
0 < c < 1.
h
Moreover, the iteration method (m) ¯
Bh
¯ ¯ y (m,n) − y (m,n−1) (m) ¯ ¯ + Ah (x, y (m,n−1) ) = 0, τ
¯ (0) = µ1 , y (m,n) ¯ y (m,0) (x) =
¯ y (m,n) (1) = µ2 ,
V2 (x) V1 (x) µ1 + µ2 V1 (1) V1 (1)
n = 1, 2, . . . ,
x∈ω ˆh, (3.52)
3.3. Implementation of the three-point EDS converges and for the corresponding error we have
∗
(m,n)
¯ − u ≤ M (hm + q n ),
y
(3.53)
1,2,ˆ ωh
where ˜ −2 L , τ = τ0 = c 1 + 8˜ c1 def
def
q =
√
1 − cτ0 ,
¯ (m,n) ¯ Y (m)0 ¯ ¯ x0 , y (m,n) − y0 dy (m,n) (m)0 2 (m,n) ¯ x + = Z , y k(x) , 0 2 (m)1 ¯ dx x=x0 V1 (x1 ) ¯ (m)j ¯ ¯ y (m,n) ¯ − Y1 xj , y (m,n) dy (m,n) j (m)j (m,n) ¯ xj , y + = Z1 , k(x) (m)j ¯ dx x=xj V1 (xj ) and the constant M does not depend on h, m and n.
Proof. Theorem 3.3 implies
∗
(m,n)
− u
y
1,2,ˆ ωh
∗
≤ y (m) − u
1,2,ˆ ωh
∗
¯ ¯ + y (m,n) − y (m)
1,2,ˆ ωh
∗
¯ ¯ ¯ ≤ M hm + y (m,n) − y (m)
.
1,2,ˆ ωh
N
¯ ([xj−1 , xi ] × R2 ), we have Since f (x, u, ξ) ∈ ∪ Cm j=1
˜ (m) ¯ (x, v) ≤ L|u − v|. ϕ ¯ (x, u) − ϕ(m) By using the Cauchy-Bunyakovsky-Schwarz inequality (see Theorem 1.8), (m) ¯ (m) ¯ Ah (x, u) − Ah (x, v), w ωˆ h
(m)
¯ ¯ ≤ ku − vkB (m) (x, u) − ϕ(m) (x, v) ¯ kwk (m) ¯ + ϕ B h
0,2,ˆ ωh
h
˜ ≤ ku − vkB (m) ¯ kwk (m) ¯ + L ku − vk0,2,ˆ ωh kwk0,2,ˆ ωh B h
h
≤ ku − vkB (m) ¯ kwk (m) ¯ + B h
h
˜ L kux¯ − vx¯ k0,2,ˆω+ kwx¯ k0,2,ˆω+ h h 8
˜ L ku − vkB(m) ≤ 1+ ¯ kwk (m) ¯ . Bh h 8˜ c1
kwk0,2,ˆωh
(3.54)
109
110
Chapter 3. 3-point difference schemes for scalar ODEs def
Setting w =
−1 (m) ¯ (m) ¯ (m) ¯ Ah (x, u) − Ah (x, v) , we obtain Bh
−1
(m) (m) ¯ (m) ¯
B ¯ Ah (x, u) − Ah (x, v)
h
(m) ¯
Bh
˜ L ku − vkB(m) ≤ 1+ ¯ . h 8˜ c1
(3.55)
It follows from (3.46), (3.55) that −1 (m) ¯ (m) ¯ (m) ¯ (m) ¯ (m) ¯ Ah (x, u) − Ah (x, v), Bh Ah (x, u) − Ah (x, v) ω ˆh
˜ 2 (m) ˜ 2 1 L L ¯ (m) ¯ 2 1+ Ah (x, u) − Ah (x, v), u − v ≤ 1+ ku − vkB (m) ≤ . ¯ 8˜ c1 c 8˜ c1 ω ˆh h Using the results of [74, p.502] we conclude that the iteration method (3.52) converges in the space HB (m) ¯ . Its norm is equivalent to the norm of the space h
◦
W21 (ˆ ωh ), and so we get
(m,n) ¯
y ¯ − y (m)
1,2,ˆ ωh
≤ M1 q n .
Besides we have dy (m,n) ¯ ¯ dy (m) − k k dx dx x=x0 x=x0 (m)0 (m)0 ¯ ¯ ≤ Z2 (x0 , y (m,n) ) − Z2 (x0 , y (m) ) 1 ¯ (m)0 ¯ (m,n) ¯ (m) ¯ Y2(m)0 (x , y ) − Y (x , y ) + 0 0 2 (m)0 ¯ (x0 ) V2
∂ (m)0 (m,n) ¯ (m) ¯ Y2 ¯ (x0 , u) + −y
y (m)0 ¯ 0,2,ˆ ωh u=˜ y V2 u=¯ y (x0 ) ∂u
∂ (m)0 ≤ Z2 (x0 , u) ∂u
¯ ¯ ≤ M1 y (m,n) − y (m)
1
, 0,2,ˆ ωh
dy (m,n) ¯ ¯ dy (m) − k k dx dx x=xj x=xj (m)j (m)j ¯ ¯ ≤ Z1 (xj , y (m,n) ) − Z1 (xj , y (m) ) 1 ¯ (m)j ¯ (m,n) ¯ (m) ¯ Y1(m)j (x , y ) − Y (x , y ) + j j 1 (m)j ¯ (xj ) V1
3.3. Implementation of the three-point EDS
∂ 1
(m,n) ¯ ¯ (m) ¯ Y1(m)j + (x , u) −y
y j (m)j ¯ 0,2,ˆ ωh u=˜ y V1 u=¯ y (xj ) ∂u
∂ (m)j ≤ Z1 (xj , u) ∂u
¯ ¯ ≤ M2 y (m,n) − y (m)
,
j = 1, 2, . . . , N,
0,2,ˆ ωh
¯ ¯
dy (m,n) dy (m)
k
−k
dx dx
ˆ 0,2,ω ¯h
dy (m,n) ¯ ¯ dy (m) ≤ max k − k j=0,1,...,N dx dx x=xj x=xj
¯ ¯ ≤ M y (m,n) − y (m)
, 1,2,ˆ ωh
from which we obtain
∗
(m,n) ¯
y ¯ − y (m)
≤ M qn .
(3.56)
The inequalities (3.54), (3.56) yield the estimate (3.53).
1,2,ˆ ωh
It is preferable to compute the solution of (3.38) by a slightly modified version of the well-known Newton’s method which was justified in [44]. It is ¯ (xj , u) = ~−1 ϕ(m) j
2 X
α
(−1)
(ku0 )β + (−1)α+1 hγ Φ2 xβ , uβ , (ku0 )β , (−1)α+1 hγ
α=1
−
Φ1 xβ , uβ , (ku0 )β , (−1)α+1 hγ Φ3 (xβ , 0, (−1)α+1 hγ )
,
where we have used as before the abbreviations def
β = j + (−1)α ,
def
γ = j − 1 + α.
From (3.25)–(3.27) we have the relations Φ1 (x, u, ξ, 0) =
ξ , k(x)
∂Φ1 (x, u, ξ, 0) f (x, u, ξ) =− , ∂h 2k(x)
Φ2 (x, u, ξ, 0) = −f (x, u, ξ) ,
Φ3 (x, u, 0) =
1 . k(x)
Thus we can write (m) ¯
ϕ
(xj , y
(m) ¯
2 ¯ hγ dy (m) (m) ¯ +O , ) = f xj , yj , dx x=xj ~j
111
112
Chapter 3. 3-point difference schemes for scalar ODEs 2 ¯ hγ dy (m) (m) ¯ . = y + O x ¯,j dx x=xj ~j The modified Newton’s method now reads: (m,0) ¯
Provide starting values ∇yj
, j = 0, 1, . . . , N ;
For n = 1, 2, . . . (m,n) ¯
1) compute the Newton correction ∇yj linear equations
(m,n) ¯
¯ a(m) ∇yx¯
x ˆ,j
+
, j = 0, 1, . . . , N , from the system of
¯ dy (m,n−1) (m,n−1) ¯ ∂f xj , yj , dx x=xj ∂u
+
(m,n) ¯
∇yj
¯ dy (m,n−1) (m,n−1) ¯ ∂f xj , yj , dx x=xj ∂ξ
(m,n) ¯
∇yx¯,j
¯ ¯ ¯ ¯ (m,n−1) = −ϕ(m) yx¯ , xj , y (m,n−1) − a(m) x ˆ,j (m,n) ¯
∇y0
= 0,
(m,n) ¯
∇yN
= 0,
j = 1, 2, . . . , N − 1,
2) compute the new iterate (m,n) ¯
yj
3.4
(m,n−1) ¯
= yj
(m,n) ¯
+ ∇yj
,
j = 0, 1, . . . , N.
Boundary conditions of 3rd kind
Let us now consider the BVP d du du k(x) = −f x, u, , dx dx dx k(0)
du(0) − β1 u(0) = −µ1 , dx
k(1)
x ∈ (0, 1),
(3.57)
du(1) + β2 u(1) = µ2 dx
(3.58)
and derive an exact difference boundary condition at x = 0 which is satisfied by the exact solution of problem (3.57), (3.58). To achieve this, we represent the solution of problem (3.57), (3.58) on the interval [x0 , x1 ] in the form u(x) = Y20 (x, u),
(3.59)
3.4. Boundary conditions of 3rd kind where the function Y20 (x, u) is the solution of the IVP dY20 (x, u) Z 0 (x, u) dZ20 (x, u) Z 0 (x, u) = 2 , = −f x, Y20 (x, u), 2 , dx k(x) dx k(x) du 0 0 Y2 (x1 , u) = u1 , Z2 (x1 , u) = k(x) , 0 = x0 < x < x1 . dx x=x1
(3.60)
We require that this function satisfies the condition k(0)
du(0) − β1 u(0) = −µ1 . dx
(3.61)
Substituting (3.59) into (3.61) we obtain a1 ux,0 − β1 u0 = −µ1 − h1 ϕ(x0 , u),
(3.62)
where def
a1 = a(x1 ) =
1 0 V (x0 ) h1 2
−1
def
,
ϕ(x0 , u) =
1 Y 0 (x0 , u) − u1 . Z20 (x0 , u) + 2 0 h1 V2 (x0 )
The function V20 (x) is the solution of the IVP dV20 (x) 1 = , dx k(x)
x0 < x < x1 ,
V20 (x1 ) = 0,
and can be represented explicitly in the form Z x1 1 V20 (x) = dξ. k(ξ) 0
(3.63)
(3.64)
Analogously the boundary condition k(1)
du(1) + β2 u(1) = µ2 dx
corresponds to the exact difference condition aN ux¯,N + β2 uN = µ2 + hN ϕ(xN , u), where −1 1 N V1 (xN ) , hN Y1N (xN , u) − uN −1 def 1 N . Z1 (xN , u) − ϕ(xN , u) = hN V1N (xN ) def
aN = a(xN ) =
The functions Y1N (x, u) and Z1N (x, u) are the solutions of the IVPs dY1N (x, u) Z N (x, u) dZ1N (x, u) Z N (x, u) = 1 , = −f x, Y1N (x, u), 1 , dx k(x) dx k(x)
(3.65)
113
114
Chapter 3. 3-point difference schemes for scalar ODEs Y1N (xN −1 , u)
= uN −1 ,
Z1N (xN −1 , u)
du = k(x) , dx x=xN −1
xN−1 < x < xN ,
and the function V1N (x) is the solution of the IVP 1 dV1N (x) = , dx k(x)
xN −1 < x < xN ,
V1N (xN −1 ) = 0.
Let us construct an approximation of the exact boundary condition (3.62). To determine numerically the solution of the IVPs (3.60), (3.63) we use the one-step method (m)0 ¯
(x0 , u) = u1 − h1 Φ1 (x1 , u1 , (ku0 )1 , −h1 ),
(m)0
(x0 , u) = (ku0 )1 − h1 Φ2 (x1 , u1 , (ku0 )1 , −h1 ),
(m)0 ¯
(x0 ) = h1 Φ3 (x1 , 0, −h1 ).
Y2
Z2 V2
Instead of (3.62) one can use a difference rank-m-approximation ¯ of the boundary condition (3.61): (m) ¯ (m) ¯
(m) ¯
a1 yx,0 − β1 y0
¯ ¯ = −µ1 − h1 ϕ(m) (x0 , y(m) ),
(m) ¯
yN
= µ2 ,
where −1 1 (m)0 ¯ a (x1 ) = V (x0 ) , h1 2 # " (m)0 ¯ (m) ¯ ¯ (x0 , y (m) ) − y1 Y2 def 1 (m)0 (m) ¯ (m) ¯ (m) ¯ . Z2 (x0 , y ) + ϕ (x0 , y ) = (m)0 ¯ h1 V (x0 )
(m) ¯ def a1 =
(m) ¯
2
Note that the relation V20 (x0 ) =
h1 + O(h21 ) and Lemma 3.4 imply k1
¯ (x1 ) − a(x1 ) a(m) (m)0 ¯
=
h1 [V20 (x0 ) − V2
(x0 )]
(m)0 ¯ V20 (x0 )V2 (x0 )
¯ = O(hm 1 ),
¯ (x0 , u) − ϕ(x0 , u) ϕ(m) ) ( (m)0 ¯ 1 Y2 Y20 (x0 , u) − u1 (x0 , u) − u1 (m)0 0 = Z2 (x0 , u) − Z2 (x0 , u) + − (m)0 ¯ h1 V20 (x0 ) V (x0 ) 2
=
¯ O(hm 1 ).
3.5. Numerical examples This means that the difference scheme (m) ¯
¯ ¯ ¯ (a(m) yx¯ )xˆ,j = −ϕ(m) (xj , y (m) ),
j = 1, 2, . . . N − 1, (3.66)
(m) ¯ (m) ¯
(m) ¯
a1 yx,0 − β1 y0
(m) ¯
¯ ¯ = −µ1 − h1 ϕ(m) (x0 , y(m) ),
yN
= µ2
approximates problem (3.57), (3.58) with order of accuracy m. ¯ Analogously, the approximation of the boundary condition (3.65) is of the form −1 1 (m)N (m) ¯ (m) ¯ (m) ¯ ¯ ¯ aN yx¯,N + β2 yN = µ2 + hN ϕ(m) (xN , u), aN = V1 (xN ) , hN # " (m)N ¯ (m) ¯ (m) ¯ Y (x , y ) − y 1 N (m)N 1 N −1 ¯ ¯ ¯ . Z1 (xN , y(m) )= (xN , y (m) )− ϕ(m) (m)N ¯ hN V (xN ) 1
3.5
Numerical examples
Example 3.1. Let us consider the BVP u00 = exp(u),
u(0) = 0,
with the exact solution u(x) = − ln cos2
√ u(1) = − ln cos2 1/ 2 , √ x/ 2 .
(3.67)
Let f (x, u, ξ) = − exp(u), f0 (x) ≡ 0, then the condition (3.5) is fulfilled if we use c(t) = exp(t), g(x) ≡ 1. Besides we have [f (x, u, ξ) − f (x, v, η)] (u − v) = − exp(θu + (1 − θ)v)(u − v)2 ≤ 0,
0 < θ < 1.
Thus, due to Theorem 3.1 the problem has a unique solution. In order to solve (3.67) numerically we use the following 6-TDS: (6) (6) (6) yx¯xˆ,j = −ϕ(6) xj , y(6) , j = 1, 2, . . . , N − 1, y0 = µ1 , yN = µ2 , (3.68) where ϕ(6) (xj , u) = ~−1 j µ1 = 0, (6)j
and Yα
2 X
(−1)α (6)j (−1)α Zα(6)j (xj , u) + Yα (xj , u) − uβ , hγ α=1
√ µ2 = − ln cos2 1/ 2 , (6)j
(x, u), Zα (x, u) are the numerical solutions of the IVPs
dYαj (x, u) = Zαj (x, u), dx Yαj (xβ , u) = uβ ,
dZαj (x, u) = −f x, Yαj (x, u) , Zαj (x, u) , dx du j Zα (xβ , u) = , dx x=xβ
x ∈ ejα , (3.69)
115
116
Chapter 3. 3-point difference schemes for scalar ODEs j = 2 − α, 3 − α, . . . , N + 1 − α,
α = 1, 2.
We have solved the IVPs (3.69) with the explicit 7-stage Runge-Kutta method of order 6 which is characterized by the Butcher tableau given in Table 2.4. To determine the solution of the difference scheme (3.68) the following fixed point iteration can be used: • starting values (6,0)
yj
= (1 − xj )µ1 + xj µ2 ,
• iteration procedure (n = 1, 2, . . .) (6,n) yx¯xˆ,j = −ϕ(6) xj , y (6,n−1) ,
j = 0, 1, . . . , N ;
j = 1, 2, . . . , N − 1, (3.70)
(6,n)
y0
= µ1 ,
(6,n) yN
= µ2 .
The equations (3.70) represent a system of linear algebraic equations for the unknowns y (6,n) (x), x ∈ ω ˆ h . We solved this system with a special Gaussian elimination technique for linear systems with a tridiagonal matrix (see e.g. [30]). Numerical results for the equidistant grid ωh are given in Table 3.1. Here, we have used the formulas
(6) ∗
z
∗
def (6) ∗ def
(6)
1,2,ωh er = z = y − u and p = log2 (3.71)
z (6) ∗ 1,2,ωh 1,2,ωh 1,2,ω h/2
to measure the error and the order of convergence, respectively. Obviously, p has been determined by the well-known Runge technique. This and the next two examples should elucidate that the theoretical order of accuracy is actually achieved.
N 8 16 32
er 0.1987 E − 8 0.3168 E − 10 0.4894 E − 12
p 6.0 6.0
Table 3.1: Numerical results for problem (3.67)
Example 3.2. Let us consider the problem 1 d2 u du 1 5 2 = cos , u(0) = 0, u(1) = arctan − ln dx2 2 dx 2 4
(3.72)
3.5. Numerical examples with the exact solution u(x) = x arctan
1 2 1 x − ln 1 + x . 2 4
1 Here we have f (x, u, ξ) = − cos2 ξ and further 2 1 [f (x, u, ξ) − f (x, v, η)] (u − v) = − cos2 (θξ + (1 − θ)η) (ξ − η) (u − v) 2 1 1 1 1 2 2 2 2 2 ≤ cos (θξ + (1 − θ)η) (u − v) + (ξ − η) ≤ |u − v| + |ξ − η| , 2 2 2 4 which means that the BVP (3.72) is monotone. The numerical results for the method with order of accuracy 6 (m = 6) on the equidistant grid ωh are given in Table 3.2. N 4 8 16
er 0.6972 E − 8 0.1099 E − 9 0.1723 E − 11
p 6.0 6.0
Table 3.2: Numerical results for problem (3.72)
Example 3.3. Let us consider the BVP d2 u du =u , dx2 dx
du(0) = −0.5/ cosh2 (1/4) , dx
u(1) = − tanh (1/4) .
(3.73)
The exact solution is u(x) = tanh ((1 − 2x)/4). The numerical results which have been obtained for the difference scheme (3.63) of order of accuracy 6 (m = 6) on the equidistant grid ωh are given in Table 3.3. N 4 8 16 32
er 0.2241 E − 7 0.3148 E − 9 0.4787 E − 11 0.7677 E − 13
p 6.2 6.0 6.0
Table 3.3: Numerical results for problem (3.73)
In the following three examples the implementation of the TDS uses the h-h/2a posteriori estimation to achieve a given accuracy EPS. The comparison with the true error Error shows that this accuracy is actually achieved.
117
118
Chapter 3. 3-point difference schemes for scalar ODEs Example 3.4. The next example d2 u du = Au , dx2 dx
A u(0) = tanh , 4
A u(1) = − tanh , 4
(3.74)
A(1 − 2x) . Table 3.4 presents the numerical 4 results for the parameter value A = 7.
has the exact solution u(x) = tanh
EPS 1.0 E − 4 1.0 E − 6 1.0 E − 8
N
Error
16 256 2048
0.937 E − 4 0.234 E − 6 0.242 E − 8
Table 3.4: Numerical results for problem (3.74)
Example 3.5. The BVP d2 u 3 = u2 , dx2 2
u(0) = 4,
u(1) = 1
(3.75)
4 . The numerical results on the equidistant (1 + x)2
has the exact solution u(x) = grid ωh are given in Table 3.5.
EPS 1.0 E − 4 1.0 E − 6 1.0 E − 8
N
Error
32 64 512
0.879 E − 5 0.847 E − 7 0.777 E − 9
Table 3.5: Numerical results for problem (3.75)
Example 3.6. Let us consider the BVP d2 u = dx2
du dx
2 ,
u(0) = 1,
u(1) = 0,
(3.76)
with the exact solution u(x) = − ln x + e−1 (1 − x) . Numerical results on an equidistant grid ωh are presented in Table 3.6.
3.5. Numerical examples EPS 1.0 E − 4 1.0 E − 6 1.0 E − 8
N
Error
128 1024 8192
0.4899 E − 5 0.8035 E − 7 0.1047 E − 8
Table 3.6: Numerical results for problem (3.76)
The conclusion of this section is that the numerical results which have been obtained for the examples 3.1 – 3.6 confirm our theoretical statements on the order of accuracy of the proposed difference schemes.
119
121
Chapter 4
Three-point difference schemes for systems of monotone second-order ODEs What do I like most about your system? It is as hard to understand as the world. Franz Grillparzer (1791–1872) This chapter deals with a generalization of the results from the previous chapter to the case of systems of second-order ODEs with a monotone operator. For such systems with Dirichlet boundary conditions an exact 3-point EDS on an irregular grid is constructed, and the existence and uniqueness of its solution is shown. The EDS forms the basis for the associated TDS on a 3-point stencil that can be constructed such that it has a required order of accuracy m. ¯ Considering the nonlinearity of the ODE we use the method of monotone operators (see, e.g. [18]) as the standard tool for our theoretical investigations .
4.1
Problem setting
Let us consider the following nonlinear BVP for a system of second-order ODEs du du d K(x) = −f x, u, , x ∈ (0, 1), u(0) = µ1 , u(1) = µ2 , (4.1) dx dx dx I.P. Gavrilyuk et al., Exact and Truncated Differences Schemes for Boundary Value ODEs, International Series of Numerical Mathematics 159, DOI 10.1007/978-3-0348-0107-2_4, © Springer Basel AG 2011
121
122
Chapter 4. 3-point difference schemes for systems of ODEs where K(x) ∈ Rn×n and f (x, u, ξ), µ1 , µ2 ∈ Rn are given, and u(x) ∈ Rn is the unknown vector. def
Let (u, v) be a scalar product in Rn , kuk = (u, u)1/2 be the associated norm, and Qp [0, 1] be the space of functions having piece-wise continuous derivatives up to order p with a finite number of discontinuity points of first kind. Moreover, let Cr be a non-negative, continuous function, f0r (x) ∈ L2 (0, 1), gr (x) ∈ L1 (0, 1), and c1 , c2 , c3 be some constants. The following theorem states sufficient conditions for the existence and uniqueness of a solution of problem (4.1). Theorem 4.1 def
Let the matrix K(x) = [krs (x)]nr,s=1 and the function def
n
f (x, u, ξ) = {fr (x, u, ξ)}r=1 satisfy the conditions K(x) = K ∗ (x),
krs (x) ∈ Q1 [0, 1],
c1 kuk2 ≤ (K(x)u, u) ≤ c2 kuk2
for all x ∈ [0, 1], u ∈ Rn ,
c1 > 0,
(4.2)
def
fruξ (x) = fr (x, u, ξ) ∈ Q0 [0, 1] for all u, ξ ∈ Rn , def
frx (u, ξ) = fr (x, u, ξ) ∈ C(R2n ) for all x ∈ [0, 1], (4.3) ! n X |fr (x, u, ξ)| ≤ Cr |up | (gr (x) + |ξr |) for all x ∈ [0, 1], u, ξ ∈ Rn , p=1
(4.4) f (x, u, ξ) − f (x, v, η) , u − v 2 2 for all x ∈ [0, 1], u, v, ξ, η ∈ Rn , ≤ c3 ku − vk + kξ − ηk 0 ≤ c3
0, 1 + π2
def
1/2
kukBh = (Bh u, u)ωˆ h .
Proof. The inequality (4.11) implies Ah (x, u) − Ah (x, v), u − v
ω ˆh
≥
1 + π 2 c4 ku − vk2Bh . π 2 c2
(4.14)
133
134
Chapter 4. 3-point difference schemes for systems of ODEs Using the Cauchy-Bunyakovsky-Schwarz inequality (see Theorem 1.8) we obtain Ah (x, u) − Ah (x, v), z ωˆ h
= Bh u − Bh v, z ωˆ h X dv du ξ ˆ − f η, v(η), , z(ξ) ~(ξ) T f η, u(η), − dη dη
(4.15)
ξ∈ˆ ωh
= Bh u − Bh v, z
Z1 dv du ˆ (η) dη − f η, v(η), ,z f η, u(η), − dη dη
ω ˆh
0
≤ ku − vkBh kzkBh 12 1 12 1 2 Z Z
dv du kˆ z (η)k2 dη +
f η, u, dη − f η, v, dη dη 0
(4.16)
0
≤ ku − vkBh kzkBh
√ + 2Lku − vk1,2,(0,1) kˆ z k0,2,(0,1) .
(4.17)
Formula (4.2) implies h i∗ V1j (xj ) = V1j (xj ),
Zxj hj 2 j K −1 (t)u, u dt ≥ V1 (xj )u, u = kuk , c2 xj−1
and further
h i−1
j
V (xj )
≤ c2 ,
1
hj
−1
K (t) ≤ 1 . c1
Using the last estimate as well as the inequality
j
V (x) ≤ (−1)α+1 α
Zx
−1
K (t) dt ≤ hj−1+α , x ∈ e¯j , α c1
α = 1, 2,
xj+(−1)α
we obtain 2 kˆ z k0,2,(0,1)
2 Z1 h i−1 h i−1
j
j j−1 j
= V1 (x) V1 (xj ) z j + V2 (x) V1 (xj ) z j−1
dx 0 x " 2 N Z j
h i−1 X
j
j
kz j k ≤2
V1 (x) V1 (xj )
j=1x j−1
2 #
h i−1
4c2
j−1 2 j
kz j−1 k dx = 22 kzk0,2,ˆωh , + V2 (x)
V1 (xj )
c1 (4.18)
4.2. Existence of a three-point EDS and
2
2 Z1 h i−1
dˆ
−1
z
K (x) V j (xj )
= (z − z ) j j−1 dx 1
dx
0,2,(0,1) 0
x
2 N Zj i−1 X
−1 h j
K (x) V1 (xj ) ≤
hj kz x¯,j k
(4.19)
j=1x j−1
≤
c22 2 kz x¯ k0,2,ˆω+ . h c21
Let us prove the estimate r ku − vk1,2,(0,1) ≤
3 c2 2 c1
√ 2L 1+ kux¯ − v x¯ k0,2,ˆω+ . h c4
(4.20)
˜ (x) + u ˆ (x), xj−1 ≤ x ≤ xj+1 , and reduce the To achieve this we write u(x) = u problem d du du K(x) = −f x, u, , x ∈ ejα , dx dx dx u(xj−2+α ) = uj−2+α ,
u(xj−1+α ) = uj−1+α ,
α = 1, 2.
to the problem d˜ u d˜ u dˆ u d ˜ (x) + u ˆ (x), K(x) = −f x, u + , dx dx dx dx ˜ (xj−2+α ) = 0, u
˜ (xj−1+α ) = 0, u
x ∈ ejα ,
α = 1, 2.
˜ (x), v ˜ (x) with Using (4.3), (4.5) and a Lipschitz condition for all vectors u ◦
u ˜r (x), v˜r (x) ∈ W21 (e), r = 1, . . . , n, we have π2 ˜ k21,2,eα k˜ u−v 1 + π2
2
d˜ v u d˜
− ≤ c1 dx dx 0,2,eα
c1
xj−1+α Z
≤
K(x)
v d˜ u d˜ − dx dx
,
v d˜ u d˜ − dx dx
dx
xj−2+α xj−1+α Z
f
= xj−2+α
u d˜ v dˆ v d˜ u dˆ ˜ +v ˆ, ˜ (x) − v ˜ (x) dx ˜ +u ˆ, + − f x, v + ,u x, u dx dx dx dx
135
136
Chapter 4. 3-point difference schemes for systems of ODEs xj−1+α Z
f
=
u d˜ v dˆ u d˜ u dˆ ˜ +u ˆ, ˜ (x) − v ˜ (x) dx ˜ +u ˆ, + − f x, v + ,u x, u dx dx dx dx
xj−2+α xj−1+α Z
f
+
˜+u ˆ, x, v
u d˜ v dˆ + dx dx
−f
d˜ v dˆ v ˜+v ˆ, ˜ (x) − v ˜ (x) dx x, v + ,u dx dx
xj−2+α
1/2 2
u d˜ v dˆ v d˜ v dˆ
dx
f x, v ˜+v ˆ, ˜+u ˆ, + − f x, v +
dx dx dx dx
xj−1+α Z
≤ xj−2+α
1/2
xj−1+α Z
×
˜ (x)k2 dx k˜ u(x) − v
2
˜ k1,2,eα + c3 k˜ u−v
xj−2+α
√ ˆ k1,2,eα k˜ ˜ k1,2,eα + c3 k˜ ˜ k21,2,eα , ≤ 2L kˆ u−v u−v u−v which yields √ π2 ˜ k1,2,eα ≤ 2Lkˆ ˆ k1,2,eα , k˜ u−v − c u−v 3 2 1+π √ 2L ˆ k1,2,eα . ˜ k1,2,eα ≤ kˆ u−v k˜ u−v c4 c1
The formulas (4.18), (4.19) and the inequality kuk20,2,ˆωh ≤
1 kux¯ k20,2,ˆω+ imply h 8
ku − vk1,2,(0,1) ˜ k1,2,(0,1) + kˆ ˆ k1,2,(0,1) ≤ k˜ u−v u−v r √ √ 2L 3 c2 2L ˆ k1,2,(0,1) ≤ kˆ u−v 1+ kux − v x¯ k0,2,ˆω+ . ≤ 1+ h c4 2 c1 c4 Taking into account (4.18), (4.20) we obtain, with an arbitrary vector z, (Ah (x, u) − Ah (x, v), z)ωˆ h √ √ c22 2L kux¯ − v x¯ k0,2,ˆω+ kzk0,2,ˆωh ≤ ku − vkBh kzkBh + 2 3L 2 1 + h c1 c4 r √ 3 c22 2L L 2 1+ kux¯ − v x¯ k0,2,ˆω+ kz x¯ k0,2,ˆω+ ≤ ku − vkBh kzkBh + h h 2 c1 c4 # " r √ 3 c22 2L L 1+ ku − vkBh kzkBh . ≤ 1+ 2 c31 c4
4.2. Existence of a three-point EDS def
Setting here z = Bh−1 (Ah (x, u) − Ah (x, v)) we get "
r
kBh−1 (Ah (x, u) − Ah (x, v))kBh ≤ 1 +
3 c22 L 2 c31
√ # 2L 1+ ku − vkBh . (4.21) c4
Now the estimates (4.21), (4.14) imply Ah (x, u) − Ah (x, v) , Bh−1 (Ah (x, u) − Ah (x, v)) "
r
≤ 1+
3 c22 L 2 c31
√ 2L 1+ c4
#2
ω ˆh
ku − vk2Bh
" r √ #2 3 c22 2L π 2 c2 L 3 1+ 1+ ≤ (Ah (x, u) − Ah (x, v), u − v)ωˆ h 2 1 + π c4 2 c1 c4 and due to the results from [74], p.502, the iteration method (4.12) converges in HBh and the error estimate (4.13) holds. ◦
Let us remember that the space HBh is equivalent to the space W21 (ˆ ωh ) , i.e. the corresponding norms satisfy γ1 kuk1,2,ˆωh ≤ kukBh ≤ γ2 kuk1,2,ˆωh . We can now formulate the following lemma. Lemma 4.3 Let the assumptions of Lemma 4.2 be satisfied. Then, the iteration method (4.12) converges and together with the estimate (4.13) the following relation holds:
du(n) du
(n)
K
− K ≤ M − u ≤ M qn,
u
dx dx 0,2,ωˆ¯ h 1,2,ˆ ωh where kuk0,2,ωˆ¯ h =
−1 NX
=
j=1
1/2 1 1 ~j kuj k2 + h1 ku0 k2 + hN kuN k2 2 2
N 1 X 2
j=1
hj
1/2 kuj k2 + kuj−1 k2 .
137
138
Chapter 4. 3-point difference schemes for systems of ODEs Proof. Using the relations Zxj j −1 du du d j K(ξ) dξ K = A u + V (x ) V (ξ) j x ¯,j j 1 1 dx x=xj dξ dξ xj−1
= Aj ux¯,j −
−1 V1j (xj )
Zxj
V1j (ξ)f
ξ, u(ξ),
du dξ
dξ,
xj−1
Zxj j−1 −1 du du d j−1 K(ξ) dξ K = A u − V (x ) V (ξ) j x ¯,j j−1 2 2 dx x=xj−1 dξ dξ xj−1
= Aj ux¯,j +
−1 V1j (xj )
Zxj
V2j−1 (ξ)f
ξ, u(ξ),
du dξ
dξ,
xj−1
together with (a + b)2 ≤ 2(a2 + b2 ), the Cauchy-Bunyakovsky-Schwarz inequality (see Theorem 1.8) as well as a Lipschitz condition, we deduce
du(n) du
K − K
dx dx 0,2,ωˆ¯ h ( =
N 1X (n) hj
Aj ux¯,j − Aj ux¯,j 2 j=1
−1 − V1j (xj )
Zxj
2
du du(n) − f ξ, u(ξ), dξ V1j (ξ) f ξ, u(n) (ξ),
dξ dξ
xj−1
N 1X (n) + hj Aj ux¯,j − Aj ux¯,j 2 j=1 −1 + V1j (xj )
Zxj
V2j−1 (ξ)
2 )1/2
du du (n) − f ξ, u(ξ), dξ f ξ, u (ξ),
dξ dξ
xj−1
( ≤
2
N X
N
2 X
−1
2 (n) hj Aj ux¯,j − Aj ux¯,j + hj V1j (xj )
j=1
" Zxj
j ×
V1 (ξ) xj−1
j=1
#2 (n)
du du (n)
f ξ, u (ξ),
dξ − f ξ, u(ξ),
dξ dξ
4.3. Implementation of the three-point EDS
+
N X
−1
2 hj V1j (xj )
j=1
" Zxj
j−1 ×
V2 (ξ)
#2 )1/2 (n)
du
f ξ, u(n) (ξ), du
dξ − f ξ, u(ξ),
dξ dξ
xj−1
( ≤
2
N X
N
2 X
−1
2 (n) hj Aj ux¯,j − Aj ux¯,j + hj V1j (xj )
j=1
j=1
Zxj
j 2 j−1 2 ×
V1 (ξ) + V2 (ξ) dξ xj−1
2 )1/2 Zxj (n)
du du (n)
dξ
f ξ, u (ξ), − f ξ, u(ξ), ×
dξ dξ xj−1
( ≤
2
N X
2
(n) hj Aj ux¯,j − Aj ux¯,j
j=1 N
X 2c2 + 22 L2 hj c1 j=1
≤
2 )1/2 Zxj
(n)
du du
(n)
u (ξ) − u(ξ) +
dξ − dξ dξ xj−1
√
(n)
2c2 ux¯ − ux¯
+ 0,2,ˆ ωh
+2
c2
L u(n) − u . c1 1,2,(0,1)
Now, inequality (4.20) and Lemma 4.2 imply √
√ √
du(n) du c22 2L
(n)
K
− K 1 + ≤ 2 c + 3 L
u − u 2 2
dx dx 0,2,ωˆ¯ h c1 c4 1,2,ˆ ωh
= M1 u(n) − u ≤ M qn , 1,2,ˆ ωh
which proves the claim.
4.3
Implementation of the three-point EDS
To simplify the structure of the formulas let us again use the abbreviations def
β = j + (−1)α ,
def
γ = j − 1 + α,
as we have already done in previous sections.
139
140
Chapter 4. 3-point difference schemes for systems of ODEs We begin our discussion with the following formula:
(−1)
Zxj
α+1
Vαj (ξ)f
du ξ, u(ξ), dξ
dξ (4.22)
xj+(−1)α
= (−1)α Vαj (xj )Z jα (xj , u) + Y jα (xj , u) − uβ , where Y jα (x, u), Z jα (x, u), α = 1, 2, are the solutions of the IVPs dY jα (x, u) = K −1 (x)Z jα (x, u), dx dZ jα (x, u) = −f x, Y jα (x, u), K −1 (x)Z jα (x, u) , dx du , Y jα (xβ , u) = uβ , Z jα (xβ , u) = K(x) dx x=xβ j = 2 − α, 3 − α, . . . , N + 1 − α,
x ∈ ejα , (4.23)
α = 1, 2,
def and the matrix functions V¯αj (x) = (−1)α+1 Vαj (x), α = 1, 2, are the solutions of the IVPs
dV¯αj (x) = K −1 (x), dx V¯αj (xβ ) = 0,
x ∈ ejα ,
j = 2 − α, 3 − α, . . . , N + 1 − α,
(4.24) α = 1, 2.
Using (4.22) the right-hand side of the EDS (4.9) can be represented in the form du def ˆ xj f ξ, u(ξ), ϕ(xj , u) = T dξ = ~−1 j
2 X
−1 j Y α (xj , u) − uβ . (−1)α Z jα (xj , u) + (−1)α Vαj (xj )
α=1
(4.25) ˆ¯ h Thus, in order to compute the input data of the EDS (4.9), (4.25) for all xj ∈ ω the four IVPs (4.23), (4.24) with smooth right-hand sides should be solved on intervals whose lengths are proportional to the maximum step size. The IVPs (4.23), (4.24) can be solved by a one-step method: ¯ Y (αm)j (xj , u) = uβ + (−1)α+1 hγ Φ1 xβ , uβ , (Ku0 )β , (−1)α+1 hγ , Z (m)j (xj , u) = (Ku0 )β + (−1)α+1 hγ Φ2 xβ , uβ , (Ku0 )β , (−1)α+1 hγ , α ¯ V¯α(m)j (xj ) = (−1)α+1 hγ Φ3 xβ , 0, (−1)α+1 hγ ,
(4.26)
4.3. Implementation of the three-point EDS where Φ1 (x, u, ξ, h), Φ2 (x, u, ξ, h), Φ3 (x, u, h) are the corresponding increment functions and du 0 . (Ku )β = K(x) dx x=xβ
Z jα (xj , u)
¯ Assume that approximates with order m, and Y (αm)j (xj , u), (m)j ¯ j j Vα (xj ) approximate Y α (xj , u), Vα (xj ), respectively, with order m. ¯
Z (m)j (xj , u) α
If K(x) and the right-hand side f (x, u, ξ) are sufficiently smooth then there exist the expansions ¯ ¯ ¯ Y jα (xj , u) = Y (αm)j (xj , u) + [(−1)α+1 hγ ]m+1 ψ jα (xβ , u) + O(hm+2 ), β j
˜ (xβ , u) + O(hm+2 ), Z jα (xj , u) = Z (m)j (xj , u) + [(−1)α+1 hγ ]m+1 ψ γ α α
(4.27)
¯ ¯ ¯ ψ¯αj (xβ ) + O(hm+2 (xj ) + [(−1)α+1 hγ ]m+1 ). V¯αj (xj ) = V¯α(m)j γ
In the case where the Taylor series method is used we have Φ1 xβ , uβ , (Ku0 )β , (−1)α+1 hγ = u0β −
m ¯ X (−1)α+1 hγ −1 [(−1)α+1 hγ ]p−1 dp Y jα (xβ , u) Kβ f (xβ , uβ , u0β ) + , 2 p! dxp p=3
Φ2 xβ , uβ , (Ku0 )β , (−1)α+1 hγ
m X [(−1)α+1 hγ ]p−1 dp Z jα (xβ , u) = −f xβ , uβ , u0β + , p! dxp p=2
Φ3 xβ , 0, (−1)α+1 hγ = K −1 (xβ ) +
m ¯ X [(−1)α+1 hγ ]p−1 dp−1 −1 K (x) . p! dxp−1 x=xj+(−1)α p=2
If an explicit Runge-Kutta method is used the increment functions are α+1 h γ = b1 g 1 + b2 g 2 + · · · + bs g s , Φ1 xβ , uβ , (Ku0 )α β , (−1) ¯ 1 + b2 g ¯ 2 + · · · + bs g ¯s, Φ2 xβ , uβ , (Ku0 )β , (−1)α+1 hγ = b1 g Φ3 xβ , 0, (−1)α+1 hγ = b1 g˜1 + b2 g˜2 + · · · + bs g˜s , where g˜i = K −1 xβ + ci (−1)α+1 hγ , i−1 X ¯p , aip g g i = g˜i (Ku0 )β + (−1)α+1 hγ p=1
141
142
Chapter 4. 3-point difference schemes for systems of ODEs i−1 X α+1 α+1 ¯ i = −f xβ + ci (−1) g hγ , uβ + (−1) hγ aip g p , g i ,
i = 1, 2, . . . , s.
p=1 ¯ In the next lemma the differences between Y jα (xj , u), Z jα (xj , u) and Y (αm)j (xj , u), (m)j Z α (xj , u), respectively, are studied.
Lemma 4.4 Suppose that 2
c1 kuk ≤ (K(x)u, u) ≤ c2 kuk
2
for all u ∈ Rn ,
krs (x) ∈ Qm+1 [0, 1],
N fr (x, u, ξ) ∈ ∪ Cm+1 [xj−1 , xj ] × R2n . j=1
If for the one-step method (4.26) the expansions (4.27) exist, then ¯ ¯ ¯ (xj , u) + (−1)α+1 hm+1 ψ γ1 (xβ , u) + O(hm+2 ), Y jα (xj , u) = Y (αm)j γ γ γ
˜ (xβ , u) + O(hm+2 ), (xj , u) + [(−1)α+1 hγ ]m+1 ψ Z jα (xj , u) = Z (m)j γ 1 α
(4.28)
¯ ¯ ¯ ψ¯1γ (xβ ) + O(hm+2 (xj ) + hm+1 ), Vαj (xj ) = Vα(m)j γ γ
j = 2 − α, 3 − α, . . . , N + 1 − α,
α = 1, 2.
Proof. Since the method (4.26) has order of accuracy m ¯ and the expansions (4.27) exist we have (m)j ¯
Y j1 (xj , u) − Y 1
(xj , u)
= Y j1 (xj , u) − u(xj − hj ) − hj Φ1 xj − hj , u(xj − hj ), Ku0 |x=xj −hj , hj ¯ ¯ ψ j1 (xj − hj , u) + O(hm+2 ), = hm+1 j j
(4.29) and (m)j
Z j1 (xj , u) − Z 1
(xj , u)
= Z j1 (xj , u) − Ku0 |x=xj −hj − hj Φ2 xj − hj , u(xj − hj ), Ku0 |x=xj −hj , hj j
˜ (xj − hj , u) + O(hm+2 ). = hm+1 ψ 1 j j (4.30) Note that (m)j ¯
Y j2 (xj , u) − Y 2
(xj , u)
= Y j2 (xj , u) − uj+1 + hj+1 Φ1 (xj+1 , uj+1 , (Ku0 )j+1 , −hj+1 ) ,
4.3. Implementation of the three-point EDS (m)j
Z j2 (xj , u) − Z 2
(xj , u)
= Z j2 (xj , u) − (Ku0 )j+1 + hj+1 Φ2 (xj+1 , uj+1 , (Ku0 )j+1 , −hj+1 ) . Substituting −hj+1 instead of hj into (4.29), (4.30) and taking into account that Y j1 (xj , u) = Y j2 (xj , u),
Z j1 (xj , u) = Z j2 (xj , u),
we obtain Y j2 (xj , u) − uj+1 + hj+1 Φ1 (xj+1 , uj+1 , (Ku0 )j+1 , −hj+1 ) j+1 ¯ m+2 ¯ = −hm+1 j+1 ψ 1 (xj+1 , u) + O(hj+1 ),
Z j2 (xj , u) − (Ku0 )j+1 + hj+1 Φ2 (xj+1 , uj+1 , (Ku0 )j+1 , −hj+1 ) j+1
˜ = (−1)m+1 hm+1 j+1 ψ 1
(xj+1 , u) + O(hm+2 j+1 ).
We have thus shown the first two relations in (4.28). Analogously one can prove the equality ¯ ¯ ¯ V¯αj (xj ) = V¯α(m)j (xj ) + (−1)α+1 hm+1 ), ψ¯1j−1+α (xβ ) + O(hm+2 γ γ
which together with V¯αj (x) = (−1)α+1 Vαj (x) gives the third relation in (4.28).
Based on the EDS (4.9), (4.25), we can now define the following TDS of the rank m ¯ (abbreviated to m-TDS ¯ hereafter): (m) ¯
¯ ¯ ¯ y x¯ )xˆ = −ϕ(m) (x, y (m) ), (A(m) ¯ y (m) (0) = µ1 ,
x∈ω ˆh, (4.31)
¯ y (m) (1) = µ2 ,
where h i−1 def (m)j ¯ ¯ A(m) (xj ) = hj V1 (xj ) , ¯ ϕ(m) (xj , u)
def
=
~−1 j
2 X
α
(−1)
Z (m)j (xj , u) α
+ (−1)
α
¯ Vα(m)j (xj )
−1 Y
(m)j ¯ (xj , u) α
− uβ .
α=1
In order to prove the order of accuracy of the m-TDS ¯ (4.31) we need the following auxiliary statement.
143
144
Chapter 4. 3-point difference schemes for systems of ODEs Lemma 4.5 Let the assumptions of Lemma 4.4 be fulfilled. Then the following estimates hold:
(m)
¯
A ¯ (xj ) − A(xj ) ≤ M hm , (4.32) and ¯ (xj , u) − ϕ(xj , u) ϕ(m) du j j j m+1 ˜ ¯ − ψ 1 (x, u) = hj K(x) ψ 1 (x, u) − ψ1 (x)K(x) dx x=xj +0 x ˆ
(4.33)
! m+2
+O
hm+2 + hj+1 j ~j
,
provided that m is odd, and ¯ ϕ(m) (xj , u) − ϕ(xj , u) du j j m ¯ = hj K(x) ψ 1 (x, u) − ψ1 (x)K(x) dx x=xj +0 x ˆ
+O
(4.34)
! hm+1 + hm+1 j j+1 , ~j
provided that m is even.
Proof. The inequality (4.32) follows from (4.27) due to h i−1 h ih i−1 (m)j ¯ (m)j ¯ ¯ ¯ V1j (xj ) − V1 (xj )−A(xj ) = hj V1j (xj ) (xj ) V1 (xj ) = O(hm A(m) j ). In order to prove (4.33), (4.34) we first want to note that ¯ (xj , u) − ϕ(xj , u) ϕ(m)
= ~−1 j
2 X
−1 j α ¯ Vα(m)j (−1)α Z (m)j (x , u) − Z (x , u) + (−1) (xj ) j j α α
α=1
−1 ¯ Y jα (xj , u) − uβ × Y (αm)j (xj , u) − uβ − Vαj (xj )
.
Lemma 3.4 and the equalities Y jα (xj , u) − uβ = (−1)α+1 hγ
du + O(h2γ ), dx x=xβ
i h i−1 h −1 j ¯ ¯ Y (αm)j Vα(m)j Y α (xj , u) − uβ (xj ) (xj , u) − uβ − Vαj (xj )
(4.35)
4.3. Implementation of the three-point EDS i −1 h (m)j Y α¯ (xj , u) − Y jα (xj , u) = Vαj (xj ) i ih i−1 h −1 h j ¯ ¯ ¯ Vα (xj ) − Vα(m)j Y (αm)j (xj ) Vα(m)j (xj ) (xj , u) − uβ , + Vαj (xj )
Vαj (xj )
−1
= h−1 γ Kβ + O(1),
h i−1 ¯ Vα(m)j (xj ) = h−1 γ Kβ + O(1)
imply m+1 γ ˜ (xβ , u) + O(hm+2 ), (xj , u) − Z jα (xj , u) = − (−1)α+1 hγ ψ Z (m)j α γ 1 and h i i−1 h −1 j ¯ ¯ Vα(m)j Y (αm)j Y α (xj , u) − uβ (xj ) (xj , u) − uβ − Vαj (xj ) (4.36) γ ¯ m+1 ¯ ¯γ (x)K(x) du = −(−1)α+1 hm K(x) ψ (x, u) − ψ + O(h ). γ γ 1 1 dx x=xβ Taking into account (4.36) we obtain from (4.35) ¯ (xj , u) − ϕ(xj , u) ϕ(m) 1 du j+1 j+1 j+1 m+1 ˜ ¯ − ψ 1 (x, u) = hj+1 K(x) ψ 1 (x, u) − ψ1 (x)K(x) ~j dx x=xj+1
−
hm+1 j
+O
du j j j ˜ ¯ − ψ 1 (x, u) K(x) ψ 1 (x, u) − ψ1 (x)K(x) dx x=xj−1
+ hm+2 hm+2 j j+1 ~j
!
(4.37) provided that m is odd, and ¯ ϕ(m) (xj , u) − ϕ(xj , u) 1 j+1 ¯j+1 (x)K(x) du = hm K(x) ψ (x, u) − ψ j+1 1 1 ~j dx x=xj+1
−
hm j
du K(x) ψ j1 (x, u) − ψ¯1j (x)K(x) +O dx x=xj−1
! hm+1 + hm+1 j j+1 ~j (4.38)
145
146
Chapter 4. 3-point difference schemes for systems of ODEs provided that m is even. Due to du K(x) ψ j1 (x, u) − ψ¯1j (x)K(x) dx x=xj−1 du j j ¯ = K(x) ψ 1 (x, u) − ψ1 (x)K(x) + O(hj ), dx x=xj ˜ j (xj , u) + O(hj ), ˜ j (xj−1 , u) = ψ ψ 1 1
the estimates (4.37), (4.38) yield (4.33), (4.34). We are now in a position to prove the following claim. Theorem 4.3
Let the assumptions of Theorem 4.1 and Lemma 4.4 be fulfilled. Then there def N exists an h0 > 0 such that for all {hj }j=1 , h = max hj ≤ h0 , the m-TDS ¯ 1≤j≤N
(4.31) has a unique solution for which the following error estimate holds:
∗
(m)
y ¯ − u
1,2,ˆ ωh
2
(m)
¯
= y − u
0,2,ˆ ωh
2
1/2 ¯
dy (m) du ¯
− K + K ≤ M hm , dx dx 0,2,ˆωh
where −1 ¯ dy (m) (m)0 (m)0 ¯ (m)0 ¯ (m) ¯ (m) ¯ (m) ¯ Y 2 (x0 , y ) − y 0 , K = Z 2 (x0 , y ) + V2 (x0 ) dx x=x0 −1 ¯ dy (m) (m)j (m)j ¯ (m) ¯ (m)j ¯ (m) ¯ (m) ¯ y j − Y 1 (xj , y ) , = Z 1 (xj , y ) + V1 (xj ) K dx x=xj j = 1, 2, . . . , N, and the constant M is independent of h.
Proof. Let us consider the operator (m) ¯
def
(m) ¯
¯ (x, u), Ah (x, u) = Bh u − ϕ(m)
From (4.32) – (4.34) we have (m) ¯ (m) ¯ Ah (x, u) − Ah (x, v), u − v
¯ = A(m) (ux¯ − v x¯ ) , ux¯ − v x¯
(m) ¯
def
¯ with Bh u = −(Am ux¯ )xˆ .
ω ˆh
¯ ¯ − ϕ(m) (x, u) − ϕ(m) (x, v), u − v
ω ˆh
ω ˆh m ¯
= (Ah (x, u) − Ah (x, v), u − v)ωˆ h + O h
4.3. Implementation of the three-point EDS and formula (4.11) shows that there exists a h0 > 0 such that for all {hj }N j=1 , with h ≤ h0 , it holds that 2 ¯ u, u , 0 < c˜1 kuk0,2,ˆωh ≤ A(m) ω ˆh
(m) ¯ (m) ¯ Ah (x, u) − Ah (x, v), u − v
2
2
≥ c ku − vkB(m) ≥ 8c˜ c1 ku − vk0,2,ˆωh , ¯
ω ˆh
h
(4.39) (m) ¯ Ah (x, u)
where 0 < c < 1. Therefore, under the assumption h ≤ h0 the operator is strongly monotone, i.e. for h ≤ h0 the m-TDS ¯ (4.31) has a unique solution ¯ y (m) (x), x ∈ ω ˆ h (see, e.g. [82], p.461). def
¯ The error function z(x) = y (m) (x) − u(x), x ∈ ω ˆ h , is the solution of the problem h i ¯ ¯ ¯ ¯ A(m) (x)z x¯ (x) + ϕ(m) (x, y (m) ) − ϕ(m) (x, u) x ˆ
¯ = ϕ(x, u) − ϕ(m) (x, u) +
h
i ¯ A(x) − A(m) (x) ux¯ (x) ,
(4.40)
x ˆ
z(0) = z(1) = 0. From (4.40) we obtain (m) ¯ (m) ¯ ¯ Ah (x, u) − Ah (x, y (m) ), z ω ˆh
=
(m) ¯
ϕ(x, u) − ϕ
(x, u), z
+
(m) ¯
− A ux¯ , z x¯
A
(4.41)
. + ω ˆh
ω ˆh
Due to (4.39) we have (m) ¯ (m) ¯ ¯ Ah (x, u) − Ah (x, y (m) ), z
2
≥ c kzkB(m) ¯ .
ω ˆh
(4.42)
h
Using the Cauchy-Bunyakovsky-Schwarz inequality (see Theorem 1.8) and (4.32) – (4.34), we deduce for the right-hand side of (4.41)
¯
(m) ¯ A − A ux¯ , z x¯ ≤ A(m) − A kux¯ k0,2,ˆω+ kz x¯ k0,2,ˆω+
h
¯ ϕ(x, u) − ϕ(m) (x, u), z
h
(4.43) ¯ ≤ M hm kz x¯ k0,2,ˆω+
h
0,2,ˆ ωh
ω ˆh
¯ M hm ≤ kzkB (m) ¯ , h c˜1
≤ M hm+1 kz x¯ k0,2,ˆω+ ≤ ω ˆh
provided that m is odd, and ¯ ϕ(x, u) − ϕ(m) (x, u), z ω ˆh
h
≤ M hm kz x¯ k0,2,ˆω+ ≤ h
M hm+1 kzkB(m) (4.44) ¯ , h c˜1
M hm kzkB (m) ¯ , h c˜1
(4.45)
147
148
Chapter 4. 3-point difference schemes for systems of ODEs ¯ provided that m is even. The estimates (4.42) – (4.45) yield kzkB (m) ≤ M hm . ¯ h
Taking into account the equivalence of the norms k·k1,2,ωˆ h and k·kB (m) ¯ , we obtain h
¯ kzk1,2,ωˆ h ≤ M hm . (m) ¯
(m) ¯
¯ ¯ = Y 02 (x0 , y (m) ) and y j = Y j1 (xj , y (m) ), the formulas (4.28) imply
dz
(m)0
¯ ¯ ¯ ) − Z 02 (x0 , y (m) ) + Z 02 (x0 , y (m) ) − Z 02 (x0 , u)
K
≤ Z 2 (x0 , y (m)
dx x=x0
Since y 0
h
i−1
(m)0
¯ (m)0 ¯ 0 (m) ¯ (m) ¯
+ V2 (x0 ) (x , y ) − Y (x , y )
Y
0 0 2 2
∂ 0 ¯ m ¯
kzk ≤ M1 hm Z + (x , u) 0,2,ˆ ωh ≤ M2 h ,
∂u 2 0 ˜ u=u
dz
(m)j
¯ ¯ ¯ ) − Z j1 (xj , y (m) ) + Z j1 (xj , y (m) ) − Z j1 (xj , u)
K
≤ Z 1 (xj , y (m)
dx x=xj
h
i−1
(m)j
¯ (m)j ¯ j (m) ¯ (m) ¯
+ V1 (xj ) (x , y ) − Y (x , y )
Y
j j 1 1
∂ j
≤ M3 h + Z 1 (xj , u) ∂u m ¯
˜ u=u
m ¯
kzk 0,2,ˆ ωh ≤ M4 h ,
j = 1, 2, . . . , N,
dz dz
¯
K K ≤ max ,
≤ M hm
dx j=0,1,...,N
dx ˆ 0,2,ω ¯h x=xj ∗
¯ and we obtain kzk1,2,ˆωh ≤ M hm . This completes the proof.
The nonlinear m-TDS ¯ (4.31) can be solved by an iteration method which is given in the following theorem. Theorem 4.4 Let the assumptions of Theorem 4.3 be fulfilled. Then: ¯ • the function ϕ(m) satisfies the Lipschitz condition
(m)
¯ ˜ ku − vk (x, v) ≤L
ϕ ¯ (x, u) − ϕ(m) 0,2,ˆ ωh , 0,2,ˆ ωh
• there exists a h0 > 0 such that for all {hj }N j=1 , with h ≤ h0 , it holds that ¯ u, u , 0 < c˜1 kuk20,2,ˆωh ≤ A(m) 0,2,ˆ ωh
(m) ¯
(m) ¯
Ah (x, u) − Ah (x, v), u − v
ω ˆh
2
≥ c ku − vkB (m) ¯ , h
0 < c < 1,
4.3. Implementation of the three-point EDS • the following iteration method converges: ¯ y (m,0) (x) = V2 (x) [V1 (1)] (m) ¯
Bh
−1
µ1 + V1 (x) [V1 (1)]
−1
µ2 ,
¯ ¯ y (m,n) − y (m,n−1) (m) ¯ ¯ + Ah (x, y (m,n−1) ) = 0, τ
¯ (0) = µ1 , y (m,n)
¯ y (m,n) (1) = µ2 ,
x∈ω ˆh,
(4.46)
n = 1, 2, . . . ,
where def
(m) ¯
¯ Bh y = −(A(m) y x¯ )xˆ ,
(m) ¯
def
(m) ¯
¯ Ah (x, y) = Bh y − ϕ(m) (x, y),
˜ −2 L τ = τ0 = c 1 + . 8˜ c1
def
• the corresponding error can be estimated by
∗
def √
(m,n) ¯ ≤ M (hm + q n ), q = 1 − cτ0 ,
y ¯ − u
(4.47)
1,2,ω ˆh
where ¯ dy (m,n) K dx x=x0 (m)0
= Z2 K
i h i−1 h (m)0 ¯ (m)0 ¯ (m,n) ¯ ¯ ¯ Y 2 (x0 , y (m,n) , (x0 , y (m,n) ) + V2 (x0 ) ) − y0
¯ dy (m,n) dx (m)j
= Z1
x=xj
h i−1 h i (m)j ¯ (m,n) ¯ (m)j ¯ ¯ ¯ yj (xj , y (m,n) ) + V1 (xj ) − Y 1 (xj , y (m,n) ) ,
j = 1, 2, . . . , N, (4.48) and the constant M does not depend on h, m and n.
Proof. Due to Theorem 4.3 we have
∗
(m,n)
y ¯ − u
1,2,ˆ ωh
∗
¯
≤ y (m) − u
1,2,ˆ ωh
∗
¯ ¯ + y (m,n) − y (m)
1,2,ˆ ωh
∗
¯ ¯ ¯ ≤ M hm + y (m,n) − y (m)
1,2,ω ˆh
.
(4.49)
149
150
Chapter 4. 3-point difference schemes for systems of ODEs N The assumption fr (x, u, ξ) ∈ ∪ Cm [xj−1 , xj ] × R2n yields j=1
(m) ˜ ¯ (x, v) ≤ L |u − v| . ϕ ¯ (x, u) − ϕ(m) Using the Cauchy-Bunyakovsky-Schwarz inequality (see Theorem 1.8) we obtain (m) ¯ (m) ¯ Ah (x, u) − Ah (x, v), w ω ˆh
≤ ku − vkB (m) ¯ kwk (m) ¯ B h
h
¯
¯ + ϕ(m) (x, u) − ϕ(m) (x, v)
0,2,ˆ ωh
kwk0,2,ˆωh
˜ ≤ ku − vkB (m) ¯ kwk (m) ¯ + L ku − vk 0,2,ˆ ωh kwk0,2,ˆ ωh B h
h
≤ ku − vkB (m) ¯ kwk (m) ¯ + B h
h
˜ L kux¯ − v x¯ k0,2,ˆω+ kw x¯ k0,2,ˆω+ h h 8
˜ L ku − vkB(m) ≤ 1+ ¯ kwk (m) ¯ . Bh h 8˜ c1 def
(m) ¯ −1
With w = Bh
(m) ¯ (m) ¯ Ah (x, u) − Ah (x, v) , this yields
−1
(m)
(m) ¯ (m) ¯
B ¯
A (x, u) − A (x, v) h h
h
≤ (m) ¯
Bh
˜ L ku − vkB (m) 1+ (4.50) ¯ . h 8˜ c1
From the relations (4.40) and (4.50) we have −1 (m) ¯ (m) ¯ (m) ¯ (m) ¯ (m) ¯ Ah (x, u) − Ah (x, v) Ah (x, u) − Ah (x, v), Bh ω ˆh
≤
˜ 2 L 1+ ku − vk2B (m) ¯ 8˜ c1 h
1 ≤ c
˜ 2 (m) L ¯ (m) ¯ 1+ Ah (x, u) − Ah (x, v), u − v . 8˜ c1 ω ˆh
Therefore, (see, e.g. [74], p.502) the iteration method (4.46) converges in the space ◦ 1 HB (m) ωh ), and the following estimate holds: ¯ , which is equivalent to the space W2 (ˆ h
(m,n) ¯
y ¯ − y (m)
1,2,ˆ ωh
Moreover, we have
¯ ¯ dy (m,n) dy (m)
− K
K
dx dx x=x0 x=x0
≤ M1 q n .
4.3. Implementation of the three-point EDS
(m)0 (m)0 ¯ ¯ ) − Z 2 (x0 , y (m) ) ≤ Z 2 (x0 , y (m,n)
h
i−1
(m)0 ¯ (m)0 ¯ (m)0 ¯ (m,n) ¯ (m) ¯
+ V2 (x0 ) (x , y ) − Y (x , y )
Y
0 0 2 2
"
∂
h i−1
(m)0 (m)0 ¯
≤ Z (x0 , u) (x0 )
+ V2
∂u 2
u=˜ y
#
∂
(m)0 ¯ Y 2 (x0 , u)
∂u
u=¯ y
¯ ¯ × y (m,n) − y (m)
0,2,ˆ ωh
¯ ¯ ≤ M1 y (m,n) − y (m)
, 1,2,ˆ ωh
¯ ¯ dy (m,n) dy (m)
− K
K
dx dx x=xj x=xj
(m)j (m)j ¯ ¯ ≤ Z 1 (xj , y (m,n) ) − Z 1 (xj , y (m) )
h
i−1
(m)j
(m)j ¯ ¯ (m)j ¯ (m,n) ¯ (m) ¯
+ V (x ) (x , y ) − Y (x , y )
Y
j j j 1 1
1
"
∂
h i−1
(m)j (m)j ¯
≤ Z 1 (xj , u) + V (x )
1 j
∂u
u=˜ y
#
∂
(m)j ¯ Y 1 (xj , u)
∂u
u=¯ y
¯ ¯ × y (m,n) − y (m)
0,2,ω ˆh
¯ ¯ ≤ M2 y (m,n) − y (m)
,
j = 1, 2, . . . , N,
0,2,ˆ ωh
¯ (m) ¯ (m,n) ¯ (m) ¯
dy (m,n) dy dy dy
K
K − K ≤ max − K
j=0,1,...,N
dx dx 0,2,ωˆ¯ h dx dx x=xj x=xj
¯ ¯ ≤ M y (m,n) − y (m)
which yields
∗
(m,n) ¯
y ¯ − y (m)
, 1,2,ˆ ωh
≤ M qn .
(4.51)
1,2,ˆ ωh
The estimates (4.49) and (4.51) imply (4.47).
A derivative-free variant of Newton’s method is usually used to numerically solve the m-TDS ¯ (4.31). It can be realized as follows. Substituting the approximate solutions (4.26) into the right-hand side of the difference scheme (4.31), we obtain ¯ ϕ(m) (xj , u)
151
152
Chapter 4. 3-point difference schemes for systems of ODEs = ~−1 j
2 X
(−1)α {(Ku0 )β + (−1)α+1 hγ Φ2 (xβ , uβ , (Ku0 )β , (−1)α+1 hγ )
α=1
− [Φ3 (xβ , 0, (−1)α+1 hγ )]−1 Φ1 (xβ , uβ , (Ku0 )β , (−1)α+1 hγ )}. From (4.27) we get 1 ∂Φ1 (x, u, ξ, 0) = − K −1 (x)f (x, u, ξ), ∂h 2
Φ1 (x, u, ξ, 0) = K −1 (x)ξ,
Φ3 (x, 0, 0) = K −1 (x),
Φ2 (x, u, ξ, 0) = −f (x, u, ξ), and therefore
(m) ¯ xj , y j ,
¯ ¯ (xj , y (m) )=f ϕ(m)
! ¯ dy (m) +O dx x=xj
h2γ ~j
¯ dy (m) (m) ¯ = y x¯,j + O dx x=xj
h2γ ~j
! ,
! .
The discrete Newton’s method now reads (m,n) ¯
∇y 0
= 0,
(m,n) ¯
¯ A(m) ∇y x¯
(m,n) ¯
∇y N
= 0, (m,n−1) ¯ (m,n−1) ¯ ∂f xj , y j , y˙ j
+
(m,n−1) ¯ (m,n−1) ¯ ∂f xj , y j , y˙ j +
(m,n) ¯
∇y j
∂u
x ˆ,j
(4.52)
(m,n) ¯
∇y x¯,j
∂ξ
(m,n−1) ¯ ¯ ¯ ¯ xj , y (m,n−1) − A(m) = −ϕ(m) y x¯
j = 1, 2, . . . , N − 1,
, x ˆ,j
(m,n) ¯
yj
(m,n−1) ¯
= yj
(m,n) ¯
+ ∇y j
,
j = 0, 1, . . . , N,
n = 1, 2, . . . ,
where the derivatives def (m,n−1) ¯ = y˙ j
¯ dy (m,n−1) dx
x=xj
can be computed by formula (4.48). Note that the convergence of Newton’s method for systems of ODEs with a monotone operator has been investigated in [48].
4.4. Numerical examples
4.4
Numerical examples
Example 4.1. Let us consider the BVP [43] d2 u1 = u1 + 3 exp(u2 ), dx2 u1 (0) = 0,
d2 u2 = u1 − exp(u2 ) + exp(−x), dx2
u1 (1) = exp(−2) − exp(−1),
u2 (0) = 0,
(4.53)
u2 (1) = −2
with the exact solution u1 (x) = exp(−2x) − exp(−x),
u2 (x) = −2x.
In order to solve problem (4.53) numerically on the equidistant grid ωh we used the following 6-TDS: (6)
y x¯x = −ϕ(6) (x, y (6) ),
y (6) (0) = µ1 ,
x ∈ ωh ,
y (6) (1) = µ2 ,
(4.54)
where ϕ(6) (xj , u) = h−1
2 X
i (−1)α h (6)j , Y (−1)α Z (6)j (x , u) + (x , u) − u j j β α α h α=1
(6)j and Y (6)j α (xj , u), Z α (xj , u) are the numerical solutions of the IVPs
dY jα (x, u) = Zαj (x, u), dx Y jα (xβ , u) = uβ ,
dZ jα (x, u) = −f (x, Y jα (x, u), Z jα (x, u)), dx
x ∈ ejα ,
Z jα (xβ , u) = u0β ,
j = 2 − α, 3 − α, . . . , N + 1 − α,
α = 1, 2, (4.55)
with f (x, Y
def j j α (x, u), Z α (x, u)) =
−
j j Yα,1 + 3 exp(Yα,2 ) j j Yα,1 − exp(Yα,2 ) + exp(−x)
! .
We have solved the IVP (4.55) with the explicit 7-stage Runge-Kutta method of order 6 which is characterized by the Butcher matrix given in Table 2.4. For the numerical solution of the TDS (4.54) we used the Newton method (4.52). Table 4.1 contains the numerical results obtained by this TDS. Here, we have used the formulas
(6) ∗
z
∗ def (6) ∗ def
(6)
1,2,ωh er = z = y − u and p = log2
z (6) ∗ 1,2,ωh 1,2,ωh 1,2,ω h/2
to measure the error and the order of convergence, respectively. One can see that the numerical results are in a good agreement with our theory.
153
154
Chapter 4. 3-point difference schemes for systems of ODEs N
er
p
4 8 16 32
0.2848 E − 5 0.4400 E − 7 0.6907 E − 9 0.1081 E − 10
6.0 6.0 6.0
Table 4.1: Numerical results for problem (4.53)
Example 4.2. Let us consider the problem d2 u1 = u2 , dx2 u1 (0) = 0,
d2 u2 12 = 6 exp(−4u1 ) − , 2 dx (1 + x)4 u(1) = ln(2),
u2 (0) = −1,
0 < x < 1, (4.56)
u2 (1) = −0.25,
with the exact solution u1 (x) = ln(1 + x),
u2 (x) = −
1 . (1 + x)2
This BVP was solved by the above mentioned 6-TDS on the equidistant grid ωh using the same IVP-solver as in the previous examples. In order to gain the prescribed order of accuracy EP S, Runge’s h − h/2-strategy was used. Table 4.2 contains numerical results which are in complete agreement with our theory. EPS 1.0 E − 4 1.0 E − 6 1.0 E − 8 1.0 E − 10
N
Error
4 4 16 32
0.1365 E − 5 0.2634 E − 6 0.2341 E − 9 0.2398 E − 11
Table 4.2: Numerical results for problem (4.56)
Example 4.3. The next example is the BVP (see [29]) d2 u1 = λ2 u1 + u2 + x + (1 − λ2 ) exp(−x), dx2 d2 u2 = −u1 + exp(u2 ) + exp(−λx), dx2 u1 (0) = 2,
u1 (1) = exp(−λ) + exp(−1),
u2 (0) = 0,
u2 (1) = −1,
(4.57)
4.4. Numerical examples with the exact solution u1 (x) = exp(−λx) + exp(−x),
u2 (x) = −x.
The BVP (4.57) is monotone since (f (x, u, ξ) − f (x, v, η), u − v) = −λ2 (u1 − v1 )2 − exp(θu2 + (1 − θ)v2 )(u2 − v2 )2 ≤ 0. Note that the Lipschitz constant of the right-hand side of the ODE (4.57) in a √ neighborhood of the exact solution is L = λ4 + 3 > 1. Table 4.3 and Table 4.4 contain the numerical results obtained by the 6-TDS (4.54) for the BVP (4.57) with λ = 500 and λ = 1000, respectively. EPS 1.0 E − 4 1.0 E − 6 1.0 E − 8
N
Error
1000 2000 4000
0.4406 E − 5 0.1315 E − 6 0.1380 E − 9
Table 4.3: Numerical results for problem (4.57) with λ = 500
EPS 1.0 E − 4 1.0 E − 6 1.0 E − 8
N
Error
2000 4000 8000
0.4411 E − 5 0.1316 E − 7 0.2239 E − 9
Table 4.4: Numerical results for problem (4.57) with λ = 1000 Example 4.4. Finally, let us consider the following singularly perturbed BVP (see [85]): du1 d2 u1 + u1 + 0.5 exp(−u2 ) + f1 (x), ε 2 = dx dx ε
du2 d2 u2 =2 + 0.5u1 + exp(u2 ) + f2 (x), dx2 dx
u1 (0) = exp(−1/ε) + 1,
u1 (1) = 1,
u2 (0) = exp(−2/ε + 1) + 1, with the exact solution u1 (x) = exp (x − 1)/ε + cos(0.5πx),
(4.58)
u2 (1) = 0,
u2 (x) = − exp 2(x − 1)/ε + 1 + exp(x).
155
156
Chapter 4. 3-point difference schemes for systems of ODEs The numerical results obtained by the 6-TDS (4.54) are given in Table 4.5. ε 1.0 E1 1.0 E1 1.0 E − 1 1.0 E − 1
EPS 1.0 E − 3 1.0 E − 5 1.0 E − 3 1.0 E − 5
N
Error
100 400 6400 25600
0.3731 E − 3 0.3701 E − 5 0.2684 E − 4 0.5148 E − 5
Table 4.5: Numerical results for problem (4.58)
157
Chapter 5
Difference schemes for nonlinear BVPs on the half-axis One thing I have learned in a long life: that all our science, measured against reality, is primitive and childlike - and yet it is the most precious thing we have. Albert Einstein (1879–1955)
In this chapter we generalize the idea of the exact difference schemes to BVPs which are defined on the half axis. Let us consider the following scalar nonlinear BVP on the infinite interval [0, ∞), d2 u − m2 u = −f (x, u), dx2 u(0) = µ1 ,
x ∈ (0, ∞),
u(x) ∈ R, (5.1)
lim u(x) = 0,
x→∞
where m 6= 0 is a real constant. We will develop three-point EDS which are defined on non-uniform grids under the assumption that the function f (x, u) in (5.1) is sufficiently smooth between a finite number of discontinuity points with respect to the first variable. Moreover, the practical implementation of the EDS by n-TDS of order of accuracy n ¯ = 2[(n + 1)/2] is proposed. As before the freely selectable natural number n is called the rank of the TDS.
I.P. Gavrilyuk et al., Exact and Truncated Differences Schemes for Boundary Value ODEs, International Series of Numerical Mathematics 159, DOI 10.1007/978-3-0348-0107-2_5, © Springer Basel AG 2011
157
158
Chapter 5. Difference schemes for BVPs on the half-axis
5.1
Existence and uniqueness of the solution
In [1, p. 83] sufficient conditions for the existence of a solution of the (vector-) problem d2 u − m2 u = −f (x, u), dx2 u(0) = µ1 ,
u(x) ∈ Rn ,
x ∈ (0, ∞),
lim u(x) = 0,
x→∞
are given. Below, we use Banach’s Fixed Point Theorem (see Theorem 1.1) to find more constructive conditions guaranteeing not only the existence but also the uniqueness of solutions of the BVP (5.1). Let us introduce the function def
u(0) (x) = µ1 exp(−m x),
(5.2)
the set def
Ω(D, β) =
u(x) : u ∈ C [0, ∞), u − u(0)
1
≤ β, D ⊆ [0, ∞) ,
1,D
)
(
kuk1,D
du
= max kuk0,D ,
dx
def
,
def
kuk0,D = max |u(x)|, x∈D
0,D
and the class Q(0) [0, ∞) of piecewise continuous functions with a finite number of discontinuity points of first kind. The next theorem gives sufficient conditions under which the problem (5.1) has a unique solution in the sphere Ω(D, r). Theorem 5.1 Suppose the following hypotheses are satisfied: def
• for all x ∈ [0, ∞) and for all u ∈ Ω([0, ∞), r), r = K1 max{1/m2 , 1/m}, it holds that def
fu (x) = f (x, u) ∈ Q0 [0, ∞),
|f (x, u)| ≤ K(x) ≤ K1 ,
(5.3)
• it is lim e
−mx
Zx
mξ
e
x→∞
0
mx
Z∞
K(ξ)dξ = lim e x→∞
e−mξ K(ξ)dξ = 0,
(5.4)
x
• for all x ∈ [0, ∞) and for all u, v ∈ Ω([0, ∞), r) it holds that |f (x, u) − f (x, v)| ≤ L1 |u − v|,
(5.5)
5.1. Existence and uniqueness of the solution • and
def
q = L1 max{1/m2 , 1/m} < 1.
(5.6)
Under these hypotheses the BVP (5.1) has a unique solution u(x) ∈ Ω([0, ∞), r) which is the limit of the sequence {u(k) (x)}∞ k=0 defined by the starting function (5.2) and the fixed point iteration d2 u(k) − m2 u(k) = −f x, u(k−1) , 2 dx (k)
u
(k)
(0) = µ1 ,
lim u
x→∞
(x) = 0,
x ∈ (0, ∞), (5.7)
k = 1, 2, . . . .
Moreover, the error estimate
(k)
u − u
≤
1,[0,∞)
qk r 1−q
(5.8)
holds. Proof. We transform problem (5.1) into the equivalent integral form Z∞ u(x) = 0. def
Find the EDS on an arbitrary grid ωh , h =
def
max hi , hi = xi − xi−1 , for the
i=1,2,...,N
BVP defined by the ODE (6.9) and the periodic boundary condition (6.8). Exercise 6.8. Construct an EDS for the BVP (6.9), (6.8) following the theory of Chapter 2. Exercise 6.9. Construct a 3-TDS for the BVP (6.9), (6.8) following the theory of Chapter 2. Exercise 6.10. Show that on a uniform grid with step-size h and with respect to the ODE (6.11) u00 = eu , x ∈ (0, 1), the difference equations and yxx −
yxx = ey
(6.12)
h2 y [e ]xx = ey 12
(6.13)
possess truncation errors of order O(h2 ) provided that u ∈ C4 [0, 1], and O(h4 ) provided that u ∈ C6 [0, 1], respectively. Exercise 6.11. Develop an algorithm of order 4 with the input data L, c1 , c2 and f (x) for the BVP u00 = eu − e−u + f (x),
x ∈ (0, L),
u(0) = c1 ,
u(L) = c2 ,
L > 0.
(6.14)
Note, such problems often arise in the modelling of semiconductor devices. Exercise 6.12. Check that the function x u(x) = − ln cos2 √ 2
(6.15)
is the solution of the BVP 00
u
u (x) = e ,
x ∈ (0, 1),
u(0) = 0,
2 1 u(1) = − ln cos √ . 2
1) Show that the difference scheme h2 y h2 y 2 y yxx − e (y ◦ ) 1 − e + e x 12 3 xx 4 2 2h4 ey y ◦ + 11e2y y ◦ + 4e3y y ◦ = ey − x x x 6! has a truncation error O(h6 ).
(6.16)
(6.17)
205
206
Chapter 6. Exercises and solutions 2) Solve this BVP with the TDS of order 2 and compare the result with the exact solution. 3) Solve this BVP with the TDS of order 4 and compare the result with the exact solution. 4) Find experimentally the a posteriori error by the Runge principle. Exercise 6.13. Check that the function u(x) = c sinh (ax + b),
(6.18)
where c is an arbitrary and a, b are positive constants, satisfies the BVP u00 (x) = 2 sinh u + f (x),
x ∈ (0, L), (6.19)
u(0) = c sinh (b),
u(L) = c sinh (aL + b),
L > 0.
def
Here, f (x) = c(2 − a2 ) sinh (ax + b). Develop a three-point EDS on 1) a uniform and 2) a non-equidistant grid. Exercise 6.14. Check that the function u(x) =
1 1+x
(6.20)
is the exact solution of the BVP u00 (x) = 2 u3 (x),
x ∈ (0, 1),
u(0) = 1,
u(1) = 0.5.
(6.21)
On the basis of the facts uxx (x) − u00 (x) = 2
∞ (2k) X u (x) k=2
(2k)!
h2k−2
(6.22)
on the equidistant grid ωh and u(2k) (x) = (−1)k (2k)!u2k+1 (x) find the EDS and a TDS of order 2n for an arbitrary n. Exercise 6.15. Check that the BVP u00 (x) + ω 2 u + u2 (x) = u(0) = A sin ϕ,
A2 (1 − cos (2ωx + 2ϕ)) , 2
(6.23)
u(1) = A sin (ω + ϕ),
where A, ω and ϕ are arbitrary constants, has the exact solution u(x) = A sin (ωx + ϕ).
(6.24)
Find on the uniform grid ωh a second-order difference equation (EDS) and a TDS of order 2n for an arbitrary n.
6.1. Exercises Exercise 6.16. Check that the BVP u00 (x) − b
u ln u = 0, x
u(1) = eb ,
u(2) = e2b ,
(6.25)
where b is an arbitrary constant, has the exact solution u(x) = ebx .
(6.26)
Find the 3-point EDS for this BVP on uniform grid with step-size h = 1/N and a TDS of order 2n for an arbitrary n. Exercise 6.17. Check that the BVP u00 (x) = −
2a u u0 , c
c u(0) = , b
u(1) =
c , a+b
(6.27)
where a, b and c are arbitrary real constants, has the exact solution u(x) =
c . ax + b
(6.28)
Find the 3-point EDS for this BVP on the uniform grid ωh and a TDS of order 2n for an arbitrary n. Exercise 6.18. Check that the BVP u00 (x) =
a2 m(m + 1) m+2 √ u m , m 2 c
u(0) =
c , bm
u(1) =
c , (a + b)m
(6.29)
where a, b, c are arbitrary positive real constants and m is a natural number, has the exact solution c u(x) = . (6.30) (ax + b)m Find the 3-point EDS for this BVP on the uniform grid ωh and a TDS of order 2n for an arbitrary n. Exercise 6.19. Check that the function u(x) =
1 , ax + b
(6.31)
where a and b are arbitrary positive constants, is the solution of the BVP u00 (x) = 2a2 u3 (x), u(0) =
1 , b
u(1) =
x ∈ (0, 1), 1 . a+b
(6.32)
ˆ i.e. determine its 1) Find the 3-point EDS on an arbitrary non-uniform grid ω, coefficients explicitly. 2) Derive the 3-TDS of order n for an arbitrary n ∈ N with explicitly given coefficients and solve the BVP by this 3-TDS with n = 4.
207
208
Chapter 6. Exercises and solutions 3) Solve the BVP (6.32) by the algorithm presented in Section 3.3 using the implicitly defined TDS of order 4 and compare the results with 2). Exercise 6.20. Check that the function u(x) = ln (ax + b),
(6.33)
where a and b are arbitrary positive constants, is the solution of the BVP 2
u00 (x) = − (u0 ) (x),
x ∈ (0, 1), (6.34)
u(0) = ln b,
u(1) = ln (a + b).
1) Find the three-point EDS on a uniform grid ω, i.e. determine its coefficients explicitly. 2) Derive the TDS of the order 2n for an arbitrary n ∈ N with explicitly given coefficients and solve the BVP with n = 4. 3) Solve the BVP by the algorithm presented in Section 3.3 using the implicitly defined TDS of order 4 and compare the results with 2). Exercise 6.21. Prove that the difference scheme uxx (x)
(ax + b)2 − a2 h2 (ax + b)2
= −u2◦ (x) +
1 ln h2
u(0) = ln b,
u(1) = ln (a + b)
x
+
1 ln2 4h2
ax + b + ah ax + b − ah
,
x ∈ ωh ,
(6.35) is exact for the BVP 2
u00 (x) = − (u0 ) (x),
x ∈ (0, 1),
u(0) = ln b,
u(1) = ln (a + b).
(6.36)
Exercise 6.22. Prove that for the right-hand side of the EDS from the previous exercise it holds that 1 (ax + b)2 − a2 h2 ln h2 (ax + b)2 (6.37) a4 ax + b + ah 8a6 1 2 2 4 = h + h + ··· . + 2 ln 4h ax + b − ah 6(ax + b)4 45(ax + b)6 Exercise 6.23. Let us consider the BVP du d2 u = − f (x, u) , 2 dx dx
x ∈ (0, 1),
u(0) = γ0 ,
u(1) = γ1 ,
(6.38)
and suppose that its solution possesses the property u(k) (x) = ϕk (x)u(x),
k = 1, 2, . . . .
(6.39)
6.1. Exercises Show that the difference scheme ux,x (x) = −u ◦ f (x, u) + 2
∞ X ϕ2k (x)
x
k=2
u(0) = γ0 ,
(2k)!
∞ X ϕ2k (x)
h2k−2 + 2f (x, u)
k=2
(2k)!
h2k−2 uk (x),
(6.40)
u(1) = γ1 ,
is exact (provided that the series converges). What is the TDS of order O(h2n+1 ) for an arbitrary n ∈ N? Exercise 6.24. Check that the function u(x) = cxn
(6.41)
is the solution of the BVP u0 (x) , u00 (x) = c2 (n − 1) p n u2 (x) n
u(a) = ca ,
n
u(b) = cb ,
c > 0, (6.42) b > a > 0,
and find an EDS and TDS for this BVP. Exercise 6.25. Develop an EDS for the BVP d2 u 1 = 3, 2 dx u
0 < x < 1,
u(0) = u(1) = 1,
(6.43)
whose exact solution is u(x) = (2x2 − 2x + 1)−3/2 . Exercise 6.26. Construct a 6-TDS for BVP (6.43). Exercise 6.27. Construct an EDS for the problem u00 (x) = sinh u,
x ∈ (0, L), (6.44)
u(0) = ln cosh b,
u(L) = ln cosh (aL + b),
where a, b and L are positive real constants (mathematical problems of this type arise in the modelling of semiconductor devices). def
Exercise 6.28. Check that in the domain Ω = {(x, y) : 0 ≤ x, y ≤ 1} the function a , a, b, c, d ∈ R, (6.45) u(x, y) = bx + cy + d is the solution of the following BVP for the nonlinear partial differential equation ∂ 2 u(x, y) ∂ 2 u(x, y) 2(b2 + c2 ) 3 + = u (x, y), ∂x2 ∂y 2 a2 u(0, y) =
a , cy + d
u(1, y) =
a , b + cy + d
u(x, 0) =
a , bx + d
u(x, 1) =
a . bx + c + d
(x, y) ∈ Ω, (6.46)
209
210
Chapter 6. Exercises and solutions Propose an EDS for this BVP on the rectangular grid def
ωh1 ,h2 = {(xi , yj ) : xi = ih1 , i = 0, 1, . . . , N1 , h1 = 1/N1 ; yj = jh2 , j = 0, 1, . . . , N2 , h2 = 1/N2 }. Is this EDS uniquely determined? Exercise 6.29. Check that in the domain Ω the function u(x, y) = a sin (bx + cy + d),
a, b, c, d ∈ R,
(6.47)
is the solution of the following BVP for the nonlinear partial differential equation ∂ 2 u(x, y) ∂ 2 u(x, y) + + 2xyu2 (x, y) + a(b2 + c2 )u ∂x2 ∂y2 = 2a2 xy sin2 (bx + cy + d),
(x, y) ∈ Ω,
u(0, y) = c sin (by + d),
u(1, y) = c sin (a + by + d),
u(x, 0) = c sin (ax + d),
u(x, 1) = c sin (ax + b + d).
(6.48)
Propose an EDS for this BVP on the rectangular grid ωh1 ,h2 . Exercise 6.30. An ODE of the form u0 (x) = f (u) is called autonomous. Suppose that an algorithm to calculate Fk (u) = f (k) (u) for all k = 1, 2, . . ., is given. Construct an EDS for the IVP u0 (x) = f (u),
u(0) = u0 ,
on an arbitrary non-uniform grid with N nodes. What is the algorithm for a TDS of order O(hn ), where h = maxi hi , hi = xi − xi−1 ? Exercise 6.31. Suppose that an algorithm to calculate Fk (u) = f (k) (u) for all k = 1, 2, . . ., is given. Construct an EDS for the BVP u00 (x) = f (u),
u(0) = u0 ,
u(1) = u1 ,
on the equidistant grid with the step-size h = 1/N . What is the algorithm for a TDS of order O(hn )? Exercise 6.32. The BVP u00 (x) + λ u(x) = 0,
x ∈ (0, 1), (6.49)
u(0) = 0,
u(1) = 0
has the exact solution un (x) = sin (nπx),
λn = (nπ)2 ,
n = 1, 2, . . . .
(6.50)
6.1. Exercises Show that on the grid def
ω h = ωh ∪ {x0 = 0, xN+1 = 0},
def
ωh = {xi =
i , N +1
i = 1, . . . , N } (6.51)
the eigenvalues of the difference scheme (in non-indexed form) √ 2 sin ( λh/2) √ uxx (x) + λ u(x) = 0, x ∈ ωh , ( λh/2) u(0) = 0,
(6.52)
u(1) = 0
or (in indexed form) √ 2 1 sin ( λh/2) √ [u(x ) − 2u(x ) + u(x )] + λ u(xi ) = 0, i+1 i i−1 h2 ( λh/2) u(x0 ) = 0,
u(xN +1 ) = 0,
(6.53)
i = 1, . . . , N,
coincide with the first N exact eigenvalues and the eigenfunctions (eigenvectors) are the projections of the first N exact eigenfunctions onto the grid . Exercise 6.33. Show that • the eigenvalues λhk of the difference eigenvalue problem yxx (x) + λh y(x) = 0,
x ∈ ω, (6.54)
y(0) = 0,
y(1) = 0
approximate the exact eigenvalues λk of (6.49) (k fixed and independent of N ) with second order of accuracy O(h2 ), and • the eigenfunctions yk (x) are the projections of the first N exact eigenfunctions uk (x) onto the grid. Exercise 6.34. For the Sturm-Liouville BVP u00 (x) + [λ − q(x)]u(x) = 0,
x ∈ (0, 1), (6.55)
u(0) = 0,
u(1) = 0,
with def
q(x) =
0,
0≤x≤
1 , 2
1 <x≤1, 2 construct the EDS on the equidistant grid def ω h = xi = ih, i = 0, 1, . . . , 2N + 2, h = 1,
1 . 2(N + 1)
211
212
Chapter 6. Exercises and solutions Exercise 6.35. (See [20, 54]) Let the eigenvalue problem Lu(x) + λ u(x) = 0,
x ∈ (a, b), (6.56)
|u(a)| 6= ∞,
|u(b)| 6= ∞,
be given, where def
def
Lu(x) = A(x)u00 (x) + B(x)u0 (x),
A(x) = a2 (x − a)(x − b),
def
B(x) = b1 x + b0 .
Determine an equidistant grid ωh with 2N + 1 nodes and specify conditions under which the eigenvalues of the following difference scheme x ∈ ωh ,
Lh y(x) + λh y(x) = 0,
(6.57) u(x−N ) 6= ∞,
u(xN ) 6= ∞,
where def
Lh y(x) = A(x)yxx + B(x)y ◦ , x
coincide with the first 2N + 1 eigenvalues of the exact problem (6.56). Which is the approximation order of the corresponding eigenfunctions with respect to h? Hint: If we substitute x=
1 [(b − a)t + a + b] 2
(6.58)
1 def into (6.56) and define y(t) = u( [(b − a)t + a + b]) then problem (6.56) reads 2 1 1 1 λ b1 (b − a)t + b1 (b + a) + b0 y 0 (t) − y(t) = 0, (1 − t2 )y 00 (t) − a2 2 2 a2 (6.59) |y(−1)| = 6 ∞,
|y(1)| = 6 ∞,
t ∈ (−1, 1).
The solution of (6.59) is a polynomial of degree n iff λ = −a2 n(n +
b1 (b − a) − 1). 2a2
2x − a − b (α,β) ), where Pn (z) are b−a b1 (b − a) b0 b0 the Jacobi polynomials with β = − − 1 and α = −1 + + (see e.g. 2a2 2a2 2a2 [6]). (α,β)
This solution is given by u(x) = Pn (x) = Pn
(
Exercise 6.36. (See [20, 54]) After the change of variables U = r−1/2 (sin θ)m V,
x = ln r,
y=
1 + cos θ 2
6.1. Exercises the Dirichlet problem for the Poisson equation in spherical coordinates (m = 0 is the case of axial symmetry) LU = Lr U + Lθ U = 0 < r1 < r < r2 ,
1 ∂ ∂U m2 U ∂ 2 ∂U r + sin θ − = f (r, cos θ), ∂r ∂r sin θ ∂θ ∂θ sin θ
0 < θ < π,
U (r1 , θ) = ϕ1 (θ),
m = 0, 1, 2, . . . ,
U (r2 , θ) = ϕ2 (θ)
is transformed into the problem LV = (Lx + Ly )V = F (x, y), V (xi , y) = Φi (y),
(x, y) ∈ G,
i = 1, 2,
where ∂2V 1 2 ∂ 2V ∂V , + m + V, L V = y(1 − y) − (m + 1)(2y − 1) y 2 2 ∂x 2 ∂y ∂y −m/2 x/2 F (x, y) = e 4y(1 − y) f (ex , 2y − 1).
Lx V =
Approximate the operator Ly by a difference operator with an exact spectrum similar to Exercise 6.35. Exercise 6.37. Given the Sturm-Liouville problem Lu(x) + λu(x) = [(1 − x2 )u0 (x)]0 + λu(x) = 0,
x ∈ (−1, 1), (6.60)
|u(−1)| = 6 ∞,
|u(1)| 6= ∞,
and let Pn (x) be the Legendre polynomials. To construct the 3-point difference scheme which has the exact spectrum of (6.60) λn = n(n + 1),
un (x; λn ) = Pn (x),
x ∈ (−1, 1),
n = 0, 1, . . . ,
(6.61)
use the stencil functions v1i and v2i which on an arbitrary grid ωh = {−1 < x−N < x−N +1 < · · · xN < 1}
(6.62)
satisfies the equations Lvαi (x) + λvαi (x) = 0,
x ∈ (xi−1 , xi+1 ),
v1i (xi−1 ) = 0,
dv1i (xi−1 ) = 1, dx
v2i (xi+1 ) = 0,
dv2i (xi+1 ) = −1. dx
α = 1, 2, (6.63)
213
214
Chapter 6. Exercises and solutions Exercise 6.38. The Sturm-Liouville problem u00 (x) − 2xu(x) + λu(x) = 0, Z ∞ 2 e−x u2 (x)dx < ∞
x ∈ (−∞, ∞), (6.64)
−∞
possesses the exact solution λn = 2n,
un (x) = un (x; λn ) = Hn (x),
x ∈ (−∞, ∞),
n = 0, 1, . . . ,
where Hn (x) are the Hermite polynomials [6]. Show that on the finite grid √ ωh = {xi = ih : i = −N, . . . , N, h = 1/ N } the difference scheme yx,x (x) − 2xy ◦ (x) + λh y(x) = 0,
x ∈ ωh ,
x
y(x−N −1 ) 6= ∞,
(6.65) y(xN+1 ) 6= ∞
has the exact eigenvalues of the given problem (6.64), i.e. the eigenvalues λhn = 2n,
6.2
n = 0, 1, . . . , 2N + 1.
Solutions
Solution 6.1. Check that the exact solution satisfies the EDS. ˆ h can be written in the form Solution 6.2. The EDS on the grid ω uj = Y j (xj , uj−1 ),
j = 1, 2, . . . , N,
where Y j (x, uj−1 ) =
B0 u0 + B1 uN = β,
Y1j (x, uj−1 )
!
Y2j (x, uj−1
is the solution of the IVP dY1j (x, uj−1 ) = Y2j (x, uj−1 ), dx h i2 dY2j (x, uj−1 ) = − Y2j (x, uj−1 ) , dx
x ∈ (xj−1 , xj ],
Y1j (xj−1 , uj−1 ) = u1,j−1 , Y2j (xj−1 , uj−1 ) = u2,j−1 ,
j = 1, 2, . . . , N.
(6.66)
6.2. Solutions The general solution of the ODE is Y1j (x, uj−1 ) = ln |x + C1 | + C2 ,
Y2j (x, uj−1 ) =
1 . x + C1
The relations Y j (xj−1 , uj−1 ) = ln |xj−1 + C1 | + C2 = u1,j−1 , Y2j (x, uj−1 ) =
1 = u2,j−1 , xj−1 + C1
yield C1 =
1 u2,j−1
− xj−1 ,
C2 = u1,j−1 − ln
1 |u2,j−1 |
.
Thus, the solution of the IVP (6.66) is the function ln |1 + (x − xj−1 ) u2,j−1 | + u1,j−1 , Y j (x, uj−1 ) = u2,j−1 1 + (x − xj−1 )u2,j−1 and we obtain the two-point EDS ln |1 + hj u2,j−1 | + u1,j−1 . uj = u2,j−1 1 + hj u2,j−1 Solution 6.3. In accordance with our theory we obtain the following 4-EDS: (4) (4) (4) (4) (6.67) y j = Y (4)j xj , y j−1 , j = 1, 2, . . . , N, B0 y 0 + B1 yN = β, where by the classical Runge-Kutta method of order 4 we have hj (4) (4) (k1 + 2k2 + 2k3 + k4 ) , Y (4)j xj , y j−1 = y j−1 + 6 hj (4) hj k1 (4) k1 = f xj−1 , y j−1 , k2 = f xj−1 + , y j−1 + , 2 2 hj (4) hj k 2 (4) k3 = f xj−1 + , y j−1 + , k4 = f xj−1 + hj , y j−1 + hj k3 , 2 2 ! u2 . f (x, u) ≡ −u22 (4)
yj
≈ uj ,
Solution 6.4. We have from (6.7) u(xi−1 ) = tan
a xn+1 + C . n + 1 i−1
(6.68)
215
216
Chapter 6. Exercises and solutions Furthermore, by evident transformations we obtain successively a xn+1 , C = arctan (u(xi−1 )) − n + 1 i−1 a a n+1 n+1 x x + arctan (u(xi−1 )) − u(xi ) = tan n+1 i n + 1 i−1 a (xi − xi−1 ) + u(xi−1 ) tan n+1 , = a (xi − xi−1 ) 1 − (xi − xi−1 ) tan n+1 (6.69) a tan (x − x ) + u(x ) i i−1 i−1 u(xi ) − u(xi−1 ) 1 n+1 − u(xi−1 ) = a hi hi (xi − xi−1 ) 1 − u(xi−1 ) tan n+1 a a tan (xi − xi−1 ) + u2 (xi−1 ) tan (xi − xi−1 ) n+1 n+1 = , a (xi − xi−1 ) hi 1 − u(xi−1 ) tan n+1 and therefore the two-point EDS is a (xi − xi−1 ) tan n+1 uxi = hi
1 + u2 (xi−1 ) , a (xi − xi−1 ) 1 − u(xi−1 ) tan n+1
(6.70)
u(x0 ) = −u(xN ). ˆ h can be written in the form Solution 6.5. The EDS on the grid ω uj = Y j (xj , uj−1 ),
j = 1, 2, . . . , N,
u0 = −uN ,
j
where Y (x, uj−1 ) is the solution of the IVP dY j (x, uj−1 ) = axn Y j (x, uj−1 ) + 1 , dx j
Y (xj−1 , uj−1 ) = uj−1 ,
x ∈ (xj−1 , xj ],
j = 1, 2, . . . , N.
The general solution of the ODE in (6.71) is a j n+1 Y (x, uj−1 ) = tan x +C . n+1 Thus we have Y j (xj−1 , uj−1 ) = tan
a xn+1 + C n + 1 j−1
= uj−1 ,
(6.71)
6.2. Solutions C = arctan uj−1 −
a xn+1 , n + 1 j−1
and the solution of the IVP (6.71) is a n+1 j n+1 x Y (x, uj−1 ) = tan − xj−1 + arctan uj−1 . n+1 Now the two-point EDS can be represented in the form a n+1 n+1 x − xj−1 + arctan uj−1 , uj = tan n+1
j = 1, 2, . . . N,
u0 = −uN . Solution 6.6. In accordance with our theory we obtain the 2-TDS (2) (2) (2) (2) yj = Y (2)j xj , yj−1 , j = 1, 2, . . . , N, y0 = −yN ,
(6.72)
where by the two-stage Runge-Kutta method of order 2 (the so-called modified polygon method or Heun’s method) we have (2) (2) (2) yj ≈ uj , Y (2)j xj , yj−1 = yj−1 + hj k2 , (2) k1 = f xj−1 , yj−1 ,
k2 = f
xj−1 +
hj (2) h j k1 , yj−1 + 2 2
,
f (x, u) ≡ axn (u2 + 1). Here one can use any Runge-Kutta method of order 2. The EDS (6.72) is a nonlinear system of algebraic equations. Analogously one can develop the 3-TDS (3) (3) yj = Y (3)j xj , yj−1 , j = 1, 2, . . . , N,
(3)
(3)
y0 = −yN ,
where e.g. the following three-stage Runge-Kutta formulas of order 3 (see e.g. [35], p. 29) is used hj (3) (3) (k1 + 4k2 + k3 ) , Y (3)j xj , yj−1 = yj−1 + 6 hj (3) h j k1 (3) k1 = f xj−1 , yj−1 , k2 = f xj−1 + , yj−1 + , 2 2 (3) k3 = f xj−1 + hj , yj−1 − hj k1 + 2hj k2 . Solution 6.7. We have from (6.10) u(xi−1 ) =
b e∆xi−1 − Ca , B e∆xi−1 − CA
def
C =
C2 , C1
C1 6= 0.
(6.73)
217
218
Chapter 6. Exercises and solutions Furthermore, by evident transformations we obtain successively C[a − Aui−1 ] = −e∆xi−1 [Bui−1 − b], C = e∆xi−1
ui−1 = u(xi−1 ),
b − Bui−1 , a − Aui−1 b − Bui−1 a − Aui−1 , b − Bui−1 − A e∆xi−1 a − Aui−1
b e∆xi − a e∆xi−1 ui = B e∆xi
(6.74)
ui − ui−1 e∆xi − e∆xi−1 = hi hi ×
B
a e∆xi
(b − Bui−1 )(a − Aui−1 ) . − A b e∆xi−1 + A Bui−1 (e∆xi − e∆xi−1 )
Now the EDS reads uxi =
e∆xi − e∆xi−1 hi ×
(b − Bui−1 )(a − Aui−1 ) , B a e∆xi − A b e∆xi−1 + A B ui−1 (e∆xi − e∆xi−1 )
(6.75)
u0 = uN . ˆ h can be written in the form Solution 6.8. The EDS on the grid ω uj = Y j (xj , uj−1 ),
j = 1, 2, . . . , N,
u0 = uN ,
where Y j (x, uj−1 ) is the solution of the IVP dY j (x, uj−1 ) = (AY j (x, uj−1 ) − a)(BY j (x, uj−1 ) − b), dx j
Y (xj−1 , uj−1 ) = uj−1 ,
x ∈ (xj−1 , xj ],
j = 1, 2, . . . , N.
The general solution of the ODE in (6.76) is Y j (x, uj−1 ) =
b exp(∆x) − Ca . B exp(∆x) − CA
Thus we have Y j (xj−1 , uj−1 ) = C=
b exp(∆xj−1 ) − Ca = uj−1 , B exp(∆xj−1 ) − CA
(b − uj−1 B) exp(∆xj−1 ) . a − uj−1 A
(6.76)
6.2. Solutions The solution of the IVP (6.76) is the function Y j (x, uj−1 ) =
b(a − uj−1 A) exp(∆x) − a(b − uj−1 B) exp(∆xj−1 ) , B(a − uj−1 A) exp(∆x) − A(b − uj−1 B) exp(∆xj−1 )
and we obtain the two-point EDS in the form uj =
b(a − uj−1 A) exp(∆xj ) − a(b − uj−1 B) exp(∆xj−1 ) , B(a − uj−1 A) exp(∆xj ) − A(b − uj−1 B) exp(∆xj−1 )
u0 = uN .
Solution 6.9. In accordance with our theory we obtain the 3-EDS (3) (3) (3) (3) yj = Y (3)j xj , yj−1 , j = 1, 2, . . . , N, y0 = yN , where the Runge-Kutta method of order 3 which we presented in Solution 6.6 is again used. Solution 6.10. For u ∈ C4 [0, 1] it holds that ∞ 2k (2k+2) i h X h u (x) 1 (4) = u (˜ x), uxx (x) − eu(x) − u00 (x) − eu(x) = 2 (2k + 2)! 12
(6.77)
k=1
with some x ˜ ∈ (x − h, x + h). For u ∈ C6 [0, 1] we have uxx (x) −
i h h2 h u(x) i e − eu(x) − u00 (x) − eu(x) 12 xx
h2 00 [u (x)]xx − eu(x) 12 h2 (4) 2 4 (6) h2 (4) h2 (6) ˜ u (x) + h u (˜ u (x) + u (x = x) − ˜) 12 6! 12 12
= uxx (x) − u00 (x) −
(6.78)
= O(h6 ), ˜˜ ∈ (x − h, x + h). with some x Solution 6.11. Analogously to Solution 6.10. Solution 6.12. Analogously to Solution 6.10. Solution 6.13. Use the fact that u(k) (x) = ak u(x). Solution 6.14. We have uxx (x) − 2u3 (x) − u00 (x) − 2u3 (x) ∞ (2k) ∞ X X u (x) 2k−2 h =2 = 2 u2k+1 (x)h2k−2 . (2k)! k=2
k=2
(6.79)
219
220
Chapter 6. Exercises and solutions Therefore the difference scheme uxx (x) − 2u3 (x) = 2
∞ X
u2k+1 (x)h2k−2 ,
x ∈ ωh , (6.80)
k=2
u(0) = 1,
u(1) = 0.5,
or, which is the same, uxx (x) − 2u3 (x) = 2h2 u(0) = 1,
u5 (x) , 1 − (hu(x))2
x ∈ ωh , (6.81)
u(1) = 0.5,
is exact and the difference scheme yxx (x) − 2y 3 (x) − 2
n X
y 2k+1 (x)h2k−2 = 0,
x ∈ ωh , (6.82)
k=2
y(0) = 1,
y(1) = 0.5
possesses a truncation error of order O(h2n ). Solution 6.15. We have uxx (x) + ω 2 u + u2 (x) −
A2 (1 − cos (2ωx + ϕ)) 2
A2 00 2 2 (1 − cos (2ωx + ϕ)) − u (x) + ω u + u (x) − 2 =2
∞ (2k)(x) X u k=2
(2k)!
h2k−2 = 2
∞ X
(6.83)
(−1)k ω 2k u(x)h2k−2 .
k=2
Therefore the difference scheme " uxx (x) + ω 2 u + u2 (x) − 2
∞ X
# (−1)k ω 2k h2k−2 u(x)
k=2
=
A2 (1 − cos (2ωx + ϕ)) , 2
u(0) = A sin (ϕ),
(6.84) x ∈ ωh ,
u(1) = A sin (ω + ϕ),
or, which is the same, uxx (x) + ω 2 u + u2 (x) − 2h2 =
A2 (1 − cos (2ωx + ϕ)) , 2
u(0) = A sin (ϕ),
ω4 u(x) 1 + (ωh)2 x ∈ ωh ,
u(1) = A sin (ω + ϕ),
(6.85)
6.2. Solutions is exact and the difference scheme " 2
2
yxx (x) + ω y + y (x) − 2
n X
# k
2k 2k−2
(−1) ω h
y(x)
k=2
=
(6.86)
A2 (1 − cos (2ωx + ϕ)) , 2
y(0) = A sin (ϕ),
x ∈ ωh ,
y(1) = A sin (ω + ϕ),
has a truncation error of order O(h2n ). Solution 6.16. We have u(k) (x) = bk ebx ,
k = 1, 2, . . . .
(6.87)
Thus, ∞ (2k)(x) X u u ln u u ln u 00 − u (x) − b =2 h2k−2 uxx (x) − b x x (2k)! k=2
∞ X = 2 b2k u(x)h2k−2 = b4 h2 k=2
(6.88) 1 u(x). 1 − (bh)2
The three-point difference scheme ∞
uxx (x) − b
X u ln u − 2 b2k u(x)h2k−2 = 0, x
x ∈ ωh , (6.89)
k=2
u(1) = eb ,
u(2) = e2b ,
or, which is the same (provided that |bh| < 1), uxx (x) − b b
u(1) = e ,
2b4 h2 u ln u − u(x) = 0, x 1 − (bh)2
x ∈ ωh , (6.90)
2b
u(2) = e ,
is exact. The difference scheme n
yxx (x) − b
X y ln y − 2y(x) b2k h2k−2 = 0, x
x ∈ ωh , (6.91)
k=2
y(1) = eb , or yxx (x) − b b
y(1) = e ,
y(1) = e2b ,
1 − (bh)2n−3 y ln y − 2b4 h2 y(x) = 0, x 1 − (bh)2 2b
y(1) = e ,
possesses a truncation error of order O(h2n ).
x ∈ ωh , (6.92)
221
222
Chapter 6. Exercises and solutions Solution 6.17. It can be easily seen that u(k) (x) = (−1)k k!c ak
a k 1 k = (−1) k! uk+1 (x), (ax + b)k+1 c
k = 1, 2, . . . .
Furthermore, we have (provided that h is sufficiently small) 2a 2a 0 00 uxx (x) + u u ◦ − u (x) + u u x c c i 2a h = [uxx (x) − u00 (x)] + u u00 (x) − u ◦ x c ∞ (2k) ∞ X u (x) 2k−2 2au X u(2k+1) (x) 2k h h =2 + (2k)! c (2k + 1)! k=2
k=1
(6.93)
∞ ∞ X 2au X a 2k+1 2k 2k+2 a 2k 2k−2 2k+1 =2 h u (x) − h u (x) c c c k=2
k=1
4 2
=
2a h c4
5
4 2
2a h u (x) u5 (x) 2 − 2 = 0. c4 ahu(x) ahu(x) 1− 1− c c
Thus the three-point difference scheme 2a u(x) u ◦ (x) = 0, x c c c , u(0) = , u(1) = b a+b uxx (x) +
x ∈ ωh , (6.94)
is exact. It is interesting to note that this difference scheme is exact on the exact solution but in general it has only a truncation error of second order if u belongs to the class C4 [0, 1]. On the other hand we have 2a 2a uxx (x) + u ux − u00 (x) + u u0 c c = [uxx (x) − u00 (x)] + =2
∞ (2k) X u (x) k=2
(2k)!
2a u [ux − u0 (x)] c
h2k−2
∞
+
2au X u(k) (x) k−1 h c k! k=2
(6.95)
6.2. Solutions =2
∞ X a 2k
c
k=2
=
2a4 h2 c4
∞
h2k−2 u2k+1 (x) +
a k 2au X (−1)k hk−1 uk+1 (x) c c k=2
2a3 h u5 (x) u3 (x) . 2 + 3 a hu(x) c a hu(x) 1 + 1− c c
Therefore the three-point difference scheme uxx (x) +
2a4 h2 2a u(x) ux (x) − 4 c c
x ∈ ωh ,
c u(0) = , b
u(1) =
2a3 h u5 (x) u3 (x) = 0, 2 + 3 a hu(x) c a hu(x) 1 + 1− c c
c a+b (6.96)
is exact, too. The difference scheme n
yxx (x) +
X a 2k 2a y(x) yx (x) − 2 h2k−2 y 2k+1 (x) c c k=2
+
2au c
n X k=2
c y(0) = , b or
(−1)k
a k c
y(1) =
hk−1 uk+1 (x) = 0,
x ∈ ωh ,
c , a+b
1 − (ah)2n−2 a y(x) yxx (x) + y yx − 2a4 h2 c 1 − (ah)2 n+1 a hu(x) 1 − − 2a3 hu3 (x) c − = 0, x ∈ ωh , c3 1 − (a h)2 c y(0) = , b
y(1) =
(6.97)
c , a+b
possesses a truncation error of order O(hn+1 ). Solution 6.18. It can easily be seen that u(k) (x) = (−1)k cak m(m + 1) · · · (m + k − 1) = (−1)k cak m(m + 1) · · · (m + k − 1)
1 (ax + b)k+m 1 u(x) (ax + b)k
(6.98)
223
224
Chapter 6. Exercises and solutions = (−1)k cak (m)k
1 u(x), (ax + b)k
def
where (m)k = m(m + 1) · · · (m + k − 1) is Pochhammer’s symbol. Further we have m+2 m+2 2 a m(m + 1) a m(m + 1) √ √ uxx (x) + u m (x) − u00 (x) + u m (x) m 2 m 2 c c 2
00
= [uxx (x) − u (x)] = 2
∞ (2k) X u (x) k=2
= 2c
∞ X
a2k
k=2
(2k)!
h2k−2
(6.99)
(m)2k 2k−2 1 h u(x). (2k)! (ax + b)2k
Thus the three-point difference scheme m+2 ∞ X a2 m(m + 1) (m)2k 2k−2 1 √ uxx (x) = h u m (x) + 2c a2k u(x), m 2 (2k)! (ax + b)2k c k=2 x ∈ ωh ,
u(0) =
c , bm
u(1) =
c , (a + b)m (6.100)
is exact and the difference scheme
a2 m(m + 1) √ y yxx (x) = m 2 c x ∈ ωh ,
y(0) =
c , bm
" n # m+2 X (m)2k 1 2k 2k−2 m (x) + 2c y(x), a h (2k)! (ax + b)2k k=2
y(1) =
c , (a + b)m (6.101)
has a truncation error of order O(h2n ). Solution 6.19. It can easily be seen that the exact solution satisfies
u(k) (x) =
(−1)k k!ak = (−1)k k!ak uk+1 (x). (ax + b)k+1
(6.102)
Using Taylor’s expansion and the formula for the sum of the infinite geometric progression we obtain
6.2. Solutions (k) ∞ k−1 (k) ∞ i X h X hj+1 uj (−1)k hk−1 uj j (2) − uxˆx,j − 2a2 u3j − uj − 2a2 u3j = k! k! k=3
=
∞ X
k+1 (−1)k hk−1 − j+1 uj
k=3
=
∞ X
k=3
hk−1 uk+1 j j
k=3
−h2j+1 a3 u4j (1
(6.103)
− hj+1 auj + (hj+1 auj )2 + · · · )
− h2j a3 u4j (1 + hj auj + (hj+1 auj )2 + · · · ) =−
h2j a3 u4j h2j+1 a3 u4j − , 1 + hj+1 auj 1 − hj auj def
def
ˆ , and hj = xj − xj−1 . where uj = u(xj ), xj ∈ ω Thus the three-point difference scheme uxˆx,j = 2a2 u3j − 1 u0 = , b
uN
h2j+1 a3 u4j h2j a3 u4j − , 1 + hj+1 auj 1 − hj auj
j = 1, 2, . . . , N − 1, (6.104)
1 , = a+b
is exact and the TDS yxˆx,j = 2a2 yj3 +
n X
k+1 (−1)k hk−1 − j+1 yj
k=3
y0 =
1 , b
yN =
n X
hk−1 yjk+1 , j
j = 1, 2, . . . , N − 1,
k=3
1 , a+b (6.105)
or yxˆx,j = 2a2 yj3 − − y0 =
h2j+1 a3 u4j (1 + (hj+1 auj )n+1 ) 1 + hj+1 auj
h2j a3 u4j (1 − (hj auj )n+1 ) , 1 − hj auj 1 , b
yN =
j = 1, 2, . . . , N − 1,
(6.106)
1 , a+b def
possesses a truncation error of order O(hn ), with h = maxj=1,...,N hj . Solution 6.20. Since u(k) = we have
(−1)k−1 (k − 1)!ak−1 0 u (x) ( ax + b)k−1
(6.107)
225
226
Chapter 6. Exercises and solutions uxx (x) + u2◦ (x) − u00 (x) + (u0 (x))2 x
h ih i = [uxx (x) − u00 (x)] + u ◦ (x) − u0 (x) u ◦ (x) + u0 (x) x
=2
∞ (2k) X u (x)
(2k)!
k=2
= −2
∞ X k=2
2k−2
h
k=1
" + (u (x))
2
∞ X
k=1
=−
k=2
" +
(2k + 1)!
#" 2k
h
∞ (2k+1) X u (x) k=1
(2k + 1)!
# 2k
h
0
+ 2u (x)
a2k h2k−2 u0 (x) (2k)(ax + b)2k
0
∞ X
+
x
"∞ X u(2k+1) (x)
a2k h2k (2k + 1)(ax + b)2k
#"
∞ X k=1
# a2k 2k h +2 (2k + 1)(ax + b)2k
a2k h2k−2 k(ax + b)2k
∞ X
k=1
a2k+1 h2k (2k + 1)(ax + b)2k+1
#"
∞ X k=1
# a2k+1 2a . h2k + (2k + 1)(ax + b)2k+1 ax + b
Thus the difference scheme uxx (x) = −u2◦ (x) − x
" +
∞ X
k=1
∞ X k=2
a2k h2k−2 k(ax + b)2k
a2k+1 h2k (2k + 1)(ax + b)2k+1
u(0) = ln b,
u(1) = ln (a + b),
#"
∞ X k=1
# a2k+1 2a 2k , h + (2k + 1)(ax + b)2k+1 ax + b
x ∈ ωh , (6.108)
is exact and the difference scheme yxx (x) = −y 2◦ (x) − x
" +
n X
k=1
n X k=2
a2k h2k−2 k(ax + b)2k
a2k+1 h2k (2k + 1)(ax + b)2k+1
y(0) = ln b,
y(1) = ln ((a + b)),
#"
n X k=1
# 2a a2k+1 2k , h + (2k + 1)(ax + b)2k+1 ax + b
x ∈ ωh , (6.109)
possesses a truncation error of order O(h2n ). In order to be able to write these schemes more compactly let us consider the series ∞ X def F 0 (q) = q 2k (6.110) k=1
6.2. Solutions and def
F (q) =
∞ X q 2k+1 , (2k + 1)
(6.111)
k=1 def
with q =
ah q2 . It can easily be seen that F 0 (q) = . Therefore ax + b 1 − q2
Z Z Z 1 q2 1 1 dq 1 1 dq + dq = − dq + F (q) = 2 2 0 1−q 2 0 1+q 0 1−q 0 1 1+q ah 1 ax + b + ah =− + ln . = −q + ln 2 1−q ax + b 2 ax + b − ah Z
1
(6.112)
Analogously we obtain F1 (q) =
∞ 2k X q k=2
2k
Z = 0
q
∞ X
! q
2k−1
=−
0
k=2
2
q
Z dq =
q 3 dq 1 − q2
2 2
1 a h q 1 − ln 1 − q 2 = − − ln 2 2 2(ax + b)2 2
(6.113)
2
2 2
(ax + b) − a h . (ax + b)2
Now, using the formulas (6.111) and (6.113) we can reformulate the EDS (6.108) in the compact form (ax + b)2 − a2 h2 ax + b + ah 1 1 ln , + uxx (x) = −u2◦ (x) + ln x 2 (ax + b)2 2 ax + b − ah (6.114) u(0) = ln b,
u(1) = ln (a + b),
x ∈ ωh .
Solution 6.21. Use the Taylor expansion. Solution 6.22. Using Solution 6.9 check that the difference scheme a uxx (x) + u(x)u ◦ (x) = 0, x c
x ∈ ω,
ca2 h a = 0, ux (0) + u(0) − 2 b b (ah + b)
u(1) =
c , a+b
(6.115)
is exact. The left boundary condition can be written in the form ca2 h a ux (0) + u(0) − 2 b b (ah + b) k ∞ ca2 h X ah a − = 0. = ux (0) + u(0) − 3 b b b k=0
(6.116)
227
228
Chapter 6. Exercises and solutions The TDS a yxx (x) + y(x)y ◦ (x) = 0, x c
x ∈ ω,
k n ca2 h X ah a yx (0) + y(0) − 3 − = 0, b b b
y(1) =
k=0
or
a yxx (x) + y(x)y ◦ (x) = 0, x c
c a+b
(6.117)
x ∈ ω,
n+1 ah 1 − − ca2 h a b = 0, yx (0) + y(0) − 3 ah b b 1+ b
(6.118) c y(1) = a+b
has a truncation error of order O(hn+2 ). Solution 6.23. We have ux,x (x) − u00 + f (x, u) [u ◦ (x) − u0 (x)] x
∞ (2k) X
u
=2
k=2
=2
∞
X u(2k+1) (x) (x) 2k−2 h h2k + 2f (x, u) (2k)! (2k + 1)!
∞ X ϕ2k (x)
k=2
(6.119)
k=1
(2k)!
h2k−2 u(x) + 2f (x, u)
∞ X ϕ(2k+1) (x) k=1
(2k + 1)!
h2k u(x).
Thus the three-point difference scheme ux,x (x) = −u ◦ f (x, u) x
" + 2
∞ X k=2
# ∞ X ϕ(2k+1) (x) 2k ϕ2k (x) 2k−2 h h u(x), + 2f (x, u) (2k)! (2k + 1)!
x ∈ ω,
(6.120)
k=1
u(0) = γ0 ,
u(1) = γ1 ,
is exact. The truncation error of the following TDS is of order O(h2n+1 ) for an arbitrary n: yx,x (x) = −y ◦ f (x, y(x)) x
" + 2
n X ϕ2k (x) k=2
(2k)!
y(0) = γ0 ,
h
2k−2
+ 2f (x, u)
y(1) = γ1 .
n X ϕ(2k+1) (x) k=1
(2k + 1)!
# 2k
h
u(x),
x ∈ ω,
(6.121)
6.2. Solutions Solution 6.24. Use the fact that u(k) (x) = ϕk (x)u(x) with ( n(n − 1) · · · (n − k + 1)x−k , if k ≤ n, ϕk (x) = 0, if k > n and the results of the previous exercise. ˆ Solution 6.25. Let the grid ω ¯ h be given. There exists the EDS " # 2 j X Y (x , u) − u j β ux¯xˆ,j = −~−1 (−1)α Zαj (xj , u) + (−1)α α j , j Vα (xj ) α=1 u0 = µ1 ,
j = 1, 2, . . . , N − 1,
uN = µ2 ,
where Yαj (x, u), Zαj (x, u), α = 1, 2, are the solutions of the IVPs dYαj (x, u) = Zαj (x, u), dx
Yαj (xβ , u)
1 dZαj (x, u) =h i3 , dx Yαj (x, u)
Zαj (xβ , u)
= uβ ,
x ∈ ejα , (6.122)
du = k(x) , dx x=xβ
j = 2 − α, 3 − α, . . . , N + 1 − α,
α = 1, 2.
These IVPs possess the exact solutions s s (C1 x + C2 )2 + 1 C1 j j Yα (x, u) = , , Zα (x, u) = (C1 x + C2 ) C1 (C1 x + C2 )2 + 1
du C1 = dx
2 x=xβ
1 + 2, uβ
C2 = uβ
du dx
− xβ C1 . x=xβ
Therefore the EDS is of the form ux¯xˆ,j =
−~−1 j
2 X
" α
(−1)
(C1 xj + C2 )
α=1
s
C1 (C1 xj + C2 )2 + 1
s (−1)α (C1 xj + C2 )2 + 1 + − uβ , hγ C1 u0 = µ1 ,
uN = µ2 ,
j = 1, 2, . . . , N − 1,
Solution 6.26. In accordance with our theory we obtain the 6-EDS (6)
yx¯x,j = −ϕ(6) (xj , y (6) ), (6)
ϕ
−1
(xj , u) = h
2 X α=1
j = 1, 2, . . . , N − 1, "
(−1)α
(6)
y0 = µ1 ,
(6)
yN = µ2 , # (6.123) (6)j (xj , u) − uβ (6)j α Yα , Zα (xj , u) + (−1) h
229
230
Chapter 6. Exercises and solutions (6)j
(6)j
where Yα (xj , u), Zα (xj , u) is the numerical solution of the IVP (6.122), obtained by the Runge-Kutta-Nystrom method of order 6 (see [14, 31])
Yα(6)j (xj , u)
α+1
= uβ + (−1)
hu0β
2
+h
151 5 385 k1 + k2 + k3 2142 116 1368
55 6250 k4 − k5 , 168 28101 151 25 275 275 (6)j 0 α+1 Zα (xj , u) = uβ + (−1) k1 + k2 + k3 + k4 h 2142 522 684 252 78125 1 k5 + k6 , − 112404 12 k1 = −f xβ , uβ , k2 = −f xβ + 0.1 (−1)α+1 h, uβ + 0.1 (−1)α+1 hu0β + 0.005h2 k1 , +
k3 = −f xβ + 0.3 (−1)α+1 h, uβ + 0.3 (−1)α+1 hu0β −
1 2 1 h k1 + h2 k2 , 2200 22
k4 = −f xβ + 0.7 (−1)α+1 h, uβ + 0.7 (−1)α+1 hu0β +
637 2 h k1 6600
−
7 2 7 h k2 + h 2 k3 , 110 33
17 17 225437 2 30073 2 (−1)α+1 h, uβ + (−1)α+1 hu0β + h k1 − h k2 25 25 1968750 281250 65569 2 9367 2 h k3 − h k4 , + 281250 984375
k5 = −f xβ +
k6 = −f xβ + (−1)α+1 h, uβ + (−1)α+1 hu0β + +
151 2 5 2 385 2 h k1 + h k2 + h k3 2142 116 1368
55 2 6250 2 h k4 − h k5 , 168 28101
f (x, u) = −
1 , u3
µ1 = 0,
µ2 = − ln cos2
1 √ 2
.
Solution 6.27. We have
uxk =
(−1)k k!abk (−1)k k!bk k+1 = u , (bx + cy + d)k+1 ak (6.124)
uyk
(−1)k k!ack (−1)k k!ck k+1 = = u , k+1 (bx + cy + d) ak
k = 1, 2, . . . ,
6.2. Solutions and for (x, y) ∈ ωh1 ,h2 it holds that ux,x (x, y) =
u(x + h1 , y) − 2u(x, y) + u(x − h1 , y) h21 ∞
=
X 1 ∂ 2k u(x, y) ∂ 2 u(x, y) +2 h2k−2 1 2 ∂x (2k)! ∂x2k k=2
2k ∞ X ∂ 2 u(x, y) 2k−2 b = + 2 h1 u2k+1 ∂x2 a k=2
4 1 ∂ 2 u(x, y) 2 b = + 2h1 u5 , ∂x2 a 1 − h21 (b/a)2 u2
(6.125)
u(x, y + h2 ) − 2u(x, y) + u(x, y − h2 ) uy,y (x, y) = h22 ∞
=
X 1 ∂ 2k u(x, y) ∂ 2 u(x, y) + 2 h2k−2 2 ∂y 2 (2k)! ∂y 2k k=2
2k ∞ X ∂ 2 u(x, y) 2k−2 c = + 2 h2 u2k+1 ∂y 2 a k=2
4 1 ∂ 2 u(x, y) 2 c = + 2h2 u5 . ∂y 2 a 1 − h22 (c/a)2 u2 Thus the difference scheme ux,x (x, y) + uy,y (x, y) 4 4 1 1 b 2 c u5 (x, y) = 2 h21 + h 2 a 1 − h21 (b/a)2 u2 a 1 − h22 (c/a)2 u2 b2 + c2 3 u (x, y), (x, y) ∈ ωh1 ,h2 , a2 a a , u(1, y) = , u(0, y) = cy + d b + cy + d +2
u(x, 0) =
a , bx + d
u(x, 1) =
a bx + c + d
is exact. The TDS ux,x (x, y) + uy,y (x, y) = 2
Nx X k=2
2
+2
h2k−2 1
2k 2k Ny X b 2k−2 c 2k+1 u + 2 h2 u2k+1 a a
2
b +c 3 u (x, y), a2
(x, y) ∈ ωh1 ,h2 ,
k=2
231
232
Chapter 6. Exercises and solutions u(0, y) =
a , cy + d
u(1, y) =
a , b + cy + d
u(x, 0) =
a , bx + d
u(x, 1) =
a , bx + c + d
or ux,x (x, y) + uy,y (x, y) = 2h21 (b/a)4 u5 (x, y) + 2h22 (c/a)4 u5 (x, y)
1 − (hbu/a)2Nx −3 1 − (h1 bu/a)2
1 − (hcu/a)2Ny −3 1 − (h2 cu/a)2
b2 + c 2 3 u (x, y), (x, y) ∈ ωh1 ,h2 , a2 a a , u(1, y) = , u(0, y) = cy + d b + cy + d +2
u(x, 0) =
a , bx + d
u(x, 1) =
a , bx + c + d 2Ny −1
has a truncation error of order O(h12Nx −1 + h2
).
Solution 6.28. This problem can be solved analogously to the solution of the previous exercise. Solution 6.29. Use the Taylor expansion for the finite difference and the fact that u(k) (x) = Fk (u(x)),
k = 1, 2, . . . ,
where e.g., F0 (u) = f (u),
F1 (u) = f 0 (u) f (u),
etc.
Solution 6.30. Use the finite difference uxx to approximate the second derivative and the fact that the Taylor expansion of uxx − u00 contains only derivatives of even order which can be expressed through the derivatives of the right-hand side f (u). Solution 6.31. This problem can be solved analogously to the solution of the previous exercise. Solution 6.32. We transform problem (6.53) into √ u(xi+1 ) − 2 cos (h λ)u(xi ) + u(xi−1 ) = 0, u(0) = 0,
u(1) = 0,
(6.126)
i = 1, . . . , N.
This is the well-known recurrence formula for the orthogonal Chebyshev polynomials of first and second kind, Ti (z) = cos (i arccos (z)),
Ui (z) =
sin ((i + 1) arccos z) √ , 1 − z2
6.2. Solutions √ def where z = cos (h λ). The left boundary condition in (6.126) yields √ √ sin (ih λ) √ , u(xi ) = a Ui (h λ) = a sin (h λ) where a is an arbitrary constant. We choose this constant subject to the condition a √ =1 sin (h λ) and obtain
√ u(xi ) = sin (ih λ),
i = 0, 1, . . . , N + 1.
The right boundary condition is satisfied provided that λ satisfies √ u(1) = u(xN+1 ) = sin ( λ) = 0, i.e., λ = λn = (nπ)2 ,
un (xi ) = sin (nπxi ) = sin (inπ/(N + 1)),
i = 0, . . . , N + 1,
n = 1, . . . , N.
Solution 6.33. The difference equation (6.54) in indexed form reads yi+1 − (2 − h2 λh )yi + yi−1 yi = 0,
i = 0, 1, . . . , N + 1,
(6.127)
and the solution satisfying the left boundary condition is (compare with the previous exercise) λh h2 , i = 0, 1, . . . , N + 1. y(xi ) = sin i arccos 1 − 2 The right boundary condition is fulfilled provided that λh satisfies y(1) = y(xN +1 ) = sin (N + 1) arccos 1 −
λh h2 = 0. 2
This implies arccos 1 −
λh h2 kπ = , 2 N +1
k = 1, . . . , N
or 1−
λh h2 = cos 2
kπ . N +1
Thus, we have 2 kπ sin 2(N + 1) kπ (kπ)2 . λhk = 2 1 − cos (N + 1)2 = kπ N +1 2(N + 1)
233
234
Chapter 6. Exercises and solutions For a fixed k independent of N we have from the Taylor expansion kπ 2 sin 1 kπ 2(N + 1) λhk = + ··· (kπ)2 = (kπ)2 1 − kπ 3! N + 1 2(N + 1) = (kπ)2 + O(h2 ). Note that the first eigenfunction y1 (x) = sin (πx), x ∈ ω coincides with the projection of the first exact eigenfunction u1 (x) = sin (πx) onto the grid. Solution 6.34. The EDS for (6.55) is √ i λn 2(N + 1) √ u(xi ) = 0, i = 1, 2, . . . , N, uxx (xi ) + λn i λn 2(N + 1) √ i λn − 1 sin 2(N + 1) √ u(xi ) = 0, i = N + 2, . . . , 2N + 1, uxx (xi ) + λn i λn − 1 2(N + 1) p p u(1/2) = A sin ( λn h) + u(1/2 − h) cos ( λn h), sin
(6.128)
where p
p p p (λn − 1)λn A = − u(1/2 − h) λn − 1 cos (h λn ) cos (h λn − 1) ∆h p p p p − λn − 1 sin (h λn ) sin ( λn − 1h) − u(1/2 + h) λn − 1 , def
(6.129) def
∆h =
p
+
p p λn (λn − 1) sin (h λn ) cos (h λn − 1)
p
p p λn (λn − 1) cos (h λn ) sin (h λn − 1)
and λn is the n-th root of the equation √ √ √ √ λ λ−1 √ λ λ−1 def √ cos + λ cos sin = 0, f (λ) = λ − 1 sin 2 2 2 2
(6.130)
where the roots are ordered as follows: 0 < λ1 < λ2 < · · · λn < · · · .
(6.131)
6.2. Solutions The exact solution of (6.55) is √ sin ( λn x), √ un (x) = p sin ( λn − 1(1 − x)) √ sin ( λn /2), sin ( λn − 1/2)
0≤x≤
1 , 2
1 < x ≤ 1, 2
(6.132)
where λn is the n-th root of equation (6.130). This can be easily proved by the substitution of (6.132) into equation (6.55) for x ∈ (0, 1/2) and x ∈ (1/2, 1) (compare with Exercise 6.32) and into the continuity conditions [un (x)]x=1/2 = un (1/2 + 0) − un (1/2 − 0) = 0, [u0n (x)]x=1/2 = u0n (1/2 + 0) − u0n (1/2 − 0) = 0.
(6.133)
That fact that (6.132) satisfies the equation (6.128) can be checked by substitution of (6.132) into (6.128), elementary transformations and taking into account that λn is a root of equation (6.130). Note that the first eigenvalues are λ1 = 10.36327300443007 . . . , λ2 = 39.98316575543942 . . . ,
(6.134)
λ3 = 89.32573613877946 . . . . Solution 6.35. We consider problem (6.59) on a grid ωh = {xi = ih : i = −N, . . . , N },
(6.135)
where h must be determined. The truncation error of the difference operator for functions v ∈ C ∞ (a, b) is Ψ(x) = Lh v(x) − Lv(x) = 2
∞ X
h2k L(k) v,
k=1
where L(k) v =
A(x) B(x)(k + 1) (2k+1) v (2k+2) + v . (2k + 2)! (2k + 2)!
We look for the solution of the eigenvalue problem (6.57) as the projection of the function ∞ X v(x, h) = h2k vk (x) k=0
on the grid (6.135). Substituting this expression into (6.57) and comparing the coefficients in front of the powers of h, we obtain the following system of equations for vk (x): k X Lvk + λh vk = −2 L(l) vk−l , k = 0, 1, . . . . (6.136) l=1
235
236
Chapter 6. Exercises and solutions Note, the right-hand side is equal to zero for k = 0. The solution of (6.136) with k = 0 is a polynomial v0 (x) = Pn (x) of degree n. For v1 (x) we have Lv1 (x) + λh v1 (x) = −2L(1) v0 (x), (6.137) 6 ∞, |v1 (−1)| =
|v1 (1)| = 6 ∞,
where the parameter λh is the same as for v0 (x) = Pn (x), namely λh = λ = −a2 n(n +
b1 (b − a) − 1). 2a2
Since v0 (x) is a polynomial of degree n, the right-hand side of (6.137) is a polynomial of degree n − 3. This inhomogeneous problem is solvable iff the right-hand side is orthogonal to the solution Pn (x) of the homogeneous equation. Here, the orthogonality is defined with a weight function, as is usual for the Jacobi polynomials. This condition is fulfilled since Pn (x) is orthogonal to all polynomials of degree less than or equal to n − 1. Therefore this problem has a polynomial v1 (x) = Pn−3 (x) of degree n − 3 as a particular solution which is orthogonal to Pn (x). If we continue this process, then there exists a j0 such that vj (x) = 0 for all j > j0 . More precisely, the equation (in fact it is a system of 2N − 1 equations for the 2N + 1 unknowns yN , y−N +1 , . . . , yN ) Lh y(x) + λh y(x) = 0, x ∈ ωh (6.138) possesses a solution of the form y(x) = v(x, h) = v0 (x) + h2 v1 (x) + · · · + h2j0 vj0 (x),
x ∈ ωh .
To bring the number of equations of the system of linear algebraic equations (6.138) into agreement with the number of unknowns, we demand that the coefficients in front of y−N and yN vanish, i.e., 1 1 1 1 − (N − 1)2 h2 b b + (b − a)(N − 1)h + (b + a) + b 1 1 0 = 0, h2 2a2 h 2 2 1 − (N − 1)2 h2 1 1 1 b1 (b − a)[−(N − 1)h] + b1 (b + a) + b0 = 0. − h2 2a2 h 2 2 1 One can easily see that these equations coincide provided that b1 (b + a) + b0 = 0 2 and we have s 4a2 . (6.139) h= 2 4a2 (N − 1) + b1 (b − a)(N − 1) Thus, we have constructed the finite difference scheme (6.57) on the equidistant grid (6.135) with mesh size (6.139) and we have shown that its eigenvalues coincide with the first 2N − 1 exact eigenvalues λhn = λ = −a2 n(n +
b1 (b − a) − 1), 2a2
n = 0, 1, . . . , 2N − 2.
The difference eigenfunctions approximate the exact ones with accuracy O(h2 ).
6.2. Solutions Solution 6.36. After the change of variables y = (z + 1)/2 the operator Ly will be transformed into the Legendre differential operator which analogously as above can be approximated by a differencep operator with the exact spectrum on an equidistant grid with the mesh size h = 1/ N (N + 1). Solution 6.37. r Using the Legendre functions Pν (x) and Qν (x) with the parameter 1 1 + λ we can write ν=− + 2 4 v1i (x) = v1i (x; λ) = (1 − x2i−1 )[−Pν (x)Qν (xi−1 ) + Qν (x)Pν (xi−1 )], v2i (x) = v2i (x; λ) = (1 − x2i+1 )[−Pν (x)Qν (xi+1 ) + Qν (x)Pν (xi+1 )]. The exact 3-point relation for the solution of the spectral problem (without the boundary conditions) is u(xi ) =
v1i (xi ; λ) v2i (xi ; λ) u(x u(xi−1 ), ) + i+1 v1i (xi+1 ; λ) v2i (xi−1 ; λ)
(6.140)
i = −N + 1, . . . , N − 1. Next, in order to obtain the exact boundary conditions and to add two more equations to the system (6.140), let us determine the solution of the differential equation (6.60) on the interval [xN −1 , 1). Taking into account the second boundary condition in (6.60) we get u(x) =
Pν (x) u(xN −1 ), Pν (xN −1 )
from which we obtain the exact boundary condition Pν (xN ) u(xN −1 ). Pν (xN −1 )
u(xN ) =
(6.141)
Analogously we obtain the other exact boundary condition u(x−N ) =
Pν (x−N ) u(x−N +1 ). Pν (x−N +1 )
(6.142)
The exact spectral 3-point difference eigenvalue problem (6.140), (6.141) and (6.142) possesses the exact spectrum λn = n(n + 1),
un (x; λn ) = Pn (x),
x ∈ ωh ,
n = 0, 1, . . . , 2N + 1,
where Pn (x) are the Legendre polynomials. Solution 6.38. Difference equation (6.65) can be rewritten in the equivalent indexed form (N − i)yi+1 − 2N yi + (N + i)yi−1 + λh yi = 0, y−N −1 6= ∞,
yN+1 6= ∞.
i = −N, . . . , N,
237
238
Chapter 6. Exercises and solutions Comparing this equation with the difference equation for Kravchuk’s polynomials with p = 1/2, q = 1/2 (see e.g. [6]) and with the explicit representation (−1)n x!(2N − x)! n 1 , x = 0, . . . , 2N, kn (x) = ∆ n!2n (x − n)!(2N − x)! n = 0, 1, . . . ,
∆f (x) = f (x + 1) − f (x)
for all f (x),
one can see that the exact difference eigenfunctions are yi = yn (xi ) = kn (i + N),
i = −N, . . . , N.
On the relationship between Kravchuk’s polynomials and Hermite polynomials see e.g. [6]. The solution is completely analogous to the solution of Exercise 6.35.
Index Algorithm A, 80 Algorithm AG, 79 approximation error, 65 automatic grid generation, 77 a posteriori estimate, 77 h-h/2, 117 Banach’s Fixed Point Theorem, 13 modified, 13 BGSEXP, 74 boundary conditions 3rd kind, 112 boundary value problem, 41 monotone, 117 periodic, 76 Browder-Minty Theorem, 13 Bulirsch-Stoer-Gragg extrapolation, 74 Butcher tableau, 75, 116 BVP, see boundary value problem Carath´eodory conditions, 16 Carath´eodory’s Theorem, 16 Cauchy-Bunyakovsky-Schwarz inequality, 16 continuity conditions, 87, 125 difference boundary condition, 21, 22, 33 difference scheme compact, 58 consistent, 6 convergent, 7 self-adjoint, 130 stable, 6 truncated, 11 difference scheme of Numerov, 8 Dirichlet boundary condition, 83
discontinuity points, 87 first kind, 122 discretization, 4 divided difference, 4 Dormand-Prince method, 74 EDS, see exact difference scheme exact difference scheme, 19, 59, 129 2-point, 41, 54 3-point, 17, 30, 90 extrapolation method semi-implicit, 75 5-point difference scheme, 8 fixed point iteration, 50, 116 modified, 55, 61 flux, 86 Fortran, 73 fundamental matrix, 42 Gaussian elimination, 67, 116 Green’s function, 18, 29, 45, 64 discrete, 56 grid, 2 dense, 71 equidistant, 2 non-equidistant, 3 quasi-uniform, 3 uniform, 2 grid function, 4 grid point, 2 Gronwall’s Lemma, 45 increment function, 58 iteration method, 94, 108, 133 Maple, 28, 73 Mathematica, 28
I.P. Gavrilyuk et al., Exact and Truncated Differences Schemes for Boundary Value ODEs, International Series of Numerical Mathematics 159, DOI 10.1007/978-3-0348-0107-2, © Springer Basel AG 2011
239
240
Index matrix tridiagonal, 116 matrix norm subordinate, 42 Minkowski’s inequality, 16 m-TDS, ¯ 103 m-TDS, 20, 58, 69 multiple shooting method, 41 Newton’s method, 66 modified, 112 node, 2 n-TDS, 32 ODE, see ordinary differential equation ODE calls, 74 one-step method, 101, 114 operator contractive, 64 semi-continuous, 89, 124, 127 strongly monotone, 124, 128 order of accuracy, 7 order of convergence, 7 ordinary differential equation monotone, 83 stiff, 74 parameter natural, 67 parameter continuation, 67 path-following, 67 Peano’s Theorem, 15 Picard-Lindel¨of’s Theorem, 15 quasi-Newton method, 67 Richardson extrapolation, 77 RKEX78, 74 roundoff error, 72 Runge estimator, 72 Runge technique, 77, 116 Runge-Kutta method, 58, 101 7-stage, 74, 116 embedded, 77 RWPM, 74, 75
shooting points, 74 SIMPR, 75 6-TDS, 74, 115 solution weak, 88, 123, 126 solution in the extended sense, 16 stencil three-point, 83 stencil function, 17 step-size, 2 sub-grid, 2 superposition principle, 21 Taylor series method, 58, 101 TDS, see truncated difference scheme 3-point difference scheme, 9 Troesch’s test problem, 51, 68, 80 truncated difference scheme, 20, 103, 115 truncation error, 6 vector norm Euclidian, 42 weak solution, 84
241
Bibliography [1] R. P. Agarwal and D. O’Regan. Infinite Interval Problems for Differential, Difference and Integral Equations. Kluwer Academic Publishers, 2001. [2] U. M. Ascher, R. M. M. Mattheij, and R. D. Russell. Numerical Solution of Boundary Value Problems for Ordinary Differential Equations. Prentice-Hall Series in Computational Mathematics. Prentice-Hall, Englewood Cliffs, 1988. [3] A. Ashyralyev and P.E. Sobolevskii. New Difference Schemes for Partial Differential Equations. Birkhauser Verlag, Basel-Boston-Berlin, 2006. uller. Numerical solution [4] W. Auzinger, O. Koch, J. Petrickovic, and E. Weinm¨ of boundary value problems with an essential singularity. Technical Report 3/03, TU Wien, Institute for Applied Mathematics, 2003. uller. New aposteriori [5] W. Auzinger, O. Koch, D. Praetorius, and E. Weinm¨ error estimates for singular boundary value problems. Numerical Algorithms, 40:79–100, 2005. [6] G. Bateman and A. Erday. Higher Transcendental Functions [Russian translation], volume Vol. 2. Nauka, Moscow, 1974. [7] J. C. Butcher. On Runge-Kutta processes of high order. Journal Austral. Math. Soc., 4:179–194, 1964. [8] J. C. Butcher. Numerical Methods for Ordinary Differential Equations. John Wiley & Sons, Ltd., Chichester, West Sussex, 2003. [9] C. Carath´eodory. Vorlesungen u ¨ber reelle Funktionen. Dover (reprint), 1948. [10] E. A. Coddington and N. Levinson. Theory of Ordinary Differential Equations. McGraw-Hill, New York, 1955. [11] L. Collatz. The Numerical Treatment of Differential Equations. Springer Verlag, Berlin, 1960. [12] S. D. Conte and C. deBoor. Elementary Numerical Analysis. McGraw-Hill, New York, 1972.
242
BIBLIOGRAPHY [13] E. J. Doedel. The constructions to ordinary differential equations. SIAM J. Numer. Analysis, 15:450–465, 1978. [14] J. R. Dormand, E. A. El-Mikkawy, and P. J. Prince. Families of Runge-KuttaNystrom formulae. IMA J. of Numer. Analysis, 7:235–250, 1987. [15] Yu. Eidelman, V. Milman, and A. Tsolomitis. Functional Analysis - An Introduction. American Mathematical Society, Providence, Rhode Island, 2004. [16] R. Fazio. A novel approach to the numerical solution of boundary value problems on infinite intervals. SIAM J. Numer. Anal., 33:1473–1483, 1996. [17] L. Fox. Numerical Solution of Two-Point Boundary Value Problems in Ordinary Differential Equations. Clarendon Press, Oxford, 1957. [18] S. Fuˇcik and A. Kufner. Nonlinear Differential Equations. Elsevier, Amsterdam, Oxford, New York, 1980. [19] E. C. Jr. Gartland. Strong stability of compact discrete boundary value problems via exact discretizations. SIAM J. Numer. Analysis, 25:111–123, 1988. [20] I. P. Gavrilyuk. Grid schemes with exact and explicit spectra (in Russian). PhD thesis, Taras Shevchenko National University of Kiev, 1977. [21] I. P. Gavrilyuk. Algorithm for solving a class of one-dimensional variational inequalities. J. Sov. Math., 66:2250–2255, 1993. [22] I. P. Gavrilyuk. A class of one-dimensional variational inequalities in difference schemes of arbitrary given degree of accuracy. Z. Anal. Anwend., 12:751–758, 1993. [23] I. P. Gavrilyuk. Exact difference schemes and difference schemes of arbitrary given degree of accuracy for generalized one-dimensional third boundary value problems. Z. Anal. Anwend., 12:549–566, 1993. [24] I. P. Gavrilyuk, M. Hermann, M. Kutniv, and I. L. Makarov. Two-point difference schemes of an arbitrary given order of accuracy for nonlinear BVPs. Applied Mathematics Letters, 23(5):585–590, 2010. [25] I. P. Gavrilyuk, M. Hermann, M. V. Kutniv, and V.L. Makarov. New methods for nonlinear BVPs on the half-axis using Runge-Kutta IVP-solvers. Technical Report 05-18, Friedrich Schiller University Jena, Department of Mathematics and Computer Science, 2005. [26] I. P. Gavrilyuk, M. Hermann, M. V. Kutniv, and V.L. Makarov. Difference schemes for nonlinear BVPs on the semiaxis. Comput. Methods Appl. Math., 7:25–47, 2007.
BIBLIOGRAPHY [27] I. P. Gavrilyuk, M. Hermann, M.V. Kutniv, and V.L. Makarov. Difference schemes for nonlinear BVPs using Runge-Kutta IVP-solvers. Advances in Difference Equations, 2006:1–29, 2006. Article ID 12167. [28] L. B. Gnativ and M. V. Kutniv. Modified three-point difference schemes of high-order accuracy for systems of the second-order ordinary differential equations with monotone operator(in Ukrainian). Mathematical Methods and Physicomechanical Fields, 47:32–42, 2004. [29] L. B. Gnativ, M. V. Kutniv, and V. L. Makarov. Generalized three-point difference schemes of high-order accuracy for systems of second order nonlinear ordinary differential equations. Differential Equations, 45(7):998–1019, 2009. [30] G. H. Golub and C. F. Van Loan. Matrix Computations. The John Hopkins University Press, Baltimore and London, 1996. [31] E. Hairer, S. P. Nørsett, and G. Wanner. Solving Ordinary Differential Equations I, Nonstiff Problems. Springer Verlag, Berlin, Heidelberg, New York, 1993. [32] E. Hairer and G. Wanner. Solving Ordinary Differential Equations II, Stiff and Differential-Algebraic Problems. Springer Verlag, Berlin, Heidelberg, New York, 1996. [33] Ph. Hartman. Ordinary Differential Equations. Birkh¨auser Verlag, Boston, Basel, Stuttgart, 1982. [34] M. Hermann and D. Kaiser. Shooting methods for two-point BVPs with partially separated endconditions. ZAMM, 75:651–668, 1995. ohnlicher Differentialgleichungen, Anfangs[35] Martin Hermann. Numerik gew¨ und Randwertprobleme. Oldenbourg Verlag, M¨ unchen, Wien, 2004. [36] F. R. de Hoog and R. Weiss. The numerical solution of boundary value problems with an essential singularity. SIAM J. Numer. Anal., 16:637–669, 1979. [37] F. R. de Hoog and R. Weiss. An approximation theory for boundary value problems on infinite intervals. Computing, 24:227–239, 1980. [38] S. R. K. Iyengar and A. C. R. Pillai. Difference schemes of polynomial and exponential orders. Applied Mathematical Modelling, 13:58–62, 1989. [39] H. B. Keller. Numerical Methods for Two-Point Boundary-Value Problems. Blaisdell Publishing Company, Waltham, Massachusetts, Toronto, London, 1968. [40] H. B. Keller. Numerical Solution of Two-Point Boundary Value Problems. SIAM, Philadelphia, 1976.
243
244
BIBLIOGRAPHY [41] H. B. Keller and Jr. White, A. B. Difference methods for boundary value problems in ordinary differential equations. SIAM J. Numer. Anal., (12):791– 802, 1975. [42] M. V. Kutniv. Accurate three-point difference schemes for second-order monotone ordinary differential equations and their implementation. Comput. Math. Math. Phys., 40:368–382, 2000. [43] M. V. Kutniv. Three-point difference schemes of high accuracy order for systems of nonlinear ordinary differential equations of second order. Comput. Math. Math. Phys., 41:860–873, 2001. [44] M. V. Kutniv. High-order accurate three-point difference schemes for systems of second-order ordinary differential equations with a monotone operator. Comput. Math. Math. Phys., 42(5):724–738, 2002. [45] M. V. Kutniv. Three-point difference schemes of high accuracy order for second order nonlinear ordinary differential equations with the boundary conditions of the third type (in Ukrainian). Visnyk of Lviv University. Series Applied Mathematics and Computer Science, (4):61–66, 2002. [46] M. V. Kutniv. Modified three-point difference schemes of high-accuracy order for second order nonlinear ordinary differential equations. Comput. Methods Appl. Math., 3:287–312, 2003. [47] M. V. Kutniv. Modified three-point difference schemes of high accuracy order for the second-order monotone ordinary differential equations (in Ukrainian). Mathematical Methods and Physicomechanical Fields, 46:120–129, 2003. [48] M. V. Kutniv. Numerical solution of three-point difference schemes (in Ukrainian). Visnyk of Lviv University. Series Applied Mathematics and Computer Science, (6):68–73, 2003. [49] M. V. Kutniv, V. L. Makarov, and A. A. Samarskii. Accurate three-point difference schemes for second-order nonlinear ordinary differential equations and their implementation. Comput. Math. Math. Phys., 39:45–60, 1999. [50] M. Laspinska-Chrzczonowicz and P. Matus. Exact difference schemes for parabolic equations. Int. J. Numer. Anal. Mod., 5(2):303–319, 2008. [51] M. Lentini and H. B. Keller. Boundary value problems on semi-infinite intervals and their numerical solutions. SIAM J. Numer. Anal., 17:577–604, 1980. [52] R.E. Lynch and J.R. Rice. A high-order difference method for differential equations. Math. of Comp., 34:333–372, 1980. [53] Chawla M. M. A sixth order tri-diagonal finite difference method for general non-linear two point boundary value problems. J. Inst. Math. Appl., 24:35–42, 1979.
BIBLIOGRAPHY [54] V. L. Makarov. Orthogonal polynomials and difference schemes with exact and explicit spectrum (in Russian). PhD thesis, Taras Shevchenko National University of Kiev, 1974. [55] V. L. Makarov, I. P. Gavrilyuk, M. V. Kutniv, and M. Hermann. A two-point difference scheme of arbitrary given accuracy order for BVPs for systems of first order nonlinear ODEs. Comput. Methods Appl. Math., 4:464–493, 2004. [56] V. L. Makarov and S. G. Gocheva. Finite difference schemes of arbitrary accuracy for second-order differential equations on a half-line. Differ. Equ., 17:367–377, 1981. [57] V. L. Makarov and V. V. Guminskii. A three-point difference scheme of a high order of accuracy for a system of second-order ordinary differential equations (the nonselfadjoint case). Differ. Equ., 30:457–465, 1994. [58] V. L. Makarov, I. L. Makarov, and V. G. Prikazchikov. Exact difference schemes and schemes of any order of accuracy for systems of second-order differential equations (in Russian). Differ. Uravn., 15:1194–1205, 1979. [59] V. L. Makarov and A. A. Samarskii. Exact three-point difference schemes for second-order nonlinear ordinary differential equations and their implementation. Soviet Math. Dokl., 41:495–500, 1991. [60] V. L. Makarov and A. A. Samarskii. Realization of exact three-point difference schemes for second-order ordinary differential equations with piecewise smooth coefficients. Soviet Math. Dokl., 41:463–467, 1991. [61] P. A. Markowich. A theory for the approximation of solution of boundary value problems on infinite intervals. SIAM J. Math. Anal., 13:484–513, 1982. [62] P. A. Markowich. Analysis of boundary value problems on infinite intervals. SIAM J. Math. Anal., 14:11–37, 1983. [63] P. A. Markowich and C. A. Ringhofer. Collocation methods for boundary value problems on ”long” intervals. Math. Comp., 40:123–150, 1983. [64] P. Matus, U. Irkhin, and M. Lapinska-Chrzczonowicz. Exact difference schemes for time-dependent problems. Computational Methods in Applied Mathematics, 5:422–448, 2005. [65] P. Matus and A. Kolodynska. Exact difference schemes for hyperbolic equations. Comput. Meth. Appl. Math., 7(4):341–364, 2007. [66] P. P. Matus, U. Irkhin, M. Lapinska-Chrzczonowicz, and Lemeshevsky S. V. About exact difference schemes for hyperbolic and parabolic equations (in russian). Differ. Uravn., 43(7):978–986, 2006. [67] N. S. Nedialkov and J. D. Pryce. Solving differential-algebraic equations by Taylor series (i): Computing Taylor coefficients. BIT Numerical Mathematics, 45:561–591, 2005.
245
246
BIBLIOGRAPHY [68] J. M. Ortega and W. C. Rheinboldt. Iterative Solution of Nonlinear Equations in Several Variables. Academic Press, New York, London, 1970. [69] A. Paradzinska and P. Matus. High accuracy difference schemes for nonlinear transfer equation ∂u + u ∂u = f (u). Math. Model. Anal., 12(4):469–482, 2007. ∂t ∂x [70] M. Ronto and A. M. Samoilenko. Numerical-Analytic Methods in the Theory of Boundary-Value Problems. Word Scientific, Singapore, 2000. [71] A. A. Samarskii. Introduction to the Theory of Finite Difference Schemes. Nauka, Moscow, 1972. [72] A. A. Samarskii. The Theory of Difference Schemes. Marcel Dekker Inc., New York and Basel, 2001. [73] A. A. Samarskii and V. L. Makarov. Realization of exact three-point difference schemes for second-order ordinary differential equations with piecewise-smooth coefficients. Differ. Equ., 26:922–930, 1991. [74] A. A. Samarskii and B.S. Nikolaev. Solution Methods for Grid Equations(in Russian). Nauka, Moscow, 1978. [75] A. A. Samarskii and E. S. Nikolaev. Numerical Methods for Grid Equations, Vol.1. Birkh¨auser Verlag, Basel, 1989. [76] M. Schechter. Principles of Functional Analysis. Second edition. American Mathematical Society, Providence, Rhode Island, 2002. [77] C. Schmeiser. Approximate solution of boundary value problems on infinite intervals by collocation methods. Math. Comp., 46:479–490, 1986. [78] M. R. Scott and H. A. Watts. A systemalized collection of codes for solving twopoint boundary value problems. In A. K. Aziz, editor, Numerical Methods for Differential Systems, pages 197 – 227, New York and London, 1976. Academic Press. [79] J. Stoer and R. Bulirsch. Introduction to Numerical Analysis. Springer Verlag, New York, Berlin, Heidelberg, 2002. [80] A. N. Tihonov and A. A. Samarskii. Homogeneous difference schemes (in Russian). Zh. Vychisl. Mat. i Mat. Fiz., 1:5–63, 1961. [81] A. N. Tihonov and A. A. Samarskii. Homogeneous difference schemes of a high order of accuracy on non-uniform nets (in Russian). Zh. Vychisl. Mat. i Mat. Fiz., 1:425–440, 1961. [82] V.A. Trenogin. Functional Analysis(in Russian). Nauka, Moscow, 1980. [83] B. A. Troesch. A simple approach to a sensitive two-point boundary value problem. J. Comput. Phys., 21:279–290, 1976.
BIBLIOGRAPHY [84] W. Wallisch and M. Hermann. Schießverfahren zur L¨ osung von Rand- und Eigenwertaufgaben. Teubner-Texte zur Mathematik, Bd. 75. Teubner Verlag, Leipzig, 1985. [85] A. I. Zadorin. Numerical solution of a boundary value problem for a system of equations with a small parameter. Comput. Math. Math. Phys., 38(8):1201– 1211, 1998. [86] E. Zeidler. Nonlinear Functional Analysis and its Applications, volume I. Springer-Verlag, New York et al., 1986.
247