Skip to content

QuantumQuality-bv/numerical-analysis-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Numerical Analysis Algorithms Portfolio

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.

Key idea

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.

Figures

Newton's method with Armijo backtracking on the Rosenbrock function illustrates why step-length control matters in nonlinear optimization.

Rosenbrock Newton iteration path

Gaussian elimination with and without partial pivoting shows how pivoting improves numerical stability for sensitive linear systems.

Gaussian elimination error comparison

Polynomial interpolation illustrates how fitting through points can still produce poor behavior between data values.

Polynomial interpolation example

What is included

  • Root-finding methods: bisection, Newton's method, secant method, and an optional fsolve comparison.
  • 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.

Methods demonstrated

  • 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

Repository structure

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

Running the code

Open MATLAB from the repository root and run:

run_all

To 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.m

Outputs

The 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

Notes

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.

Limitations

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.

About

MATLAB implementations of numerical analysis algorithms for root finding, optimization, linear systems, interpolation, quadrature, and ODE solving.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages