100% found this document useful (3 votes)
22 views

Computational Partial Differential Equations Using MATLAB 2nd 2nd Edition Jichun Li - Download the ebook now to never miss important content

The document provides information about various ebooks available for download on ebookmeta.com, including titles related to computational partial differential equations using MATLAB. It lists several recommended digital products in different formats such as PDF, EPUB, and MOBI. Additionally, it includes details about the contents of the book 'Computational Partial Differential Equations Using MATLAB' by Jichun Li and Yi-Tung Chen.

Uploaded by

muairimozley
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
22 views

Computational Partial Differential Equations Using MATLAB 2nd 2nd Edition Jichun Li - Download the ebook now to never miss important content

The document provides information about various ebooks available for download on ebookmeta.com, including titles related to computational partial differential equations using MATLAB. It lists several recommended digital products in different formats such as PDF, EPUB, and MOBI. Additionally, it includes details about the contents of the book 'Computational Partial Differential Equations Using MATLAB' by Jichun Li and Yi-Tung Chen.

Uploaded by

muairimozley
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 75

Read Anytime Anywhere Easy Ebook Downloads at ebookmeta.

com

Computational Partial Differential Equations Using


MATLAB 2nd 2nd Edition Jichun Li

https://ebookmeta.com/product/computational-partial-
differential-equations-using-matlab-2nd-2nd-edition-jichun-
li/

OR CLICK HERE

DOWLOAD EBOOK

Visit and Get More Ebook Downloads Instantly at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

An Introduction to Partial Differential Equations Zhilin


Li Larry Norris

https://ebookmeta.com/product/an-introduction-to-partial-differential-
equations-zhilin-li-larry-norris/

ebookmeta.com

Analytical Methods for Solving Nonlinear Partial


Differential Equations 2nd 2nd Edition Daniel Arrigo

https://ebookmeta.com/product/analytical-methods-for-solving-
nonlinear-partial-differential-equations-2nd-2nd-edition-daniel-
arrigo/
ebookmeta.com

An Elementary course in Partial Differential Equations 2nd


Edition T. Amaranath

https://ebookmeta.com/product/an-elementary-course-in-partial-
differential-equations-2nd-edition-t-amaranath/

ebookmeta.com

GRE 5-Hour Quick Prep For Dummies Ron Woldoff

https://ebookmeta.com/product/gre-5-hour-quick-prep-for-dummies-ron-
woldoff/

ebookmeta.com
Thinking Critically about Research A Step by Step Approach
1st Edition Jane Ogden

https://ebookmeta.com/product/thinking-critically-about-research-a-
step-by-step-approach-1st-edition-jane-ogden/

ebookmeta.com

Imposter Syndrome and The As If Personality in Analytical


Psychology The Fragility of Self 1st Edition Susan E.
Schwartz
https://ebookmeta.com/product/imposter-syndrome-and-the-as-if-
personality-in-analytical-psychology-the-fragility-of-self-1st-
edition-susan-e-schwartz/
ebookmeta.com

Roman Architecture 2nd Edition Frank Sear

https://ebookmeta.com/product/roman-architecture-2nd-edition-frank-
sear/

ebookmeta.com

Aquatic Animal Nutrition A Mechanistic Perspective from


Individuals to Generations 1st Edition Steinberg

https://ebookmeta.com/product/aquatic-animal-nutrition-a-mechanistic-
perspective-from-individuals-to-generations-1st-edition-steinberg/

ebookmeta.com

Divine Inspiration in Byzantium Notions of Authenticity in


Art and Theology Karin Krause

https://ebookmeta.com/product/divine-inspiration-in-byzantium-notions-
of-authenticity-in-art-and-theology-karin-krause/

ebookmeta.com
Jewish Studies on Premodern Periods A Handbook 1st Edition
Carl S. Ehrlich

https://ebookmeta.com/product/jewish-studies-on-premodern-periods-a-
handbook-1st-edition-carl-s-ehrlich/

ebookmeta.com
Computational Partial
Differential Equations
Using MATLAB
Second Edition
Computational Partial
Differential Equations
Using MATLAB
Second Edition

Jichun Li
Yi-Tung Chen
MATLAB is a trademark of The MathWorks, Inc. and is used with permission. The
MathWorks does not warrant the accuracy of the text or exercises in this book. This
book’s use or discussion of MATLAB software or related products does not constitute
endorsement or sponsorship by The MathWorks of a particular pedagogical approach or
particular use of the MATLAB software.

CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742


c 2020 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works

Printed on acid-free paper

International Standard Book Number-13: 978-0-367-21774-7 (Hardback)

This book contains information obtained from authentic and highly regarded sources. Rea-
sonable efforts have been made to publish reliable data and information, but the author and
publisher cannot assume responsibility for the validity of all materials or the consequences
of their use. The authors and publishers have attempted to trace the copyright holders of
all material reproduced in this publication and apologize to copyright holders if permission
to publish in this form has not been obtained. If any copyright material has not been
acknowledged please write and let us know so we may rectify in any future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted,
reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other
means, now known or hereafter invented, including photocopying, microfilming, and record-
ing, or in any information storage or retrieval system, without written permission from the
publishers.

For permission to photocopy or use material electronically from this work, please access
www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Cen-
ter, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-
for-profit organization that provides licenses and registration for a variety of users. For
organizations that have been granted a photocopy license by the CCC, a separate system
of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trade-


marks, and are used only for identification and explanation without intent to infringe.

Visit the Taylor & Francis Web site at


http://www.taylorandfrancis.com

and the CRC Press Web site at


http://www.crcpress.com
Contents

Preface xi

Acknowledgments xiii

1 Brief Overview of Partial Differential Equations 1


1.1 The parabolic equations . . . . . . . . . . . . . . . . . . . . . 1
1.2 The wave equations . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 The elliptic equations . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Differential equations in broader areas . . . . . . . . . . . . . 3
1.4.1 Electromagnetics . . . . . . . . . . . . . . . . . . . . . 3
1.4.2 Fluid mechanics . . . . . . . . . . . . . . . . . . . . . . 4
1.4.3 Groundwater contamination . . . . . . . . . . . . . . . 5
1.4.4 Petroleum reservoir simulation . . . . . . . . . . . . . 6
1.4.5 Finance modeling . . . . . . . . . . . . . . . . . . . . . 7
1.4.6 Image processing . . . . . . . . . . . . . . . . . . . . . 8
1.5 A quick review of numerical methods for PDEs . . . . . . . . 9
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2 Finite Difference Methods for Parabolic Equations 13


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 Theoretical issues: stability, consistence, and convergence . . 16
2.3 1-D parabolic equations . . . . . . . . . . . . . . . . . . . . . 18
2.3.1 The θ-method and its analysis . . . . . . . . . . . . . . 18
2.3.2 Some extensions . . . . . . . . . . . . . . . . . . . . . 23
2.4 2-D and 3-D parabolic equations . . . . . . . . . . . . . . . . 27
2.4.1 Standard explicit and implicit methods . . . . . . . . . 27
2.4.2 The ADI methods for 2-D problems . . . . . . . . . . 30
2.4.3 The ADI methods for 3-D problems . . . . . . . . . . 32
2.5 Numerical examples with MATLAB codes . . . . . . . . . . . 35
2.6 Bibliographical remarks . . . . . . . . . . . . . . . . . . . . . 37
2.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

3 Finite Difference Methods for Hyperbolic Equations 43


3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.2 Some basic difference schemes . . . . . . . . . . . . . . . . . . 44
3.3 Dissipation and dispersion errors . . . . . . . . . . . . . . . . 47

v
vi Contents

3.4 Extensions to conservation laws . . . . . . . . . . . . . . . . . 49


3.5 The second-order hyperbolic equations . . . . . . . . . . . . . 50
3.5.1 The 1-D case . . . . . . . . . . . . . . . . . . . . . . . 50
3.5.2 The 2-D case . . . . . . . . . . . . . . . . . . . . . . . 53
3.6 Numerical examples with MATLAB codes . . . . . . . . . . . 57
3.7 Bibliographical remarks . . . . . . . . . . . . . . . . . . . . . 59
3.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

4 Finite Difference Methods for Elliptic Equations 65


4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4.2 Numerical solution of linear systems . . . . . . . . . . . . . . 67
4.2.1 Direct methods . . . . . . . . . . . . . . . . . . . . . . 67
4.2.2 Simple iterative methods . . . . . . . . . . . . . . . . . 69
4.2.3 Modern iterative methods . . . . . . . . . . . . . . . . 72
4.3 Error analysis with a maximum principle . . . . . . . . . . . . 74
4.4 Some extensions . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.4.1 Mixed boundary conditions . . . . . . . . . . . . . . . 77
4.4.2 Self-adjoint problems . . . . . . . . . . . . . . . . . . . 78
4.4.3 A fourth-order scheme . . . . . . . . . . . . . . . . . . 78
4.5 Numerical examples with MATLAB codes . . . . . . . . . . . 81
4.6 Bibliographical remarks . . . . . . . . . . . . . . . . . . . . . 84
4.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

5 High-Order Compact Difference Methods 89


5.1 One-dimensional problems . . . . . . . . . . . . . . . . . . . . 89
5.1.1 Spatial discretization . . . . . . . . . . . . . . . . . . . 89
5.1.2 Dispersive error analysis . . . . . . . . . . . . . . . . . 94
5.1.3 Temporal discretization . . . . . . . . . . . . . . . . . 98
5.1.4 Low-pass spatial filter . . . . . . . . . . . . . . . . . . 103
5.1.5 Numerical examples with MATLAB codes . . . . . . . 104
5.2 High-dimensional problems . . . . . . . . . . . . . . . . . . . 121
5.2.1 Temporal discretization for 2-D problems . . . . . . . 121
5.2.2 Stability analysis . . . . . . . . . . . . . . . . . . . . . 123
5.2.3 Extensions to 3-D compact ADI schemes . . . . . . . . 124
5.2.4 Numerical examples with MATLAB codes . . . . . . . 125
5.3 Other high-order compact schemes . . . . . . . . . . . . . . . 133
5.3.1 One-dimensional problems . . . . . . . . . . . . . . . . 133
5.3.2 Two-dimensional problems . . . . . . . . . . . . . . . . 135
5.4 Bibliographical remarks . . . . . . . . . . . . . . . . . . . . . 138
5.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Contents vii

6 Finite Element Methods: Basic Theory 145


6.1 Introduction to one-dimensional problems . . . . . . . . . . . 145
6.1.1 The second-order equation . . . . . . . . . . . . . . . . 145
6.1.2 The fourth-order equation . . . . . . . . . . . . . . . . 148
6.2 Introduction to two-dimensional problems . . . . . . . . . . . 152
6.2.1 The Poisson equation . . . . . . . . . . . . . . . . . . 152
6.2.2 The biharmonic problem . . . . . . . . . . . . . . . . . 154
6.3 Abstract finite element theory . . . . . . . . . . . . . . . . . . 155
6.3.1 Existence and uniqueness . . . . . . . . . . . . . . . . 156
6.3.2 Stability and convergence . . . . . . . . . . . . . . . . 157
6.4 Examples of conforming finite element spaces . . . . . . . . . 158
6.4.1 Triangular finite elements . . . . . . . . . . . . . . . . 159
6.4.2 Rectangular finite elements . . . . . . . . . . . . . . . 163
6.5 Examples of nonconforming finite elements . . . . . . . . . . 164
6.5.1 Nonconforming triangular elements . . . . . . . . . . . 164
6.5.2 Nonconforming rectangular elements . . . . . . . . . . 165
6.6 Finite element interpolation theory . . . . . . . . . . . . . . . 167
6.6.1 Sobolev spaces . . . . . . . . . . . . . . . . . . . . . . 167
6.6.2 Interpolation theory . . . . . . . . . . . . . . . . . . . 169
6.7 Finite element analysis of elliptic problems . . . . . . . . . . . 173
6.7.1 Analysis of conforming finite elements . . . . . . . . . 173
6.7.2 Analysis of nonconforming finite elements . . . . . . . 175
6.8 Finite element analysis of time-dependent problems . . . . . . 177
6.8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 177
6.8.2 FEM for parabolic equations . . . . . . . . . . . . . . 178
6.9 Bibliographical remarks . . . . . . . . . . . . . . . . . . . . . 185
6.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

7 Finite Element Methods: Programming 193


7.1 FEM mesh generation . . . . . . . . . . . . . . . . . . . . . . 193
7.2 Forming FEM equations . . . . . . . . . . . . . . . . . . . . . 198
7.3 Calculation of element matrices . . . . . . . . . . . . . . . . . 199
7.4 Assembly and implementation of boundary conditions . . . . 204
7.5 The MATLAB code for P1 element . . . . . . . . . . . . . . . 205
7.6 The MATLAB code for the Q1 element . . . . . . . . . . . . 208
7.7 Bibliographical remarks . . . . . . . . . . . . . . . . . . . . . 213
7.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

8 Mixed Finite Element Methods 219


8.1 An abstract formulation . . . . . . . . . . . . . . . . . . . . . 219
8.2 Mixed methods for elliptic problems . . . . . . . . . . . . . . 223
8.2.1 The mixed variational formulation . . . . . . . . . . . 223
8.2.2 The mixed finite element spaces . . . . . . . . . . . . . 225
8.2.3 The error estimates . . . . . . . . . . . . . . . . . . . . 229
viii Contents

8.3 Mixed methods for the Stokes problem . . . . . . . . . . . . . 232


8.3.1 The mixed variational formulation . . . . . . . . . . . 232
8.3.2 Mixed finite element spaces . . . . . . . . . . . . . . . 234
8.4 An example MATLAB code for the Stokes problem . . . . . . 238
8.5 Mixed methods for viscous incompressible flows . . . . . . . . 252
8.5.1 The steady Navier-Stokes problem . . . . . . . . . . . 252
8.5.2 The unsteady Navier-Stokes problem . . . . . . . . . . 254
8.6 Bibliographical remarks . . . . . . . . . . . . . . . . . . . . . 255
8.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

9 Finite Element Methods for Electromagnetics 261


