Numerical Approximation Methods
Harold Cohen
Numerical Approximation
Methods
355
p
113
Harold Cohen
Department of Physics and Astronomy
California State University
Los Angeles, California
USA
twohco@[Link]
ISBN 978-1-4419-9836-1 e-ISBN 978-1-4419-9837-8
DOI 10.1007/978-1-4419-9837-8
Springer New York Dordrecht Heidelberg London
Library of Congress Control Number: 2011932169
Mathematics Subject Classification (2010): 65L-xx, 65M-xx, 65N-xx, 65Q-xx, 65R-xx, 65T-xx
# Springer Science+Business Media, LLC 2011
All rights reserved. This work may not be translated or copied in whole or in part without the written
permission of the publisher (Springer Science+Business Media, LLC, 233 Spring Street, New York,
NY 10013, USA), except for brief excerpts in connection with reviews or scholarly analysis. Use in
connection with any form of information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed is forbidden.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they
are not identified as such, is not to be taken as an expression of opinion as to whether or not they are
subject to proprietary rights.
Cover design: The cover of this text contains a highly accurate rational fraction approximation of p.
This approximation was initially discovered in the 5th century by a Chinese mathematician named
Zu Chongzi (see, for example, Solomon, R., 2008, p. 15). It was rediscovered by the author in 2005
during a day of extreme boredom.
Printed on acid-free paper
Springer is part of Springer Science+Business Media ([Link])
This book is dedicated to the most important people in my life.
Foremost among these are:
my wife Helen,
my daughters Lisa and Allyson,
my son David
and my son-in-law Jeff.
It is also dedicated to the memory of my parents.
I also dedicate this work to the memory of Dr. Charles Pine
whose kindness and academic nurturing helped me to recognize
the beauty of mathematics and its applications to scientific problems.
I am.
Therefore I think.
Preface
Approximate solutions to many problems that cannot be solved analytically, arise
from numerical and other approximation techniques. In this book, the numerical
methods and algorithms are developed for approximating such solutions. It also
includes some methods of computation that yield exact results.
This book is appropriate as a text for a course in computational methods as well as
a reference for researchers who need such methods in their work. The book contains
a presentation of some well-known approximation methods that are scattered
throughout existing literature as well as techniques that are obscure such as Chio’s
method for evaluating a determinant in ch. 5 and Namias’ extension of the Stirling
approximation to the gamma function for large argument in Appendix 3. Material
that seems to be original is also presented; such as evaluating integrals using
Parseval’s theorem for periodic functions, beta and gamma functions, and Heaviside
operator methods, along with solving integral equations with singular kernels and
numerical evaluation of Cauchy principle value integrals.
To provide the reader with concrete applications of these methods, the book
relies heavily on illustrative examples. I have provided a table of examples (like a
table of contents) with descriptive titles to give the reader quick access to these
illustrations.
This manuscript was prepared using Microsoft Word and MathType. MathType
is an equation editor developed and marketed by Design Science Co. of Long
Beach, California. Because of constraints encountered using these programs, it is
sometimes necessary to position a mathematical expression in a sentence that does
not fit on the same line as the text in that sentence. Such expressions have been
placed on a separate line, centered on the page. They should be read as if they were
text within the sentence. These expressions are distinguished from equations in that
they are in the center of the page, they do not contain an “equal” (¼), “not equal”
(6¼), or “inequality” (>, , etc.) symbol and are not designated with an equation
number. Equations are displayed starting close to or at the left margin, have one
or more equal, not equal or inequality symbols, and are identified by an equation
number. An example of this “out of line” part of a sentence can be found at the
bottom of page 133.
ix
x Preface
My thanks are expressed to those students in the Mathematical Methods
of Physics courses that I taught over the years at California State University,
Los Angeles. Their curiosity and questions helped in the development of this
material. My motivation to write this book came from a group of physics, chemis-
try, and mathematics students who sat in on a course that I taught at Shandong
University in Jinan, Peoples Republic of China. I thank them all for that motivation.
I am particularly grateful to Mr. Li Yuan (Paul) for his help in that course.
Los Angeles, CA Harold Cohen
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
1 INTERPOLATION and CURVE FITTING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Lagrange and Lagrange-Like Interpolation. . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Spline Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Interpolation by Pade Approximants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4 Operator Interpolation for Equally Spaced Data . . . . . . . . . . . . . . . . . . . . 13
1.5 Curve Fitting by the Method of Least Squares . . . . . . . . . . . . . . . . . . . . . 18
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2 ZEROS of a FUNCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.1 Roots of a Cubic Polynomial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.2 Roots of a Quartic/Biquadratic Polynomial . . . . . . . . . . . . . . . . . . . . . . . . 43
2.3 Regula Falsi and Newton–Raphson Methods . . . . . . . . . . . . . . . . . . . . . . . 47
2.4 Zeros by Interpolation for Discrete Data . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.5 Roots of a Polynomial by Root Squaring Methods . . . . . . . . . . . . . . . . . 56
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3 SERIES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.1 Definitions and Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.2 Summing a Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3.3 Approximating the Sum of a Convergent Series . . . . . . . . . . . . . . . . . . . . 89
3.4 Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
4 INTEGRATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.1 Expanding the Integrand in a Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.2 Euler–MacLaurin Approximation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
4.3 Newton-Cotes Quadratures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
4.4 Gaussian Quadratures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
4.5 Integral of a Function with Singularities . . . . . . . . . . . . . . . . . . . . . . . . . . 145
xi
xii Contents
4.6 Monte Carlo Integration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
4.7 Evaluating Integrals Using the Gamma and Beta Functions . . . . . . . . 157
4.8 Integration Using Heaviside Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
5 DETERMINANTS AND MATRICES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
5.1 Evaluation of a Determinant. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
5.2 Matrices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
6 ORDINARY FIRST ORDER DIFFERENTIAL EQUATIONS . . . . . . . 237
6.1 Taylor Series Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
6.2 Picard Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
6.3 Runge–Kutta Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
6.4 Finite Difference Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
6.5 Predictor–Corrector Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
7 ORDINARY SECOND ORDER DIFFERENTIAL EQUATIONS . . . . 269
7.1 Initial and Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
7.2 Taylor Series Approximations for Equations Subject
to Initial Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
7.3 Runge–Kutta Approximations for Equations Subject
to Initial Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
7.4 Finite Difference Approximate Solutions for Equations Subject
to Initial Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
7.5 Finite Difference Approximations for Equations Subject
to Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
7.6 Shooting Method for Equations Subject to Dirichlet Boundary
Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
7.7 Frobenius Approximations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
8 PARTIAL DIFFERENTIAL EQUATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
8.1 Initial and Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
8.2 Taylor Series Approximations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
8.3 Runge–Kutta Approximations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
8.4 Finite Difference Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
9 LINEAR INTEGRAL EQUATIONS IN ONE VARIABLE. . . . . . . . . . . . 383
9.1 Fredholm Equations of the First Kind
with Non-singular Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
9.2 Fredholm Equations of the Second Kind
with Non-singular Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
9.3 Eigensolutions of Fredholm Equations of the Second Kind
with Non-singular Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Contents xiii
9.4 Volterra Equations with Non-singular Kernel . . . . . . . . . . . . . . . . . . . . . 414
9.5 Fredholm Equations with Weakly Singular Kernel . . . . . . . . . . . . . . . . 421
9.6 Fredholm Equations with Kernels Containing
a Pole Singularity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
Appendix 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
Appendix 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Appendix 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
Appendix 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
Appendix 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481