100% found this document useful (1 vote)
21 views40 pages

An Introduction To Scientific Computing With MATLAB and Python Tutorials 1st Edition Sheng Xu

The document promotes the ebook 'An Introduction to Scientific Computing with MATLAB and Python Tutorials' by Sheng Xu, available for download on ebookmeta.com. It includes links to additional recommended digital products related to scientific computing and engineering. The book covers various topics in scientific computing, including errors, algorithms, and methods for linear systems.

Uploaded by

fondevahen
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 (1 vote)
21 views40 pages

An Introduction To Scientific Computing With MATLAB and Python Tutorials 1st Edition Sheng Xu

The document promotes the ebook 'An Introduction to Scientific Computing with MATLAB and Python Tutorials' by Sheng Xu, available for download on ebookmeta.com. It includes links to additional recommended digital products related to scientific computing and engineering. The book covers various topics in scientific computing, including errors, algorithms, and methods for linear systems.

Uploaded by

fondevahen
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/ 40

Get the full ebook with Bonus Features for a Better Reading Experience on ebookmeta.

com

An Introduction to Scientific Computing with


MATLAB and Python Tutorials 1st Edition Sheng Xu

https://ebookmeta.com/product/an-introduction-to-scientific-
computing-with-matlab-and-python-tutorials-1st-edition-
sheng-xu/

OR CLICK HERE

DOWLOAD NOW

Download more ebook instantly today at https://ebookmeta.com


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

Introduction to Engineering and Scientific Computing with


Python 1st Edition David E. Clough

https://ebookmeta.com/product/introduction-to-engineering-and-
scientific-computing-with-python-1st-edition-david-e-clough/

ebookmeta.com

Python for Astronomers An Introduction to Scientific


Computing 3rd Edition Imad Pasha

https://ebookmeta.com/product/python-for-astronomers-an-introduction-
to-scientific-computing-3rd-edition-imad-pasha/

ebookmeta.com

An Introduction to Scientific Computing Fifteen


Computational Projects Solved with MATLAB 2nd 2nd Edition
Ionut Danaila Pascal Joly Sidi Mahmoud Kaber Marie Postel
https://ebookmeta.com/product/an-introduction-to-scientific-computing-
fifteen-computational-projects-solved-with-matlab-2nd-2nd-edition-
ionut-danaila-pascal-joly-sidi-mahmoud-kaber-marie-postel/
ebookmeta.com

Linux Mint 20 Self Help Guide 2nd Edition Unofficial and


Compatible With All Linux Mint 20 Versions Partridge

https://ebookmeta.com/product/linux-mint-20-self-help-guide-2nd-
edition-unofficial-and-compatible-with-all-linux-mint-20-versions-
partridge/
ebookmeta.com
Archaeological Theory in Practice 2nd Edition Patricia A
Urban Edward Schortman

https://ebookmeta.com/product/archaeological-theory-in-practice-2nd-
edition-patricia-a-urban-edward-schortman/

ebookmeta.com

Everyday Data Cultures 1st Edition Jean Burgess

https://ebookmeta.com/product/everyday-data-cultures-1st-edition-jean-
burgess/

ebookmeta.com

ZEB Police Officer Virgin Curvy Woman Suspense Rescued