9.1 Introduction to Maxwell’s equations . . . . . . . . . . . . . . 261
9.2 The time-domain finite difference method . . . . . . . . . . . 263
9.2.1 The semi-discrete scheme . . . . . . . . . . . . . . . . 263
9.2.2 The fully discrete scheme . . . . . . . . . . . . . . . . 272
9.3 The time-domain finite element method . . . . . . . . . . . . 285
9.3.1 The mixed method . . . . . . . . . . . . . . . . . . . . 285
9.3.2 The standard Galerkin method . . . . . . . . . . . . . 290
9.3.3 The discontinuous Galerkin method . . . . . . . . . . 293
9.4 The frequency-domain finite element method . . . . . . . . . 298
9.4.1 The standard Galerkin method . . . . . . . . . . . . . 298
9.4.2 The discontinuous Galerkin method . . . . . . . . . . 299
9.4.3 The mixed DG method . . . . . . . . . . . . . . . . . 303
9.5 Maxwell’s equations in dispersive media . . . . . . . . . . . . 305
9.5.1 Isotropic cold plasma . . . . . . . . . . . . . . . . . . . 306
9.5.2 Debye medium . . . . . . . . . . . . . . . . . . . . . . 310
9.5.3 Lorentz medium . . . . . . . . . . . . . . . . . . . . . 313
9.5.4 Double-negative metamaterials . . . . . . . . . . . . . 315
9.6 Bibliographical remarks . . . . . . . . . . . . . . . . . . . . . 323
9.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325

10 Meshless Methods with Radial Basis Functions 331


10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
10.2 The radial basis functions . . . . . . . . . . . . . . . . . . . . 332
10.3 The MFS-DRM . . . . . . . . . . . . . . . . . . . . . . . . . . 335
10.3.1 The fundamental solution of PDEs . . . . . . . . . . . 335
10.3.2 The MFS for Laplace’s equation . . . . . . . . . . . . 338
10.3.3 The MFS-DRM for elliptic equations . . . . . . . . . . 341
10.3.4 Computing particular solutions using RBFs . . . . . . 344
10.3.5 The RBF-MFS . . . . . . . . . . . . . . . . . . . . . . 346
10.3.6 The MFS-DRM for the parabolic equations . . . . . . 346
10.4 Kansa’s method . . . . . . . . . . . . . . . . . . . . . . . . . . 348
10.4.1 Kansa’s method for elliptic problems . . . . . . . . . . 348
Contents ix

10.4.2 Kansa’s method for parabolic equations . . . . . . . . 349


10.4.3 The Hermite-Birkhoff collocation method . . . . . . . 350
10.5 Numerical examples with MATLAB codes . . . . . . . . . . . 352
10.5.1 Elliptic problems . . . . . . . . . . . . . . . . . . . . . 352
10.5.2 Biharmonic problems . . . . . . . . . . . . . . . . . . . 359
10.6 Coupling RBF meshless methods with DDM . . . . . . . . . . 366
10.6.1 Overlapping DDM . . . . . . . . . . . . . . . . . . . . 367
10.6.2 Non-overlapping DDM . . . . . . . . . . . . . . . . . . 368
10.6.3 One numerical example . . . . . . . . . . . . . . . . . 369
10.7 Bibliographical remarks . . . . . . . . . . . . . . . . . . . . . 372
10.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373

11 Other Meshless Methods 379


11.1 Construction of meshless shape functions . . . . . . . . . . . . 379
11.1.1 The smooth particle hydrodynamics method . . . . . . 379
11.1.2 The moving least-square approximation . . . . . . . . 381
11.1.3 The partition of unity method . . . . . . . . . . . . . . 382
11.2 The element-free Galerkin method . . . . . . . . . . . . . . . 384
11.3 The meshless local Petrov-Galerkin method . . . . . . . . . . 386
11.4 Bibliographical remarks . . . . . . . . . . . . . . . . . . . . . 389
11.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390

Appendix A Answers to Selected Problems 393

Index 405
Preface

The purpose of this book is to provide a quick but solid introduction to ad-
vanced numerical methods for solving various partial differential equations
(PDEs) in science and engineering. The numerical methods covered in this
book include not only the classic finite difference and finite element meth-
ods, but also some recently developed meshless methods, high-order compact
difference methods, and finite element methods for Maxwell’s equations in
complex media.
This book is based on the material that we have taught in our numeri-
cal analysis courses, MAT 665/666 and MAT 765/766, at the University of
Nevada Las Vegas since 2003. The emphasis of the text is on both mathe-
matical theory and practical implementation of the numerical methods. We
have tried to keep the mathematics accessible for a broad audience, while still
presenting the results as rigorously as possible.
This book covers three types of numerical methods for PDEs: the finite
difference method, the finite element method, and the meshless method. In
Chapter 1, we provide a brief overview of some interesting PDEs coming from
different areas and a short review of numerical methods for PDEs. Then we
introduce the finite difference methods for solving parabolic, hyperbolic, and
elliptic equations in Chapters 2, 3, and 4, respectively. Chapter 5 presents
the high-order compact difference method, which is quite popular for solving
time-dependent wave propagation problems. Chapters 6 through 9 cover the
finite element method. In Chapter 6, fundamental finite element theory is
introduced, while in Chapter 7, basic finite element programming techniques
are presented. Then in Chapter 8, we extend the discussion to the mixed finite
element method. Here both theoretical analysis and programming implemen-
tation are introduced. In Chapter 9, we focus on some special finite element
methods for solving Maxwell’s equations, where some newly developed algo-
rithms and Maxwell’s equations in dispersive media are presented. Chapter 10
is devoted to the radial basis function meshless methods developed in recent
years. Some Galerkin-type meshless methods are introduced in Chapter 11.
The book is intended to be an advanced textbook on numerical methods
applied to diverse PDEs such as elliptic, parabolic, and hyperbolic equations.
Each chapter includes about 10 exercises for readers to practice and enhance
their understanding of the materials. This book supplies many MATLAB
source codes, which hopefully will help readers better understand the pre-
sented numerical methods. We want to emphasize that our goal is to provide
readers with simple and clear implementations instead of sophisticated usages

xi
xii Preface

of MATLAB functions. The skilled reader should be able to easily modify or


improve the codes to solve similar problems of his or her interest.
This book can be used for a two-semester graduate course that provides an
introduction to numerical methods for partial differential equations. The first
semester can cover the elementary chapters such as Chapters 1 through 5.
This part can also be used at the undergraduate level as a one-semester in-
troductory course on numerical methods or scientific computing. The rest of
the chapters are more advanced and can be used for the second semester or a
stand-alone advanced numerical analysis course.

MATLAB is a registered trademark of The MathWorks, Inc. For product


information, please contact:

The MathWorks, Inc.


1 Apple Hill Drive
Natick, MA 01760-2098 USA
Tel: 508-647-7000
Fax: 508-647-7001
Email: [email protected]
Web: www.mathworks.com

New to this edition:


In this edition, we first corrected those typos in the first edition. Then we
provided updates to recent textbooks on related subjects, added more exer-
cises, and expanded some sections, such as a detailed finite element analysis
of parabolic equations, and a new section on the popular time-domain finite
difference method for Maxwell’s equations. Of course, we apologize for any
unavoidable omissions and potential typos.
Acknowledgments

We would like to thank Professor Goong Chen for his kind support in accepting
our book into this book series. We also want to thank Shashi Kumar, Karen
Simon, and Bob Stern for their kind help during the first edition production
process, and Bob Ross for his kind help during the second edition production
process.

University of Nevada Las Vegas Jichun Li


University of Nevada Las Vegas Yi-Tung Chen

I am very grateful for the mathematics department’s kind support of my


numerical PDE courses, and to those students suffering during my lectures
over the years, which made this book possible. This work has benefited greatly
from many collaborations with my colleagues over the years. Very special
thanks go to Professor Qun Lin who introduced me to the finite element
superconvergence world; to Professor Mary Wheeler who led me to the won-
derful parallel computing and multidisciplinary research world; to Professors
C.S. Chen and Benny Hon who enlightened me on the meshless method; and
to Dr. Miguel Visbal who directed me to the compact difference method.
Last, but not least, I want to express my gratitude to my wife, Tao, and
our children, Jessica and David, for their love, help, and unwavering support
over the years. Finally, I dedicate this book to the memory of my parents,
Shu-Zhen Zhao and Hao-Sheng Li.

Jichun Li

This book is dedicated to my wife, Yulien, and our children, Jessica and
Jonathan, for their endless love and support.

Yi-Tung Chen

xiii
1
Brief Overview of Partial Differential
Equations

Generally speaking, partial differential equations (PDEs) are equations con-


taining some partial derivatives of an unknown function u with respect to
spatial variables such as x = (x1 , · · · , xd )′ ∈ Rd , d ≥ 1, and sometimes with
respect to time variable t.
It turns out that many problems can be modeled by PDEs from various
science and engineering applications. Furthermore, most problems cannot be
solved analytically, hence finding good approximate solutions using numerical
methods will be very helpful. Learning various numerical methods for solving
PDEs becomes more and more important for students majoring in science and
engineering. These days we are immersed with many “computational” words
such as “computational mathematics”, “computational physics”, “compu-
tational chemistry”, “computational biology”, “computational geosciences”,
“computational fluid mechanics”, “computational electromagnetics”, etc. In
this chapter, we first review some interesting PDEs to motivate our readers.
Then we provide a very quick review of several popular numerical methods
for solving differential equations.

1.1 The parabolic equations


The one-dimensional (1-D) differential equation

∂u ∂2u
= α2 2 or ut = α2 uxx , 0 < x < L, (1.1)
∂t ∂x
is a standard 1-D parabolic equation. This equation can be used to model
many physical phenomena such as heat distribution in a rod, in which case
u(x, t) represents the temperature at point x and time t, and α2 is the thermal
diffusivity of the material. Hence (1.1) is also called heat/diffusion equation.
Furthermore, if there is an additional source/sink along the rod, given by
f (x, t), then we end up with an inhomogeneous heat equation

ut = α2 uxx + f (x, t). (1.2)

1
2 Computational Partial Differential Equations Using MATLABr

If the material property is not uniform along the rod (e.g., density or specific
heat depends on the location x), then the coefficient α will be a function of
x. In the case that the thermal conductivity K depends on x, then the heat
equation becomes
∂ ∂u
ut = (K(x) ). (1.3)
∂x ∂x
Of course, to make the heat equation well posed, we must supply an initial
condition and proper boundary conditions at both ends of the rod. Similarly,
2-D and 3-D heat equations can be derived, which are often written as
ut = α2 (uxx + uyy + uzz ) + f, (1.4)
and
ut = (aux )x + (buy )y + (cuz )z + f. (1.5)

1.2 The wave equations


The second-order hyperbolic differential equation
utt = c2 uxx , 0 < x < L, (1.6)
is often called the wave equation. Equation (1.6) can be used to describe the
vibration of a perfectly flexible string when it is nailed down at both ends,
pulled, and let go. In that case, u denotes the displacement of the string.
If some vertical force f is imposed at point x, then we have the inhomoge-
neous wave equation
utt = c2 uxx + f (x, t). (1.7)
If the string has non-uniform density, then the coefficient c2 becomes a func-
tion of x. To make the wave equation well posed, we need boundary conditions
at each end of the string and initial conditions for both u and ut at each point
of the string.
The two-dimensional wave equation
utt = c2 (uxx + uyy ) + f (x, y, t) (1.8)
can be used to describe the vibration of a membrane, where u(x, y, t) is the
height of the membrane at point (x, y) at time t, and f (x, y, t) represents the
load effect.
The three-dimensional wave equation
utt = c2 (uxx + uyy + uzz ) + f (x, y, z, t) (1.9)
can be obtained when we model the propagation of waves in 3-D media. Ex-
amples include the propagation of elastic waves in solids and electromagnetic
waves.
Brief Overview of Partial Differential Equations 3

1.3 The elliptic equations


The second-order elliptic equations are obtained as the steady state solutions
(as t → ∞) of the parabolic and wave equations. For example, a general
Poisson’s equation results in electrostatics
(ǫux )x + (ǫuy )y = −ρ, (1.10)
where the permittivity ǫ may vary with position and the given charge distri-
bution ρ can vary with position too. When ǫ is a constant, we get the so-called
Poisson’s equation
uxx + uyy = −f (x, y). (1.11)
A further simplified form of Poisson’s equation with homogeneous right-
hand side (i.e., f = 0) is the so-called Laplace equation
uxx + uyy = 0. (1.12)
Solutions of (1.10) are important in many fields of science, such as electro-
magnetics, astronomy, heat transfer, and fluid mechanics, because they may
represent a temperature, electric or magnetic potential, and displacement for
an elastic membrane. In three dimensions, we have the corresponding Poisson
and Laplace equations.

1.4 Differential equations in broader areas


In this section, we show readers a few more interesting PDEs from different
disciplines.

1.4.1 Electromagnetics
With the advancement of modern technology, we live in a world surrounded
by electromagnetic waves. For example, the TV programs we watch daily are
generated and broadcast by waves propagating in the air; we warm our food
using a microwave oven, which warms the food by generating microwaves;
ultrasound wave propagation plays a very important role in medical applica-
tions, such as hypothermia therapy, detection of tumors and bond density; we
talk to our friends by mobile phones, whose signals are transported as ultra-
short wave pulses through optical fibers; we build “invisible planes” by absorb-
ing the detecting waves sent by enemies. Hence, the study of electromagnetic
waves interacting with different materials is an unavoidable important issue
in our daily life and in national defense.
4 Computational Partial Differential Equations Using MATLABr

The fundamental equations in describing the electromagnetic phenomena


are the Maxwell equations:
∂B
Faraday’s law: ∇ × E = − ,
∂t
∂D
Maxwell-Ampere’s law: ∇ × H = ,
∂t
Gauss’s law: ∇ · D = ρ,
Gauss’s law - magnetic: ∇ · B = 0,

where E(x, t) and H(x, t) are the electric and magnetic fields, D(x, t) and
B(x, t) are the corresponding electric and magnetic flux densities, ρ is the
electric charge density. Furthermore, D and B are related to E and H
through the constitutive relations

D = ǫE, B = µH,

