applied and numerical harmonic analysis978-1-4612-1754-1/1.pdf · applied and numerical harmonic...

13

Upload: others

Post on 18-Jul-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory
Page 2: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory

Applied and Numerical Harmonic Analysis

Series Editor' John J. Benedetto University of Maryland

Editorial Advisory Board

Akram Aldroubi Vanderbilt University

Ingrid Daubechies Princeton University

Christopher Heil Georgia Institute of Technology

James McClellan Georgia Institute of Technology

Michael Unser Ecole Polytechnique Federale de Lausanne

M. Victor Wickerhauser Washington University, St. Louis

Douglas Cochran Arizona State University

Hans G. Feichtinger University of Vienna

Murat Kunt Ecole Poly technique Federale de Lausanne

Wim Sweldens Lucent Technologies Bell Laboratories

Marlin Vetterli Ecole Poly technique Federale de Lausanne

Page 3: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory

Introduction to Partial Differential Equations

withMATLAB

J effery Cooper

Springer Science+Business Media, LLC

Page 4: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory

Jeffery Cooper Department of Mathematics University ofMaryland College Park, MD 20742 USA

Library of Congress Cataloging-in-Publication Data

Cooper, Jeffery. Introduction to partial differential equations with MATLAB /

Jeffery Cooper. p. cm. -- (Applied and numerical harmonic analysis)

Includes bibliographical references and index. ISBN 978-1-4612-7266-3 ISBN 978-1-4612-1754-1 (eBook) DOI 10.1007/978-1-4612-1754-1

1. Differential equations, Partial--Computer-assisted instruction. 2. MATLAB. 1. Title. II. Series. QA371.35.C66 1997 5l5'.353--dc21 97-32251

(Corrected second printing, 2000)

Printed on acid-free paper

© 1998 Springer Science+Business Media New York Origina11y published by Birkhăuser Boston in 1998 Softcover reprint of the hardcover 1 st edition 1998

CIP

Copyright is not claimed for works of U.S. Government employees. AII rights reserved. No part ofthis publication may be reproduced, stored in aretrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without prior permission of the copyright owner.

Permis sion to photocopy for internal or personal use of specific clients is granted by Spring­er Science+Business Media, LLC for libraries and other users registered with the Copyright Clea ance Center (CCC), provided that the base fee of $6.00 per copy, plus $0.20 per page is paid directly to CCC, 222 Rosewood Drive, Danvers, MA 01923, U.S.A. Special requests should be addressed directly to Springer Science+Business Media, LLC, 675 Massachu­setts A venue, Cambridge, MA 02139, V.S.A.

SPIN 10773396 Typeset by T & T Techworks Inc., Coral Springs, FL Cover design by Dutton & Sherman Design, New Haven, CT MATLAB® is a registered trademark of The Math Works Incorporated

98765432

Page 5: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory

Dedication

For Christina and Rebecca

Page 6: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory

Contents

Preface

1 Preliminaries 1.1 Elements of analysis . . . . . . . . .

1.1.1 Sets and their boundaries 1.1.2 Integration and differentiation 1.1.3 Sequences and series of functions 1.1.4 Functions of several variables . .

1.2 Vector spaces and linear operators . . . . 1.3 Review of facts about ordinary differential equations

2 First-Order Equations 2.1 Generalities ........ . 2.2 First-order linear PDE's .. .

2.2.1 Constant coefficients . 2.2.2 Spatially dependent velocity of propagation

2.3 Nonlinear conservation laws 2.4 Linearization............. 2.5 Weak solutions . . . . . . . . . . . .

