Level 1 · foundational · ~5 h
Root-finder shootout on the Wilkinson polynomial — real-data stress test
Compare bisection, Newton, secant and Halley methods on the degree-20 Wilkinson polynomial and on a double root with perturbed coefficients. Repeat on a real dataset, report a table with confidence intervals over three trials, and explain which assumption broke.
Prerequisites
Problem statement
- 01Compare bisection, Newton, secant and Halley methods on the degree-20 Wilkinson polynomial and on a double root with perturbed coefficients. Repeat on a real dataset, report a table with confidence intervals over three trials, and explain which assumption broke.
Real-world motivation
- 01The Wilkinson polynomial is the canonical example of coefficient perturbation destroying root conditioning. The real-data stress test setting forces concrete choices about data, scale and evaluation.
Learning objectives
- 01Implement four root finders
- 02Measure convergence order
- 03Quantify root sensitivity
- 04Report wall-clock seconds on one pinned CPU core alongside the baseline metrics.
Technical architecture
- 01bracketed and open iteration schemes
- 02coefficient perturbation harness
- 03convergence-order estimator
Mathematical foundations
- 01Newton iteration $x_{k+1}=x_k-p(x_k)/p'(x_k)$
- 02root condition number $\kappa=1/|p'(r)|$ scaled by coefficient perturbation
Dataset and sources
- 01MNIST 70k subset
- 02UCI Sparse Matrix collection
Step-by-step tasks
- 01Frame the task and freeze the real-data stress test evaluation protocol with a fixed random seed.
- 02Implementation 1: Evaluate p and p' by Horner
- 03Implementation 2: Track residuals per iteration
- 04Implementation 3: Perturb one coefficient by 2^-23
- 05Verification 1: Check quadratic convergence for a simple root
- 06Verification 2: Verify bisection bracket invariant
- 07Run the ablation grid and report wall-clock seconds on one pinned CPU core over three independent trials.
Implementation requirements
- 01Evaluate p and p' by Horner
- 02Track residuals per iteration
- 03Perturb one coefficient by 2^-23
- 04Log all hyperparameters and the random seed for the real-data stress test run.
Testing requirements
- 01Check quadratic convergence for a simple root
- 02Verify bisection bracket invariant
- 03Measure wall-clock seconds on one pinned CPU core over at least three seeds.
Evaluation metrics
- 01iterations to 1e-12
- 02observed convergence order
- 03root displacement under perturbation
- 04wall-clock seconds on one pinned CPU core
Expected outputs
- 01convergence plot
- 02table of perturbed roots
Common failure modes
- 01Newton cycles on near-double roots
- 02deflating changes subsequent root accuracy
- 03real data violates the synthetic noise model and the baseline overfits
Stretch goals
- 01implement Aberth simultaneous iteration
- 02use mpmath high precision as truth
- 03profile the method with cProfile and report the dominant kernel
Research extensions
- 01relate root conditioning to the discriminant
- 02study simultaneous root finders for clustered roots
GitHub submission requirements
- 01A repository whose README states the real-data stress test protocol and the exact command to reproduce it.
- 02Source for the scratch implementation, a test file, and a results table with uncertainty estimates.
- 03A two-page report explaining failures on MNIST 70k subset and what the ablation revealed.
Completion rubric
- 01four methods implemented
- 02convergence order measured not asserted
- 03perturbation explained
- 04Extra credit: profile the method with cProfile and report the dominant kernel
Submit when every rubric item is satisfied and your repository contains runnable code plus a reproduction command.