Skip to main content
Numerical Methods with Programming
Leonid Kovalev
Contents
Search Book
close
Search Results:
No results.
Dark Mode
Prev
Up
Next
\( \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
Acknowledgements
Preface
I
Using Matlab
1
Scalars, vectors and matrices
1.1
Matlab interface
1.2
Assigning scalar values
1.3
Creating vectors and matrices
1.4
Operations on vectors and matrices
1.5
Accessing the entries of vectors and matrices
1.6
Comments and sections in a script
1.7
Examples and questions
1.8
Homework
2
Linear systems, array operations, plots
2.1
Systems of linear equations
2.2
More tools for constructing matrices
2.3
Array operations
2.4
Implicit expansion of arrays
2.5
Plotting
2.6
Examples and questions
2.7
Homework
3
Built-in functions, input, output
3.1
Built-in functions
3.2
Random numbers and histograms
3.3
User input
3.4
Formatted output
3.5
Examples and questions
3.6
Homework
4
Control flow: loops and conditional statements
4.1
for
loop
4.2
while
loop
4.3
if
statement
4.4
Breaking out of a loop
4.5
Measuring the computation time
4.6
Examples and questions
4.7
Homework
5
User-defined functions
5.1
Anonymous functions
5.2
Named functions
5.3
Examples and questions
5.4
Homework
II
Solving Equations
6
Systems of linear equations
6.1
Classification of linear systems
6.2
Systems without free variables
6.3
Systems with free variables
6.4
The effect of round-off errors
6.5
Examples and questions
6.6
Homework
7
Root finding: bisection
7.1
Motivation for solving equations numerically
7.2
The meaning of a numeric solution
7.3
Bisection method
7.4
Limitations of the bisection method
7.5
Examples and questions
7.6
Homework
8
Root finding: fixed point iteration
8.1
Classification of fixed points
8.2
Rewriting equations in the fixed-point form
8.3
The speed of convergence of fixed-point iteration
8.4
Examples and questions
8.5
Homework
9
Newton’s method and its relatives
9.1
Newton’s method
9.2
Potential issues with Newton’s method
9.3
The secant method
9.4
How
fzero
works
9.5
The relaxation parameter
9.6
Examples and questions
9.7
Homework
10
Systems of several nonlinear equations: multivariate Newton’s method
10.1
Systems of nonlinear equations
10.2
Multivariate Newton’s method
10.3
Potential issues
10.4
Examples and questions
10.5
Homework
11
Broyden’s method
11.1
Idea of Broyden’s method
11.2
Outer products
11.3
Details of Broyden’s method
11.4
Examples and questions
11.5
Homework
III
Numerical Calculus
12
Numerical differentiation
12.1
Definition of derivative and the order of error
12.2
Loss of significance
12.3
Symmetric difference formulas
12.4
Richardson extrapolation
12.5
Examples and questions
12.6
Homework
13
Numerical integration: basic rules
13.1
Riemann sums
13.2
Left, right, midpoint rules
13.3
Trapezoidal rule
13.4
Error estimates
13.5
Examples and questions
13.6
Homework
14
Simpson’s rule and other Newton-Cotes rules
14.1
Simpson’s rule
14.2
Other derivations of Simpson’s rule
14.3
Newton-Cotes rules
14.4
Examples and questions
14.5
Homework
15
Legendre polynomials and Laguerre polynomials
15.1
Motivation: search for better evaluation points
15.2
Legendre polynomials
15.3
Laguerre polynomials
15.4
Examples and questions
15.5
Homework
16
Gauss-Legendre and Gauss-Laguerre integration
16.1
Brief recap of orthogonal polynomials
16.2
Gauss-Legendre integration
16.3
Gauss-Laguerre integration
16.4
Examples and questions
16.5
Homework
17
Adaptive integration
17.1
Why we need adaptive methods
17.2
Estimating error by using two step sizes
17.3
Recursive subdivision algorithm
17.4
Combining two rules
17.5
Examples and questions
17.6
Homework
18
Multivariable integration
18.1
Double integrals over rectangles
18.2
Double integrals over general regions
18.3
High-dimensional integration: Monte-Carlo method
18.4
Homework
19
Differential equations: Euler’s method and its relatives
19.1
Ordinary differential equations
19.2
Euler’s method
19.3
Estimating the accuracy of numeric ODE methods
19.4
Improving Euler’s method
19.5
Solving systems of differential equations
19.6
Homework
20
Modeling with differential equations
20.1
Models of an epidemic
20.2
Predator-prey models
20.3
Examples and questions
20.4
Homework
IV
Modeling Data
21
Polynomial Interpolation
21.1
Interpolation in the monomial basis
21.2
Lagrange interpolating polynomial
21.3
Newton interpolating polynomial
21.4
Homework
22
Chebyshev Polynomials and Interpolation
22.1
Estimating the error of polynomial interpolation
22.2
Chebyshev polynomials and interpolation
22.3
Chebyshev extreme points
22.4
Homework
23
Spline Interpolation
23.1
Piecewise linear interpolation
23.2
Cubic splines
23.3
Using cubic splines
23.4
Homework
24
Spline Approximation
24.1
Weak points of spline interpolation
24.2
Hat functions and B-splines
24.3
Construction of cardinal B-splines
24.4
Homework
25
Discrete Fourier Transform
25.1
Periodic functions and trigonometric polynomials
25.2
Fourier series
25.3
Discrete Fourier Transform
25.4
Trigonometric Interpolation
25.5
Homework
26
Applications of Discrete Fourier Transform
26.1
Working with images in Matlab
26.2
Two-dimensional DFT
26.3
Cosine interpolation of non-periodic functions
26.4
Homework
27
Linear Least Squares
27.1
Overview of least squares
27.2
Overfitting, training and testing
27.3
The standard error of parameters
27.4
Multiple regression
27.5
Homework
28
Transforming Data for LLS
28.1
Exponential fit
28.2
Logistic fit
28.3
Weighted least squares
28.4
Fitting an implicit equation
28.5
Homework
29
Nonlinear Least Squares
29.1
Motivating examples for Nonlinear Least Squares
29.2
Using fminsearch for curve-fitting
29.3
Beyond curve-fitting: source location
29.4
Homework
V
Optimization
30
Single Variable Minimization
30.1
Basic concepts of optimization
30.2
Brute force search
30.3
Newton method for minimization
30.4
Golden section search
30.5
Homework
31
Parabolic Interpolation and Gradient Descent
31.1
Successive parabolic interpolation
31.2
How
fminbnd
works
31.3
Gradient descent in one dimension
31.4
Homework
32
Gradient methods and Newton’s method
32.1
Gradient descent in several variables
32.2
Newton’s method for multivariate minimization
32.3
Conjugate gradient method
32.4
Homework
33
The Nelder-Mead method
33.1
First attempt at derivative-free minimization
33.2
Reflection-contraction combination
33.3
Reflection-contraction-expansion Nelder-Mead method
33.4
Nelder-Mead method in higher dimensions
33.5
Homework
34
Constrained Optimization
34.1
Penalty method
34.2
Lagrange multiplier method
34.3
Homework
35
Linear Programming
35.1
Introduction to linear programming
35.2
Duality in linear programming
35.3
Interpretation of duality in microeconomics
35.4
Duality in optimal transportation
35.5
Homework
36
Classification Problems
36.1
Classification and logistic regression
36.2
Classification and linear programming
36.3
Homework
Chapter
13
Numerical integration: basic rules
We begin the study of numerical integration: the problem of finding, approximately, the definite integral of a given function on a given interval. This chapter covers basic rules of numerical integration that are covered in Calculus books.
🔗
13.1
Riemann sums
13.2
Left, right, midpoint rules
13.3
Trapezoidal rule
13.4
Error estimates
13.5
Examples and questions
13.6
Homework
🔗