640 likes | 1.49k Views
MA5233: Computational Mathematics. Weizhu Bao Department of Mathematics & Center for Computational Science and Engineering National University of Singapore Email: bao@math.nus.edu.sg URL: http://www.math.nus.edu.sg/~bao. Computational Science. Third paradigm for
E N D
MA5233: Computational Mathematics Weizhu Bao Department of Mathematics & Center for Computational Science and Engineering National University of Singapore Email: bao@math.nus.edu.sg URL: http://www.math.nus.edu.sg/~bao
Computational Science • Third paradigm for • Discovery in Science • Solving scientific & engineering problems • Interdisciplinary • Problem-driven • Mathematical models • Numerical methods • Algorithmic aspects— computer science • Programming • Software • Applications, ……
Computational Science • Computational Mathematics – Scientific computing/numerical analysis • Computational Physics • Computational Chemistry • Computational Biology • Computational Fluid Dynamics • Computational Enginnering • Computational Materials Sciences • ……...
Steps for solving a practical problems • Physical or engineering problems • Mathematical model – physical laws • Analytical methods – existence, regularity, solution, … • Numerical methods – discretization • Programming -- coding • Results -- computing • Compare with experimental results
Computational Mathematics • Numerical analysis/Scientific computing • A branch of mathematics interested in constructive methods • Obtain numerically the solution of mathematical problems • Theory or foundation of computational science • Develop new numerical methods • Computational error analysis: • Stability • Convergence • Convergence rate or order of accuracy,….
History • Numerical analysis can be traced back to a symposium with the title ``Problems for the Numerical Analysis of the Future, UCLA, July 29-31, 1948. • Volume 15 in Applied Mathematics Series, National Bureau of Standards • Boom of research and applications: Fluid flow, weather prediction, semiconductor, physics, ……
Milestone Algorithms • 1901: Runge-Kutta methods for ODEs • 1903: Cholesky decomposition • 1926: Aitken acceleration process • 1946: Monte Carlo method • 1947: The simplex algorithm • 1955: Romberg method • 1956: The finite element method
Milestone algorithms • 1957: The Fortran optimizing compiler • 1959: QR algorithm • 1960: Multigrid method • 1965: Fast Fourier transform (FFT) • 1969: Fast matrix manipulations • 1976: High Performance computing & packages: LAPACK, LINPACK – Matlab • 1982: Wavelets • 1982: Fast Multipole method
Top 10 Algorithms • 1946: Monte Carlo method • 1947: Simplex method for linear programming • 1950: Krylov subspace iterative methods • 1951: Decompositional approach for matrix computation • 1957: Fortran optimizing compiler • 1959-61: QR algorithms • 1962: Quicksort • 1965: Fast Fourier Transform (FFT) • 1977: Integer relation detection algorithm • 1982: Fast multipole algorithm http://amath.colorado.edu/resources/archive/topten.pdf
Contents • Basic numerical methods • Round-off error • Function approximation and interpolation • Numerical integration and differentiation • Numerical linear algebra • Linear system solvers • Eigenvalue probems • Numerical ODE • Nonlinear equations solvers & optimization
Contents • Numerical PDE • Finite difference method (FDM) • Finite element method (FEM) • Finite volume method (FVM) • Spectral method • Problem driven research: • Computational Fluid dynamics (CFD) • Computational physics • Computational biology, ……
How to do it well • Three key factors • Master all kinds of different numerical methods • Know and aware the progress in the applied science • Know and aware the progress in PDE or ODE • Ability for a graduate student • Solve problem correctly • Write your results neatly • Speak your results well and clear – presentation • Find good problems to solve
Numerical error • Example 1: • Example 2: • Example 3: • Example 4:
Numerical error • Truncation error or error of the method • Round-off error: due to finite digits of numbers in computer • Numerical errors for practical problems • Truncation error • Round-off error • Model error & observation error & empirical error etc.
Absolute error • Absolute error: • Absolute error bound (not unique!!):
Relative error • An example: • Relative error: • Relative error bound:
Absolute error bounds for basic operations • Suppose • Error bounds
Significant digits • An example • Definition: n significant digits • Method: • Write in the standard form • Count the number of digits after decimal
Error spreading: An example • Algorithm 1: • Use 4 significant digits for practical computation • Results
Error spreading: An example • Algorithm 2 • Result • Truncation error analysis
Convergence and its rate • Numerical integration • Exact solution
Numerical methods • Composite midpoint rule • Composite Simpson’s rule • Composite trapezoidal rule • Error estimate
Observations • Before h0 • Truncation error is too large !! • After h1 • Round-off error is dominated!! • Between h0 and h1 • Clear order of accuracy is observed for the method • We can observe clear convergence rate for proper region of the mesh size!!!
Numerical Differentiation • Numerical differentiation • The total error
Numerical Differentiation • Total error depends • Truncation error: • Round-off error: • Minimizer of E(h): • Double precision: • Clear region to observe truncation error:
How to determine order of accuracy • Numerical approximation or method • How to determine p and C?? • By plot log E(h) vs log h
How to determine order of accuracy • By quotation