where ǫ and µ denote the permittivity and permeability of the medium, re-
spectively. Here we use the conventional notation for the curl operator ∇×
and the divergence operator ∇·, i.e., for any vector φ = (φ1 , φ2 , φ3 )′ , we have
∂φ3 ∂φ2 ∂φ3 ∂φ1 ∂φ2 ∂φ1
∇ × φ = i( − ) − j( − ) + k( − ),
∂y ∂z ∂x ∂z ∂x ∂y

and ∇ · φ = ∂φ ∂φ2 ∂φ3


∂x + ∂y + ∂z .
1

For more detailed discussions on Maxwell’s equations in electromagnetics,


readers can consult books by Chew [7] and Jackson [17], and references cited
therein.

1.4.2 Fluid mechanics


In modeling fluid flow, we will come across the Navier-Stokes (N-S) equations.
Consider laminar flows of viscous, incompressible fluids; the two-dimensional
N-S equations in dimensionless form are given by:
Momentum equations:
∂u ∂p 1 ∂2u ∂2u ∂(u2 ) ∂(uv)
+ = ( 2 + 2)− − + gx ,
∂t ∂x Re ∂x ∂y ∂x ∂y
∂v ∂p 1 ∂2v ∂2v ∂(uv) ∂(v 2 )
+ = ( 2 + 2) − − + gy ,
∂t ∂y Re ∂x ∂y ∂x ∂y
Continuity equation:
∂u ∂v
+ = 0,
∂x ∂y
where Re is the dimensionless Reynolds number, gx and gy denote the body
forces, u and v are the velocity fields in the x- and y-directions, respectively,
and p is the pressure.
Brief Overview of Partial Differential Equations 5

In the three-dimensional case, the N-S equations are given as follows.


Momentum equations:

∂u ∂p 1 ∂2u ∂2u ∂2u ∂(u2 ) ∂(uv) ∂(uw)


+ = ( 2 + 2 + 2)− − − + gx ,
∂t ∂x Re ∂x ∂y ∂z ∂x ∂y ∂z
∂v ∂p 1 ∂2v ∂2v ∂2v ∂(uv) ∂(v 2 ) ∂(vw)
+ = ( 2 + 2 + 2)− − − + gy ,
∂t ∂y Re ∂x ∂y ∂z ∂x ∂y ∂z
∂w ∂p 1 ∂2w ∂2w ∂2w ∂(uw) ∂(vw) ∂(w2 )
+ = ( 2 + 2
+ 2
)− − − + gz .
∂t ∂z Re ∂x ∂y ∂z ∂x ∂y ∂z
Continuity equation:
∂u ∂v ∂w
+ + = 0.
∂x ∂y ∂z
Here w denotes the velocity component in the z-direction, and gz the z-
component of the body forces.
Using Einstein summation convention, the above momentum equations can
be simply written as:

∂ ∂ 1 ∂2 ∂p
( + uj − · )ui = − + gi , i, j = 1, 2, 3,
∂t ∂xj Re ∂xj xj ∂xi

where we denote (x1 , x2 , x3 ) := (x, y, z), (u1 , u2 , u3 ) := (u, v, w) and (g1 , g2 , g3 ) =


(gx , gy , gz ).
In a more compact vector form, the momentum equations are often written
as follows:
∂u 1 2
+ (u · ∇)u − ∇ u = −∇p + g,
∂t Re
where we denote u := (u, v, w) and g := (gx , gy , gz ).

1.4.3 Groundwater contamination


Groundwater contamination and soil pollution have been recognized as impor-
tant environmental problems over the past three decades. Very often, ground
water is an important pathway for wastes found in the land’s subsurface. Con-
taminants leak from the waste, move forward through the unsaturated zone
to the water table, and then migrate in the saturated groundwater system.
The contaminants may discharge ultimately to well water or surface water,
which may threaten our living environments. Hence better understanding of
groundwater flow and contaminant transport is essential to the national and
global economies, people’s health and safety, and billions of dollars for future
environmental remediation and crisis management.
The governing equations for groundwater flow and contaminant transport
can be classified into two big categories: saturated and unsaturated. Generally
speaking, the saturated zone is the region below the groundwater table, and
the unsaturated zone is the part of the subsurface between the land surface and
6 Computational Partial Differential Equations Using MATLABr

the groundwater table. Unsaturated means that the pore spaces are partially
filled with water, and partially with air. The unsaturated zone varies from
meters to hundreds of meters deep.
The saturated groundwater flow in three dimensions can be modeled by the
equation
∂h ∂ ∂h ∂ ∂h ∂ ∂h
Ss = (Kx ) + (Ky ) + (Kz ) + Q,
∂t ∂x ∂x ∂y ∂y ∂z ∂z
where h is the water head, Kx , Ky and Kz denote the hydraulic conductivity
in the x-, y-, and z-directions, respectively. Ss is the specific storage, and Q
is a source or sink term.
In an unsaturated zone, the groundwater flow is governed by the equation
∂ψ ∂ ∂ψ ∂ ∂ψ ∂ ∂ψ
c(ψ) = (Kx (ψ) )+ (Ky (ψ) )+ (Kz (ψ) ) + Q, (1.13)
∂t ∂x ∂x ∂y ∂y ∂z ∂z

where we denote ψ the pressure head, Kx (ψ), Ky (ψ) and Kz (ψ) the unsatu-
rated hydraulic conductivity in the x-, y-, and z-directions, respectively, c(ψ)
is the specific moisture capacity, and Q is a source or sink term. Equation
(1.13) is the multidimensional form of the well-known Richards equation.
The contaminant transport equation in an unsaturated zone is given by

X 3 X3
∂ ∂ ∂C ∂
(θw RC) = (θw Dij )− (vi C) + qs , (1.14)
∂t i,j=1
∂xi ∂xj i=1
∂xi

where both the moisture content θw and the retardation factor R are functions
of time, and Dij is the dispersion coefficient. We use qs to describe the
addition or removal of the contaminant due to chemical and/or biological
reactions. The velocity vi is related to the pressure head by Darcy’s law:
∂ψ ∂ψ ∂ψ
vx = −Kx (ψ) , vy = −Ky (ψ) , vz = −Kz (ψ) .
∂x ∂y ∂z

While the transport in a saturated zone is the same as (1.14) except that
θw is replaced by the porosity θ, which is the fraction of a representative
elementary volume for the fluid. In this case the porous medium reaches its
full saturation, which represents the fraction of the void volume filled by this
phase in a porous medium.
More details on groundwater flow and contaminant transport modeling can
be found in books such as [25, 26].

1.4.4 Petroleum reservoir simulation


A petroleum reservoir is a porous medium which contains hydrocarbons. Sim-
ulation of petroleum reservoirs helps us in predicting the performance of a
Brief Overview of Partial Differential Equations 7

reservoir and optimizing the oil recovery. The so-called two-phase immiscible
flow is used to model the simultaneous flow of two fluid phases such as water
and oil in a porous medium. We assume that the two phases are immisci-
ble and there is no mass transfer between them. Hence we have the mass
conservation for each phase, which is given by

∂(φρα Sα )
+ ∇ · (ρα uα ) = qα , α = w, o,
∂t
where w and o denote the water phase and oil phase, respectively. Here we
denote φ the porosity of the porous medium, ρα the density of each phase, qα
the mass flow rate, and Sα the saturation. The Darcy velocity uα is described
by Darcy’s law
1
uα = − kα (∇pα − ρα g∇z), α = w, o,
µα
where kα is the effective permeability, pα is the pressure, µα is the viscosity
for each phase α, g is the magnitude of the gravitation acceleration, z is the
depth of the reservoir, and ∇z = (0, 0, 1)′ . Note that both phases occupy the
whole void space, hence we have Sw + So = 1.
Thorough discussions on reservoir simulation can be found in books such
as [5, 9].

1.4.5 Finance modeling


The celebrated Black-Scholes differential equation is

∂u 1 2 2 ∂ 2 u ∂u
+ σ S + rS − ru = 0. (1.15)
∂t 2 ∂S 2 ∂S
Here u(S(t), t) denotes the price of an option on a stock, S(t) is the price
of the stock at time t, σ is the volatility of the stock, and r is the risk-free
interest rate.
Note that (1.15) is a backward parabolic equation, which needs a final
condition at time T . For a vanilla European call, we have the condition

u(S, T ) = max{S − X, 0},

while for a put option, we have

u(S, T ) = max{X − S, 0},

where X is the exercise price at the expiration date T . We want to remark


that the call option means the right to buy the stock, while the put option
gives the right to sell the stock.
More details on mathematical finance can be found in books such as [11, 16].
8 Computational Partial Differential Equations Using MATLABr

1.4.6 Image processing


In recent years, PDEs have become popular and useful tools for image denois-
ing, image segmentation, and image restoration. Such PDE-based methodol-
ogy has been successfully applied to many problems in image processing and
computer vision. Examples include image denoising, segmentation of textures
and remotely sensed data, object detection, optical flow, stereo, and enhanc-
ing textures such as fingerprints, image sharpening, and target tracking.
For example, the homogeneous linear diffusion equation
∂2u ∂2u
ut = △u ≡ + 2 (1.16)
∂x2 ∂y
can be used to reduce noise, where u denotes the image value. But this simple
model can blur important features such as edges. Hence the inhomogeneous
linear diffusion
ut = div(g(|∇u0 |2 )∇u) (1.17)
was proposed, where u0 is a given image, g : R+ → R+ is a decreasing
function with g(0) = 1, lims→∞ g(s) = 0 and g(s) is smooth, e.g., g(s2 ) =
2
(1 + λs 2 )−1 , λ > 0 is a constant. Using the model (1.17), edges remain better
localized and their blurring is reduced. But for large t the filtered image
reveals some artifacts which reflect the differential structure of the initial
image. To reduce the artifacts of inhomogeneous linear diffusion filtering, a
feedback can be introduced in the process by adapting the diffusivity g to the
gradient of the actual image u(x, t), which leads to the nonlinear isotropic
diffusion model
ut = div(g(|∇u|2 )∇u). (1.18)
Model (1.18) can increase the edge localization and reduce the blurring at
edges, but the absolute contrast at edges becomes smaller. To overcome this
shortcoming, the orthonormal system of eigenvectors v1 and v2 of the diffu-
sion tensor D can be constructed such that v1 is parallel to ∇uσ , and v2 is
perpendicular to ∇uσ , where uσ = Gσ ⋆ u represents the standard convolution
of Gσ with u. Here Gσ can be any smoothing kernel such as the often used
1
Gaussian filter Gσ (x) = 4πσ exp(−|x|2 /(4σ)). If we want to smooth the image
along the edge instead of across the edge, we can choose the eigenvalues λ1
and λ2 as
λ1 = g(|∇uσ |2 ), λ2 = 1,
which creates fairly realistic segments.
To circumvent the stopping time problem caused by the diffusion filters with
a constant steady state, an additional reaction term can be added to keep the
steady-state solution close to the original image, which gives us another model
ut = div(g(|∇u|2 )∇u) + β(u0 − u), β > 0.
For more discussions on PDEs in image processing, readers can consult
books such as [1, 4, 19].
Brief Overview of Partial Differential Equations 9

1.5 A quick review of numerical methods for PDEs


Due to the ubiquitousness of partial differential equations, there are many
different numerical methods for solving them. Generally speaking, we can
classify the numerical methods into six big categories: finite difference, spec-
tral method, finite element, finite volume, boundary element, and meshless or
mesh-free methods.
The finite difference method seems to be the easiest understandable tech-
nique to solve a differential equation. The basic idea is to use finite differences
to approximate those differentials in the PDEs. Due to its simplicity, the dif-
ference method is often the first choice for those who are interested in numer-
ical solutions of PDEs. One disadvantage of this method is that it becomes
quite complex when solving PDEs on irregular domains. Another disadvan-
tage is that it is not easy to carry out the mathematical analysis (such as
solvability, stability, and convergence) for the difference methods especially
for PDEs with variable coefficients, and nonlinear PDEs. Considering that
the finite difference method serves as a basis for other numerical methods, we
will cover it in more detail in future chapters.
Spectral methods are powerful technologies for solving PDEs if the physical
domain is simple and the solution is smooth. Early literature on spectral
methods are the short book by Gottlieb and Orszag [13] and the monograph
by Canuto, Hussaini, Quarteroni and Zang [3]. More recent advances can be
found in books by Fornberg [10], Trefethen [23], Shen, Tang and Wang [21],
and Hesthaven et al. [14]. Due to our lack of training and experience in this
area, we will not cover the spectral methods in this book. Interested readers
can consult the above books for more details.
The finite element method is arguably the most popular method for solving
various PDEs. Compared to other methods, it has well-established mathe-
matical theory for various PDEs and is a good choice for solving PDEs over
complex domains (like cars and airplanes). The finite element method works
by rewriting the governing PDE into an equivalent variational problem, mesh-
ing the modeled domain into smaller elements and looking for approximate
solutions at the mesh nodes when using a linear basis function over each ele-
ment. But the implementation of the finite element method may be the most
complicated compared to other numerical methods. Due to its popularity,
there are many commercial finite element packages and some free packages
too. We will discuss both the mathematical theory and implementation of
the finite element method in later chapters.
The boundary element method is used to solve those PDEs which can be
formulated as integral equations. The boundary element method attempts
to use the given boundary conditions to fit boundary values into the integral
equation, rather than values throughout the space defined by the PDE. Con-
ceptually, the boundary element method can be thought of as a finite element
10 Computational Partial Differential Equations Using MATLABr

