Numerical Methods in Civil Engineering

# Numerical Methods in Civil Engineering

The field of numerical analysis predates the invention of modern computers by many centuries. Linear interpolation was already in use more than 2000 years ago. Many great mathematicians of the past were preoccupied by numerical analysis, as is obvious from the names of important algorithms like Newton's method, Lagrange interpolation polynomial, Gaussian elimination, or Euler's method.

To facilitate computations by hand, large books were produced with formulas and tables of data such as interpolation points and function coefficients. Using these tables, often calculated out to 16 decimal places or more for some functions, one could look up values to plug into the formulas given and achieve very good numerical estimates of some functions. The canonical work in the field is the NIST publication edited by Abramowitz and Stegun, a 1000-plus page book of a very large number of commonly used formulas and functions and their values at many points. The function values are no longer very useful when a computer is available, but the large listing of formulas can still be very handy.

The mechanical calculator was also developed as a tool for hand computation. These calculators evolved into electronic computers in the 1940s, and it was then found that these computers were also useful for administrative purposes. But the invention of the computer also influenced the field of numerical analysis, since now longer and more complicated calculations could be done.

AN OVERVIEW OF BASIC CONCEPTS ............................................................................. 1

1. ROOTS OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS ................................ 11

Introduction .............................................................................................................. 11

1.1. Intermediate Value Property ................................................................................... 11

1.2. Bisection Method ...................................................................................................... 11

1.3. Calculation of Number of Iterations ....................................................................... 12

1.4. Order of Convergence of Iterative Methods ............................................................ 12

1.5. Order of Convergence of Bisection Method............................................................. 12

1.6. Rate of Convergence of a Sequence ......................................................................... 12

1.7. Theorem I: Bisection Method Always Converges ................................................... 13

1.8. Iteration Method (Successive Approximation Method) ......................................... 17

1.8A. Theorem II: Sufficient Condition for Convergence of Iterations ........................... 18

1.9. Order of Convergence of Iteration Method ............................................................. 19

1.10. Solution of Simultaneous Non-linear Equations .................................................... 27

1.11. Sufficient Condition for the Convergence of Iteration Method for Two

Unknowns ................................................................................................................. 27

1.12. Procedure to Solve Simultaneous Non-linear Equations in Two Variables

by Iterative Method. ................................................................................................. 28

1.13. Method of False Position Or Regula-Falsi Method ................................................ 30

1.14. Order of Convergence of Regula-Falsi Method ....................................................... 36

1.15. Newton-Raphson Method or Newton's Method ...................................................... 38

1.16. Sufficient Condition for the Convergence of Newton-Raphson Method ............... 39

1.17. Order of Convergence of Newton-Raphson Method ............................................... 39

1.18. Geometrical Significance of Newton-Raphson Method. ......................................... 40

1.19. Applications of Newton-Raphson's or Newton's Iterative Formulae .................... 41

2. LINEAR EQUATIONS AND EIGEN VALUES PROBLEMS .............................................. 54

2.1. Introduction to Linear Systems ............................................................................... 54

2.2. Solution of Simultaneous Linear Equations by Matrix Method or Matrix Inversion Method ............... 55

2.3. Elementary Operations or Transformations on a Matrix ..................................... 56

2.4 Gauss-Jordan Method (Inverse of a Matrix by Elementary Operations) ............. 57

2.5. Gauss Elimination Method (Without Pivoting) to Solve Liner Equations ........... 60

2.6. Failure of Gauss Elimination Method..................................................................... 61

2.7. Gauss Elimination Method (with Partial Pivoting) to Solve Linear Equations .. 61

2.8. Gauss Elimination Method (with Complete Pivoting) to Solve Linear Equations . 61

2.9. Gauss-Jordan Elimination Method to Solve Linear Equations ............................ 69

2.10. Numerical Solution of Linear Systems: Iterative Methods or Indirect Methods. 72

