MATLAB implementations and driver scripts for a Math 448 Numerical Analysis algorithms portfolio covering root finding, unconstrained optimization, linear systems, interpolation, quadrature, and an initial value problem solver.
The portfolio emphasizes implementation, verification, diagnostics, convergence behavior, stability, conditioning, and numerical error. The accompanying portfolio PDF is included in docs/portfolio.pdf.
Numerical methods are not just formulas for getting an answer. Each method has assumptions, failure modes, convergence behavior, and diagnostic quantities that determine whether the computed result is trustworthy.
This repository organizes several core numerical-analysis algorithms with driver scripts, test cases, and documentation focused on how the methods behave.
Newton's method with Armijo backtracking on the Rosenbrock function illustrates why step-length control matters in nonlinear optimization.
Gaussian elimination with and without partial pivoting shows how pivoting improves numerical stability for sensitive linear systems.
Polynomial interpolation illustrates how fitting through points can still produce poor behavior between data values.
- Root-finding methods: bisection, Newton's method, secant method, and an optional
fsolvecomparison. - Optimization: Newton's method with Armijo backtracking line search on the Rosenbrock function.
- Linear systems: Gaussian elimination with and without partial pivoting.
- Interpolation: monomial-basis polynomial interpolation and cubic spline comparison for gamma-function data.
- Quadrature and ODEs: composite midpoint rule and Forward Euler method.
- A basic bisection verification test.
- Bracketed root finding
- Newton and secant iteration
- Residual and step-size diagnostics
- Newton optimization with backtracking line search
- Gaussian elimination and partial pivoting
- Conditioning and numerical-stability checks
- Polynomial interpolation and spline comparison
- Composite midpoint quadrature
- Forward Euler time stepping
- MATLAB driver-script organization
numerical-analysis-algorithms/
├── README.md
├── run_all.m
├── docs/
│ └── portfolio.pdf
├── figures/
│ ├── rosenbrock_newton_path.png
│ ├── gaussian_elimination_error.png
│ └── polynomial_gamma_interpolation.png
├── root_finding/
│ ├── bisection.m
│ ├── newton.m
│ ├── secant.m
│ └── driver_root_finding.m
├── optimization/
│ ├── newton_backtracking.m
│ └── driver_optimization.m
├── linear_systems/
│ ├── back_substitution.m
│ ├── gaussian_elimination_no_pivot.m
│ ├── gaussian_elimination_partial_pivot.m
│ └── driver_linear_systems.m
├── interpolation/
│ ├── polynomial_interpolation.m
│ ├── evaluate_polynomial.m
│ └── driver_interpolation.m
├── quadrature_odes/
│ ├── composite_midpoint.m
│ ├── forward_euler.m
│ └── driver_quadrature_odes.m
└── tests/
└── test_bisection.m
Open MATLAB from the repository root and run:
run_allTo run one module at a time, add that folder to the MATLAB path or open the driver directly. For example:
addpath root_finding
run root_finding/driver_root_finding.mThe drivers print numerical results to the command window. Drivers that generate figures save them in the figures/ directory.
A basic bisection test is included in:
tests/test_bisection.m
The root-finding driver uses fsolve only as a comparison when Optimization Toolbox is available. The custom bisection, Newton, and secant implementations do not depend on fsolve.
The interpolation driver uses MATLAB's built-in spline routine for the cubic spline comparison and a custom Vandermonde solve for polynomial interpolation.
This repository is a curated numerical-methods portfolio. The implementations are written for educational verification, method comparison, and diagnostic understanding. They are intended to show algorithm behavior, assumptions, and failure modes.


