freeprogrammingbooks.com

Introduction to Numerical Methods with examples in Javascript

By D.V. Fedorov

Introduction to Numerical Methods with examples in Javascript by D.V. Fedorov is based on lecture notes developed over several years of teaching numerical methods at Aarhus University.

Numerical methods are fundamental in scientific computing, engineering, physics, and applied mathematics. They provide systematic techniques for solving mathematical problems that either cannot be solved analytically or would be impractical to solve by hand. These methods underpin simulations, data analysis, optimization, modeling of physical systems, and computational research.

With the growing importance of computational tools across disciplines, understanding numerical algorithms and their implementation is essential for students and professionals working in technical fields. Practical exposure to both the mathematical foundations and programmatic implementation strengthens computational literacy and problem-solving skills.

About the book

Introduction to Numerical Methods with examples in Javascript by D.V. Fedorov is based on lecture notes developed over several years of teaching numerical methods at Aarhus University. The book presents concise descriptions of commonly used numerical techniques and accompanies them with program examples written in JavaScript.

The material is intended for students and learners interested in numerical computation and scientific programming. It assumes familiarity with mathematical concepts typically encountered in university-level science or engineering programs. The JavaScript examples are presented for clarity and conciseness and are designed to illustrate the algorithms rather than provide optimized production code.

The book is distributed under open licenses, allowing copying and redistribution under the GNU General Public License (version 3 or later) or the Creative Commons Attribution Share Alike License (version 3 or later).

What you will learn

Readers are introduced to a broad range of classical numerical techniques used in scientific computation. The book covers methods for solving linear systems, performing interpolation, computing least-squares fits, and evaluating integrals using both deterministic and Monte Carlo approaches.

It also addresses numerical solutions of ordinary differential equations, root-finding for nonlinear equations, optimization methods, eigenvalue problems, Krylov subspace techniques, and the Fast Fourier Transform. Throughout the text, algorithmic ideas are paired with JavaScript implementations, allowing readers to see how numerical procedures can be translated into working code.

By studying this book, learners gain insight into:

  • Core algorithms for linear algebra and matrix factorization
  • Interpolation and spline construction techniques
  • Least-squares fitting and error analysis
  • Numerical integration strategies, including adaptive and Gaussian quadratures
  • Monte Carlo sampling methods
  • Time-stepping methods for ordinary differential equations
  • Root-finding and optimization algorithms
  • Eigenvalue computation techniques and iterative methods
  • Discrete Fourier Transform and the Cooley–Tukey algorithm

The emphasis is on understanding algorithmic structure and practical implementation.

Table of contents

  • 1 Linear equations
    1.1 Triangular systems and back-substitution
    1.2 Reduction to triangular form
    1.2.1 LU decomposition
    1.2.2 QR decomposition
    1.3 Determinant of a matrix
    1.4 Matrix inverse
    1.5 JavaScript implementations
  • 2 Interpolation
    2.1 Polynomial interpolation
    2.2 Spline interpolation
    2.2.1 Linear interpolation
    2.2.2 Quadratic spline
    2.2.3 Cubic spline
    2.3 Other forms of interpolation
  • 3 Linear least squares
    3.1 Linear least-squares problem
    3.2 Solution via QR-decomposition
    3.3 Ordinary least-squares curve fitting
    3.3.1 Variances and correlations of fitting parameters
    3.4 JavaScript implementation
  • 4 Numerical integration
    4.1 Classical quadratures with equally spaced abscissas
    4.2 Quadratures with optimized abscissas
    4.3 Reducing the error by subdividing the interval
    4.4 Adaptive quadratures
    4.5 Gauss-Kronrod quadratures
    4.6 Integrals over infinite intervals
    4.6.1 Infinite intervals
    4.6.2 Half-infinite intervals
  • 5 Monte Carlo integration
    5.1 Multi-dimensional integration
    5.2 Plain Monte Carlo sampling
    5.3 Importance sampling
    5.4 Stratified sampling
    5.5 Quasi-random (low-discrepancy) sampling
    5.5.1 Lattice rules
  • 6 Ordinary differential equations
    6.1 Introduction
    6.2 Runge-Kutta methods
    6.3 Multistep methods
    6.3.1 A two-step method
    6.4 Predictor-corrector methods
    6.5 Stepsize control
    6.5.1 Error estimate
    6.5.2 Adaptive stepsize control
  • 7 Nonlinear equations
    7.1 Introduction
    7.2 Newton’s method
    7.3 Broyden’s quasi-Newton method
    7.4 Javascript implementation
  • 8 Optimization
    8.1 Downhill simplex method
    8.2 Javascript implementation
  • 9 Eigenvalues and eigenvectors
    9.1 Introduction
    9.2 Similarity transformations
    9.2.1 Jacobi eigenvalue algorithm
    9.3 Power iteration methods
    9.3.1 Power method
    9.3.2 Inverse power method
    9.3.3 Inverse iteration method
    9.4 JavaScript implementation
  • 10 Power method and Krylov subspaces
    10.1 Introduction
    10.2 Arnoldi iteration
    10.3 Lanczos iteration
    10.4 Generalised minimum residual (GMRES)
  • 11 Fast Fourier transform
    11.1 Discrete Fourier Transform
    11.1.1 Applications
    11.2 Cooley-Tukey algorithm
    11.3 Multidimensional DFT
    11.4 C implementation

Book details

  • Title: Introduction to Numerical Methods with examples in Javascript
  • Author(s): D.V. Fedorov
  • Main category: Mathematics
  • Subcategory: Applied Mathematics
  • Language: English
  • License: GNU General Public License version 3 or later; Creative Commons Attribution Share Alike License version 3 or later

More books in: Applied Mathematics, Mathematics


Legal notice: This book is shared for educational purposes only. The content is distributed under Creative Commons licenses or with explicit permission from the author. FreeProgrammingBooks may host files that comply with their respective licenses.