Numerical Analysis Basics

Fundamental Numerical Algorithms (Undergraduate Level)

Overview

This section covers the fundamentals of numerical analysis typically taught in early undergraduate courses. Topics include how computers represent numbers (floating-point arithmetic), standard algorithms for solving equations, interpolation, and numerical integration.

Learning Objectives

  • Understand the IEEE 754 floating-point number system
  • Solve equations using Newton's method and the secant method
  • Apply Lagrange interpolation and Newton interpolation
  • Compute numerical integrals using the trapezoidal rule and Simpson's rule
  • Understand the order of convergence of algorithms

Table of Contents

Error and Number Representation

Computational Pitfalls

Root-Finding Methods for Nonlinear Equations

Interpolation and Approximation

Numerical Differentiation

Numerical Integration

Systems of Linear Equations

Norms

Numerical Methods for ODEs

  • 40. Euler Method — Forward, backward, and improved Euler methods; stability analysis

Miscellaneous

Visualizing Newton's Method

Newton's method rapidly approaches a root by following tangent lines.

Visualization of Newton's Method
Figure 1: Newton's method applied to $f(x) = x^3 - 2x - 5$. Starting from $x_0 = 3.5$, tangent lines are drawn and their x-intercepts $x_1, x_2, \ldots$ converge rapidly to the root $x^*$.

Visualizing Spline Interpolation

Visualization of Spline Interpolation
Figure 2: Comparison of cubic spline interpolation (blue solid line) and linear interpolation (gray dashed line) through 6 data points (red circles). Spline interpolation connects cubic polynomials across each interval, producing a smooth curve.

Prerequisites

Reading

  • Newton's Method: The Art of Clever Guessing [Reading] — Let yourself be fooled by the tangent line on purpose to build a better next guess. A relaxed look at why it is so blazingly fast, its intuition, and its pitfalls.
  • Slow but Never Wrong: The Quiet Certainty of Bisection [Reading] — It is not the fastest. But once you know a root lies inside an interval, it corners the answer, halving with certainty at every step. A relaxed take on choosing sureness over speed, with a surprising link to number-guessing games.
  • Why 0.1 + 0.2 Isn't 0.3: How Computers Stumble on Decimals [Reading] — Why can't a computer hold a simple decimal exactly? From the nature of binary to cancellation, and all the way to the Patriot missile and Ariane 5 failures, a casual tour through the mysteries of rounding error.