method over the modeled surface (i.e., meshing over the surface) instead of
over the modeled physical domain [15]. Hence, the boundary element method
is often more efficient than other methods in terms of computational resources
for problems when the surface-to-volume ratio is small. However, boundary
element formulations typically yield fully populated matrices, which makes
the storage requirements and computational time increase in the square or-
der of the problem size. While matrices from finite element methods are
often sparse and banded, the storage requirements only grow linearly with
the problem size. Therefore, for many problems boundary element methods
are significantly less efficient than those volume-based methods such as fi-
nite element methods. Another problem for the boundary element method
is that not many problems, such as nonlinear problems, can be written as
integral equations, which restricts the applicability of the boundary element
method. For detailed mathematical theory on the boundary element method,
the reader can consult books such as [6, 8] and references cited therein. For
engineering applications and implementation, details can be found in books
[2, 20] and references cited therein.
The finite volume method is another method for solving PDEs. This method
is very popular in computational fluid dynamics. The basic idea of the finite
volume method is to integrate the differential equation over a finite-sized con-
trol volume surrounding each nodal point on a mesh, then changing the volume
integrals (those involving the divergence term) to surface integrals which can
be evaluated as fluxes at the surfaces of each finite volume. Hence the finite
volume method is conservative locally on each volume. Another advantage of
the finite volume method is that it can be easily used for irregularly shaped
domains. Detailed discussions about the finite volume method can be found
in books such as [18, 24] and references cited therein.
The meshless or mesh-free method is a more recently developed technique
for solving PDEs. The mesh-based methods (the finite element, boundary
element and finite volume methods) share the drawbacks such as the tedious
meshing and re-meshing in crack propagation problem, the melting of a solid
or the freezing process, large deformations, etc. The meshless method aims
to overcome those drawbacks by getting rid of meshing or re-meshing the
entire modeled domain and only adding or deleting nodes, instead. The ini-
tial idea dates back to the smooth partical hydrodynamics method developed
by Gingold and Monaghan in 1977 [12] for modeling astrophysical phenom-
ena. Since the 1990s, the research into meshless methods has become very
active and many mesh-free methods have been developed, e.g., Element Free
Galerkin Method; Reproducing Kernel Particle Method; Partition of Unity
Method; hp-Cloud Method; Radial Basis Function Method; Meshless Local
Petrov-Galerkin method, etc. We will introduce them in more detail in later
chapters.
Brief Overview of Partial Differential Equations 11

References
[1] G. Aubert and P. Kornprobst. Mathematical Problems in Image Pro-
cessing: Partial Differential Equations and the Calculus of Variations.
Springer, New York, NY, 2nd edition, 2006.
[2] C. A. Brebbia and L. C. Wrobel. Boundary Element Techniques: Theory
and Applications in Engineering. WIT Press, Southampton, UK, 2nd
edition, 1996.
[3] C. Canuto, M.Y. Hussaini, A. Quarteroni and T.A. Zang. Spectral Meth-
ods in Fluid Dynamics. Springer-Verlag, Berlin, 1988.
[4] T. Chan and J. Shen. Image Processing and Analysis: Variational, PDE,
Wavelet, and Stochastic Methods. SIAM, Philadelphia, PA, 2005.
[5] Z. Chen, G. Huan and Y. Ma. Computational Methods for Multiphase
Flows in Porous Media. SIAM, Philadelphia, PA, 2006.
[6] G. Chen and J. Zhou. Boundary Element Methods. Academic Press,
New York, NY, 1992.
[7] W.C. Chew. Waves and Fields in Inhomogenous Media. Wiley-IEEE
Press, New York, NY, 1999.
[8] D. Colton and R. Kress. Integral Equation Methods in Scattering Theory.
John Wiley & Sons, New York, NY, 1983.
[9] R.E. Ewing (ed.). The Mathematics of Reservoir Simulation. SIAM,
Philadelphia, PA, 1987.
[10] B. Fornberg. A Practical Guide to Pseudospectral Methods. Cambridge
University Press, Cambridge, UK, 1996.
[11] J.-P. Fouque, G. Papanicolaou and K.R. Sircar. Derivatives in Financial
Markets with Stochastic Volatility. Cambridge University Press, Cam-
bridge, UK, 2000.
[12] R.A. Gingold and J.J. Monaghan. Smoothed particle hydrodynamics:
theory and application to non-spherical stars. Mon. Not. Roy. Astron.
Soc., 181:375–389, 1977.
[13] D. Gottlieb and S.A. Orszag. Numerical Analysis of Spectral Methods:
Theory and Applications. SIAM, Philadelphia, PA, 1977.
[14] J.S. Hesthaven, S. Gottlieb and D. Gottlieb. Spectral Methods for Time-
Dependent Problems. Cambridge University Press, Cambridge, UK,
2007.
12 Computational Partial Differential Equations Using MATLABr

[15] C. Johnson. Numerical Solution of Partial Differential Equations by the


Finite Element Method. Cambridge University Press, Cambridge, UK,
1987.
[16] I. Karatzas and S.E. Shreve. Methods of Mathematical Finance.
Springer, New York, NY, 1998.
[17] J.D. Jackson. Classical Electrodynamics. 3rd edn. John Wiley & Sons,
Hoboken, NJ, 2001.
[18] R.J. LeVeque. Finite Volume Methods for Hyperbolic Problems. Cam-
bridge University Press, Cambridge, UK, 2002.
[19] S.J. Osher and R.P. Fedkiw. Level Set Methods and Dynamic Implicit
Surfaces. Springer, New York, NY, 2002.
[20] C. Pozrikidis. A Practical Guide to Boundary Element Methods with the
Software Library BEMLIB. CRC Press, Boca Raton, FL, 2002.
[21] J. Shen, T. Tang and L.-L. Wang. Spectral Methods: Algorithms, Anal-
ysis and Applications. Springer-Verlag, Berlin, 2011.
[22] J.C. Tannehill, D.A. Anderson and R.H. Pletcher. Computational Fluid
Mechanics and Heat Transfer. Taylor & Francis, Philadelphia, PA, 2nd
edition, 1997.
[23] L.N. Trefethen. Spectral Methods in MATLAB. SIAM, Philadelphia,
PA, 2000.
[24] H. Versteeg and W. Malalasekra. An Introduction to Computational
Fluid Dynamics: The Finite Volume Method. Prentice Hall, Upper Sad-
dle River, NJ, 2nd edition, 2007.
[25] D. Zhang. Stochastic Methods for Flow in Porous Media: Coping with
Uncertainties. Academic Press, New York, NY, 2001.
[26] C. Zheng. Applied Contaminant Transport Modeling. Wiley-Interscience,
New York, NY, 2nd edition, 2002.
2
Finite Difference Methods for Parabolic
Equations

The finite difference method (FDM) seems to be the simplest approach for the
numerical solution of PDEs. It proceeds by replacing those derivatives in the
governing equations by finite differences. In this chapter, we will introduce
various difference methods for parabolic equations. In Sec. 2.1, we present
both the explicit and implicit schemes for a simple heat equation. Then
we introduce some important concepts (such as stability, consistence, and
convergence) used in analyzing finite difference methods in Sec. 2.2. Then in
Sec. 2.3, we demonstrate a few examples for using those concepts. In Sec. 2.4,
we extend the discussion to two-dimensional and three-dimensional parabolic
equations. Here we cover the standard difference methods and the alternate
direction implicit (ADI) method. Finally, in Sec. 2.5, we present a MATLAB
code to show readers how to solve a parabolic equation.

2.1 Introduction
We start with a simple heat equation model: find u(x, t) such that
ut = uxx , ∀ (x, t) ∈ (0, 1) × (0, tF ), (2.1)
u(0, t) = u(1, t) = 0, ∀ t ∈ (0, tF ) (2.2)
u(x, 0) = u0 (x), ∀ x ∈ [0, 1], (2.3)
where tF denotes the terminal time for the model. Here without loss of
generality, we assume that the spatial domain is [0, 1].
To solve the problem (2.1)–(2.3) by FDM, we first divide the physical do-
main (0, tF ) × (0, 1) by N × J uniform grid points
tF
tn = n△t, △t = , n = 0, 1, · · · , N,
N
1
xj = j△x, △x = , j = 0, 1, · · · , J.
J
We denote the approximate solution unj to the exact solution u at an arbi-
trary point (xj , tn ), i.e., unj ≈ u(xj , tn ). To obtain a finite difference scheme,

13
14 Computational Partial Differential Equations Using MATLABr

we need to approximate those derivatives in (2.1) by some finite differences.


Below we demonstrate two simple finite difference schemes for solving (2.1)-
(2.3).

Example 2.1
(Explicit scheme: Forward Euler) Substituting

ut (xj , tn ) ≈ (un+1
j − unj )/△t,
uxx (xj , tn ) ≈ (unj+1 − 2unj + unj−1 )/(△x)2 ,

into (2.1), we obtain an explicit scheme for (2.1):

ujn+1 = unj + µ(unj+1 − 2unj + unj−1 ), 1 ≤ j ≤ J − 1, 0 ≤ n ≤ N − 1, (2.4)

where we denote
△t
µ= . (2.5)
(△x)2
The boundary condition (2.2) can be approximated directly as

un0 = unJ = 0, 0 ≤ n ≤ N − 1,

and the initial condition (2.3) can be approximated as

u0j = u0 (j△x), 0 ≤ j ≤ J. (2.6)

Note that with the scheme (2.4), the approximate solution un+1
j at any
interior points can be obtained by a simple marching in time.

Example 2.2
(Implicit scheme: Backward Euler) Similarly, by substituting

ut (xj , tn ) ≈ (unj − un−1


j )/△t,
uxx (xj , tn ) ≈ (unj+1 − 2unj + unj−1 )/(△x)2 ,

into (2.1), another difference scheme for (2.1) can be constructed as:

unj − un−1
j unj+1 − 2unj + unj−1
= , 1 ≤ j ≤ J − 1, 1 ≤ n ≤ N. (2.7)
△t (△x)2

In which case, we obtain an implicit scheme

−µunj−1 + (1 + 2µ)unj − µunj+1 = un−1


j , 1 ≤ j ≤ J − 1. (2.8)

Note that in this case, we have to solve a linear system at each time step
in order to obtain the approximate solutions unj at all interior points. That
Finite Difference Methods for Parabolic Equations 15

is why the scheme (2.8) is called implicit in order to distinguish it from the
explicit scheme (2.4).
More specifically, the scheme (2.8) is equivalent to a linear system Aun =
u n−1
with vectors un = (un1 , · · · , unJ−1 )′ , un−1 = (un−1
1 , · · · , un−1 ′
J−1 ) , and the
(J − 1) × (J − 1) tridiagonal matrix A:
 
1 + 2µ −µ 0 0
 −µ 1 + 2µ −µ 
 
 . . . 
 
A=  . . . ,

 . . . 
 
 −µ 1 + 2µ −µ 
0 0 −µ 1 + 2µ

which can be solved by the efficient Thomas algorithm (e.g., [11]).

Example 2.3
(Implicit scheme: Crank-Nicolson (CN)) Similarly, by substituting

ut (xj , tn ) ≈ (unj − un−1


j )/△t,
!
1 unj+1 − 2unj + unj−1 un−1 n−1
j+1 − 2uj + un−1
j−1
uxx (xj , tn ) ≈ + ,
2 (△x)2 (△x)2

into (2.1), we can obtain the CN scheme for (2.1): For 1 ≤ j ≤ J − 1,


1 ≤ n ≤ N,
!
unj − un−1
j 1 unj+1 − 2unj + unj−1 un−1 n−1
j+1 − 2uj + un−1
j−1
= + , (2.9)
△t 2 (△x)2 (△x)2

which can be written as:

−µunj−1 + (2 + 2µ)unj − µunj+1 = µun−1 n−1


j−1 + (2 − 2µ)uj + µun−1
j+1 . (2.10)

For this CN scheme, we also have to solve a linear system at each time
step in order to obtain the approximate solutions unj at all interior points.
Using the same notation as the Backward-Euler scheme, the scheme (2.10)
can be written as a linear system Bun = Cun−1 , where both B and C are
(J − 1) × (J − 1) tridiagonal matrices given as follows:
 
2 + 2µ −µ 0 0
 −µ 2 + 2µ −µ 
 
 . . . 
 
B=  . . . ,

 . . . 
 
 −µ 2 + 2µ −µ 
0 0 −µ 2 + 2µ
16 Computational Partial Differential Equations Using MATLABr

and  
2 − 2µ µ 0 0
 µ 2 − 2µ µ 
 
 . . . 
 
C=
 . . . .

 . . . 
 
 µ 2 − 2µ µ 
0 0 µ 2 − 2µ

2.2 Theoretical issues: stability, consistence, and


convergence
From the previous section, we see that constructing a finite difference scheme
seems quite simple, but how do we know which scheme is better and how
do we compare different schemes? To answer these questions, we need to
introduce some important concepts in FDM analysis.

DEFINITION 2.1 (Truncation error)


The truncation error of the scheme (2.4) is defined as
t x x
D+ u(x, t) D+ D− u(x, t)
T E(x, t) = − ,
△t (△x)2
x x
where we denote the backward and forward difference operators D− and D+
in variable x as follows:
x
D− v(x, t) = v(x, t) − v(x − △x, t),
x
D+ v(x, t) = v(x + △x, t) − v(x, t).
t
Similarly, we can define the forward difference operator D+ in variable t as
t
D+ v(x, t) = v(x, t + △t) − v(x, t).

DEFINITION 2.2 (Consistence)


If T E(x, t) → 0 as △t, △x → 0 at any point (t, x) in the physical domain
(for our example (x, t) ∈ (0, 1) × (0, tF )), then we say that the scheme is
consistent with the differential equation (2.1).
Finite Difference Methods for Parabolic Equations 17

DEFINITION 2.3 (Convergence)


If for any point (x, t) ∈ (0, 1) × (0, tF ),
xj → x, tn → t implies unj → u(x, t),
i.e., the numerical solution at node (xj , tn ) approximates the exact solution
u(x, t) as (xj , tn ) gets close to the point (x, t), then we say that the scheme is
convergent.

DEFINITION 2.4 (Order of accuracy)


If for a sufficiently smooth solution u, there exists a constant C > 0 such
that
T E(x, t) ≤ C[(△t)p + (△x)q ], as △t, △x → 0,
where p and q are the largest possible integers, then we say that the scheme
has pth order of accuracy in △t and qth order of accuracy in △x.

DEFINITION 2.5 (Well-posedness)


A partial differential equation (PDE) is well-posed if a solution of the
PDE exists, the solution is unique, and the solution depends continuously on
the data (such as initial conditions, boundary conditions, right-hand side).

DEFINITION 2.6 (Numerical stability)


