MATLAB implementations and numerical experiments for ordinary differential equations, convection-diffusion PDEs, and ill-conditioned inverse problems. The emphasis is on convergence, stability, mesh dependence, conditioning, sparse discretization, and regularization.
- Explicit Euler, Heun, classical RK4, and RK4 3/8 implemented from scratch.
- Empirical convergence studies against a high-accuracy numerical reference.
- Absolute-stability regions for explicit time-stepping methods.
- Sparse centered finite-difference discretization of a 2-D convection-diffusion operator.
- Numerical illustration of mesh-Peclet effects and transport-dominated oscillations.
- SVD-based Tikhonov regularization for an ill-conditioned inverse problem.
- L-curve parameter selection using geometric curvature in log-log coordinates.
The endpoint-error study recovers the expected first-, second-, and fourth-order behavior of the implemented schemes.
The test problem is the nonlinear IVP
with a high-accuracy ode113 computation used as a numerical reference, not as an analytic solution.
The PDE module solves
on a rectangular domain with Dirichlet data. The discretization uses centered finite differences and assembles a sparse linear system. For unit diffusion coefficient,
For the demonstration with alpha = 40, the coarse mesh (n = 10) has Pe ≈ 1.82 and develops the characteristic non-physical overshoot of a transport-dominated centered scheme. Refining to n = 80 gives Pe ≈ 0.25 and removes the oscillation.
The inverse-problem module constructs a matrix with exponentially decaying singular values and perturbs exact data with controlled relative Gaussian noise. It computes zero-order Tikhonov solutions
through the SVD of A. The regularization parameter is selected from the geometric curvature of
.
├── ode/
│ ├── solvers/
│ │ ├── explicit_euler.m
│ │ ├── heun.m
│ │ ├── rk4_classical.m
│ │ └── rk4_38.m
│ ├── convergence_study.m
│ └── stability_regions.m
├── pde/
│ ├── convection_diffusion_2d.m
│ └── run_convection_diffusion_demo.m
├── inverse_problems/
│ ├── tikhonov_path.m
│ ├── lcurve_curvature.m
│ └── run_lcurve_experiment.m
└── figures/
Clone the repository, open MATLAB in the repository directory, and run any experiment script:
run('ode/convergence_study.m')
run('ode/stability_regions.m')
run('pde/run_convection_diffusion_demo.m')
run('inverse_problems/run_lcurve_experiment.m')The implementation uses standard MATLAB functionality only.
The project covers implementation of one-step ODE solvers, empirical order-of-accuracy studies, absolute stability, sparse finite-difference discretization, the mesh Peclet number, singular-value decay and ill-conditioning, Tikhonov filter factors, and L-curve parameter selection.
MIT License. See LICENSE.