2.5.1 The notion of a weak solution 2.5.2 Weak solutions of Ut + F(uh = 0 2.5.3 The Riemann problem ...... . 2.5.4 Formation of shock waves .... . 2.5.5 Nonuniqueness and stability of weak solutions

2.6 Numerical methods ...... . 2.6.1 Difference quotients . . . . . . . . . . . . 2.6.2 A finite difference scheme . . . . . . . . . 2.6.3 An upwind scheme and the CFL condition. 2.6.4 A scheme for the nonlinear conservation law

2.7 A conservation law for cell dynamics 2.7.1 A nonreproducing model

xiii

1 1 1 3 5

11 14 17

19 19 21 22 25 30 39 41 41 43 45 47 48 53 53 55 57 60 64 64

Page 7: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory

viii

2.7.2 The mitosis boundary condition 2.8 Projects ............... .

Contents

67 70

3 Diffusion 73 3.1 The diffusion equation . . . . . . . . 73 3.2 The maximum principle . . . . . . . 77 3.3 The heat equation without boundaries 81

3.3.1 The fundamental solution . . 81 3.3.2 Solution of the initial-value problem. 85 3.3.3 Sources and the principle of Duhamel 89

3.4 Boundary value problems on the half-line 95 3.5 Diffusion and nonlinear wave motion . . 101 3.6 Numerical methods for the heat equation 105 3.7 Projects ................. 110

4 Boundary Value Problems for the Heat Equation 111 4.1 Separation of variables . . . . . . . . . . . . 111 4.2 Convergence of the eigenfunction expansions . 116 4.3 Symmetric boundary conditions . . . . . . . . 130 4.4 Inhomogeneous problems and asymptotic behavior 141 4.5 Projects ...................... 153

5 Waves Again 157 5.1 Acoustics................ 157

5.1.1 The equations of gas dynamics 157 5.1.2 The linearized equations 159

5.2 The vibrating string ...... 160 5.2.1 The nonlinear model 160 5.2.2 The linearized equation 163

5.3 The wave equation without boundaries. 165 5.3.1 The initial-value problem and d' Alembert's formula. 165 5.3.2 Domains of influence and dependence. 170 5.3.3 Conservation of energy on the line. 170 5.3.4 An inhomogeneous problem. . . 174

5.4 Boundary value problems on the half-line 181 5.4.1 d' Alembert's formula extended 181 5.4.2 A transmission problem . . . . . 186 5.4.3 Inhomogeneous problems . . . . 187

5.5 Boundary value problems on a finite interval 192 5.5.1 A geometric construction .... . . 192 5.5.2 Modes of vibration. . . . . . . . . . 193 5.5.3 Conservation of energy for the finite interval 196 5.5.4 Other boundary conditions. 198 5.5.5 Inhomogeneous equations . . . . . . . . . . 199

Page 8: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory

Contents ix

5.5.6 Boundary forcing and resonance. 5.6 Numerical methods .... 5.7 A nonlinear wave equation. 5.8 Projects ......... .

201 208 211 217

6 Fourier Series and Fourier Transform 6.1 Fourier series. . . . . . . . .

219 219 223 231 236 238 238 244 250 257

6.2 Convergence of Fourier series 6.3 The Fourier transform . . . . 604 The heat equation again . . . 6.5 The discrete Fourier transform

6.5.1 The DFT and Fourier series 6.5.2 The DFT and the Fourier transform

6.6 The fast Fourier transform (FFT) . 6.7 Projects ................. .

7 Dispersive Waves and the Schrodinger Equation 259 7.1 Oscillatory integrals and the method of stationary phase 259 7.2 Dispersive equations . . . . 263

7.2.1 The wave equation . . . . . . . . 263 7.2.2 Dispersion relations . . . . . . . 264 7.2.3 Group velocity and phase velocity 267

7.3 Quantum mechanics and the uncertainty principle 274 704 The Schrodinger equation . . . . . . . . . . . . 278

704.1 The dispersion relation of the Schrodinger equation 278 704.2 The correspondence principle . . . . . . . . . . . 281 704.3 The initial-value problem for the free Schrodinger equation 282

7.5 The spectrum of the SchrMinger operator . . . . 287 7.5.1 Continuous spectrum .......... 287 7.5.2 Bound states of the square well potential 290

7.6 Projects ..................... 296

8 The Heat and Wave Equations in Higher Dimensions 297 8.1 Diffusion in higher dimensions. . . . . . . . . . . 297

8.1.1 Derivation of the heat equation ...... 297 8.1.2 The fundamental solution of the heat equation . 298

8.2 Boundary value problems for the heat equation 304 8.3 Eigenfunctions for the rectangle .... 310 804 Eigenfunctions for the disk. . . . . . . 315 8.5 Asymptotics and steady-state solutions 322

8.5.1 Approach to the steady state . . 322 8.5.2 Compatibility of source and boundary flux 325

8.6 The wave equation . . . . . . . . 331 8.6.1 The initial-value problem ......... 331

Page 9: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory

x Contents

8.6.2 The method of descent . 335 8.7 Energy ............. 339 8.8 Sources ............. 343 8.9 Boundary value problems for the wave equation 347

8.9.1 Eigenfunction expansions 347

8.9.2 Nodal curves ....... 349 8.9.3 Conservation of energy 349

8.9.4 Inhomogeneous problems 351 8.10 The Maxwell equations ..... 356

8.10.1 The electric and magnetic fields 356 8.10.2 The initial-value problem 359

8.10.3 Plane waves · ..... 359 8.10.4 Electrostatics. . . . . . 360 8.10.5 Conservation of energy 361

8.11 Projects ............ 365

9 Equilibrium 367 9.1 Harmonic functions · ...... 367

9.1.1 Examples · ...... 367

9.1.2 The mean value property . 368 9.1.3 The maximum principle 372

9.2 The Dirichlet problem ...... 377

9.2.1 Fourier series solution in the disk 377

9.2.2 Liouville's theorem ..... 384

9.3 The Dirichlet problem in a rectangle . . . 389

9.4 The Poisson equation .......... 394

9.4.1 The Poisson equation without boundaries 394

9.4.2 The Green's function ...... 399

9.5 Variational methods and weak solutions 414

9.5.1 Problems in variational form . 414

9.5.2 The Rayleigh-Ritz procedure 417

9.6 Projects ............... 423

10 Numerical Methods for Higher Dimensions 425

10.1 Finite differences . 425

10.2 Finite elements . . . . . . . . 433

10.3 Galerkin methods ...... 442

10.4 A reaction-diffusion equation 450

11 Epilogue: Classification 455

Page 10: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory

Contents

Appendices

A Recipes and Formulas Al Separation of variables in space-time problems A2 Separation of variables in steady-state problems A3 Fundamental solutions . . . . . . . . . . . . . A4 The Laplace operator in polar and spherical coordinates

B Elements of MATLAB B.l Forming vectors and matrices B.2 Operations on matrices .. B.3 Array operations . . . . . . . BA Solution of linear systems .. B.5 MATLAB functions and mfiles . B.6 Script mfiles and programs . B. 7 Vectorizing computations B.8 Function functions . B.9 Plotting 2-D graphs B.IO Plotting 3-D graphs B.ll Movies ...... .

C References

D Solutions to Selected Problems

E List of Computer Programs

Index

xi

459 459 464 471 474

477 477 480 481 482 483 485 486 488 490 492 496

497

501

527

533

Page 11: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory

Preface

Overview

The subject of partial differential equations has an unchanging core of material but is constantly expanding and evolving. The core consists of solution methods, mainly separation of variables, for boundary value problems with constant coeffi­cients in geometrically simple domains. Too often an introductory course focuses exclusively on these core problems and techniques and leaves the student with the impression that there is no more to the subject. Questions of existence, uniqueness, and well-posedness are ignored. In particular there is a lack of connection between the analytical side of the subject and the numerical side. Furthermore nonlinear problems are omitted because they are too hard to deal with analytically.

Now, however, the availability of convenient, powerful computational software has made it possible to enlarge the scope of the introductory course. My goal in this text is to give the student a broader picture of the subject. In addition to the basic core subjects, I have included material on nonlinear problems and brief discussions of numerical methods. I feel that it is important for the student to see nonlinear problems and numerical methods at the beginning of the course, and not at the end when we run usually run out of time. Furthermore, numerical methods should be introduced for each equation as it is studied, not lumped together in a final chapter.

The text is intended for a first course in partial differential equations at the undergraduate level for students in mathematics, science and engineering. It is assumed that the student has had the standard three semester calculus sequence including multivariable calculus, and a course in ordinary differential equations. Some exposure to matrices and vectors is helpful, but not essential. No prior experience with MATLAB is assumed, although many engineering students will have already seen MATLAB.

Organization and features

The material is organized by physical setting and by equation rather than by technique of solution. Generally, I have tried to place each equation in the appro-

Page 12: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory

XIV Preface

priate physical context with a careful derivation from physical principles. This is followed by a discussion of qualitative properties of the solutions without boundary conditions. Then a nonlinear version of the equation and an appropriate numeri­cal scheme are introduced. Thus Chapter 2 deals with linear first-order equations and the method of characteristics, an example of a scalar nonlinear conservation law, and numerical methods for these equations. Chapter 3 follows the same strat­egy for the heat equation, while Chapter 4 treats boundary value problems for the heat equation. The wave equation is studied in Chapter 5. Fourier series and the Fourier transform are studied in Chapter 6. Chapter 7 is perhaps novel for this level course. It deals with the method of stationary phase and dispersive equa­tions. The Schr6dinger equation is discussed as a dispersive equation. Chapter 8 has fairly standard material on the linear heat and wave equations in higher di­mensions. Chapter 9 treats the Laplace and Poisson equations, and includes some examples of nonlinear variational problems. Finally, Chapter 10 provides more numerical methods, suitable for computations in higher dimensions, including an introduction to the finite element method and Galerkin methods.

A substantial amount of time is spent on the standard boundary value prob­lems and the technique of separation of variables. The formulas obtained this way contain much valuable information about the structure of the solutions. Hand com­putation of the eigenfunctions is done when possible. The usual restriction at this stage in the discussion is that one can only hand compute the Fourier coefficients for a limited number of examples. One could then provide numerical means for evaluating these integrals. However, I have chosen to use finite difference schemes to compute the solutions because they can easily be extended to equations with variable coefficients. Another possibility is the Galerkin method, treated in Chapter 10. In Chapter 6 where Fourier series and Fourier transform are discussed, I have included a brief treatment of the discrete Fourier transform and the fast Fourier transform. If one needs to compute Fourier coefficients in a practical manner, the FFT is the modem, efficient procedure to use.

The nonlinear conservation law discussed in Chapter 2 provides a dramatic example of the difference between linear and nonlinear behavior. It also provides an important motivation for developing numerical methods. However, it is possible to skip the sections on the nonlinear problems in Chapter 2 and go directly to the linear heat equation in Chapter 3. Other examples on nonlinear equations are seen in Chapters 3, 5, 9, and 10.

Computational aspects

I have used the computer extensively in the text with many exercises, although it is possible to use this text without the computer exercises. I feel strongly that students must receive some computational experience as they learn the subject. In addition, current graphics capability provides an intuitive understanding of the properties of the solutions that was not available 20 years ago. Almost every set of exercises has some exercises to be done with a computer. In many cases these

Page 13: Applied and Numerical Harmonic Analysis978-1-4612-1754-1/1.pdf · Applied and Numerical Harmonic Analysis Series Editor' John J. Benedetto University of Maryland Editorial Advisory

Preface xv

computer exercises are paired with analytical exercises, one clarifying the other. In addition, at the end of each chapter there are several computing projects which involve programming. These longer projects provide the most valuable educational experience. Here the student must compute and use analytical examples to check the validity of his results.

My choice of software is MATLAB. I found that MATLAB offers a flexibility and ease of programming that make it preferable to other software packages. In addition MATLAB graphics are excellent and easy to use. There are many good introductions to MATLAB available but I have included a brief appendix containing some basic elements ofMATLAB. Within the exercises there are also instructions on how to use MATLAB.

I have compromised between the extremes of having the student do all the programming, or using all prewritten programs. Having the student write all the programs would be too time consuming so I have written a collection of MATLAB mfiles to implement several basic finite difference schemes. In addition there are several mfiles which help with graphical constructions. The mfiles have been tested on both MATLAB4.2 and MATLABS.O. The only difference may be in the colors that appear in the graphs. The mfiles are grouped by chapter and are available at the following two web sites: www.Birkhauser.com/book/isbn/O-8176-3967-5 and www.math.umd.edu;-jec . This collection of mfiles will be expanded, hopefully with the help of other interested users of the text.

Acknowledgements

I have received many helpful comments and suggestions from my colleagues here at the University of Maryland. I want to extend my warmest thanks to all of them: John Osborn, Stuart Antrnan, Harland Glaz, Manos Grillakis, Alexander Dragt, Bruce Kellogg, John Benedetto, Robert Pego, and Jerry Sather. I also wish to thank the reviewers, Bob Rogers and Michael Beals; and Thomas Beale who used an earlier version of the text at Duke. Many of their suggestions have been incorporated. Peter Close provided important assistance in checking the MATLAB codes. Finally I wish to thank my students over several semesters who worked through the text, making valuable suggestions.