For a time-dependent PDE, the corresponding difference scheme is stable
in a norm k · k if there exists a constant M > 0 such that
kun k ≤ M ku0 k, ∀ n△t ≤ tF ,
where M is independent of △t, △x and the initial condition u0 .

The following Lax-Richtmyer equivalence theorem connects the stability,


consistence, and convergence concepts altogether, which proof can be found
in many classic finite difference books (e.g.,[1, 5, 9, 13]).

THEOREM 2.1
(Lax-Richtmyer equivalence theorem) For a consistent difference approxima-
tion to a well-posed linear time-dependent problem, the stability of the scheme
is necessary and sufficient for convergence.

The classic Lax-Richtmyer equivalence theorem implies that convergence


is equivalent to consistency and stability. The consistency is usually easy to
check, hence the analysis of stability plays a very important role for numerical
methods.
In general, there are two fundamental approaches for proving stability: the
Fourier analysis (also called von Neumann stability analysis), and the en-
ergy method. Generally speaking, the Fourier analysis applies only to linear
18 Computational Partial Differential Equations Using MATLABr

constant coefficient problems, while the energy method can be used for more
general problems with variable coefficients and nonlinear terms. However,
the energy method can become quite complicated and the proof is problem
dependent. We will demonstrate both methods in the following sections.

2.3 1-D parabolic equations


In this section, we present several popular finite difference methods and their
stability analysis for the 1-D parabolic equations.

2.3.1 The θ-method and its analysis


For the model problem (2.1), we can construct the so-called θ-scheme:
un+1
j − unj x x n+1
θD+ x x n
D− uj + (1 − θ)D+ D− uj
= , 0 ≤ θ ≤ 1, 1 ≤ j ≤ J − 1,
△t (△x)2
(2.11)
or
−θµun+1 n+1
j−1 + (1 + 2θµ)uj − θµun+1 x x n
j+1 = [1 + (1 − θ)µD+ D− ]uj . (2.12)
Note that the special case θ = 0 is just the Forward Euler scheme (2.4). θ =
1 corresponds to the Backward Euler scheme (2.7), while θ = 21 corresponds
to the CN scheme (2.9).

2.3.1.1 Stability analysis with the Fourier analysis technique


To study the stability of (2.11), we can use the Fourier analysis technique.
This technique is motivated by the fact that the exact solution of a parabolic
equation can be expressed as a Fourier series. For example, by the method of
separation of variables, we can prove that the exact solution of the problem
(2.1)-(2.3) can be written as
X∞ Z 1
2
u(x, t) = an e−(nπ) t sin nπx, an = 2 u0 (x) sin nπxdx,
n=1 0

i.e., the exact solution is a linear combination of all Fourier modes. Hence, we
can assume that a similar Fourier mode should be an exact numerical solution
of the difference scheme. Substituting
unj = λn eik(j△x) , (2.13)
into (2.11), and dividing by unj , we obtain
λ − 1 = µ[θλ + (1 − θ)](eik△x − 2 + e−ik△x )
k△x
= µ[θλ + (1 − θ)](−4 sin2 ). (2.14)
2
Finite Difference Methods for Parabolic Equations 19

Here λ = λ(k) is called the amplification factor corresponding to the wavenum-


ber k.
Solving (2.14) for λ gives
k△x
1 − 4(1 − θ)µ sin2 2
λ= . (2.15)
1+ 4θµ sin2 k△x
2

When θ = 0, we see that 0 < 2µ ≤ 1 implies 1 ≥ 1 − 4µ sin2 k△x 2 ≥ −1, i.e.,


|λ(k)| ≤ 1 for all k, so that the scheme (2.11) in this case is stable.
1
When θ = 1, then λ = 1+4µ sin 2 k△x
≤ 1 for all k, in which case, the scheme
2
is said to be unconditionally stable, i.e., there is no constraint on the time
step size △t and the mesh size △x.
k△x
1 1−2µ sin2
When θ = 2, then λ = 1+2µ sin2
2
k△x . When 0 < 2µ ≤ 1, we have |λ| ≤
2
1 2µ sin2 k△x
1+2µ sin2 k△x ≤ 1. When 2µ ≥ 1, we have |λ| ≤ 2
1+2µ sin2 k△x
< 1. Hence, for
2 2
1
any µ, the scheme (2.11) with θ = 2 is also unconditionally stable.

2.3.1.2 Stability analysis with the energy method

Example 2.4
To see how the energy method can be used for stability analysis, let us first
consider the Forward Euler scheme (2.4). Denote the discrete maximum norm

||un ||∞ = max |uni |.


0≤i≤J

Under the condition 0 < 2µ ≤ 1, we see that

|un+1
j | = |(1 − 2µ)unj + µunj+1 + µunj−1 |
≤ (1 − 2µ)|unj | + µ|unj+1 | + µ|unj−1 | ≤ ||un ||∞ .

Taking the maximum of both sides with respect to j, and using the induction
method, we obtain

||un+1 ||∞ ≤ ||un ||∞ ≤ · · · ≤ ||u0 ||∞ ,

i.e., the explicit scheme is stable under the condition 0 < 2µ ≤ 1.

Example 2.5
Now let us consider the Backward Euler scheme (2.8). Using inequality

|a − b| ≥ |a| − |b|,
20 Computational Partial Differential Equations Using MATLABr

we have

|un−1
j | ≥ (1 + 2µ)|unj | − µ|unj−1 + unj+1 | ≥ (1 + 2µ)|unj | − 2µ||un ||∞ . (2.16)

Taking the maximum of (2.16) with respect to all j, we obtain

||un−1 ||∞ ≥ (1 + 2µ)||un ||∞ − 2µ||un ||∞ = ||un ||∞ ,

which shows that the scheme (2.8) is unconditionally stable.

Example 2.6
Finally, let us consider the CN scheme (2.9). We will use a different energy
method for the stability analysis. Let us denote the inner product
J−1
X
(v, w)h ≡ (△x)vj wj ,
j=1

and its associated norm


1/2
||v||h ≡ (v, v)h .
Furthermore, to simplify the analysis, we introduce the following difference
operators:

δx vj+ 21 ≡ vj+1 − vj , δx2 vj ≡ δx · δx vj = δx vj+ 21 − δx vj− 12 = vj+1 − 2vj + vj−1 .

Using operator δx2 , we can rewrite the CN scheme (2.9) simply as: For any
j ∈ [1, J − 1], n ∈ [1, N ],
!
unj − un−1
j 1 2
un−1
j + unj
= δ . (2.17)
△t (△x)2 x 2

Using the definition of δx2 and condition v0 = vJ = 0, we easily see that


J−1
X J−1
X J−1
X J−2
X
vj δx2 vj = vj (δx vj+ 21 − δx vj− 12 ) = vj δx vj+ 12 − vj+1 δx vj+ 12
j=1 j=1 j=1 j=0
J−1
X J−1
X
= (vj − vj+1 )δx vj+ 21 = − δx vj+ 12 · δx vj+ 21 ,
j=0 j=0

which leads to the following useful lemma.

LEMMA 2.1
Under the assumptions v0 = vJ = 0, we have
J−1
X J−1
X
vj δx2 vj = − δx vj+ 12 · δx vj+ 21 . (2.18)
j=1 j=0
Finite Difference Methods for Parabolic Equations 21

Multiplying (2.17) by △t△x(unj + un−1j ), then summing up the result over


j = 1 to j = J − 1, and using Lemma 2.1, we have
J−1
! n−1 !
n 2 n−1 2
X
2
un−1
j + unj uj + unj
||u ||h − ||u ||h = 2µ △x δx ,
j=1
2 2
 
J−1
X un−1
j+ 21
+ unj+ 1
= −2µ △x | δx  2  2
| ≤ 0,
j=0
2

which leads to
||un ||2h ≤ ||un−1 ||2h ≤ · · · ≤ ||u0 ||2h .
This proves that the CN scheme (2.9) is unconditionally stable.

2.3.1.3 Truncation error analysis


Below, we want to study the truncation error of (2.11). Since the scheme (2.11)
is symmetric about the point (xj , tn+ 12 ), we can consider the truncation error

n+ 12 u(xj , tn+1 ) − u(xj , tn )


T Ej ≡
△t
x x x x
θD D u(xj , tn+1 ) + (1 − θ)D+ D− u(xj , tn )
− + − 2
. (2.19)
(△x)

By the Taylor expansion, we obtain

(△t)3
u(xj , tn+1 ) − u(xj , tn ) = [△tut + ut3 + · · · ](xj , tn+ 12 ),
24
and
x x x x
θD+ D− u(xj , tn+1 ) + (1 − θ)D+ D− u(xj , tn )
(△x)4 n+ 1
= [(△x)2 ux2 + ux4 + · · · ]|j 2
12
1 (△x)4 n+ 1
+(θ − )△t[(△x)2 ux2 t + ux4 t + · · · ]|j 2
2 12
1 2 2 n+ 1
+[ (△t) (△x) ux2 t2 + · · · ]|j 2 .
8
Substituting the above expansions into (2.19), we obtain

n+ 12 1 (△x)2 n+ 1 (△t)2 (△t)2 n+ 1


T Ej = −[(θ − )△tux2 t + ux4 ]|j 2 + [ ut3 − ux2 t2 ]|j 2
2 12 24 8
1 1 n+ 1
+[ ( − θ)△t(△x)2 ux4 t ]|j 2 + higher-order-terms, (2.20)
12 2
22 Computational Partial Differential Equations Using MATLAB
n+ 1
which shows that T Ej 2 goes to zero as t and x go to zero. Hence the
scheme (2.11) is consistent for any θ, t and x. Furthermore, for any θ = 12 ,
the scheme has 1st-order accuracy in t and 2nd-order accuracy in x, since
n+ 1
T Ej 2 can be simply written as
n+ 12 1
T Ej = O(t + (x)2 ) when θ = .
2
When θ = 12 , (2.20) can be simplified to
n+ 12 (x)2 (t)2 n+ 1
T Ej = −[ ux4 + ut3 ]j 2 + higher-order-terms
12 12
= O((t)2 + (x)2 ).

2.3.1.4 An unconditionally unstable scheme


Here we would like to mention an interesting scheme for solving (2.1):
un+1
j − un−1
j unj+1 − 2unj + unj−1
= , 1 ≤ n ≤ N − 1, 1 ≤ j ≤ J − 1, (2.21)
2t (x)2
which is obtained by approximations
ut (xj , tn ) ≈ (un+1
j − un−1
j )/(2t),
uxx (xj , tn ) ≈ (unj+1 − 2unj + unj−1 )/(x)2 .
First, the truncation error of this scheme at (xj , tn ) is
u(xj , tn+1 ) − u(xj , tn−1 )
T E(xj , tn ) ≡
2t
u(xj+1 , tn ) − 2u(xj , tn ) + u(xj−1 , tn )

(x)2
(t)2
= [ut (xj , tn ) + ut3 (xj , tn ) + · · · ]
6
(x)2
−[ux2 (xj , tn )+ ux4 (xj , tn ) + · · · ] = O((t)2 +(x)2 ) → 0,
12
when x, t → 0. This shows that the scheme is consistent.
To study its stability, we substitute unj = λn eik(jx) into (2.21), and we
obtain
λ − λ1 eikx − 2 + e−ikx −4 sin2 12 kx
= =
2t (x)2 (x)2
or
1
λ2 + (8μ sin2 kx)λ − 1 = 0,
2
from which we see that the two real roots λ1 and λ2 should satisfy
λ1 · λ2 = −1.
Finite Difference Methods for Parabolic Equations 23

Hence the magnitude of one root must be greater than one no matter how
you pick △t and △x, in which case we say that the scheme is unconditionally
unstable! This warns us that we need to be careful when we develop a finite
difference scheme. It is not just simply putting any combinations of difference
approximations together.

2.3.2 Some extensions


In this section, we continue developing the finite difference schemes and sta-
bility analysis for more general 1-D parabolic equations. More specifically, we
demonstrate how the previously introduced techniques be extended to equa-
tions with lower-order terms, variable coefficients, more general boundary
conditions, and nonlinear terms.

2.3.2.1 Influence of lower-order terms


First, let us consider the governing equation (2.1) augmented by some lower-
order terms:
ut = uxx + aux + bu, (2.22)
where a and b are constants.
We can construct an explicit scheme
un+1
j − unj unj+1 − 2unj + unj−1 unj+1 − unj−1
= + a + bunj . (2.23)
△t (△x)2 2△x
Using the same stability analysis as in previous examples, we can obtain
the amplification factor
1 a△t
λ = 1 − 4µ sin2 k△x + i sin k△x + b△t,
2 △x
which gives
1 a△t 2 2
|λ|2 = (1 − 4µ sin2 k△x + b△t)2 + ( ) sin k△x.
2 △x
For model problems with lower-order terms such as (2.22), we need to relax
the stability condition |λ| ≤ 1 to
|λ(k)| ≤ 1 + M △t, for any wavenumber k, (2.24)
where the positive constant M is independent of △t and k. Equation (2.24)
is often called the von Neumann condition [11, p. 144]. Hence, under the
condition 0 < 2µ ≤ 1, we have
1 1
|λ|2 = (1 − 4µ sin2 k△x)2 + 2(1 − 4µ sin2 k△x)b△t
2 2
+b2 (△t)2 + a2 µ△t sin2 k△x
 2
1 1
≤ 1 + 2|b|△t + b2 (△t)2 + a2 △t ≤ 1 + ( a2 + |b|)△t ,
2 4
24 Computational Partial Differential Equations Using MATLABr

which yields (2.24). Hence, the added lower-order terms do not change the
stability condition imposed on the explicit scheme for (2.1).
It is easy to check that the truncation error of (2.23) is
t x x
D+ u(xj , tn ) D+ D− u(xj , tn ) u(xj+1 , tn ) − u(xj−1 , tn )
T Ejn = − −a −bu(xj , tn )
△t (△x)2 2△x
= O(△t + (△x)2 ).

2.3.2.2 General boundary conditions


Next let us see how to deal with a general boundary condition such as

ux = a(t)u + b(t), at x = 0. (2.25)

One simple scheme for discretizing (2.25) is:

un1 − un0
= an un0 + bn , an ≡ a(tn ), bn ≡ b(tn ), (2.26)
△x

