Course home · 25 lectures · 25 ready

Numerical Methods

CSE-3107 · Md Mahbub E Noor · Assistant Professor, Department of CSE, University of Barishal · 3rd Year, 1st Semester

How to use

Slides: →/Space next step, ← back, F full screen, S slide list. Worked solutions appear one line at a time: predict the next line before it appears.

Live code: every lecture has Python and C programs you can edit and run in the page (Ctrl+Enter). Change a number, press Run, see what happens. ⤓ downloads the file for Jupyter or gcc.

Labs: each lecture's lab has an explorer, a solver that builds the full iteration table for your own problem, coding tasks, and practice questions with answers.

Offline: everything is inside this folder: fonts, formulas, Python and C runners. Open index.html in any browser, no internet needed.

Foundations of numerical computingLectures 1–5

  1. 01
    Why Numerical Methods?Modelling pipeline, analytical vs numerical solutions, iteration and stopping rules, CSE and ML case studies17 slides · 1 live code boxes · 1 interactive widgets
  2. 02
    Floating-Point NumbersBinary fractions, IEEE 754 single and double, machine epsilon, rounding vs chopping, significant digits16 slides · 3 live code boxes · 2 interactive widgets · builds on L1 · used in L4
  3. 03
    Taylor Series and Order of AccuracyTaylor expansion and remainder, truncation error bounds, big-O and order of accuracy, forward and central differences15 slides · 1 live code boxes · 1 interactive widgets · builds on L1 · used in L4, L5, L8, L9, L15, L19, L21
  4. 04
    Errors and Their PropagationAbsolute, relative and percentage error, error propagation, catastrophic cancellation, best step size (truncation vs round-off)17 slides · 2 live code boxes · 2 interactive widgets · builds on L2, L3 · used in L5, L6, L19
  5. 05
    Conditioning and StabilityWell- and ill-conditioned problems, condition number, forward and backward error, stable vs unstable algorithms17 slides · 1 live code boxes · 2 interactive widgets · builds on L3, L4 · used in L11, L12, L23

Solving nonlinear equationsLectures 6–10

  1. 06
    Root Finding and the Bisection MethodBracketing, intermediate value theorem, error bound, number of iterations, bisection code in Python and C20 slides · 2 live code boxes · 6 interactive widgets · builds on L1, L4 · used in L7, L8, L25
  2. 07
    The False Position MethodRegula Falsi as a chord method, worked examples, comparison with bisection, the one-sided stall and its fix21 slides · 1 live code boxes · 2 interactive widgets · builds on L6 · used in L10
  3. 08
    Fixed-Point IterationMethod of iteration x = g(x), convergence condition |g′(x)| < 1, choosing g, cobweb diagrams, linear convergence21 slides · 1 live code boxes · 1 interactive widgets · builds on L3, L6 · used in L9, L14
  4. 09
    The Newton–Raphson MethodTangent-line derivation, quadratic convergence, failure cases, square-root algorithm, Newton in Python and C21 slides · 1 live code boxes · 3 interactive widgets · builds on L3, L8 · used in L10, L25
  5. 10
    Secant Method and Nonlinear SystemsSecant method, order of convergence compared, choosing a method, Newton for systems and the Jacobian22 slides · 1 live code boxes · 6 interactive widgets · builds on L7, L9 · used in L25

Systems of linear equationsLectures 11–14

  1. 11
    Linear Systems, Cramer's Rule and the InverseMatrix form Ax = b, Cramer's rule, matrix inversion, cost of each, vector and matrix norms, condition number25 slides · 1 live code boxes · 5 interactive widgets · builds on L5 · used in L12
  2. 12
    Gaussian and Gauss–Jordan EliminationForward elimination and back substitution, Gauss–Jordan, operation count, partial pivoting, growth factor23 slides · 1 live code boxes · 5 interactive widgets · builds on L5, L11 · used in L13, L14
  3. 13
    LU, Cholesky and Tridiagonal SystemsDoolittle and Crout LU, many right-hand sides, symmetric positive definite matrices, Cholesky, Thomas algorithm25 slides · 2 live code boxes · 3 interactive widgets · builds on L12 · used in L18, L23
  4. 14
    Iterative Methods: Jacobi, Gauss–Seidel, SORJacobi and Gauss–Seidel, diagonal dominance, eigenvalue recap and spectral radius, SOR, sparse matrices25 slides · 1 live code boxes · 5 interactive widgets · builds on L8, L12 · used in L25

Finite differences and interpolationLectures 15–18

  1. 15
    Finite Differences and OperatorsDifference tables, Δ, ∇, δ, E, μ, D and their relations, E = e^(hD), differences of a polynomial, missing terms21 slides · 1 live code boxes · 2 interactive widgets · builds on L3 · used in L16, L17
  2. 16
    Newton's Forward and Backward InterpolationNewton–Gregory formulas for equal intervals, choosing forward or backward, interpolation vs extrapolation, error21 slides · 1 live code boxes · 5 interactive widgets · builds on L15 · used in L17, L19, L20, L22
  3. 17
    Lagrange and Divided-Difference InterpolationUnequal intervals, Lagrange's formula, Newton's divided differences, inverse interpolation22 slides · 1 live code boxes · 4 interactive widgets · builds on L15, L16 · used in L18
  4. 18
    Spline Interpolation and the Runge PhenomenonWhy high-degree polynomials oscillate, linear and cubic splines, smoothness conditions, natural splines20 slides · 1 live code boxes · 4 interactive widgets · builds on L13, L17

Numerical differentiation and integrationLectures 19–20

  1. 19
    Numerical DifferentiationDerivatives from Newton's formulas and from Taylor series, second derivatives, step size, Richardson extrapolation21 slides · 1 live code boxes · 3 interactive widgets · builds on L3, L4, L16 · used in L20
  2. 20
    Numerical IntegrationGeneral quadrature formula, trapezoidal, Simpson 1/3 and 3/8, composite rules and their errors, Romberg, Gauss (intro)22 slides · 1 live code boxes · 4 interactive widgets · builds on L16, L19 · used in L21, L22

Ordinary differential equationsLectures 21–22

  1. 21
    ODEs I: Taylor, Picard and Euler MethodsInitial value problems, Picard's method, Taylor series method, Euler and modified Euler (Heun), local vs global error25 slides · 1 live code boxes · 4 interactive widgets · builds on L3, L20 · used in L22
  2. 22
    ODEs II: Runge–Kutta and Predictor–CorrectorRK2 and RK4, Milne's and Adams predictor–corrector methods, stability, stiff equations25 slides · 1 live code boxes · 6 interactive widgets · builds on L16, L20, L21

Data fitting and optimization for machine learningLectures 23–25

  1. 23
    Least Squares and Linear RegressionOverdetermined systems, normal equations, geometric meaning, goodness of fit, conditioning, link to machine learning24 slides · 1 live code boxes · 6 interactive widgets · builds on L5, L13 · used in L24
  2. 24
    Polynomial, Exponential and Trigonometric FittingPolynomial regression, linearising y = ae^(bx) and y = ax^b, trigonometric fits, overfitting23 slides · 1 live code boxes · 9 interactive widgets · builds on L23 · used in L25
  3. 25
    Numerical Optimization for Machine LearningGolden-section search, gradient descent, learning rate and curvature, Newton's method for optimisation, Gauss–Newton26 slides · 1 live code boxes · 6 interactive widgets · builds on L6, L9, L10, L14, L24