Wiki

Numerical method comparisons

These tables do not replace the guides: they are a quick view for choosing a method by assumptions, cost and expected behaviour.

Newton vs secant vs bisection

Three scalar root-finding strategies: global safety, local speed and per-iteration cost.

MethodAssumptionsOrderCostWhen to use it
BisectionContinuity and sign change on [a,b][a,b]Linear; the interval is halvedOne new evaluation of ff per iterationTo bracket the root and get a reliable initial estimate
Newton-RaphsonSimple root, available ff' and nearby starting pointLocal quadraticff and ff' per iterationWhen the seed is good and the derivative is cheap
SecantTwo initial estimates and sufficiently regular ffSuperlinear, p1.618p\approx1.618One new evaluation of ff per iterationWhen ff' is unavailable or undesirable
Scroll horizontally to see the complete table →

Euler vs Heun vs RK4

One-step IVP methods: accuracy, evaluations of ff and practical use.

MethodIdeaGlobal errorEvaluationsWhen to use it
Explicit EulerAdvances with the slope at the start of the intervalO(h)\mathcal{O}(h)1 per stepFor quick estimates or as a predictor
HeunAverages Euler's slope with a corrected slopeO(h2)\mathcal{O}(h^2)2 per stepWhen a cheap improvement over Euler is enough
RK4Combines four slopes with weights 1,2,2,11,2,2,1O(h4)\mathcal{O}(h^4)4 per stepFor high accuracy without solving implicit equations
Scroll horizontally to see the complete table →

Jacobi vs Gauss-Seidel vs SOR

Linear iterative methods viewed as splittings A=MNA=M-N and through their iteration matrix.

MethodSplittingUpdateAdvantageRisk
JacobiM=DM=DUses only values from the previous iterationSimple and parallelizableMay converge slowly
Gauss-SeidelM=DLM=D-LReuses new values as soon as they are computedOften improves Jacobi without an extra parameterDepends on equation ordering
SORM=1ωDLM=\frac{1}{\omega}D-LRelaxes Gauss-Seidel with a weight ω\omegaCan accelerate strongly with a good ω\omegaA poor ω\omega can slow or break convergence
Scroll horizontally to see the complete table →

Lagrange vs Newton vs Hermite vs splines

Four ways to interpolate the same data: what information they use, what they cost to build and when each one pays off.

InterpolantData it usesConstructionStrengthLimitation
LagrangeValues f(xi)f(x_i) at n+1n+1 nodesExplicit basis i(x)\ell_i(x), no systems to solveClosed form, ideal for theory and quadrature derivationsAdding a node forces rebuilding the whole basis
NewtonValues f(xi)f(x_i) at n+1n+1 nodesDivided-difference table, nested formAdding a node only costs one more diagonalSame polynomial as Lagrange: inherits its high-degree limits
HermiteValues f(xi)f(x_i) and derivatives f(xi)f'(x_i)Divided differences with repeated nodesDoubles the information per node: degree 2n+12n+1 and higher accuracyRequires derivatives, which the data do not always provide
Cubic splineValues f(xi)f(x_i) at all nodesTridiagonal system for the moments, one cubic per pieceSmooth (C2C^2) and free of the Runge phenomenon with many nodesNo single global polynomial, and a system must be solved
Scroll horizontally to see the complete table →

Trapezoid vs Simpson vs midpoint vs Gauss

The everyday quadratures compared by nodes, composite error order and the situation where each wins.

FormulaNodesComposite errorDegree of precisionWhen to use it
Composite trapezoidEquispaced, closed (uses the endpoints)O(h2)\mathcal{O}(h^2)1Tabulated data; simple and robust
Composite SimpsonEquispaced, closed, even number of subintervalsO(h4)\mathcal{O}(h^4)3Smooth tabulated integrand: two extra orders at the same cost per node
Composite midpointEquispaced, open (avoids the endpoints)O(h2)\mathcal{O}(h^2)1When the integrand cannot be evaluated at the endpoints
Gauss-LegendreRoots of Legendre polynomials, not equispacedDegree 2n12n-1 with nn nodes2n12n-1When you can evaluate ff anywhere and evaluations are expensive
Scroll horizontally to see the complete table →

AB2 vs AM2 vs predictor-corrector

The order-2 multistep methods head to head: cost per step, error constant and the price of implicit stability.

MethodTypeLocal errorCost per stepNotes
AB2Explicit, two-step512h3y(ξ)\frac{5}{12}h^3y'''(\xi)1 new evaluation of ffNeeds a startup value (Heun or RK4) and a uniform mesh
AM2 (implicit trapezoid)Implicit, one new step112h3y(ξ)-\frac{1}{12}h^3y'''(\xi)Solve one equation in yk+1y_{k+1}Error constant 5 times smaller than AB2 and far better stability
Predictor-corrector AB2+AM2Explicit in practiceOf the corrector's order2 evaluations of ffAM2's accuracy without solving the implicit equation; the predictor-corrector gap estimates the error
Scroll horizontally to see the complete table →