which coupling with a difference scheme such as (2.4) or (2.8) yields all the
numerical solutions uni .
Another popular way to discretize (2.25) is the so-called ghost point tech-
nique:
un1 − un−1
= an un0 + bn , (2.27)
2△x
where un−1 denotes the approximate solution at the grid point to the left of
x = 0, which is outside of the physical domain. In this case, we need to
assume that the scheme (2.4) or (2.8) holds true for j = 0, then solve it
together with (2.27) for the numerical solution. Note that the scheme (2.27)
is more accurate than (2.26).

2.3.2.3 Variable coefficients


In this subsection, we show how to construct and analyze difference schemes
for the variable coefficient parabolic equations through two examples.

Example 2.7
A general parabolic equation in self-adjoint form is

ut = (a(x, t)ux )x , (x, t) ∈ (0, 1) × (0, tF ), (2.28)

where the function a(x, t) > 0. A nice way to discretize (2.28) is to use central
difference twice to approximate the derivative with respect to x, i.e.,
un n
j+1 −uj un n
j −uj−1
(aux )nj+ 1 − (aux )nj− 1 anj+ 1 · △x − anj− 1 · △x
(aux )x |nj ≈ 2 2
≈ 2 2
,
△x △x
Finite Difference Methods for Parabolic Equations 25

from which we obtain the explicit scheme

un+1
j − unj 1
= [an 1 (un − unj ) − anj− 1 (unj − unj−1 )], 1 ≤ j ≤ J − 1,
△t (△x)2 j+ 2 j+1 2

(2.29)
where we denote anj± 1 = a((j ± 21 )△x, n△t). In practical implementation, it
2
is better to rewrite this scheme as follows:

un+1
j = µ[anj+ 1 unj+1 + anj− 1 unj−1 ] + [1 − µ(anj+ 1 + anj− 1 )]unj , (2.30)
2 2 2 2

△t
where we recall the notation µ = (△x)2 .
Note that under the condition
△t 1
amax · ≤ , amax = max a(x, t), (2.31)
(△x)2 2 (x,t)∈[0,1]×[0,tF ]

all the coefficients on the right-hand side of (2.30) are non-negative. Hence
from (2.30) we have

|un+1
j | ≤ µ[anj+ 1 + anj− 1 ] max(|unj+1 |, |unj−1 |) + [1 − µ(anj+ 1 + anj− 1 )]|unj |
2 2 2 2
 
n n n n n n
≤ µ[aj+ 1 + aj− 1 ] + [1 − µ(aj+ 1 + aj− 1 )] ||u ||∞ = ||u ||∞ , (2.32)
2 2 2 2

where we used the notation ||un ||∞ = max0≤i≤J |uni |. Taking the maximum
of (2.32), we immediately have

||un+1 ||∞ ≤ ||un ||∞ ≤ · · · ≤ ||u0 ||∞ ,

which shows that the scheme (2.29) is stable under the constraint (2.31).

Example 2.8
A more general linear parabolic equation is represented as

ut = a(x, t)uxx + b(x, t)ux + c(x, t)u + d(x, t), (2.33)

where we assume that a > 0 and b > 0. For the convection-dominated


problem (i.e., b ≫ a), to avoid numerical oscillation, the upwind differencing
is preferred: when b > 0, use forward difference for the ux term; otherwise, use
backward difference for ux . For (2.33), the upwind difference scheme becomes:

ujn+1 − unj unj+1 − 2unj + unj−1 unj+1 − unj


= anj 2
+ bnj + cnj unj + dnj , (2.34)
△t (△x) △x

where we denote anj ≡ a(xj , tn ). Similar notation is used for other functions.
Exploring the Variety of Random
Documents with Different Content
But the complications do not finish with the problem of the
mother-in-law. There is the other problem which arises when the
candidate for marriage has lost his first wife, or the woman her first
husband, or both of them their first partners, with or without
children on one side or on both sides.
The possible combinations are these:
Widow and widower
without children.
with children.
of the man.
of the woman.
of both.
Widower
without children.
with children.
Widow
without children.
with children.
These various combinations are so many algebraical formulæ in
which one may find snares, dangers to happiness, and rancour
without end.
If you are a widower and you marry a widow, and neither of you
have children, no danger hangs over you. Liberty on both sides, no
right nor pretext for intervention; marriage presents itself almost in
the guise of an union between two young people.
You may indeed incur the danger of your wife making
comparisons, and these not to your advantage. An old proverb says,
Comparisons are odious, but I should like to make a correction and
add that for him to whom they are unfavourable they are odious, but
flattering to him who gains by them. Perhaps you may excel your
predecessor, and your companion will be happy to find it so.
In any case, if you have your weak side inquire about the public
and private virtues of the first husband, and put the results into the
balance which must weigh the pros and cons of the marriage.
A widow and a widower may both have children, or one only may
have them. The dangers in these cases are very different.
It is better for the wife to have them, for if the husband really
loves her he will also love her children; and besides, being a man, he
is less at home, and paternity is always an episode in his life and not
the whole life, as maternity is with the woman. Then if the man has
the good fortune not to have children he will often end by loving his
wife’s as much as though they were his own.
In the case of there being children on both sides the balance may
prove of advantage, because it is equal in weight and measure, and
the two married people have cause to reproach themselves and to
suffer for the same things.
The worst case is that of a widower with children to whose
number the new wife adds; he must be an angel, his wife and
children angels also, if no civil war breaks out in his house. Think of
it well, think a hundred times. Do not complicate the marriage,
already fraught with so many dangers, by imprudence and temerity.
In marriages between a widow and a widower the greatest danger
arises from the children, who fear or see their future threatened,
and who in their love for their lost parent believe the new marriage
to be an outrage to the memory of the dear one.
It is in these cases that we see all that a man has of venom and
baseness come up and soil and cover everything with defilement and
poison; all the brutal possibilities of human egotism covered, it may
be, with varnish but still the skeleton underlying every thought and
feeling.

Only one of the engaged persons may be widow or widower, and
it is greatly to the honour of women that more men marry a second
time than women. Man often finds more happiness in marriage than
she does, while she is more faithful to the memory of the departed,
and thinks more of her children than herself.
How many women I have known who, being left widows quite
young, have sacrificed themselves, together with the need of loving
and being loved, to their children, often to one alone; proud of their
sacrifice, unconquerable against all temptations and against all the
power of the most legitimate passions.
Do children know how to value this heroism hidden in the bosom
of so many families? Do they understand that there is more courage
required in this struggle of months and years than one day’s assault
of a battery in battle?
Very rarely do they know it, for even the best of children do not
return a hundredth part of the love they have received from their
parents, and especially from their mother.

Is happiness more easily to be found in the union of a widower
and a young woman, or in that of a widow and a celibate?
The answer is difficult, for the problem is too vague, and individual
qualities weigh too heavily in the balance, gradually modifying the
surroundings, the affections now warding off dangers, now
increasing them infinitely.
If other conditions be favourable the widow is generally an
excellent wife for many reasons: She has lost many illusions, but has
learned to know and excuse the egotism of man. Sometimes she will
have been obliged to beg her first husband’s pardon for some
accession of jealousy or caprice; and as a woman always occupies
herself in everything more with other people’s happiness than her
own, she wishes to give her second husband perfect bliss, and often
and willingly succeeds. If she cannot offer her companion the
virginal flower (which after all is more a myth than a real jewel) she
can give him all the treasures of amorous experience, that is often
worth more than a hundred virginities.
On the other hand the widower who marries a young woman has
the great advantage of her not being able to make any odious
comparisons, and he also brings precious gems to the new home
which an unmarried man does not know or possess. He has learned
to know all the little weaknesses and great virtues of woman, he has
learned to become less egotistical, to think of others more than
himself, and as separate from himself, and he generally is an
excellent husband.

In all intricate problems, in all the fatal confusions which present
themselves in the marriage between widows and widowers, between
widows, widowers, and celibates, the anchor of safety which saves
from shipwreck is always the heart. When there is great love, and it
is shared by two, who join hands forever, every difficulty is cleared
away, and concord ends by hoisting its banner over the new house.
The most ferocious hatred is conquered by generosity, by the
indulgence of one who loves much, and after a short battle of the
opposing forces love scatters its flowers and blessing over the new
nest. Love is the strength of strengths, which surpasses all others,
and in this case it is omnipotent, so that when it exists in all its
proper energy on one side only, it absorbs all the minor energies,
and on the fields threatened with hail and lightning the sun shines
through the last drops of the beneficent rain, and the rainbow hangs
its multicoloured bridge in the sky, drawing enemies nearer and
making them allies.

Of all the accidents which we may meet on the threshold of
matrimony one of the most common is the stoppage of the way by
someone who exclaims: “Halt! there is no passage here.”
You are a minor, or your loved one is, or the person who has the
right to speak does not find your choice to his taste, and shuts the
door of the temple you wish to enter in your face, securing it with
many chains. Civil war is declared, and it is to be seen who can and
ought to gain the victory.
This can and ought are not synonymous terms, because the
parents on one side or the other can withhold their consent to your
union, but many times they are in the wrong, and ought not to
refuse to sanction the marriage.
As regards two lovers, if their love is sincere, if in their secret and
confidential dialogues they have sworn the everlasting yes to each
other, if they have nearly conjugated half of the verb to love, they
believe that they have every right in the world to become husband
and wife; and when they have tried all fair means to bend the will of
the tyrant or tyrants they run away together, secretly, hoping that
once the deed is done it will sooner or later receive the consent of
those opposing it. Sometimes, however, the wandering sheep are
discovered before the deed is consummated, and are re-conducted
with many reproaches to their respective folds. In more serious
cases spectres of single or double suicide, asphyxiation, poison, or
the revolver may appear.
Should anyone find himself in such case meditating death, and
have time to cast a look on these pages, let him leave the charcoal,
the poison of the druggist, and the revolver of the armourer. Life is a
good and beautiful thing that must be guarded with love, caressed
with tenderness, and if love ought to be the bridegroom of the
marriage, reason and good sense ought always to be present as
witnesses.
If with a stroke of a magic wand one could raise all those who
have committed self-destruction to life again, after having dressed
their wounds, they would take up life gaily, and even another love
affair.
Parents always have the duty and the right of speaking,
protesting, and counselling, nay, even of interposing a veto, if they
see their children’s future endangered when they have chosen love
as arbitrator, but have forgotten to call good sense and reason as
witnesses.
If you will marry an abject creature who will dishonour your name
and the name of the family to which you belong, and of whom after
a few months of warm passion you yourself will be ashamed; if you
will marry a woman suffering from tuberculous disease, or one of a
consumptive family, or where madness is present; if you will
increase the sad patrimony of proletaries and the unemployed,
having neither present nor future resources; if in one way or another
you throw yourself with closed eyes head foremost into a bottomless
abyss only to satisfy carnal excitement which you may call passion,
but which is only the desire of the flesh—father and mother have full
right to oppose your ruin with all possible means; and even if they
should not succeed they will have done their duty. If the means they
take succeed you will later on thank them with a warm gratitude.
In all these cases I allow you to combat, to weep, even tear out
some of your hair; but the tears over, the muscles tired, gather up
the hair you have torn out and present it to your fair one, telling her
to keep it until your return as a pledge of your eternal faith; for you
ought to leave, and that instantly, even on foot, even asking money
of the tyrannical parents or of some compassionate friend. Travel in
far countries, and who knows if on your return you will not find a
neat little packet tied with rose-coloured ribbon—your letters, your
hair, and perhaps the announcement of the marriage of your old
fiancée.
If your love, instead, has known how to resist the long absence, if
it has strengthened and grown, who knows if the hard parents will
not be moved to pity and try to make an adjustment, provided,
however, that there be no consumption, madness, or other
calamities to dissuade you from marriage in an absolute and decided
way. Better that you should die than sow death broadcast in future
generations.

