# NUMERICAL METHODS FOR PHYSICS

Academic Year 2023/2024 - Teacher: Giuseppe Gioacchino Neil ANGILELLA

## Expected Learning Outcomes

Several physical problems of interest are proposed, which provide examples of standard mathematical problems. These, in turn, provide examples of standard numerical techniques, which are sometimes also implemented by means of computer codes. At the various levels of interest (physical, mathematical, numerical and, where available, in programming), different sources of “approximation” are presented and critically examined.

Knowledge and understanding.

Ability of inductive and deductive reasoning. Ability to describe a physical phenomenon in terms of scalar and vector fields. Ability to describe a problem in terms of suitable (algebraic, integral, or differential) relations among physical magnitudes through analytical or numerical methods. Several physical phenomena will be classified according to the mathematical relations arising among relevant quantities, and suitable numerical methods will be proposed and analyzed for their solution.

Applying knowledge and understanding.

Ability to devise theoretical models. Ability to perform numerical simulations.

Making judgements.

Ability of critical reasoning. Ability to identify the predictions of a theory or of a model.

Communication skills.

Good computer skills. Good skills in using tools for the organization of scientific information, data analysis, and bibliographic survey. Oral and written knowledge of scientific English. Ability to orally present scientific topics, with a suitable vocabulary and sufficient rigour, with attention to motivations and results.

Learning skills.

Ability to update one's knowledge and expertise, through reading scientific literature, both in Italian and in English, in the various areas of physics, even if not explicitly covered within one's own curriculum.

## Course Structure

Frontal lectures.

Should the circumstances require online or blended teaching, appropriate modifications to what is hereby stated may be introduced, in order to achieve the main objectives of the course.

## Required Prerequisites

Linear algebra, geometry, calculus (sequences, real functions of real variables, one-dimensional integration, Taylor expansion, basics of ODE), general physics (mechanics, thermodynamics). A few topics also make reference to notions of calculus (real functions of more than one real variable), general physics (electromagnetism), analytical mechanics and quantum mechanics: these courses are being attended simultaneously by the average student.

## Attendance of Lessons

Lectures attendance is usually mandatory (see the Regulations of the BSc Course in Physics).

## Detailed Course Content

Approximation and interpolation of functions. Polynomial interpolation. Interpolation formulas according to Lagrange and to Newton.

Numerical error: point and global error. Scalar products and norms in functional spaces.

Orthonormal bases in linear spaces. Classical orthogonal polynomials. Legendre, Hermite, Laguerre, Chebyshev polynomials. Generating function. Rodriguez formula (for the Hermite polynomials). Multipole expansion. Central fields generated by a mass or charge distribution. Development of functions in Legendre polynomials.

Numerical derivation and integration. Newton-Cotes formulas. Trapeze method. Simpson method. Adaptive integration (hint). Monte Carlo method (hint).

Zero finding. Bisection method. Convergence order. Secant method. Newton-Raphson method. The Babylonian algorithm and other examples.

Ordinary differential equations (ODE). Physical examples. Picard-Lindelöf theorem. Lipschitz condition. Picard method. Continuous dependence on initial data values. Euler method. Local and global truncation error. Heun, implicit Euler, and Runge-Kutta methods. Symplectic methods.

Numerical solution of the Schrödinger equation: Numerov method. Case of the harmonic oscillator, of the potential well, and other confining potentials.

Systems of linear equations: direct and iterative methods. Cramer method. Laplace algorithm for the determinant of a matrix. Computational complexity: polynomial and non-polynomial. Stirling formula. Factorial of a number in terms of Euler's Gamma function. Saddle-point approximation for the numerical estimate of integrals. Gauss-Jordan method and its computational complexity. Power sums. LU factorization method. Iterative methods. Convergence criterion. Matrix norms. Jacobi and Gauss-Seidel methods. Sparse and dense matrices. Successive over-relaxation.

Eigenvalues and eigenvectors (reminder). Spectral representation. Relevance of symmetries in physics. Graphs: adjacency matrix. Google and Perron-Frobenius theorem (hint). Applications to Internet and the search engines. Power method. Normal modes of a one-dimensional chain of harmonic oscillators: periodic case. Analytical solution for a homogeneous chain. Bands. Continuum limit. Long wavelength limit. Sound velocity. Acoustic modes. Normal modes of a one-dimensional chain of harmonic oscillators: quasi-periodic case. Quasicrystals. Numerical solution for the Fibonacci chain.

Partial differential equations (PDE). PDE of physical relevance. Classification (hint). Local and global formulation of a physical law. Examples of PDE from physics: Maxwell equations. General problem of the electrostatics. Poisson equation: Dirichlet and von Neumann problems. Poisson equation: variational derivation. Discretization of the Poisson equation and of the electrostatic energy. Richardson method. Convergence criterion. Liebmann method.

Discrete Fourier Transforms (DFT). Numerical solution of the Poisson equation via DFT.

## Textbook Information

S. E. Koonin, D. C. Meredith, Computational physics (Addison-Wesley, Redwood, 1990).

G. Naldi, L. Pareschi, G. Russo, Introduzione al calcolo scientifico (McGraw-Hill, Milano, 2001).

J. F. Epperson, Introduzione all'analisi numerica (McGraw-Hill, Milano, 2003).

J. F. Epperson, An introduction to numerical methods and analysis (Wiley, Hoboken, 2013) - 2nd ed.

## Course Planning

SubjectsText References
1Polynomial interpolation
2Numerical differentiation
3Numerical integration
4Zero finding
5Numerical solution of ordinary differential equations
6Numerical solution of linear systems
7Dominant eigenvalue of a matrix
8Numrical solution of Poisson's equation
9Discrete Fourier Transforms

## Learning Assessment

### Learning Assessment Procedures

Oral discussion on topics of the course. The candidate is usually invited to start from a topic of his/her choice.

Evaluation criteria are: relevance of answer wrt question, detail level, ability to stipulate links with other topics of this or other courses, ability to formulate relevant examples, language skills, clarity of presentation.

Evaluation may also take place online, should circumstances require, and current regulations allow that.

### Examples of frequently asked questions and / or exercises

Questions below are provided only by way of example, and do not exhaust all possible questions:

• Interpolating polynomial: Lagrande and Newton forms
• Classical orthogonal polynomials
• Legendre Polynomials: properties etc
• Multipole expansion
• Numerical differentiation
• Newton-Cotes formulas
• Convergence rate (zero finding)
• Contractions
• ODE: explicit and implicit methods
• Symplectic methods
• Computational complexity
• Direct (Gauss-Jordan, LU) and indirect methods (Jacobi, Gauss-Seidel) for linear systems
• Power method (dominant eigenvalue)
• Quasicrystals
• Indirect and direct methods (DFT) for the solution of Poisson equation