Diamond Ridge Mountain Men Book 1 1st Edition Brynn Hale
[Hale
https://ebookmeta.com/product/zeb-police-officer-virgin-curvy-woman-
suspense-rescued-diamond-ridge-mountain-men-book-1-1st-edition-brynn-
hale-hale/
ebookmeta.com

The Trouble With Her (Forbidden Love #4) 1st Edition Kat
T. Masen

https://ebookmeta.com/product/the-trouble-with-her-forbidden-
love-4-1st-edition-kat-t-masen/

ebookmeta.com

Inside Afghanistan Routledge Contemporary South Asia


Series 1st Edition Timor Sharan

https://ebookmeta.com/product/inside-afghanistan-routledge-
contemporary-south-asia-series-1st-edition-timor-sharan/

ebookmeta.com
The Bathysphere Book 1st Edition Brad Fox

https://ebookmeta.com/product/the-bathysphere-book-1st-edition-brad-
fox/

ebookmeta.com
An Introduction to
Scientific Computing
with MATLAB® and
Python Tutorials
An Introduction to
Scientific Computing
with MATLAB® and
Python Tutorials

Sheng Xu
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.

First edition published 2022


by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742

and by CRC Press


4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN

© 2022 Sheng Xu

CRC Press is an imprint of Taylor & Francis Group, LLC

Reasonable efforts have been made to publish reliable data and information, but the author and pub-
lisher 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 recording, 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, access www.copyright.
com or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA
01923, 978-750-8400. For works that are not available on CCC please contact mpkbookspermis-
[email protected]

Trademark notice: Product or corporate names may be trademarks or registered trademarks and are
used only for identification and explanation without intent to infringe.

ISBN: 978-1-032-06315-7 (hbk)


ISBN: 978-1-032-06318-8 (pbk)
ISBN: 978-1-003-20169-4 (ebk)

DOI: 10.1201/9781003201694

Typeset in Nimbus Roman


by KnowledgeWorks Global Ltd.

Publisher’s note: This book has been prepared from camera-ready copy provided by the authors
To my family and friends.
Contents

Preface xiii

Author xv

1 An Overview of Scientific Computing 1


1.1 What Is Scientific Computing? . . . . . . . . . . . . . . . . . . . . 1
1.2 Errors in Scientific Computing . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Absolute and Relative Errors . . . . . . . . . . . . . . . . . 3
1.2.2 Upper Bounds . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.3 Sources of Errors . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Algorithm Properties . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 Taylor’s Theorem 9
2.1 Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1.1 Polynomial Evaluation . . . . . . . . . . . . . . . . . . . . 10
2.2 Taylor’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.1 Taylor Polynomials . . . . . . . . . . . . . . . . . . . . . . 12
2.2.2 Taylor Series . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.3 Taylor’s Theorem . . . . . . . . . . . . . . . . . . . . . . . 14
2.3 Alternating Series Theorem . . . . . . . . . . . . . . . . . . . . . 19
2.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.5 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 22

3 Roundoff Errors and Error Propagation 25


3.1 Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.1.1 Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.2 Floating-Point Numbers . . . . . . . . . . . . . . . . . . . . . . . 26
3.2.1 Scientific Notation and Rounding . . . . . . . . . . . . . . 27
3.2.2 DP Floating-Point Representation . . . . . . . . . . . . . . 29
3.3 Error Propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3.1 Catastrophic Cancellation . . . . . . . . . . . . . . . . . . 32
3.3.2 Algorithm Stability . . . . . . . . . . . . . . . . . . . . . . 33
3.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.5 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 37

vii
viii Contents

4 Direct Methods for Linear Systems 43


4.1 Matrices and Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.2 Triangular Systems . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.3 GE and A=LU . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.3.1 Elementary Matrices . . . . . . . . . . . . . . . . . . . . . 51
4.3.2 A=LU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.3.3 Solving Ax = b by A=LU . . . . . . . . . . . . . . . . . . 55
4.4 GEPP and PA=LU . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.4.1 GEPP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.4.2 PA=LU . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.4.3 Solving Ax = b by PA=LU . . . . . . . . . . . . . . . . . . 65
4.5 Tridiagonal Systems . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.6 Conditioning of Linear Systems . . . . . . . . . . . . . . . . . . . 69
4.6.1 Vector and Matrix Norms . . . . . . . . . . . . . . . . . . . 72
4.6.2 Condition Numbers . . . . . . . . . . . . . . . . . . . . . . 76
4.6.3 Error and Residual Vectors . . . . . . . . . . . . . . . . . . 77
4.7 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
4.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
4.9 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 82

5 Root Finding for Nonlinear Equations 85


5.1 Roots and Fixed Points . . . . . . . . . . . . . . . . . . . . . . . . 86
5.2 The Bisection Method . . . . . . . . . . . . . . . . . . . . . . . . 90
5.3 Newton’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.3.1 Convergence Analysis of Newton’s Method . . . . . . . . . 96
5.3.2 Practical Issues of Newton’s Method . . . . . . . . . . . . . 99
5.4 Secant Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
5.5 Fixed-Point Iteration . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.6 Newton’s Method for Systems of Nonlinear Equations . . . . . . . 109
5.6.1 Taylor’s Theorem for Multivariate Functions . . . . . . . . 110
5.6.2 Newton’s Method for Nonlinear Systems . . . . . . . . . . 114
5.7 Unconstrained Optimization . . . . . . . . . . . . . . . . . . . . . 117
5.8 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
5.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
5.10 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 127

6 Interpolation 131
6.1 Terminology of Interpolation . . . . . . . . . . . . . . . . . . . . . 132
6.2 Polynomial Space . . . . . . . . . . . . . . . . . . . . . . . . . . 133
6.2.1 Chebyshev Basis . . . . . . . . . . . . . . . . . . . . . . . 135
6.2.2 Legendre Basis . . . . . . . . . . . . . . . . . . . . . . . . 138
6.3 Monomial Interpolation . . . . . . . . . . . . . . . . . . . . . . . 141
6.4 Lagrange Interpolation . . . . . . . . . . . . . . . . . . . . . . . . 143
6.5 Newton’s Interpolation . . . . . . . . . . . . . . . . . . . . . . . . 145
6.6 Interpolation Error . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Contents ix

6.6.1Error in Polynomial Interpolation . . . . . . . . . . . . . . 150


6.6.2Behavior of Interpolation Error . . . . . . . . . . . . . . . 153
6.6.2.1 Equally-Spaced Nodes . . . . . . . . . . . . . . . 153
6.6.2.2 Chebyshev Nodes . . . . . . . . . . . . . . . . . 156
6.7 Spline Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . 159
6.7.1 Piecewise Linear Interpolation . . . . . . . . . . . . . . . . 159
6.7.2 Cubic Spline . . . . . . . . . . . . . . . . . . . . . . . . . 161
6.7.3 Cubic Spline Interpolation . . . . . . . . . . . . . . . . . . 163
6.8 Discrete Fourier Transform (DFT) . . . . . . . . . . . . . . . . . . 167
6.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
6.10 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 177

7 Numerical Integration 183


7.1 Definite Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
7.2 Numerical Integration . . . . . . . . . . . . . . . . . . . . . . . . 187
7.2.1 Change of Intervals . . . . . . . . . . . . . . . . . . . . . . 189
7.3 The Midpoint Rule . . . . . . . . . . . . . . . . . . . . . . . . . . 191
7.3.1 Degree of Precision (DOP) . . . . . . . . . . . . . . . . . . 192
7.3.2 Error of the Midpoint Rule . . . . . . . . . . . . . . . . . . 195
7.4 The Trapezoidal Rule . . . . . . . . . . . . . . . . . . . . . . . . . 200
7.5 Simpson’s Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
7.6 Newton-Cotes Rules . . . . . . . . . . . . . . . . . . . . . . . . . 209
7.7 Gaussian Quadrature Rules . . . . . . . . . . . . . . . . . . . . . . 209
7.8 Other Numerical Integration Techniques . . . . . . . . . . . . . . . 216
7.8.1 Integration with Singularities . . . . . . . . . . . . . . . . . 216
7.8.2 Adaptive Integration . . . . . . . . . . . . . . . . . . . . . 217
7.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
7.10 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 221

8 Numerical Differentiation 225


8.1 Differentiation Using Taylor’s Theorem . . . . . . . . . . . . . . . 225
8.1.1 The Method of Undetermined Coefficients . . . . . . . . . 227
8.2 Differentiation Using Interpolation . . . . . . . . . . . . . . . . . 229
8.2.1 Differentiation Using DFT . . . . . . . . . . . . . . . . . . 231
8.3 Richardson Extrapolation . . . . . . . . . . . . . . . . . . . . . . 232
8.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
8.5 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 235

9 Initial Value Problems and Boundary Value Problems 237


9.1 Initial Value Problems (IVPs) . . . . . . . . . . . . . . . . . . . . 238
9.1.1 Euler’s Method . . . . . . . . . . . . . . . . . . . . . . . . 239
9.1.1.1 Local Truncation Error and Global Error . . . . . 242
9.1.1.2 Consistency, Convergence and Stability . . . . . . 244
9.1.1.3 Explicit and Implicit Methods . . . . . . . . . . . 247
9.1.2 Taylor Series Methods . . . . . . . . . . . . . . . . . . . . 248
x Contents

9.1.3 Runge-Kutta (RK) Methods . . . . . . . . . . . . . . . . . 249


9.2 Boundary Value Problems (BVPs) . . . . . . . . . . . . . . . . . . 252
9.2.1 Finite Difference Methods . . . . . . . . . . . . . . . . . . 253
9.2.1.1 Local Truncation Error and Global Error . . . . . 254
9.2.1.2 Consistency, Stability and Convergence . . . . . . 255
9.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
9.4 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 259

10 Basic Iterative Methods for Linear Systems 261


10.1 Jacobi and Gauss-Seidel Methods . . . . . . . . . . . . . . . . . . 263
10.1.1 Jacobi Method . . . . . . . . . . . . . . . . . . . . . . . . 264
10.1.2 Gauss-Seidel (G-S) Method . . . . . . . . . . . . . . . . . 267
10.2 Convergence Analysis . . . . . . . . . . . . . . . . . . . . . . . . 270
10.3 Other Iterative Methods . . . . . . . . . . . . . . . . . . . . . . . 272
10.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
10.5 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 274

11 Discrete Least Squares Problems 277


11.1 The Discrete LS Problems . . . . . . . . . . . . . . . . . . . . . . 278
11.2 The Normal Equation by Calculus . . . . . . . . . . . . . . . . . . 281
11.3 The Normal Equation by Linear Algebra . . . . . . . . . . . . . . 284
11.4 LS Problems by A=QR . . . . . . . . . . . . . . . . . . . . . . . . 286
11.5 Artificial Neural Network . . . . . . . . . . . . . . . . . . . . . . 287
11.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
11.7 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 292

12 Monte Carlo Methods and Parallel Computing 295


12.1 Monte Carlo Methods . . . . . . . . . . . . . . . . . . . . . . . . 297
12.2 Parallel Computing . . . . . . . . . . . . . . . . . . . . . . . . . . 298
12.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
12.4 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 302

Appendices 305

A An Introduction of MATLAB for Scientific Computing 307


A.1 What is MATLAB? . . . . . . . . . . . . . . . . . . . . . . . . . . 307
A.1.1 Starting MATLAB . . . . . . . . . . . . . . . . . . . . . . 307
A.1.2 MATLAB as an Advanced Calculator . . . . . . . . . . . . 308
A.1.3 Order of Operations . . . . . . . . . . . . . . . . . . . . . 308
A.1.4 MATLAB Built-in Functions and Getting Help . . . . . . . 309
A.1.5 Keeping a Record for the Command Window . . . . . . . . 310
A.1.6 Making M-Scripts . . . . . . . . . . . . . . . . . . . . . . 310
A.2 Variables, Vectors and Matrices . . . . . . . . . . . . . . . . . . . 311
A.2.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
A.2.2 Suppressing Output . . . . . . . . . . . . . . . . . . . . . . 312
A.2.3 Vectors and Matrices . . . . . . . . . . . . . . . . . . . . . 312
Contents xi

A.2.4 Special Matrices . . . . . . . . . . . . . . . . . . . . . . . 313


A.2.5 The Colon Notation and linspace . . . . . . . . . . . . . 314
A.2.6 Accessing Entries in a Vector or Matrix . . . . . . . . . . . 315
A.3 Matrix Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . 317
A.3.1 Scalar Multiplication . . . . . . . . . . . . . . . . . . . . . 317
A.3.2 Matrix Addition . . . . . . . . . . . . . . . . . . . . . . . 317
A.3.3 Matrix Multiplication . . . . . . . . . . . . . . . . . . . . . 318
A.3.4 Transpose . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
A.3.5 Entry-wise Convenience Operations . . . . . . . . . . . . . 320
A.4 Outputting/Plotting Results . . . . . . . . . . . . . . . . . . . . . 321
A.4.1 disp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
A.4.2 fprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
A.4.3 plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
A.5 Loops and Decisions . . . . . . . . . . . . . . . . . . . . . . . . . 325
A.5.1 for Loops . . . . . . . . . . . . . . . . . . . . . . . . . . 325
A.5.2 Logicals and Decisions . . . . . . . . . . . . . . . . . . . . 327
A.5.3 while Loops . . . . . . . . . . . . . . . . . . . . . . . . . 329
A.6 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
A.6.1 M-Functions . . . . . . . . . . . . . . . . . . . . . . . . . 330
A.6.2 Anonymous Functions . . . . . . . . . . . . . . . . . . . . 332
A.6.3 Passing Functions to Functions . . . . . . . . . . . . . . . . 333
A.7 Creating Live Scripts in the Live Editor . . . . . . . . . . . . . . . 334
A.8 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . 335
A.9 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 336

B An Introduction of Python for Scientific Computing 339


B.1 What is Python? . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
B.1.1 Starting Python . . . . . . . . . . . . . . . . . . . . . . . . 339
B.1.2 Python as an Advanced Calculator . . . . . . . . . . . . . . 340
B.1.3 Python Programs . . . . . . . . . . . . . . . . . . . . . . . 342
B.2 Variables, Lists and Dictionaries . . . . . . . . . . . . . . . . . . . 342
B.2.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
B.2.2 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
B.2.3 Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . 345
B.3 Looping and Making Decisions . . . . . . . . . . . . . . . . . . . 347
B.3.1 for Loops . . . . . . . . . . . . . . . . . . . . . . . . . . 347
B.3.2 if Statements . . . . . . . . . . . . . . . . . . . . . . . . . 349
B.3.3 while Loops . . . . . . . . . . . . . . . . . . . . . . . . . 351
B.3.4 break and continue in Loops . . . . . . . . . . . . . . . 352
B.4 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
B.4.1 Passing Arguments . . . . . . . . . . . . . . . . . . . . . . 355
B.4.2 Passing Lists . . . . . . . . . . . . . . . . . . . . . . . . . 357
B.5 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
B.5.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
B.5.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
xii Contents

B.5.3 Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . 362


B.5.4 Objects as Attributes . . . . . . . . . . . . . . . . . . . . . 364
B.6 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
B.7 numpy, scipy, matplotlib . . . . . . . . . . . . . . . . . . . . . . . 370
B.7.1 numpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
B.7.2 scipy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
B.7.3 matplotlib . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
B.8 Jupyter Notebook . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
B.9 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . 376
B.10 Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 376

Index 379
Preface

Features of the Book


We write this book to have the following features.
• We cover fundamental numerical methods in the book. The book can be used as a
textbook for a first course in scientific computing. The prerequisites are calculus
and linear algebra. A college student in science, math or engineering can take the
course in sophomore year.
• We write this book for students. We present the material in a self-contained
accessible manner for a student to easily follow and explore. We use motivating
examples and application problems to catch a student’s interest. We add remarks
at various places to satisfy a student’s curiosity.
• We provide short tutorials on MATLAB® and Python. We give pseudocodes of
algorithms instead of source codes. With the tutorials and pseudocodes, a student
can enjoy writing programs in MATLAB or Python to implement, test and apply
algorithms.
• We balance the underlying idea, algorithm implementation and performance analy-
sis for a fundamental numerical method so that a student can gain comprehensive
understanding of the method.
• We review necessary material from calculus and linear algebra at appropriate
places. We also make the connection between the fundamental numerical methods
with advanced topics such as machine learning and parallel computing.
• We design paper-and-pen exercises and programming problems so that stu-
dents can apply, test and analyze numerical methods toward comprehensive
understanding and practical applications.

Sample Syllabi
Below is a sample syllabus for a two-semester course sequence.

Semester 1
1. Appendix A or B: MATLAB or Python Tutorial

xiii
xiv Preface

2. Chapter 1: An Overview of Scientific Computing


3. Chapter 2: Taylor’s Theorem
4. Chapter 3: Roundoff Errors and Error Propagation
5. Sections 5.1–5.5: Root Finding for Nonlinear Equations
6. Sections 6.1–6.6: Interpolation
7. Sections 7.1–7.6: Numerical Integration
8. Chapter 8: Numerical Differentiation

Semester 2
1. Chapter 4: Direct Methods for Linear Systems
2. Sessions 5.6–5.7: Nonlinear Systems and Optimization
3. Sessions 6.6–6.7: Spline Interpolation and DFT
4. Sessions 7.7–7.8: Gaussian Quadrature Rules
5. Chapter 9: IVPs and BVPs
6. Chapter 10: Iterative Methods for Linear Systems
7. Chapter 11: LS Problems
8. Chapter 12: Monte Carlo Methods and Parallel Computing

Acknowledgments
We acknowledge our colleagues Daniel Reynolds and Johannes Tausch for detailed
critiques of this first edition. We would appreciate any comments, suggestions and
corrections that readers may wish to send us using the email address [email protected].
Another Random Document on
Scribd Without Any Related Topics
Fig. 55

Result of accidental explosion of hand grenade, in a Chinese coolie with Fourth


Division of Japanese Army, near Mukden. (Major Lynch.)

About the head may be seen all varieties of gunshot wounds and
their complications. The bullets from small weapons may not
penetrate, but those from larger ones usually penetrate and
sometimes perforate. Infection is not an uncommon sequel to all of
these injuries, even if involving the skin alone; the skull, especially
the diploë; the membranes, or the brain itself. (See Chapter XXXVI.)
Septic complications are more likely to occur in proportion to
disregard of antiseptic precautions in the first treatment. Usually the
most serious head injuries are those connected with penetrating
bullets. Sometimes the skull undergoes extensive shattering, and
occasionally the base is fractured. Instantaneous death, such as
occurs when a soldier is beheaded by a cannon ball, sometimes
causes a peculiar cataleptic rigidity, which is a species of immediate
postmortem rigidity, by which a body may be maintained in the
position it occupied when struck. Obviously, lesions at the base are
still more serious than those of the vertex, and wounds of the
cerebrum are nearly always fatal. I have seen a number of men who
had been shot entirely through the head—by Mauser or smaller
bullets—who, nevertheless, recovered more or less completely. In
Fig. 56 one soldier, I recall, the bullet
traversed an orbit in such a way
as to divide the optic nerve. He
was blinded, but recovered most
of his other functions; he
remained well for some years,
and then developed symptoms of
insanity. Epilepsy and other
psychical disturbances are all
more or less frequent after head
injuries. Plate XIII illustrates how
a bullet may be, apparently,
harmlessly embedded in the
interior of the cranium.
Sometimes years after such
injuries active symptoms make
their first appearance. There can
be no question as to the value of
the information usually afforded
in such cases by the aid of the x-
rays.
The same necessity exists
here as elsewhere for primary
antiseptic occlusion, including
careful shaving and cleansing of
the scalp. Inasmuch as nearly
every gunshot wound of the skull
calls for subsequent operation—
just as does almost every
compound fracture—the parts
should be prepared for it early,
and everything else should be
left until the time when the
surgeon is ready to make a
complete operation and meet all
the indications. In such a case
hemorrhage may be temporarily
checked by tampon. The
surgeon should not omit to take
Shrapnel wound of leg necessitating advantage of all the information
amputation. Japanese soldier at which a study of cerebral
battle of Mukden. (Major Lynch.) localization may afford him, since
localizing symptoms may reveal
not only the course of a bullet, but something regarding its location.
Penetrating wounds of the face are less serious than those of the
cranium proper. Occasionally a bullet striking a tooth will displace it
and drive it in some other portion of the face, e. g., the tongue.
Bullets and loose pieces of bone should be removed in wounds of
the face. Hemorrhage can usually be controlled by tampons.
Interdental splints may often be used to advantage, and in every
case where the mouth has been injured antiseptic mouth-washes
should be frequently used; in the case of the nose, an antiseptic
spray should be employed.
The neck is often penetrated, but if the spine and the important
vessels and nerve trunks escape, little apparent damage may be
done. If infection occur and suppuration take place resulting
abscesses should be opened promptly, as they might migrate into
the thorax or axilla. Even in the neck bullets which are producing no
disturbance need not be disturbed; but if positive irritation or
paralysis be caused by them they should be removed. Wounds of
the larynx or trachea, by involving the parts in subsequent stricture,
may call for tracheotomy.
Gunshot wounds of the spinal column below the neck are often
complicated by perforations of the thorax or of the abdomen. So far
as the spine is concerned the principal question is regarding the
injury to the cord itself. In rare instances cerebrospinal fluid escapes
from the wound; hemorrhage, or even the possibility of air entering
the canal, is a more common possibility. I have seen perforation of
the spinal canal, in connection with penetration of the thorax and
lung, so that, after the operation of laminectomy, air escaped through
the bullet wound in the spine with each inspiration and expiration.
Infection in spinal injuries is always to be feared and caution should
be observed regarding the maintenance of asepsis. The indications
for laminectomy scarcely differ from those in other injuries to the
cord. (See chapter on the Spine.)
Wounds of the thorax are more likely to be penetrating than
formerly, owing to the conical shape and greater velocity of even
small-arm bullets. Emphysema does not necessarily imply
perforation of the lung, as air may enter through the external wound
with each respiratory effort. When an imaginary line connecting the
wounds of entrance and exit would naturally pass through the lung, it
may be assumed that this viscus has been perforated. Signs
indicating such lung injuries are peculiar pain, disorder of the
respiration, more or less cough, usually with raising of blood; when
the pleural cavity is more or less filled with blood there will be signs
of pressure on the lung from presence of fluid. In other words a bullet
wound of the lung will usually lead to a more or less complete picture
of traumatic hydropneumothorax. Sometimes external hemorrhage is
severe, even though it come from an intercostal or internal mammary
vessel; usually the blood from these vessels escapes within the
thorax. I have known an intercostal artery to be divided by a small
pistol bullet which scarcely penetrated the thorax of a man, who died
in consequence, when the insertion of a small tampon would have
checked the hemorrhage and saved his life. Lung tissue rarely
bleeds seriously. When hemorrhage is from the lung it comes from a
divided vessel of some size. A collection of blood in the chest is
subject to the danger of infection, and empyema is a frequent but
somewhat delayed consequence of gunshot wounds of the chest;
while abscesses in the lung or mediastinum occasionally result.
To the primary occlusion, which should be the first attention given
to every bullet wound of the thorax, there may be added complete
immobilization of the chest. Fluid already present, unless it be clotted
blood, may be withdrawn by aspiration. Traumatic, not to say septic
pneumonia, is a serious complication. Should any operation be
called for, like removal of fragments of rib or the checking of
hemorrhage, it is best to make a free opening and a liberal removal
of all particles or fragments, with ample provision for drainage.
Hernia of any of the viscera through such wounds occasionally
occurs.
Fig. 57[12]

Result of frostbite without gunshot. After battle of Mukden. (Major Lynch.)

[12] Figs. 57, 58 and 59, as well as the others preceding credited to
Major Lynch, are due to the courtesy of Major Charles Lynch, now of the
United States Army General Staff, who was attached to the Russian Army
as our Military Attaché, and who took them himself.

Fig. 58

Result of frostbite after two days and nights of exposure. After battle of Mukden.
(Major Lynch.)
The subject of injuries to the heart will be dealt with in the chapter
devoted to the surgery of that organ. Not every perforation of the
heart substance is fatal, and there are enough successful cases on
record of radical intervention by resection of the thoracic wall, and of
exposure of the pericardium, even of the heart itself, to justify this
method of attack in any case which will permit of it. Not the least of
the dangers pertaining to heart injuries is the impediment to heart
action caused by a collection of blood in the pericardial sac. Should
anything further be called for it would be warrantable at any time to
explore this sac and withdraw fluid through the aspirating needle,
through a trocar, or even by incision and drainage.
In the abdomen all conceivable forms of injury may be met with,
from contusions produced possibly by a spent cannon ball, to
lacerations from fragments of a bursting shell and multiple
perforations produced by one or more bullets. A first requisite in all
such injuries is immediate antiseptic occlusion. This will not prevent
such prompt and further study of the case as may indicate suitable
treatment. When shock is extreme, indicating the possible result of
contusions or laceration, or when perforation of the stomach,
intestines, or bladder is probable, laparotomy should be performed at
once. According to De Nancrède the order of probable frequency of
these injuries of the abdomen is small intestine, large intestine, liver,
stomach, kidney, spleen, and pancreas. Multiple lesions are also
common. The immediate dangers are those from shock and
hemorrhage, to be supplemented later by imminent danger of septic
peritonitis.
Fig. 59

Scene in operating room in Second Field Hospital of Fifth Division of Japanese


Army, at Mukden Railway Station. (Major Lynch.)

The modern small bullet causes few surface indications as to the


amount of damage done within, as in the thorax. A careful
consideration of the location of the wounds of entrance and exit will
indicate the probability of perforation, especially of the hollow
viscera. The appearance of blood, either in the mouth or from the
rectum or urethra, the recognition of a rapidly accumulating amount
of fluid, the presence of gas in the abdomen, are all significant
indications of perforating injury. Several years ago Senn advised the
insufflation of hydrogen gas into the colon, on the theory that its
escape from the intestine into the abdominal cavity and thence out of
one of the abdominal wounds, where it could be lighted as it passed
through a small tube, would afford a certain and unmistakable test as
to perforation of the bowel, and such is undoubtedly the case.
Nevertheless, it is not one which is always easy or even possible of
application, and no time should be wasted in waiting for a supply of
hydrogen for this purpose.
The safest course and the most life-saving one is exploration
when there is any doubt as to the nature of the injury. This means an
operator possessed of good judgment, a suitable environment, rigid
antiseptic precautions, and a small incision to begin with, with the
finger as the best of all probes. The escape of bloody fluid, bloody
urine, or fecal matter will immediately justify a much more extended
incision through which complete orientation may be obtained. The
first incision may be best made as an enlargement of the bullet
wound, but any extensive operation within the abdominal cavity can
be made through a sufficiently long median incision. Only in this way
can the source of hemorrhage be ascertained. Thus the intestines
may be systematically gone over inch by inch. When perforations are
found they may be either dealt with as they appear—each opening
being closed transversely—or the entire intestinal canal may be
exposed. Contused spots will eventually slough, and should be
treated as if they were perforations. Injuries, therefore, of short
portions of the intestines might justify the removal of several inches.
Instead of making multiple resections, it would be better to remove
en masse the involved portion of the bowel, and then make lateral
anastomosis or an end-to-end suture. Perforations of the mesentery
as well as tears in the omentum should be carefully closed.
Everything which is not vitally necessary and which has been injured
should be removed. The posterior surface of the stomach, the lesser
cavity of the omentum, the region of the gall-bladder and pancreas,
the kidneys and ureters, and the bladder should be examined, in
order that injury may be detected. After operations of this kind the
abdominal cavity may be flushed with sterile salt solution; while the
question of drainage should be decided upon the individual merits
and indications of each case, as it is safer to drain the contaminated
peritoneal cavity than to rely upon mere cleansing and drying.
If the spleen or kidney be injured, it is safer to make a primary
removal of them; if they are not removed, posterior drainage should
be made.
In uncertain cases of abdominal wounds the back as well as the
abdomen should be scrubbed in order that if posterior drainage be
necessary it can be made without delay.
The after-treatment of such patients does not differ from that of
non-traumatic cases. Abstention from stomach feeding, the judicious
use of salines, dependence upon hypodermoclysis and rectal
nourishment, and the use of opiates are all matters of importance.
When the bladder has been injured there is usually more or less
injury of some of the other pelvic organs. An empty bladder will
escape more often than one which is full; while the latter will nearly
always leak into the peritoneal cavity or along the bullet track, thus
infecting one or both. The appearance of blood in the urine is one of
the indications of bladder injury, and sometimes the bladder will fill
with blood clot, which will produce the phenomenon of retention.
Such a case may rapidly succumb to infection if relief be not
promptly afforded, and this may come through abdominal section or
a combination of it with exploration through the perineum. Particles
of clothing and bone and even the bullet itself have been removed
from the cavity of the bladder. It is advisable to open the bladder
from below and insert a self-retaining drainage tube, by which,
especially when combined with the method of drainage by
siphonage, as described in the chapter on Surgery of the Bladder, a
satisfactory and continuous emptying of the organ may be
maintained.
CHAPTER XXIII.
PREVENTION AND CONTROL OF HEMORRHAGE;
SUTURES; KNOTS.
The first requisite after the infliction of a wound is to arrest and
control the hemorrhage. In many operations upon the extremities
precautions are taken to avoid its occurrence, and the so-called
bloodless method of operating, which is effected by the use of an
elastic bandage of pure rubber, is frequently employed and generally
gives satisfactory results. The pure-gum bandage was first
introduced into surgery by Martin, of Massachusetts, and its
combined use both as an elastic bandage and tourniquet was so
promoted by Esmarch that it is generally known as Esmarch’s
bandage, and Martin has failed to receive the credit due him.
The elastic bandage used for this purpose should be about three
inches in width and five or six yards in length, and made of pure
rubber. The operator begins by applying this to the tip of the
extremity which is to be made bloodless. It is wound around the limb
in spiral turns, with sufficient force to press out the blood from the
tissues and to empty the vessels into those of the trunk. It is
continued above the site of the operation, and then the limb is either
constricted with a tourniquet of the old type or with one of the rubber
appliances used for this purpose. A few turns of the rubber bandage
may be passed more tightly about the limb at this point and secured
with forceps. The rest of the bandage is then unwrapped from the
limb, which will be found pale and bloodless. Operation may then be
practised without the loss of more than a few drops of blood. All
divided vessels should be secured before the constriction is removed
and the wound closed.
In septic, tuberculous, and malignant conditions no such pressure
should be made, as harmful elements might be forced into the
circulation. In such cases the elastic tourniquet is applied high up
and no attempt is made to force the blood out of the limb. The limb
should be elevated so that its veins may empty before the bandage
is applied, and a certain amount of blood will thus be saved.
Care should be taken in graduating the tightness of the
constricting band, as well as its narrowness, and in preventing undue
pressure upon nerve trunks. Cases are on record of temporary and
even permanent paralysis, due to too vigorous application of the
tourniquet, and except upon large and stout limbs it is not often
necessary to apply it as tightly as is often done. Moreover even a
wide rubber bandage when stretched taut becomes little better than
a rubber cord or rubber tube and sinks into the tissues. A sterile
towel should be folded into a strip and wound around the limb, and
then a tourniquet should be applied over it so that pressure may be
more equably distributed and danger of paralysis reduced.
Exigencies may require the application of the elastic tourniquet as
high as it can be possibly used, either upon the shoulder or the hip.
This necessity is usually observed in amputations at those joints,
and the special methods required will be more fully dealt with when
speaking of these procedures. (See Chapter LVII.)
The elastic bandage should have been unrolled and sterilized with
the rest of the surgical equipment required, and even when so
protected it would be well to cover the limb with wet sterile towels
before applying the bandage, which is usually done at the last in
order to avoid contamination. When this is not done the final
scrubbing should not be effected until the bandage has been placed,
the tourniquet applied, and the bandage again removed.
The first measure, then, in the treatment of a wound is to prevent
loss of blood. This may be done in various ways, and the method
should depend upon the circumstances of the case. In emergency
cases it may be accomplished either by direct pressure, by
constriction of the limb above the injury, or in some instances by
mere position. If it be possible to make direct pressure through the
medium of some clean—preferably sterile—dressing or material, this
of course would be desirable. In all civilized armies soldiers are now
equipped with a package of sterile dressing by which an emergency
pad for this purpose can be promptly applied. Railroads and
steamers are now providing emergency outfits. In injury of the arm or
leg advantage may be taken of position, i. e., forced flexion, which is
maintained by any Fig. 60
measure or material
which can be made
available for this
purpose (Fig. 60).
Digital compression
over a main vessel
may also serve a
good purpose. Mere
elevation of the part,
as, for example, the
head, when not
otherwise contra-
indicated, or a hand
or foot, will do much
to check venous or
arterial flow.
Moreover, in these
positions reflex
contraction of arteries
occurs, even in those
of the head when the
arms are elevated.
For this reason in
cases of serious Illustrating forced flexion for control of hemorrhage.
nose-bleed it is often
advisable to keep the arms raised high above the head.
Of other means resorted to may be mentioned:
1. Extremes of Heat and Cold.—Water at a temperature of 130°
to 160° F. is a powerful
hemostatic. It stimulates contraction of the muscular coats of the
vessels and produces coagulation of the albuminous portions of the
blood upon the surface to which it is applied, and in this way plugs
the capillaries and small arteries and so prevents oozing. Heat with
pressure will be serviceable in many instances. Cold may be
employed by means of ice or iced water and may be made
serviceable in cavities like the mouth, the vagina, or the rectum, after
patients have recovered from the anesthetic and at a time when hot
water could not be borne. Cold has more of a constringing effect but
less coagulating property.
2. Pressure Directly Applied.—This may be made with a tampon
in some cavity, or by a graduated
absorbent dressing whose effect may be regulated by pressure of a
bandage or an elastic bandage. Care should be always given that
pressure be not too long nor too firmly made, and it should be
released as soon as there appears edema of the part below or any
evidence of insufficient circulation.
3. Styptics and Chemical Agents.—There are many substances
which contract vessels and
cause more or less coagulation of blood, and at one time there were
many of these in general use, but they have been supplemented by
other products, i. e., cocaine, antipyrine, and adrenalin. The effect of
cocaine is temporary, but sometimes is sufficient in the urethra or the
nasal cavity. Antipyrine, in 5 to 10 per cent. solution, alone or with
cocaine, has a similar effect, but is more lasting. Some years ago the
writer stated that by mixing 10 per cent. solutions of antipyrine and
tannin there was precipitated a gum-like material of extraordinary
tenacity. This will check oozing from any part to which it may be
applied, but it may adhere so tightly as to make it difficult to later
remove the tampon. Of the hemostatic drugs, adrenalin has the most
marvellous properties. It can be procured in solutions of 1 to 1000. A
solution of this strength, somewhat diluted, may be spread or applied
upon an oozing surface with almost instantaneous effect.
The use of gelatin in checking hemorrhage has given some
satisfaction upon the Continent, but has not found much favor in this
country. It consists of a solution of 2 parts of pure gelatin to 100 parts
of normal salt solution, which should be thoroughly sterilized. It is
injected subcutaneously to increase the coagulability of the blood,
and has also been injected directly into an aneurysmal sac or its
immediate vicinity to induce coagulation. It is likely that if the surgeon
have a patient with the hemorrhagic diathesis the combined use of
gelatin in this way and of calcium chloride internally would give
satisfactory results.
A styptic has recently been introduced by Freund under the name
“stypticin.” It is a product of the oxidation of narcotin, one of the
opium alkaloids, and is a yellowish powder of bitter taste. Chemically
it is cotarnin hydrochloride. It has been used especially in the
treatment of uterine hemorrhage, with a certain degree of success,
regardless of the cause of the hemorrhage. It may also be given in
cases of too profuse menstruation. The average dose is 2 to 3 Gr.
(0.15 to 0.20) at intervals of two or three hours. When a speedy
result is desired twice the above amount in 10 per cent. solution may
be given subcutaneously.
4. Destructive Methods may include the use of the sharp spoon,
chemical caustics, or the actual cautery.
The curette is usually employed for removal of surfaces which have
attained a spongy or easily bleeding condition, as the interior of the
uterus, bleeding ulcers in other cavities, etc. When fungoid tissue is
scraped to a base of healthy tissue there is usually a cessation of
further hemorrhage. Occasionally there are cases of fungating
cancer which bleed upon the slightest touch. The most radical way in
which to deal with these for temporary purposes is to destroy the
spongy tissue which bleeds so frequently. The gross part may be
done with the sharp spoon and the cautery may be made to finish
the work. Bleeding piles, when it is not permissible to treat them
more radically, should be touched with the actual cautery, with
stretching of the sphincter. The cautery knife should not be made too
hot, as it may act similar to a sharp blade instead of merely searing
by its heat.
5. Mechanical Means.—When vessels of considerable size or
masses of tissue containing them can be
made accessible, the best means of control of hemorrhage are those
which can be applied directly to the vessels. When this is not
possible they should be tied en masse. A method formerly in use
was acupressure. To effect this a needle was passed through the
overlying skin beneath the vessel and out again, and around this a
suture was tied to make pressure. Since the introduction of
absorbable materials this method has been supplanted by the use of
catgut sutures, which may be tied, cut short, and left to absorb.
Under the term “forcipressure” is included the method of seizing
vessels before, or as they bleed, in small forceps, which are
variously shaped and constructed, and grouped under the name of
hemostats. Small vessels seized between the blades of such an
instrument will have their walls so crushed that blood clot is so
quickly entangled that the forceps can be removed in a few moments
with little or no danger of subsequent bleeding. Larger vessels
should be ligated.
Torsion is a substitute for ligature, especially with the smaller
vessels, and denotes a twisting of the vessel end after its seizure,
breaking up its inner coat, and effectually sealing its lumen. Some
surgeons rely on torsion for the large vessels.
Angiotribe is the name applied to strong crushing forceps, by
which a pressure of several hundred pounds can be made through a
lever mechanism. In this a mass of tissue, as the broad ligament,
can be secured and such tremendous pressure brought to bear that
its vessels are crushed and destroyed beyond possibility of bleeding.
Downes has improved upon this mechanism by adapting to it an
electrocautery arrangement, by which not only pressure but also
heat is brought to bear. His instrument is called an electrothermic
clamp. To all of these instruments there are at least theoretical
objections, in that they are more or less clumsy or unwieldy and
require special equipment. They devitalize a considerable amount of
tissue, all of which has subsequently to be removed either by a
process of sloughing or by active phagocytosis; but they serve
perhaps a useful purpose in the crushing treatment of hemorrhoidal
tumors. They have been used only by a few, and have not found
wide acceptance.
6. Ligatures.—These are also mechanical means of controlling
hemorrhage, but deserve to be grouped by
themselves. Ligation of vessels may be preliminary or may be
performed as needed during an operation.
By a preliminary ligature is meant taking such precaution as tying
the carotid before operations on the face, the brain, or the femoral
artery before amputation at the hip. There is also the method of
temporary ligation of vessels by the application of a ligature which
should not be drawn too tightly, but simply serve the purpose of
gentle constriction for the half-hour or so during which it may be
needed, after which the vessel is promptly released. If this ligature
has not been too tightly applied the vessel walls will not have been
injured and circulation is restored. Crile has effected the same
purpose with the carotids by a small clamp whose pressure may be
regulated by a thumb-screw.
Ligation of large trunks is made for the purpose of influencing
nutrition by diminishing blood supply, as when the femoral is tied for
elephantiasis of the leg, or the carotid is tied or excised, as
suggested by Dawbarn, to cut off the blood supply from cancer of the
face or neck.
Ligatures are usually made of absorbable material, such as catgut,
chromicized or not, as may be desired, or of silk, which disappears
after a time, but which is not regarded as absorbable. For special
purposes other material has been used at times, such as strips of ox
aorta. The surgeon has his choice of these, whether he intends to
ligate the end of an artery or tie a vessel in its continuity. For the
latter purpose the ligature is threaded into an artery needle, or a
specially devised curved forceps known as the “Cleveland” needle.
When tying the exposed end of a bleeding vessel it is desirable to tie
near the cut end, so as not to leave tissue which should be
absorbed, and for the same reason to not include unnecessary
tissue. One of the forms of knot similar to the “reef” knot, which will
not slip, should be used. Silk has the advantage over catgut in that a
knot tied with it will rarely become loose, whereas catgut knots,
unless carefully tied, will occasionally slip. The ligature knots should
be left as short as is consistent with protection against slipping.
Fate of Ligatures.—Silk or celluloid thread are the most
unabsorbable of ligature materials ordinarily
used. Even these usually disappear after the lapse of time.
Absorbable ligatures of catgut disappear after a few days or weeks,
according to the method of their preparation. Absorption is practically
a matter of phagocytosis, the end of the vessel or tissue beyond the
ligature disappearing with the latter by the process of tissue
digestion.
When vessels of large size are ligated the blood supply is taken up
by the collateral circulation. On the possibility or practicability of the
latter will depend the success of such operations as ligation of large
trunks for the cure of aneurysm. Should the collateral supply prove
insufficient, gangrene, beginning at the tip of an extremity, is an
assured fact.
The effects of the ligature on the vessel wall will depend upon the
security with which it is tied. The damage done to the inner and
middle coats by a ligature tied for permanent purposes is usually
sufficient to rupture them, after which they roll up inside the outer
coat, while the blood contained in that part of the vessel coagulates,
the clot extending to the first vessels above and below. This quickly
organizes, becomes infiltrated with cells, and brings about the
complete obliteration of that part of the vessel and its transformation
into a fibrous cord. This can only occur, however, when asepsis has
prevailed. Should the ligature prove septic the patient is exposed to
two dangers: that of secondary hemorrhage by ulceration and
breaking down of the clot instead of organization, and the ordinary
dangers of septic infection.
There are circumstances under which it may be well to modify the
ordinary methods of ligation and not to tie knots too tightly—i. e.,
when the vessels are greatly weakened by extensive disease, or so
stiffened by calcareous degeneration as to cause them to snap
under rough handling. It has been suggested to use pieces of ox
aorta to prevent these accidents.
The dangers of secondary hemorrhage pertain mostly to septic
conditions. In an absolutely aseptic wound, properly cared for,
secondary hemorrhage is almost impossible, but as soon as germ
activity begins lymph barriers are broken down, tissues softened,
and weakened vascular walls may give way.
Secondary hemorrhage may call for ligation of a main trunk not
previously attacked, but in a majority of cases will demand reopening
of the wound and further search for bleeding points. Should the
patient’s condition be materially weakened the effects of position and
of pressure may be tried in suitable cases. But the pressure which
may be effective to check the hemorrhage may be sufficient to
completely shut off circulation from parts beyond, and such pressure
should, therefore, be judiciously practised and its effects carefully
watched. The signs of secondary hemorrhage will vary with the
location of its source. Occurring on or near the surface it will usually
stain the dressing; occurring deeply, as in the pelvic or abdominal
cavities, it will produce prompt symptoms of shock, i. e., lowered
blood pressure, whose degree will indicate the extent of the blood
loss. In these cases, unless the patient’s condition contra-indicate
the measure, the wound should be opened under anesthesia, and
the source of the bleeding sought out and mastered. The surgeon
should never overlook the fact that after the gradual restoration of
the force of the heart’s action, as the patient recovers from
anesthesia and becomes uncontrollably restless, vessels may bleed
which upon the operating table scarcely emitted a drop of blood.
Experiences of this kind teach the value of hemostasis during
operation, and even of absolute rest induced by an opiate,
immediately after.
There are certain conditions in which the surgeon is led by
experience to anticipate liability to unusual hemorrhage; such as
cases of hemophilia, or anything that savors of it or of scurvy. In
patients who claim to be “bleeders,” the surgeon should be
extremely chary and careful during his operative work. There are,
furthermore, certain toxemias, especially that of cholemia, during
which the blood is slow in coagulation. When the time for preparation
is afforded no cholemic patient should be operated without a few
days’ previous preparation by four or five daily doses of calcium
chloride, 20 to 30 grains given in plenty of water. This is known to
greatly increase blood coagulability, and thereby to measurably
protect the patient against the danger of an oozing of blood difficult
to control.
The other measures needful in the treatment of secondary
hemorrhage are those described in Chapter XVIII.

TREATMENT OF WOUNDS.
The general consideration of wounds in the previous chapters
necessarily included many suggestions concerning their treatment.
The first essential in the treatment of open wounds is exact
hemostasis; the next is the removal of dirt and foreign material of all
kinds, i. e., visible and invisible. Accidental wounds are practically
never received upon surgically clean surfaces, and it may be always
assumed that the possibility of infection is present. It becomes then a
question to what extent the surgeon should go in removing or
avoiding danger. Obviously all visible foreign material should be
carefully removed and all dirt should be scrupulously washed away.
Emergency treatment of a bleeding injury in a well-regulated hospital
is one thing, and the exigency of a railroad accident or casualty away
from civilization is quite another. The canons of antisepsis and
asepsis have been elsewhere sufficiently well laid down to indicate
what should be done at the time when it can be done.
The protective vitality of the human tissues permits them to bear
frightful injuries or resist infection in a surprising way. But occasional
escapes from severe accidents by no means justify carelessness
when caution can be taken, and cannot be held as excusing the
surgeon for any neglect in antisepsis.
A bruise or contusion accompanied by a slight abrasion may seem
a trifling injury, and yet by virtue of the injury the resisting powers of
the tissues may be rendered insufficient to protect them from
infection through a break of the surface. No relatively small lesions of
this kind can be safely neglected, but should be cleaned and
covered with an antiseptic compress, either wet with some suitable
solution or smeared with a protective ointment, or used dry with a
suitable antiseptic powder, as, for example, bismuth subiodide.
Injuries followed by considerable swelling should be treated
according to the time which has elapsed since their reception. If, for
instance, a bruise or sprain be seen early and before much swelling
has occurred, ice-cold applications can be made in the hope that, by
limiting the flow of blood, the outpour of fluids may be prevented.
This effort should be seconded by position, and perhaps by gentle
pressure. Conversely when a case is seen late, after the tissues
have become waterlogged with fluids, heat should be applied in
order that by stimulating the circulation reabsorption may more
speedily take place. In this case, also, suitable pressure may be of
service.
When there is actual hematoma, and the exuded fluid fails to
disappear, an incision properly made and in the right place may
permit the clot to be turned out, and then speedy recovery secured
by coaptation with sutures and pressure.
Poultices are nauseous applications to make to the human body.
By their indiscriminate use much harm has been done and
suppuration encouraged or brought about, which but for them would
not have occurred. There are occasions when a hot flaxseed poultice
may be of use, but they are very few and far between. With regard to
such remedies as arnica, witch-hazel, etc., the best that can be said
of them is that they may be of some use by virtue of the alcohol
which they contain; they serve the purpose, then, of a diluted alcohol
and nothing else.
There is virtue in the use of a cold wet pack, or compress,
especially in the treatment of chronic affections of the joints, and
their value can be perceptibly enhanced by using solutions of
sodium, or preferably ammonium chloride, and the addition of a little
alcohol. Absorbent material wet in such a solution, wrapped around
the part, covered with oiled silk or some impervious material, while
the part is kept at rest, will render valuable service in conditions of
this kind.
In regard to the relative worth of heat and cold for relief of pain, the
alleviating effect of heat is more promptly manifested, but that of cold
is more permanent, and especially is this true of chronic affections of
the joints and bones.
In the treatment of open wounds, bleeding having been first
controlled, all the surrounding parts, as well as the wound itself,
should be sterilized. In a scalp wound the scalp should be shaved as
well as scrubbed. All particles of visible dirt should be carefully
picked out, and every particle of tissue whose vitality is so
compromised that it apparently cannot live should be excised. The
wound may then be irrigated or washed out with hydrogen peroxide,
and not until all this is done should the operator consider how he
may best close it, as well as whether he needs to provide for
drainage. A ragged line of tearing will leave a jagged and more
unsightly scar, especially on the face; therefore the margins of such
a lacerated wound should be trimmed before coapting them.
The method of closure will depend on the degree of tension
necessary for the purpose. Parts that come together easily may

You might also like