Skip to main content
Introduction to Numerical Methods and MATLAB Programming for Engineers
Todd Young, Martin J. Mohlenkamp
Contents
Search Book
close
Search Results:
No results.
Dark Mode
Prev
Up
Next
\(\newcommand{\N}{\mathbb N} \newcommand{\Z}{\mathbb Z} \newcommand{\Q}{\mathbb Q} \newcommand{\R}{\mathbb R} \newcommand{\bb}{\mathbf{b}} \newcommand{\fb}{\mathbf{f}} \newcommand{\rb}{\mathbf{r}} \newcommand{\ub}{\mathbf{u}} \newcommand{\vb}{\mathbf{v}} \newcommand{\wb}{\mathbf{w}} \newcommand{\xb}{\mathbf{x}} \newcommand{\yb}{\mathbf{y}} \newcommand{\zb}{\mathbf{z}} \newcommand{\Eb}{\mathbf{E}} \newcommand{\Ub}{\mathbf{U}} \newcommand{\ew}{\textbf{ew}} \newcommand{\ev}{\textbf{ev}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \definecolor{fillinmathshade}{gray}{0.9} \newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}} \)
Front Matter
Colophon
Preface
1
MATLAB and Solving Equations
1.1
Vectors, Functions, and Plots in MATLAB
1.1.1
Entering vectors
1.1.2
Basic Formatting
1.1.3
Plotting Data
1.1.4
Data as a Representation of a Function
1.1.5
Built-in Functions
1.1.6
User-Defined Anonymous Functions
1.1.7
Exercises
1.2
Matlab Programs
1.2.1
Function Programs
1.2.1.1
Printing, Returning, Capturing, and Printing
1.2.2
Script Programs
1.2.3
Program Comments
1.2.4
Exercises
1.3
Newton’s Method and Loops
1.3.1
Solving equations numerically
1.3.2
Newton iterations
1.3.3
The loop:
for ... end
1.3.4
Convergence
1.3.5
Exercises
1.4
Controlling Error and Conditional Statements
1.4.1
Measuring error and the Residual
1.4.2
The
if ... end
statement
1.4.3
The loop:
while ... end
1.4.4
Exercises
1.5
The Bisection Method and Locating Roots
1.5.1
Bisecting and the
if ... else ... end
statement
1.5.2
Bounding the Error
1.5.3
Locating the roots (if any)
1.5.4
Exercises
1.6
Secant Methods
1.6.1
The Secant Method
1.6.2
The Regula Falsi (False Position) Method
1.6.3
Convergence
1.6.4
Simulations and Experiments
1.6.5
Exercises
1.7
Symbolic Computations
1.7.1
Defining functions and basic operations
1.7.2
Functions of Two Variables and Partial Derivatives
1.7.3
Other useful symbolic operations
1.7.4
New Notation
1.7.5
Exercises
1.8
Review of Chapter 1
1.8.1
Methods and Formulas
1.8.1.1
Solving equations numerically:
1.8.1.2
Newton’s method:
1.8.1.3
Bisection method:
1.8.1.4
Secant method:
1.8.1.5
Regula Falsi
1.8.1.6
Convergence:
1.8.1.7
Locating roots:
1.8.1.8
Usage:
1.8.2
MATLAB
1.8.2.1
Commands:
1.8.2.2
Program structures:
1.8.2.3
Function Programs:
1.8.2.4
Script Programs:
1.8.2.5
Symbolic:
2
Linear Algebra
2.1
Matrices and Matrix Operations in MATLAB
2.1.1
Matrix operations
2.1.2
Component-wise operations
2.1.3
The identity matrix and the inverse of a matrix
2.1.4
The “Norm” of a matrix
2.1.5
Some other useful commands
2.1.6
Exercises
2.2
Introduction to Linear Systems
2.2.1
How linear systems occur
2.2.2
Linear systems are equivalent to matrix equations
2.2.3
Triangular matrices and back substitution
2.2.4
Gaussian Elimination
2.2.5
MATLAB’s matrix solve command
2.2.6
Exercises
2.3
Some Facts About Linear Systems
2.3.1
Some inconvenient truths
2.3.2
Basic theory
2.3.3
The Residual
2.3.4
Exercises
2.4
Accuracy, Condition Numbers and Pivoting
2.4.1
The effect of rounding
2.4.2
Row Pivoting
2.4.3
Condition number
2.4.4
Exercises
2.5
LU Decomposition
2.5.1
LU decomposition
2.5.2
Using LU to solve equations
2.5.3
Exercises
2.6
Nonlinear Systems - Newton’s Method
2.6.1
An Example
2.6.2
Vector Notation
2.6.3
Linear Approximation for Vector Functions
2.6.4
Newton’s Method
2.6.5
An Experiment
2.6.6
Exercises
2.7
Eigenvalues and Eigenvectors
2.7.1
Finding Eigenvalues for
\(2\times 2\)
and
\(3\times3\)
2.7.2
Larger Matrices
2.7.3
Complex Eigenvalues
2.7.4
Exercises
2.8
An Application of Eigenvectors: Vibrational Modes and Frequencies
2.8
Exercises
2.9
Numerical Methods for Eigenvalues
2.9.1
The Power Method
2.9.2
Symmetric, Positive-Definite Matrices
2.9.3
The residual of an approximate eigenvector-eigenvalue pair
2.9.4
The Inverse Power Method
2.9.5
Exercises
2.10
The QR Method*
2.10
Exercises
2.11
Review of Chapter 2
2.11.1
Methods and Formulas
2.11.1.1
Basic Matrix Theory:
2.11.1.2
Solving Process:
2.11.1.3
Condition number:
2.11.1.4
LU factorization:
2.11.1.5
Eigenvalues and eigenvectors:
2.11.1.6
Complex eigenvalues:
2.11.1.7
Vibrational modes:
2.11.1.8
Power Method:
2.11.1.9
Inverse Power Method:
2.11.1.10
Symmetric and Positive definite:
2.11.1.11
QR method (Not covered in MATH 3600 at Ohio University):
2.11.2
MATLAB
2.11.2.1
Matrix arithmetic:
2.11.2.2
Special matrices:
2.11.2.3
General matrix commands:
2.11.2.4
Matrix decompositions:
3
Functions and Data
3.1
Polynomial and Spline Interpolation
3.1.1
A Chemical Reaction
3.1.2
Polynomial Interpolation
3.1.3
Predicting the future?
3.1.4
More data
3.1.5
A challenging data set
3.1.6
The idea of a spline
3.1.7
Cubic spline
3.1.8
Exercises
3.2
Least Squares Fitting: Noisy Data
3.2.1
Traffic flow model
3.2.2
Least squares
3.2.2.1
Linear least squares
3.2.3
Drag coefficients
3.2.4
Exercises
3.3
Integration: Left, Right and Trapezoid Rules
3.3.1
The Left and Right endpoint rules
3.3.2
The Trapezoid rule
3.3.3
Using the Trapezoid rule for areas in the plane
3.3.4
Vector Operations using Slicing and Summing
3.3.5
Exercises
3.4
Integration: Midpoint and Simpson’s Rules
3.4.1
Midpoint rule
3.4.2
Simpson’s rule
3.4.3
Error bounds
3.4.4
Exercises
3.5
Plotting Functions of Two Variables
3.5.1
Functions on Rectangular Grids
3.5.2
Scattered Data and Triangulation
3.5.3
Exercises
3.6
The Gradient and Max-Min Problems
3.6.1
The gradient of a function of multiple variables
3.6.2
Optimization in multiple variables
3.6.3
The gradient ascent or descent method
3.6.4
Exercises
3.7
Double Integrals for Rectangles
3.7.1
The center point method
3.7.2
The four corners method
3.7.3
The double Simpson method
3.7.4
Exercises
3.8
Double Integrals for Non-rectangles
3.8.1
Redefining the function
3.8.2
Integration Based on Triangles
3.8.3
Exercises
3.9
Numerical Differentiation
3.9.1
Approximating derivatives from data
3.9.2
An example
3.9.3
Errors of approximation
3.9.4
Partial Derivatives
3.9.5
Exercises
3.10
The Main Sources of Error
3.10.1
Truncation Error
3.10.2
Roundoff Error
3.10.3
Loss of Precision (also called Loss of Significance)
3.10.4
Bad Conditioning
3.10.5
Summary
3.10.6
Exercises
3.11
Review of Chapter 3
3.11.1
Methods and Formulas
3.11.1.1
Polynomial Interpolation:
3.11.1.2
Spline Interpolation:
3.11.1.3
Least Squares:
3.11.1.4
Interpolation vs. Extrapolation:
3.11.1.5
Numerical Integration:
3.11.1.6
Numerical Integration Rules with Even Spacing:
3.11.1.7
Simpson’s rule:
3.11.1.8
Area of a region:
3.11.1.9
Accuracy of integration rules:
3.11.1.10
Double Integrals on Rectangles:
3.11.1.11
Integration based on triangles:
3.11.1.12
Finite Differences
3.11.1.13
Sources of error:
3.11.2
MATLAB
3.11.2.1
Data Interpolation:
3.11.2.2
Functions of 2 Variables and Meshgrids:
3.11.2.3
Integration:
3.11.2.4
Integration over non-rectangles:
3.11.2.5
Logical expressions
4
Differential Equations
4.1
Reduction of Higher Order Equations to Systems
4.1.1
The motion of a pendulum
4.1.2
Converting a general higher order equation
4.1.3
Using MATLAB to solve a system of ODE’s
4.1.4
Exercises
4.2
Euler Methods
4.2.1
Numerical Solution of an IVP
4.2.2
The Euler Method
4.2.3
The problem with the Euler method
4.2.4
The Modified Euler Method
4.2.5
Exercises
4.3
Higher Order Methods
4.3.1
The order of a method
4.3.2
Fourth Order Runge-Kutta
4.3.3
Variable Step Size and RK45
4.3.4
Why order matters
4.3.5
Exercises
4.4
ODE Boundary Value Problems and Finite Differences
4.4.1
Steady State Heat and Diffusion
4.4.2
Beam With Tension
4.4.3
Finite Difference Method – Linear ODE
4.4.4
Exercises
4.5
Finite Difference Method – Nonlinear ODE
4.5.1
Heat conduction with radiation
4.5.2
Relaxation Method for Nonlinear Finite Differences
4.5.3
Implementing the Relaxation Method
4.5.4
Exercises
4.6
Parabolic PDEs - Explicit Method
4.6.1
Heat Flow and Diffusion
4.6.2
Explicit Method Finite Differences
4.6.3
Initial Condition
4.6.4
Boundary Conditions
4.6.5
Implementation
4.6.6
Exercises
4.7
Solution Instability for the Explicit Method
4.7.1
Writing the Difference Equations in Matrix Form
4.7.2
Consequences
4.7.3
Exercises
4.8
Implicit Methods
4.8.1
The Implicit Difference Equations
4.8.2
Crank-Nicholson Method
4.8.3
Exercises
4.9
Insulated Boundary Conditions
4.9.1
Insulation
4.9.2
Implementation in a linear equation by elimination
4.9.3
Insulated boundary conditions in time-dependent problems
4.9.4
An example
4.9.5
Exercises
4.10
Finite Difference Method for Elliptic PDEs
4.10.1
Examples of Elliptic PDEs
4.10.2
The Finite Difference Equations
4.10.3
Direct Solution of the Equations
4.10.4
Iterative Solution
4.10.5
Exercises
4.11
Finite Elements
4.11.1
Triangulating a Region
4.11.2
What is a finite element?
4.11.3
What is a finite element solution?
4.11.4
Experiment with finite elements
4.11.5
Values at boundary nodes
4.11.6
Exercises
4.12
Determining Internal Node Values
4.12.1
Variational Principles
4.12.2
The finite element solution
4.12.3
Application to the steady state heat equation
4.12.4
Experiment
4.12.5
Exercises
4.13
Review of Chapter 4
4.13.1
Initial Value Problems
4.13.1.1
Reduction to First order system:
4.13.1.2
Euler’s method:
4.13.1.3
Modified (or Improved) Euler method:
4.13.2
Boundary Value Probems
4.13.2.1
Finite Differences:
4.13.2.2
Explicit Method Finite Differences for Parabolic PDE (heat):
4.13.2.3
Implicit Method Finite Differences for Parabolic PDE (heat):
4.13.2.4
Crank-Nicholson Method Finite Differences for Parabolic PDE (heat):
4.13.2.5
Finite Difference Method for Elliptic PDEs:
4.13.2.6
Finite Elements:
4.13.3
MATLAB
Backmatter
A
Programs Used and MATLAB Reference
A.1
Glossary of Select MATLAB Commands
A.1.1
Mathematical Operations
A.1.2
Built-in Mathematical Constants
A.1.3
Built-in Mathematical Functions
A.1.4
Built-in Numerical Mathematical Operations
A.1.5
Built-in Symbolic Mathematical Operations
A.1.6
Graphics Commands
A.1.7
Special MATLAB Commands
A.1.8
MATLAB Programming
A.1.9
Commands for Matrices and Linear Algebra
A.2
Programs Used
Colophon
Colophon
Colophon
©2020–2026 Todd R. Young and Martin J. Mohlenkamp
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit
CreativeCommons.org
🔗