There are some cases, however, in which the wrong is not yours,
but is theirs who unreasonably and tyrannically oppose your
happiness from prejudices of rank, avidity of money, or some caprice
or other. If you are a count or marquis and love a girl of good family
without a coat of arms, or if you are very rich and wish to marry an
educated girl of angelic character, but who is not rich—in these and
similar cases seek the help of your mother, who is nearly always
more compassionate than your father, or ask counsel and help from
some intimate friend, from one of the few who knows your heart like
a book, and has never flattered you.
In these domestic contests it is very rare for right and reason to
be on one side only; there is a little on this side and a little on that;
your hands are too unsteady to hold the balance of justice steadily,
and weigh with precision the pro and the con. Your mother, instead,
who loves you as no one else can (not even your lover), and your
friend who knows you well, see things from a dispassionate and
calm point of view, and will judge justly whether you are right or
wrong; and if you are neither mad nor a fool you will end by
believing those who love you and desire your good; and, as the case
may be, stand firm and you will win. The ancient Greek appealed
against Philip, the modern miller appeals against Berlin, and both
were right against Philip and against Frederick the Great. Your
mother and friend will appeal to you not to fast entirely from love,
but to be a little less hungry, and who knows but that they will end
in being right against that king of kings Love—stronger than the
father of Alexander the Great, greater than Frederick the Great.
If they really love you, and are persons of good sense, they will
say neither No! nor Never! to you, but will content themselves by
saying, Have a little patience; wait.
Time is the chief and capable corrector of the proof sheets of the
sketches of love, as also the policy of Fabius the temporizer, who
knew how to gain so many wars by skirmishes and battles.
The stone of comparison enables us to distinguish gold from
ignoble metal; time teaches us to separate with certainty true love
from the desire of the flesh, from the fussy exactions of self-love and
all that is plated. And perhaps, besides your mother and friend, you
will listen to the long experience of him who writes, and will hear his
voice, which says to you, cries to you, supplicates you:
Let time take its course, ever and always.
CHAPTER IX.
HELL.
I am sitting in a restaurant in the town of ———, at the seaside. It
is the height of the bathing season, the carnival of salt and fresh
water, and the whole world is forgetting the labour and
unpleasantnesses of city life for a few weeks.
I am waiting for my breakfast, seated at a table just outside the
house, under an arbour of vines and convolvulus. The sea breeze
reaches me, plays with my tablecloth and sports with my hair,
uniting itself to the perfume of flowers which peep up, red, white,
and violet, happy also in the midst of all the sunshine, greenery, and
freshness.
Nearly all the tables, scattered about under the arbours or in the
shade of the trees, are surrounded by happy people who have just
taken their baths, fresh, with disordered hair, hungry and merry.
Even human life has its good quarters of an hour.
Near me I see a teacher to whom two girls of about ten and
twelve have been intrusted, and who, faithful to her trust, is giving
them a noisy lesson in morality and gallantry, whilst she eats and
drinks as if she were starving. I cannot imagine how she does it, but
she manages not to interrupt her educational discourse, whilst she
never ceases to eat and drink. The pupils do not listen to her, but
look at each other, slyly laughing at the inexhaustible conversation of
their instructress. A little further off there are three young fellows
who, having passed their examinations well, have been rewarded by
a visit to the seaside. They are laughing, noisy, and giddy with
youth, thoughtless, envying no living soul. One of them has just
finished his breakfast, and in order to pay his bill of one franc fifty
centimes he brings out a red banknote of a hundred francs, and
offers it to the waiter with great pride, and in such a way that
everyone can see it. It is the first he has ever had, and already that
morning he has offered it at the coffeehouse to pay fifteen centimes,
and at the baths to pay for his ticket of fifty centimes. No one would
change it, and even the waiter says he has no change; and the
young fellow is happy, for he will be able to display it a fourth, a
fifth, and even a sixth time.
Facing me a whole family of some seven or eight persons are
eating merrily, and the children, in a chromatic scale of bright
colours and different heights, range from two to fifteen years. Each
one is giving utterance to its joy, clambering up and down the chairs,
playing with a little dog to which they give the tid-bits on their
plates. The father is red, stout, and in his shirt sleeves; he looks
smilingly at his blond companion, reading in her smile the reflection
of all that lisping chatter, laughter, and folly which surround them.
All these people, differing in age, condition, and intellect, unite in
the same merriment, which they seem to have drawn from the sea,
the father of planetary life, the dispenser of spirit and energy; and
all the while the golden rays of the sun shine through the vine
leaves, the ivy, and convolvulus, painting with the shade and
penumbra of the leaves the tablecloth, the dresses of the women,
and the rosy faces of the children, throwing patches, half shades,
and glistening spots on the garden sand.
I, too, a solitary observer, enjoyed all the bright sunshine and the
happiness of the people, but forgot that I had only looked to the
right and straight before me; I turned calmly to the left, sure of
finding there another scene of joy and brightness.
On the contrary, the picture was very different.
At a table just as clean and white as the others, played on
capriciously by light and shade, two persons were sitting, a man and
a woman.
He was about thirty, she forty-five. He was handsome, robust,
with manly energy; she lame, fat, and hunch-backed. There ought to
have been a neck, but there was none to be seen, for the heavy
head appeared to have been put on the chest awry; and all the cruel
artifices resorted to for hiding the hump behind seemed made on
purpose to produce another in front. Even her features were ugly,
and the ill-made hands were laden with rings. Large earrings were in
her ears, and a colossal locket surrounded by diamonds, inclosing
the man’s portrait, was hanging in front. Husband and wife, no
doubt.
She was eating, but could not have known the flavour of the food,
for the mouthful went round and round between her teeth, whilst
another piece on the fork was waiting in vain for its turn to enter the
mouth. That poor deformed being did not cry, that is, no tears fell
on her cheeks, but she blew her nose every now and then, and the
eyes were moist and sad. She placed the fork automatically from
time to time on the plate, with the mouthful still on it, and gazed at
the man lovingly, tenderly, waiting, imploring for a look.
But the look never came. With one hand he hastily conveyed the
food to his mouth, and with the other held a newspaper, which he
was reading with pretended interest, so as not to have the silence
interrupted. He did not shed tears nor blow his nose, but he
frowned, and he was also suffering one of those intense and hidden
agonies to which one does not confess, but which furrow the soul
like harrows of steel.
I did not remove my eyes again from that dumb and agonizing
scene.
After a long interval she said to him, timidly, hesitatingly, almost
as if committing a crime:
“Will you take anything else?”
He started as if the voice had struck him like a blow in the face;
he turned to her and twisted his mouth like one seized with a
sudden and irresistible disgust.
“No, I want nothing more.”
The No was pronounced angrily and with scorn; it was, and must
have been, a blow to her to whom it was addressed. He looked at
her a long time, a look full of hatred, remorse, and disgust. It
seemed as if he were passing in review all his companion’s ugliness,
and as if until that moment he had never seen it so clearly: those
wrinkles, that gray hair, that hump, the deformed neck, those arms
which looked like hams in sacks, and then those rings and jewels
which seemed to jeer at the white, flabby flesh with their brightness.
The deformity, the grotesque violation of good taste, suddenly struck
that handsome and robust man, for he had sold youth and manhood
to an unfortunate woman who had believed it possible to still love
and be loved.
The two had plunged into the waves of the sea a little before;
they had drunk of the sun’s rays too, but neither sea nor sun had
been able to give happiness to these unfortunate creatures who had
bartered carnal pleasures for gold, who had changed sacred love to
a vile prostitution of flesh and banknotes.
She had already passed the meridian of her second youth; he was
still young.
She was undressing. He was already in bed, and followed the
progressive unclothing of that body with an anxious curiosity, that
body once so active, so handsome and fascinating, now all
submerged in the high waters of an invading corpulence.
He wished to hide his head under the counterpane, and did so,
but a morbid curiosity made him put out his head again directly, and
he looked.
She had read in her glass only too well the ruin of her form, and
had always sought to undress alone; but this time she was obliged
to do it before his eyes. She ingeniously hid the regions which had
most suffered wreck, and with a remnant of coquetry kept
uncovered her shoulders, the ultimum moriens in the woman’s body;
but diffident of herself, and fearful of those looks which seemed to
pierce her through, her last garment fell from her hands to her feet,
and the disasters of the wreck suddenly appeared, standing out
cruelly, without pity for her or for him.
She uttered a cry and stooped down to cover herself....
He, egotistical, pitiless, forgot all the delights that this body once
so fragrant of youth and beauty had given him, and exclaimed,
throwing the words in her face:
“At a certain age I think a little more modesty is demanded.”
From that moment, from that evening, the two were enemies, two
galley slaves bound by the same chain.

She was reclining, rather than seated, on the sofa, with small and
large cushions, which allowed her to change the frame of which she
was the picture. She was smoking a cigarette, and had a French
novel on her knee that could not have interested her very much, for
at that moment she yawned. The yawn was cut short, or rather
interrupted, by the sudden opening of the sitting-room door; no one
ever entered the room in that way but him. This time it was more
like him than usual: always a husband, now an angry one.
He entered with his hat on his head, his stick in his hand, as if he
were just going out or had just come in. The latter was the case. On
returning from his walk a large envelope had been put into his hand
in the anteroom. It contained a dressmaker’s bill, the third or fourth
he had received in a few months. The total was very high, higher
than usual, and he came into the room with the bill in his hand to
make a scene.
“Come, now, come, now, my lady, when shall we finish with these
accounts?”
She made no answer, but continued to smoke, only growing a little
red in the face.
“It seems that my lady believes herself to be a millionaire; this is
the third bill that I have had to pay in little more than four months.
But what game are we playing, my lady?”
And my lady, throwing the end of her cigarette on a Japanese
tray, stretched out her voluptuous limbs, and showed, as if by
chance, a fairy-like foot and a leg for a sculptor. More than once
already had the disclosure of such a picture, sacred to love, warded
off a heavy storm. Now, however, neither foot nor leg could disarm
her husband, who had thrown his stick on a chair, but kept on his
hat, to increase the violence of his words and to give authority to his
threats. In the meantime he rumpled and then folded the innocent
paper with alternate convulsive movements.
“I shall not pay this bill; you must pay it yourself. You have jewels
(given by me, of course); put them in pawn. You will then learn not
to play the princess with other people’s money.”
The little foot and leg retired under the dress, ashamed of their
defeat, and at last the lady opened her mouth too:
“I think you can hardly expect me to cut a sorry figure in society.”
“But what society? Society of Egypt! Many ladies who are more
truly ladies than you don’t spend half what you do. I have inquired
and know very well.”
“Yes, your Fifi told you, your Fifi, for whom you pay much larger
bills than you do for your wife.”
Never had his wife uttered the name of the stage dancer until that
moment, and he had believed her to be quite ignorant of his
amours. He reddened up to his hair, frowned, and shook himself as if
he had been stung by a viper, and the conversation became
embittered even to brutality.
“Ah! jealous, and impertinent too! It seems to me that when one
has not brought a halfpenny of dowry there ought to be a little more
modesty and economy.”
“Good, very good, sir! I have brought youth and beauty as a
dowry, and a dowry besides; yes, you insolent man, a good dowry, a
large sum which was lost in the failure of the Bank of Turin. And is
that my fault? And you, what have you brought me? A bald head,
false teeth, and a body eaten through with vice—a fine patrimony,
truly.”
“Ah, you had a dowry, had you? I have never seen it; the only
treasure I have seen is the gold with which your teeth are stopped.
Sell that and pay the dressmaker’s bill with it.”
The bill flew in the air and fell at the woman’s feet.
The husband went out of the room, slamming the door so loudly
as to make the little Japanese figures and the other bric-a-brac on
the table tremble. And the wife, lighting a fresh cigarette, set to,
with all the force of her intellect, to invent some revenge worthy of
the insult received.
She was alone in her boudoir, seated before a writing table of
ebony inlaid with ivory. She wrote rapidly and smiled to herself, as
one smiles when one is writing to one beloved, and saying a saucy
thing flavoured with much tenderness.
Nothing was heard in the room but the soft and rhythmical
scratching of the steel pen on the paper. She was so intent on what
she was writing that she had not heard someone raise the portière,
enter the room, and stand before her.
That someone was not the person to whom she was writing, for
raising her graceful head for a moment as if to seek an adjective
more merrily saucy to put with the others, she saw her husband,
whom she believed was out, standing before her.
She uttered a startled cry, and unconsciously covered the paper
she was writing on with her right hand.
“Ah, is it you? How you frightened me!”
“Another time I will have myself announced.”
These words were said without anger, and with a serene
calmness; but a diabolic irony played round the mouth.
The smile gradually converted itself to a real laugh, to which the
nodding head seemed to beat time.
“Perhaps you were writing to Count B. Who can write the better,
you or he? His letters are pretty, very pretty! How much passion—
no, passion is not a fit word, it is too flattering; let us say sensuality,
lasciviousness, debauchery. Which of these words do you find most
suitable?”
The lady had become white as death. The pen fell from her hand
and made a large blot on the elegant paper.
But the husband, continuing to laugh, had approached her, and
having drawn a chair to the writing table, stroked her hair lovingly.
“You were afraid; but of what? You think, perhaps, that I am come
to make a scene, or perhaps to kill you, and then myself after. No,
no; I only like double suicides on the stage or in novels, provided the
author of the book or the drama has talent. But here, why stain this
beautiful Persian carpet with your blood, why scatter mine over the
elegant paper you were covering with your words of love? It would
really be a pity, a crime, and above all a folly. I am come to make a
compact,” and he laid a long kiss on the little fair curls at her neck.
It seemed to the lady as if that kiss burnt her like a red-hot iron.
She withdrew her head and gazed at her husband with glassy
eyes, petrified with astonishment.
No, he had not really the look of an assassin. He was calm,
cheerful, like a good-tempered fellow who was playing an innocent
joke, a very innocent one.
“Give me a cigarette. The air is heavy with the odour of your
cigarettes! They must be very good ones. Probably Count B. brought
them for you from Constantinople?” He did not wait for her to give it
to him, but took one himself from a bronze bowl and lighted it. “I
told you, then, that I was come to make a compact with you, a
compact of purchase and sale, in which we shall both gain
something. Look!”
And here the husband took out of the pocket of his greatcoat a
perfumed packet of letters tied with a golden cord.
“I have a treasure here! the entire and complete collection of all
the letters the count has written you. Not one is missing! The lady’s
maid you dismissed last week made me a present of them, gave
them to me for nothing. There are a hundred and thirty, written in
three months! How much will you give me for this treasure?”
The lady, being suddenly reassured that her husband’s intentions
were not homicidal, looked at him with a gaze full of contempt and
cruelty. She no longer felt fear or remorse. She could have wished at
that moment that the letters might have been not from one lover
only, but from ten, a hundred, and that each one could strike him
and spit in his face. She began to laugh too.
“Bravo! capital! you are a man of spirit. Give me a kiss!”
And the kiss was given, a faithful copy of the one that Judas gave
Christ nearly twenty centuries ago.
“I will give you a thousand francs!”
“Oh! oh! oh!”
And here followed a long and loud laugh.
“A thousand francs! a thousand francs! What are you thinking of?
I want ten thousand francs, not a penny more or less. If not, I will
give them to your father for nothing, only reserving two or three of
the most lascivious to publish in the papers. Do you agree?”
“Give them to him if you will. I shall say that you wrote them, that
they are false. My father esteems me highly.”
“Um! Your father is not a fool, and the writing of the count is not
forged. I want ten thousand francs!”
“I will give you five.”
“No; it is too little. I must pay Nina’s milliner’s bill, and I want to
go to Paris.”
“I will give you six.”
“No, ten. Not a penny more or less.”
“Very well; I will give you ten thousand francs. Give me the
letters. Swear that they are all here!”
“Look at the dates. They are really all here. They are numbered
too by the count, with red ink, perhaps with his blood.”
And here there was a loud laugh.
“When you bring me the ten thousand francs I will give you the
letters, not before.”