2.11. Jacobi's Iterative Method or Gauss-Jacobi Iterative Method or Method of

Simultaneous Displacement .................................................................................... 73

2.12. Gauss-Seidel Iterative Method or Method of Successive Displacement ............... 76

2.13. Eigen Values and Eigen Vectors of a Matrix .......................................................... 83

2.14. Elementary Properties of Eigen Values and Eigen Vectors .................................. 83

2.15. Rayleigh's Power Method ......................................................................................... 86

3. INTERPOLATION WITH EQUAL AND UNEQUAL INTERVALS ...................................... 96

Introduction .............................................................................................................. 96

3.1. Finite Differences ..................................................................................................... 96

3.2. Some Other Difference Operators ........................................................................... 98

3.3. Relation Between Difference Operators ................................................................. 99

3.4. Differences of a Polynomial ................................................................................... 100

3.5. Missing Term Technique........................................................................................ 108

3.6. Factorial Notation .................................................................................................. 112

3.7. Differences of [x]n.................................................................................................... 112

3.8. Reciprocal Factorial ................................................................................................ 113

3.9. Method of Separation of Symbols .......................................................................... 116

3.10. Interpolation with Equal Intervals ....................................................................... 119

3.11. Assumptions for Interpolation ............................................................................... 119

3.12. Newton's Formulae for Interpolation .................................................................... 120

3.13. Error in Polynomial Interpolation ......................................................................... 127

3.14. Error in Newton-Gregory Forward Interpolation Formula ................................. 127

3.15. Central Difference Interpolation Formulae .......................................................... 137

3.16. Interpolation with Unequal Intervals ................................................................... 155

3.17. Inverse Interpolation .............................................................................................. 163

3.18. Divided Differences ................................................................................................ 164

3.19. Properties of Divided Differences .......................................................................... 165

3.20. Algebra of Divided Differences .............................................................................. 167

3.21. Relation Between Divided Differences and Forward Differences ...................... 168

3.22. Merits and Demerits of Lagrange's Interpolation Formula ................................ 169

4. SOLUTION OF INITIAL AND BOUNDARY VALUE PROBLEMS .................................. 177

Introduction ............................................................................................................ 177

4.1. Collocation Method ................................................................................................. 177

4.2. Galerkin's Method of Least Squares ..................................................................... 183

4.3. Runge-Kutta Methods ............................................................................................ 192

4.4. First order Runge-Kutta Method .......................................................................... 192

4.5. Second Order Runge-Kutta Method ...................................................................... 193

4.6. Third Order Runge-Kutta Method or Runge's Method ........................................ 193

4.7. Fourth Order Runge-Kutta Method ...................................................................... 194

4.8. Runge-Kutta Method for Simultaneous Initial Value Problems ........................ 194

4.9. Runge-Kutta Method for Second Order Initial Value Problem........................... 195

5A. FINITE DIFFERENCE METHOD FOR ORDINARY DIFFERENTIAL EQUATIONS ....... 204

Introduction ............................................................................................................ 204

5.1A. Finite-difference Method for Ordinary Differential Equation ............................ 204

5B. FINITE DIFFERENCE METHOD FOR PARTIAL DIFFERENTIAL EQUATIONS........... 218

Introduction ............................................................................................................ 218

5.1B. Classification of Linear Partial Differential Equation of Second Order ............ 218

5.2B. Derive Finite Difference Approximation to Partial Derivatives ......................... 221

5.3B. Grid Lines and Grid Points .................................................................................... 223

5.4B. Solution of Laplace's Equation by Finite Difference Method .............................. 226

5.5B. Procedure for ADI Method ..................................................................................... 228

5.6B. Solution of Poisson's Equation by Finite Difference Method .............................. 243

5.7B. Parabolic Partial Differential Equations .............................................................. 247

5.8B. Explicit and Implicit Methods ............................................................................... 247

5.9B. Hyperbolic Partial Differential Equation ............................................................. 268

