Computational Methods for Numerical Analysis with R

CMNANumerical analysis, built where you can see it.

Numerical methods are easier to understand when the machinery is visible. CMNA pairs a traditional numerical-analysis sequence with complete R implementations that can be read, run, changed, and tested.

Cover of Computational Methods for Numerical Analysis with R
James P. Howard, II · Chapman & Hall/CRC · 2017

The project

A book, working code, and room to keep going.

This site is the front door for the book and its companion software. It is intentionally narrower than a numerical-analysis encyclopedia: the material here follows the ideas, algorithms, examples, and teaching problems that belong to CMNA.

The book

The 2017 text follows the standard path from numerical error through linear algebra, interpolation, integration, optimization, and differential equations.

Book details →

The methods

Browse the computational ideas by topic, then follow them into the companion R implementations instead of treating the library call as the explanation.

Method atlas →

The software

The cmna package collects the implementations used by the book, with source available for inspection and reuse.

Use the code →

The central idea

A method is not a black box.

A numerical routine gives us a result. Numerical analysis asks what happened on the way there: how the approximation moved, what error remains, and whether the computation deserves our trust.

That is why CMNA keeps the implementations close to the mathematics. The code is deliberately small enough to inspect and alter, making the algorithm itself part of the lesson rather than an implementation detail hidden behind an API.

f <- function(x) x^3 - 2*x^2 - 159*x - 540
root <- bisection(f, 10, 20)

# The answer matters.
# The path to the answer matters too.

CMNA Laboratory

Make the iteration visible.

A printed algorithm freezes the process at exactly the moment when movement is most informative. The laboratory pages put that movement back: change the problem, walk the iterations, and watch convergence happen.

Actual R

This is R. Go nuts.

The browser workbench runs valid R locally with webR. Define functions, draw plots, create matrices, and call bundled CMNA algorithms without a remote computation server.

Open the R Workbench
Live lab

Halve the uncertainty

Run bisection against several functions, inspect every bracket, and play the convergence from the first interval to the final estimate.

Open the bisection lab →
Comparison

Same root, different path

Compare bisection, Newton, and secant by residual and see why iteration count alone is not the whole story.

Compare root finders →
Atlas

Find the machinery

Search the method atlas by concept or R function across the algorithms currently represented in the companion package.

Open the method finder →
Worked problems

Meet the usual suspects

The Numerical Zoo keeps Wilkinson, Hilbert, Runge, Himmelblau, and other examples around because they are unusually good at exposing assumptions.

Open the Numerical Zoo →

Living companion

The printed page does not have to be the end of the project.

Corrections, modernized code, expanded examples, and teaching notes can accumulate here as the project grows beyond the printed page. If that body of work someday supports another edition, the evidence will already exist.