Module page
Laboratorio di Programmazione e Calcolo
academic year: | 2016/2017 |
instructor: | Biancamaria Della Vecchia |
degree course: | Mathematics - DM 270/04 (triennale), I year |
type of training activity: | di base |
credits: | 9 (84 class hours) |
teaching language: | italiano |
program: | A-L |
period: | I sem (03/10/2016 - 13/01/2017) |
Presence: highly recommended
Module aims: The main goal is to introduce the students to a constructive approach to mathematics also by means of personal computers. In this respect, the course complements other courses of the first year where the logic/deductive point of view is more emphasized. A major part of this course will be devoted to problem solving, to the analysis of basic algorithms and to their implementation in C.
Detailed module subject: Introduction to C++ language: types of variables, type conversion, arrays, logical operators (or, and, not), read and write statements, conditional statements (if-else) and cycle statements (for, while, do-while). Mathematical functions. Structure of a C++ program. Functions. Passing variables. Basics on the use of pointers. Representation of integer and real numbers in computers. Error propagation in arithmetic operations. Stable and unstable algorithms: computation of pi. Computation of a polynomial in a point (Horner algorithm). Matrices, vectors and systems of linear equations: Gauss and Jacobi methods. Graphic library Gnuplot: plot of a function. Numerical methods for finding roots of a nonlinear equation: bisection, Newton and secant methods. Taylor formula for computing some mathematical functions. Polynomial interpolation. Numerical methods for computing definite integrals.
Suggested reading: Materials provided by the teacher on the Web Luis J. Aguilar, "Fondamenti di programmazione in C++", McGraw-Hill, 2008 or equivalent. A. Quarteroni, R. Sacco, F. Saleri, "Matematica numerica", Springer, 2008 As an alternative: A.Quarteroni , "Elementi di Calcolo Numerico", Progetto Leonardo ,1998 J.F. Epperson, "Introduzione all'analisi numerica", McGraw-Hill, 2003
Issues:
- Short introduction to C/C++ (by Prof. M. Falcone; Italian language)
- Basic mathematics problems, algorithms and codes (by Prof. S. Finzi Vita; Italian Language)
- Introductory lesson to the course (by Prof. S. Finzi Vita; Italian language)
- Compuer numbers (by Prof. E. Carlini; Italian language)
- Introduction to errors (by Prof. M.Marfurt; Italian language)
- Use of C/C++ compilare under Linux (by Prof. A. Seghini; Italian language)
- C code with casting examples
- Introduction to C++ (by Prof. M. Marfurt)
- Systems of linear equations, by Prof. Marfurt
- Numerical solution of nonlinear equations, by Prof. Falcone
- Approximation of functions, by Prof. M. Falcone
Type of course: standard
Exercises:
- Exercise n. 1
- Exercise sheet N. 2
- Exercise sheet N. 3
- Exercise sheet #4
- Exercise sheet # 5
- Exercise sheet #6
- Exercise sheet #7
- Exercise sheet #8
- Exercise sheet #9
- Exercise sheet #10
- Exercise sheet #11
Examination tests:
Knowledge and understanding: Successful students will be able to have a basic knowledge of programming and of the mathematical properties of simple algorithms. They will also achieve some fundamental notions about convergence, order of convergence, errors and complexity for elementary algorithms.
Skills and attributes: Successful students will be able to write a simple C code for scientific purposes and to manage elementary numerical algorithms to solve problems. They will be able to choose the appropriate algorithm for simple problems like finding the root of an equation, computing an integral or solving a linear system. During the laboratory sessions they will learn how to use PCs, graphic tools and a LAN network.
Personal study: the percentage of personal study required by this course is the 65% of the total.