The compact was made, the letters were returned, the sum was
paid.
The husband paid Nina’s milliner’s bill, and has gone to Paris.
Indeed, he has already returned and is still living in the house of his
wife, with whom he hopes soon to be able to negotiate a new
ransom.
And she?
She has a new lover to whom she never writes and from whom
she will not receive any letters. When he complains of this strange
proceeding she throws her arms round his neck and, kissing him,
says:
“Is it not better, dear, to have a kiss the more and a letter the
less?”
And the husband has waited a long time in vain, hoping to
discover a new packet of perfumed letters, tied with a golden cord,
all marked in progressive numbers, written with red ink, perhaps
with blood.
CHAPTER X.
PURGATORY.
But few marriages are a hell, and fewer still enjoy the highest
beatitudes of heaven; the most stand halfway between the two—
that is, in purgatory. There they live without redemption, which
means without any hope of mounting to heaven; but neither have
they any fear of being hurled down among the fallen angels. After a
more or less lengthy honeymoon they descend gradually to earth,
now walking amongst nettles and thorns, now amongst the
flowering beds of the garden, to remain there till death.
To describe all the forms and accidents of this conjugal purgatory
would be to exhaust the human universe. It is enough for me to
present some scenes taken from life, so that you can judge of the
rest from these examples.

It is eight o’clock in the morning; he has been awake for some
time; she is sleeping soundly and sweetly.
He had been quiet and silent for more than an hour, reading the
paper, smoking a cigarette, looking at his wife with the fond hope
that she may wake up of herself, but in vain.
Then he coughed several times, used his handkerchief without
needing it, shook the bed, but in vain.
The waiting had become impatience; impatience had changed to a
troublesome, insupportable agitation.
Then he gave her a sweet, light little kiss on her lips. She woke
with a start and stared at him—he who had expected a smile or an
answer on a par with the question.
“How you frightened me! Why did you wake me so suddenly?”
“I thought my kiss would have pleased you, and hoped to wake
you gradually without giving you a shock.”
“But you know—you know very well that for some time past
waking me in that way has hurt me. It gives me palpitation of the
heart, and then I feel ill all day.”
“I have been awake since six o’clock, and have had the patience
to wait two hours for you to wake; you have slept nine hours.”
“And if I wish to sleep ten what have you to say against it? Do you
not remember that I worked like a dog yesterday, that I had to
attend to the house linen, put the drawing room in order, and then
went round to all the shops to find a good flannel for your vests?
You ruin my health, and will give me disease of the heart by your
nasty habit of waking me up so suddenly.”
“And how ought I to wake you? Teach me.”
“If I could teach you to have a little more consideration, if I could
cure you of your egotism, I would willingly do so; you only think of
yourself.”
The tone of the conversation on her part, at first slightly irritated,
had become angry, rancorous, and full of suppressed bitterness.
He felt it, but still hoped for a reconciliation.
He tried to feel her heart.
“Let me see if you really have palpitation of the heart.”
She turned her back on him angrily.
“Let me alone; after having done me harm you now want to joke.
I tell you you will finish by killing me!”
He turned away too, muttering under his breath and thinking sad
thoughts of that chemical combination called marriage.

“Listen, dear; I should like to dine an hour earlier to-day.”
“And why?”
“Because I eat nothing at breakfast and have a poet’s hunger.”
“I, on the contrary, have none at all. I eat too much.”
“But besides my appetite, I have another reason for wishing to
dine earlier. Do you know, I have promised my oldest and best
friend, Giovanni, to meet him at the station on his way to Rome?”
“Who knows that it is not a lady instead?”
“Come with me to the station and convince yourself.”
“Heaven defend me! I am not jealous.”
“A little! You are jealous six days in the week and seven times
every day. You are always so and always in the wrong.”
“But I tell you I believe you; I was only joking.”
“Very well, then, we will dine at five instead of six.”
“Impossible! Annina has brought home such a tough fowl that it
will require all the cooking in the world to have it ready by seven.”
“But I can do without the fowl!”
“But there is nothing else! Go another time to meet Giovanni—
when he returns from Rome, for instance.”
“He will not be returning by the same route. I know he has to go
back by Civita Vecchia and Genoa.”
“Well, anyhow, we cannot dine at five!”
“Ah! it is enough that I should ask a thing for you to find a
thousand and one difficulties to prevent you doing what I want. It
has been so ever since we were married, and will be to the end.”
“And you will always be that obstinate and infallible man who
wishes to command in housekeeping where the woman ought to be
mistress.”
“Go on, go on! Just because one wants dinner at five instead of at
six you have your usual reproaches for me. I know them by heart
already.”
“Yet it does not appear so, for you are incorrigible and will have
what you want at any cost, even if your wife’s or children’s health
has to suffer, or even if the sky fall.”
“Yes, yes, you are right; a tough fowl will kill you. For Heaven’s
sake do not let us have such pettiness.”
“But it is you who are petty, thanks for the compliment; if I am
petty you are egotistical, and ought not to have married.”
“And you ought not to have had a husband, you chatterer, you
intolerable scold!”
“Go on. Haven’t you some more gentle, nice adjectives; they are
so well suited to your delicate mouth?”
“Yes, I have a good many left; you are foolish and have no
common sense; you make a rope out of a thread of silk, and in
everything you find a pretext to make scenes and torment me, and
scatter gall on all you touch. Yes, you must be suffering from the
liver. Call in the doctor, you must have the jaundice.”
“It is you who have the jaundice, and to show you that you are
the most petty of the two I will be silent and go.”
“And I will go too, and will dine neither at five nor six, but at the
hotel. At least I shall not hear your ugly and impertinent voice there,
your chatter without sense, and I shall have an hour’s rest from the
infinite sweetnesses you scatter over the time when we are obliged
to be together.”
He is director of some large works. He is early at his desk, for it is
Saturday and he must balance the accounts of the week and pay the
work people. He is in an exceedingly bad temper, for he has
discovered that the cashier is not honest, that his chief
superintendent is ignorant, and that a good many customers have
sent in complaints of the bad quality of the goods despatched from
the factory. He has both arms on the writing table, his head is
between his hands, and he looks mechanically at a row of figures
before him without reading them.
She, on the contrary, is in the best of tempers, for she feels well,
and when she was dressing her hair the glass told her how
handsome she was, very handsome; and then her little boy on
waking a little before had sat up in his cradle and, smiling, had said
Mamma for the first time.
She caught him up in delight in his little white night-dress, just as
he was, and ran to her husband’s office, opened the door without
knocking or waiting to know if anyone was there, and rushed in
hastily and happily.
He had hardly time to raise his eyes before she was at the writing
table, and had placed the child on a bundle of papers, and said in an
agitated voice:
“Give papa a kiss.”
Papa loved the little fellow very much and the mother exceedingly;
but at that moment he hated all and everything, even himself. What
would he have given at that moment not to be unkind; what would
he have done not to have had his wife and child there to make him
hurt them!
How many fierce, dumb, and invisible struggles are carried on in a
man’s brain within a few seconds.
He said nothing, but put his mouth quickly to the child’s.
“Yes, yes; bravo; give me a kiss and then go away directly, for I
am busy—I have a devil in every hair and a thousand anxieties in my
mind ... yes ... yes, so ... good-by, good-by.”
And he almost pushed away mother and child with his two
nervous, angry, almost threatening hands. The poor mother had not
expected such a reception, and could not reconcile herself to it.
“Do you know that Carlino has just said Mamma for the first time,
really, just now when he woke?”
The father was silent and fretted, angry with himself because he
could not and did not know how to call up a single affectionate word
to his lips or a sole caress to his hands; all was dark before him, and
everything so bitter that absinthe would have seemed honey to him.
And to be obliged to be so hard with that touching picture before
him! Oh, why had that woman come at such a moment? Why had he
not locked himself in his office?
The mother could not give in. She drew her lips to his scowling
forehead, but he did not draw down those lips to his; he simply
touched her cheek coldly. That kiss was an insult; he was ice; he
was brutal.
She felt a lump in her throat, which broke into a sob.
“Yes, yes, let us go away. We will not come again to trouble you.”
He got up hurriedly and went to the window, but did not open it.
He put his hands through his hair and exclaimed aloud:
“Bless the women! they never understand anything; they come
into the office, interrupt one’s work, and oblige one to be harsh to
those one loves best. And yet they pretend to be our equals.”
He continued his panegyric on women alone, for mother and child
had disappeared, both crying, the mother mortally offended by the
double blow—the one to the wife’s heart, the other to the mother’s.
The child screamed, frightened at the cruel scene which he
appeared to feel, if he did not understand.
Sobs and cries lasted some time, and were heard through the wall
in the office, making a savage harmony with the bursts of
impatience of the angry director of the factory.

“Do you know, dear, the Marquis of Bellavista came into our box at
the theatre yesterday evening?”
“What did he want? I did not know he was in Florence.”
“Neither did I.”
“Um!”
“I thought he was still in Naples; but he told me he was staying a
day or two in Florence on his way to the races at Milan, and seeing
me in the box, he came up to shake hands with me.”
“I hope you were rude to him, so that he will not be tempted to
come and see you a second time.”
“Rude, no! but cold. You can ask your mother, who was present at
the time.”
“I can’t believe that you had not seen him before during the day,
when you were out, or perhaps here at home. You tell me now that
you have seen him at the theatre because a hundred others might
tell me, and you wished to forestall them.”
“But this is a gratuitous insult, unjust, cruel! I do not think I have
ever given you reason to doubt my loyalty.”
“I have not the slightest suspicion of any other man who may pay
you attention, but with the marquis it is quite a different thing.
Before you married me he was deeply in love with you, and you with
him; and the affair went a good way, for you were engaged to each
other. It was only your father who broke off the engagement at the
last moment because he heard the worst accounts of the character
of his future son-in-law and of his disreputable conduct. First love
always leaves deep impressions.”
“No, my love, had I really loved the marquis I should not have
married anyone else, nor should I have believed the accusations
they cast at him. I should have waited until I was mistress of myself,
and not have given my hand to another.”
“And how long was the marquis in the box?”
“About an hour.”
“Very good, only an hour! Too short a time for a love appointment,
and too long for a complimentary visit.”
“But I could not send him away.”
“When a woman desires it she can always make a man
understand that his visit is inopportune, inconvenient, and that he
must shorten it if possible.”
“You teach me how I can do so.”
“And then you chatted over your old love, and the cruel rupture of
your separation.”
“We only spoke of music and theatres.”
“We may believe that. But I am going out to see if I can discover
whether the marquis is still in Florence, and how long he intends to
stay. And in the meantime, if he is barefaced enough to call here, I
beg you will not receive him. This I demand and desire.”
“No command is necessary; I know my duty.”
“Not always. A visit of an hour in the box of a woman to whom
the man was once engaged is an offence to her husband.”
She, who was completely innocent, felt herself really offended by
all the suspicions of her husband, and began to beat her foot on the
carpet and to torture a volume of Coppée lying on the table with a
paper knife.
From anger and from opposition to the unmerited offence she had
a firm idea that the Marquis of Bellavista would never have been so
jealous, so foolishly jealous. Libertines know the hearts of women a
little better.
The husband went out of the house without a farewell word to his
wife. He became a spy on the marquis, and followed his steps from
café to café, at the club, amongst friends, dividing his projects, and
tormenting himself in a hundred and one ways, one more absurd
than the other.
“Will you allow me, dear, to make an observation?”
The question is asked by a man still in bed, and is addressed to
his wife, who is near him under the same sheet, and is still sleepy.
“About what?”
“About the French song you sang yesterday at the countess’s.”
“And what have you to say about it?”
“That you pronounced the u very badly, just as if it were ou.”
“And have you nothing else to criticise?”
“No. Now do not be angry; if your husband does not tell you of
these things————”
“Bravo, capital, and a thousand thanks; above all, let me
congratulate you on the time you have selected for correcting my
errors in French pronunciation. Instead of wishing me good-morning
with a kiss, a caress, or a loving word the French professor gives me
a lesson in language. Do you give it to me gratuitously, or what do
you charge for it?”
“There you are, up on your high horse in a moment, and for such
a trifle. You are a Tuscan and the u is hard and difficult for those lips
of yours, which distil milk and honey; but another time be careful.
People will say you do not know French.”
“But what French! I ask you if in the excitement of the music, or
the torrent of notes, there is anyone who would notice if one said u
or ou. And I do not speak of a vowel only. Who listens to the words?
They can only be distinguished with difficulty.”
“There are those who notice. First of all, the French, who do not
like to hear their language mutilated; then the envious, the spiteful.
Now only see, each time you had to repeat the word dur, which you
always pronounced dour, the Marchioness Vittoria smiled, and
looked at her sister, who laughed and then pursed her lips to imitate
you. Neither one nor the other was aware that I saw all their
pantomime in the mirror.”
“How can you tell what they were laughing at? I know that I was
very much applauded, and that my voice and method of singing
were praised.”
“You certainly sing well, but remember
that in good society applause
is bestowed upon all, especially upon handsome women.”
“Yes, but only to those who know how to pronounce the u.”
“Shall I tell you all, since you are determined to take offence at
the slightest observation which I make?”
“Yes, tell me.”
“Well, the Duke of St. Etienne whilst they so loudly applauded you
bent forward to his cousin and said: ‘Oui, elle chanté très-bien, mais
elle a le timbre de la voix un peu dour.’ And the amiable little cousin
covered her face to hide her Homeric laugh.”
“Dur or dour, I must get up an hour earlier, or else you will drive
me mad. My day will be a happy one, and I shall have you to thank
for it. A thousand thanks, you master of French!”
To know the reason of this sudden burst of anger, why from being
slightly keen the conversation became suddenly bitter, and the notes
from sharp became acute, you must understand that the cousin of
the duke was, from position, youth, and beauty, the official rival of
the lady who pronounced u as ou.

They are both seated at the table with their four children, their
ages ranging from five to twelve years. She, the mother, is helping
them all. He is watching the distribution of a delicious custard. From
time to time he frowns, and shakes his head in sign of
disapprobation.
And this pantomime continued so long that at last she became
aware of it, and in her turn looked at him crossly and put down the
spoon.
“What is the matter? Some new criticism?”
“Yes, but it’s no new subject of complaint. For some time past I
have noticed the thing every day at breakfast, dinner, and supper,
and if I have not given utterance to my dislike, it has been to avoid
any unpleasantness; but to-day it seems as if I were losing
patience.”
“Lose it; I will pick it up.”
“You might have a little more consideration, especially when you
usurp the prerogative of a god and distribute good and evil with
such authority.”

You might also like