5.10B. Finite Difference Method of Solving one Dimensional Wave Equation. ............ 268

6. CORRELATION AND REGRESSION ANALYSIS ........................................................... 278

6.1. Univariate Distributions ........................................................................................ 278

6.2. Bivariate Distributions .......................................................................................... 278

6.3. Correlation .............................................................................................................. 278

6.4. Positive or Negative Correlation ........................................................................... 278

6.5. Linear and Non-linear Correlation ....................................................................... 278

6.6. Methods of Measuring Correlation ....................................................................... 278

6.7. Scatter or Dot Diagram Method ............................................................................ 279

6.8. Karl Pearson's Coefficient of Correlation ............................................................. 280

6.9. Alternative Formula of Correlation Coefficient ................................................... 283

6.10. Characteristics of Karl Pearson's Coefficient of Correlation............................... 283

6.11. Degree of Karl Pearson's Coefficient of Correlation ............................................ 284

6.12. Probable Error ........................................................................................................ 284

6.13. Standard Error ....................................................................................................... 284

6.14. Limits of Correlation .............................................................................................. 284

6.15. Calculation of Coefficient of Correlation for a Bivariate Frequency

Distribution ............................................................................................................. 292

6.16. Spearman's Rank Correlation ............................................................................... 294

6.17. Repeated Ranks or Tied Ranks ............................................................................. 300

6.18. Regression Analysis ................................................................................................ 303

6.19. Curve of Regression and Regression Equation .................................................... 304

6.20. Linear Regression ................................................................................................... 304

6.21. Lines of Regression ................................................................................................. 304

6.22. Derivation of Lines of Regression .......................................................................... 305

6.23. Regression Coefficients .......................................................................................... 306

6.24. Uses of Regression Analysis .................................................................................. 306

6.25. Comparison of Correlation and Regression Analysis........................................... 306

6.26. Properties of Regression Coefficients .................................................................... 307

6.27. Angle Between Two Lines of Regression .............................................................. 308

7. FITTING A POLYNOMIAL ................................................................................................ 322

Introduction ............................................................................................................ 322

7.1. Importance of Fitting a Polynomial ...................................................................... 322

7.2. Method of Least Squares........................................................................................ 322

7.3. Fitting a Straight Line ........................................................................................... 323

7.4. Fitting of an Exponential Curve y = aebx............................................................... 327

7.5. Fitting of the Curve y = axb.................................................................................... 328

7.6. Fitting of the Curve y = abx.................................................................................... 328

7.7. Fitting of the Curve pvr= k .................................................................................... 328

7.8. Fitting of the Curve xy = b + ax ............................................................................. 329

7.9. Fitting of the Curve y = ax2

7.11. Fitting of the Curve y = ax +

7.12. Fitting of the Curve y = a +

7.13. Fitting of the Curve y =

7.14. Fitting of the Curve 2x = ax2

7.16. Most Plausible Solution of a System of Linear Equations .................................. 341

7.17. Polynomial Fit: Non-linear Regression ................................................................. 343

8. NUMERICAL INTEGRATION IN TIME: IMPLICIT AND EXPLICIT METHOD ............... 349

Introduction ............................................................................................................ 349

8.1. Stability of Explicit Methods ................................................................................. 349

8.2. Stability of Implicit Methods ................................................................................. 349

8.3. Single-degree-of-Freedom (SDOF) Systems ......................................................... 350

8.4. Fundamental Equation of Motion for a SDOF System ........................................ 350

8.5. Derivation of Newmark's Method ......................................................................... 351

8.6. Stability of Newmark's Method ............................................................................. 352

8.7. Newmark's Algorithm for a SDOF System ........................................................... 353

8.8. Numerical Integration in Time by Explicit Method............................................. 360

8.9. Central Difference Method Algorithm to Find Displacement, Velocity and Acceleration of a SDOF System. ................. 360

INDEX ........................................................................................... 364