# Explorations in Numerical Analysis

by

### Description

This textbook introduces advanced undergraduate and early-career graduate students to the field of numerical analysis. This field pertains to the design, analysis, and implementation of algorithms for the approximate solution of mathematical problems that arise in applications spanning science and engineering, and are not practical to solve using analytical techniques such as those taught in courses in calculus, linear algebra or differential equations. Topics covered include error analysis, computer arithmetic, solution of systems of linear equations, least squares problems, eigenvalue problems, polynomial interpolation and approximation, numerical differentiation and integration, nonlinear equations, optimization, ordinary differential equations, and partial differential equations. For each problem considered, the presentation includes the derivation of solution techniques, analysis of their efficiency, accuracy and robustness, and details of their implementation, illustrated through the MATLAB programming language. This text is suitable for a year-long sequence in numerical analysis, and can also be used for a one-semester course in numerical linear algebra.

1. Preliminaries
1. What is Numerical Analysis?
2. Understanding Error
2. Numerical Linear Algebra
1. Direct Methods for Linear Systems
2. Least Squares Problems
3. Iterative Methods for Linear Systems
4. Eigenvalue Problems
3. Data Fitting and Function Approximation
1. Polynomial Interpolation
2. Approximation of Functions
3. Differentiation and Integration
4. Nonlinear Equations and Optimization
1. Zeros of Nonlinear Functions
2. Optimization
5. Differential Equations
1. Initial Value Problems
2. Two-Point Boundary Value Problems
3. Partial Differential Equations
Appendices
1. Review of Calculus
2. Review of Linear Algebra

### Errata

• Page 5: First paragraph, is is'' should be it is''
• Page 30: First paragraph, should say next innermost loop, with index variable i''
• Page 52, Explorations 2.1.10 and 2.1.11: Equation reference (2.1.4) should actually be to un-numbered equation at the bottom of page 51
• Page 108, Explorations 3.3.9 and 3.3.10: The hint provided for 3.3.10 actually applies to 3.3.9
• Page 117, Algorithm 3.4.3: After the algorithm, the phrase test convergence'' should be convergence test''
• Page 127, Equation (4.3): $\hat{\bf x}$ should be ${\bf x}$
• Page 132, Equation (4.8): $s$ should have $\mathrm{sgn}(b)$ in the numerator
• Page 132, Equation (4.9): $c$ should have $\mathrm{sgn}(a)$ in the numerator
• Page 143, Algorithm 4.2.5: On third line from the bottom, a right parenthesis is missing at the end of the line
• Page 143, Algorithm 4.2.5: On second line from the bottom, all references to $Q$ should use rows $1:m$, not $j:m$
• Page 152, Explorations 4.3.3 and 4.3.5: Modify your function'' should be Use your function''
• Page 157, Exploration 4.4.9: It should be stated that $A$ is assumed to be a square, invertible matrix
• Page 164, Exploration 4.5.5: 4.25'' should be in parentheses
• Page 166, Chapter 4, Exercise 1(b): Equation should be $A^T A = R^T R$
• Page 177: It needs to be explicitly stated that $k$ is a positive integer
• Page 178: All references to b on this page, except for the equation for the residual at the bottom, should be r1
• Page 180: Should read $\tilde{T}_k$ has the $LDL^T$ factorization...''
• Page 180: Middle of the page, end of equation should be $= \beta_0 L_k^{-1}{\bf e}_1$''
• Page 181: Middle of the page, multiple of the initial'' should be multiple of the initial residual''
• Page 182: In Algorithm 5.2.3, the statement $k=1$ is not needed
• Page 184: In Algorithm 5.2.4, the statement $k=1$ is not needed
• Page 185-6: All references to ${\mathcal K}({\bf b},A,k)$ should be ${\mathcal K}({\bf r}_1,A,k)$, and ${\bf b}$ within $\langle f, g \rangle$ should also be ${\bf r}_1$
• Page 187: In Algorithm 5.3.1, $\beta_0$ should be $h_{10}$
• Page 214, Exploration 6.2.3: The matrix P should be a right stochastic matrix
• Page 218: After Algorithm 6.3.1, the expression $I - c{\bf vv}^T$ must be in parentheses
• Page 230, Exploration 6.4.8: The phrase Use your proof of the result in Exploration 6.4.7 to'' should be removed
• Page 234, Equation (6.10): This formula needs to be rewritten to avoid cancellation error; it should be μ = tnn - tn,n-12/(d + sign(d) (d2 + tn,n-12)1/2)
• Page 264: In computation of p3(x), second step, last two binomial coefficients should have lower indices of 2 and 3, respectively
• Page 280: In formula for s(x), first piece, -184/7 should be the coefficient of x, not x2
• Page 281: Not-a-knot boundary conditions are incorrectly described as being synonymous with natural boundary conditions. The MATLAB function spline supports not-a-knot, but not natural
• Page 281, Exploration 7.6.7: members of p'' should be members of pp''
• Page 286, Chapter 7, Exercise 9: output p'' should be output pp''
• Page 286, Chapter 7, Exercise 6: $\pi_n'(x)$ should be $\pi_n'(x_j)$
• Page 300, Example 8.2.1: In the normal equations, n should be 4
• Page 303: Above last equation, should be: p-1(x)≡0
• Page 373, Exploration 9.7.2: There is no makelegendre function from Section 8.2; instead, should use equation (8.9)
• Page 386, Chapter 9, Exercise 6: The error formula for the Corrected Trapezoidal Rule should include the 4th derivative of f, not the 5th
• Page 394, Figure 10.1, right plot: Error should be 0.707, not 1.707
• Page 407, Example 10.3.6: should be containing x=3/4.''
• Page 419, Exploration 10.4.6: What was wrong'' should be What happens''
• Page 477: In description of ode23, should be the second output y is an (n+1)×m matrix'' and The (i+1)st row of y consists of the values of y(ti), for i=0,1,2,...,n.''
• Page 483: In definition of F(y), the second summation should have a terminal index of m, not s
• Page 484: In sequence of steps above equation (12.24), = should be ≈ in each step
• Page 487: Definition of αi should have a factor of h on the right side of the equation
• Page 490: In computation of τn(h), f(tn,y(tn)) is missing its closing right parenthesis in two places
• Page 491: Above Exploration 12.4.3, the formula for τn(h) needs to be negated
• Page 494, Equation (12.32): sum should have initial index of 1, not 0
• Page 495: Upper bound on |en| is missing a factor of δ
• Page 510, Exploration 12.6.3: use'' should be modify''
• Page 516, Exploration 13.1.2: should be condition y2(b) ≠ 0 is guaranteed''
• Page 520, Figure 13.1: Labels in the legend should be switched
• Page 521, Exploration 13.1.8: should be input argument f''
• Page 522, Equation (13.9): y(xi) should be y(xi-1)
• Page 526, Equation (13.14): Each entry in the ith row of JF(y) is a partial derivative of Fi, not fi
• Page 525, Figure 13.2: with circles'' should be ''with diamonds''
• Page 533, Example 13.3.1: The plot produced by the code is not the same as Figure 13.3. Also, in the caption of Figure 13.3, circles'' should be diamonds''
• Page 569, Exploration 14.4.1: second input arguments'' should be second and third input arguments''
• Page 573: In definition of uM, uj should be cj
• Page 574, Exploration 14.5.1: (14.61) should be (14.60)