# BASIC NUMERICAL METHODS

**Academic Year 2021/2022**- 2° Year

**Teaching Staff:**

**Giovanni RUSSO**

**Credit Value:**6

**Taught classes:**35 hours

**Exercise:**12 hours

**Term / Semester:**2°

## Learning Objectives

The course is an introduction to numerical methods for the solution of basic mathematical problems. Addressed to students of the second year of Mathematics, it aims to present some basic ideas of the art numerical approximation, such as accuracy, robustness and efficiency of the methods, and fundamental techniques for the solution of linear systems, interpolation and approximation functions, solution of nonlinear equations and computation of integrals. The course provides an introduction to the use of Python (in particular Enthought Canopy) for numerical computation. The implementational aspects of the methods are explained in part during the course, and partly during the afternoon supplementary activities (tutoring) related to the course.

## Course Structure

The teaching activity consists mainly of lectures given by the teacher, during which the topics of the course are presented.

The lessons will be face-to-face, or in mixed or remote mode, depending on what is allowed by the containment measures of the pandemic, and in compliance with the safety of the students and the teacher.

During class the teacher will illustrate Python implementations of some of the methods presented in the lectures. The course is complemented by additional tutoring activities.

Students are invited to clarify any doubts during the lesson or during the office hours. It is better to clarify the doubts before taking the exam than after.

The exam consists of a practical test and an oral test.

The oral exam can be accessed only after passing the practical test.

The practical test consists in solving some proposed exercises to the computer within a time set by the teacher and in any case not exceeding three hours.

Passing the practical test allows access to the oral test in the same session or even in a subsequent session, within a year.

Learning assessment may also be carried out on line, should the conditions require it.

## Detailed Course Content

**Introduction to the use of the computer for numerical calculations.**

Introduction to Python language. Enthought Canopy. Variables and elementary instructions. Cycles. Data structures. Modules. Use of matplotlib and numpy packages. Floating point representation. Machine numbers. Truncation and rounding. Machine operations. Digital cancellation. Order of accuracy.

**Numerical linear algebra.**

Elements of linear algebra: vectors, matrices, determinants, inverse matrix. Vector and matrix norms. Natural norms and their representation. Eigenvalues. Spectral radius and its properties. Some special matrices. Direct methods for solving linear systems: triangular systems, Gaussian elimination, pivoting. Factorization A = LU and PA = LU. Compact methods, Choleski factorization and their implementation in python. Conditioning of a linear system. Condition number. Sparse matrices and their representation. Eigenvalues and eigenvectors: brief review. Iterative methods for solving linear systems: Jacobi method, Gauss-Seidel method, SOR method. Stopping criteria. Pointwise and block methods (mention). Singular value decomposition (mention). Localization of the eigenvalues: the theorems Gershgorin-Hadamard. Eigenvalues calculation: direct and inverse power methods.

**Approximation of functions and data.**

Polynomial interpolation. Lagrange form. Linear interpolation operator. Calculation of the interpolation polynomials. Newton's formula of divided differences. The error formula (Lagrange form). Chebyshev polynomials: recursive formula, zeros, the property of minimal norm. Weierstrass theorem on approximation of a continuous function by polynomials (statement). Bernstein polynomials. The problem of the convergence of a sequence of interpolators schemes. Interpolation by piecewise-polynomials. Splines. Calculation of cubic splines. Method of least squares and applications. Normal equations and their geometric interpretation.

**Solution of nonlinear equations.**

General concepts. Methods of bisection, secant and Newton. General theory of iterative methods for nonlinear equations and fixed point problems. Convergence order. Stopping criteria. Aitken method for one and two order of convergence of methods.

**Quadrature formulas.**

Weighted integrals. General form of a quadrature formula. Polynomial order (or degree of precision) of a quadrature formula. Interpolatory formulas. Convergence theorem. Newton-Cotes formulas. Gaussian formulas. Composite formulas: trapezoid and Simpson formulae. Romberg method. Adaptive quadrature (notes).

## Textbook Information

The course is almost self-contained, and the subject can be prepared using the notes taken during the lectures of the professor.

In any cases, there are several excellent textbooks in English. An old, still very good one, is the classical book by Eugene Isaacson (Author), Herbert Bishop Keller (Author):

*Analysis of Numerical Methods *(Dover Books on Mathematics) Revised Edition.

It can be bought on Amazon for about 15 US$.

The book can be supplemented by

*Introduction to Numerical Analysis: Second Edition* (Dover Books on Mathematics) 2nd Edition, by F. B. Hildebrand, at similar price.