• Non ci sono risultati.

Elements of numerical linear algebra and quadrature

N/A
N/A
Protected

Academic year: 2021

Condividi "Elements of numerical linear algebra and quadrature"

Copied!
6
0
0

Testo completo

(1)

Elements of numerical linear algebra and quadrature

Elements of numerical linear algebra and quadrature

Emma Perracchione

Corso di Calcolo Numerico per Ingegneria Meccanica - Matr. PARI (Univ. PD)

Gli esercizi sono presi dal libro: S. De Marchi, D. Poggiali, Exercices of numerical calculus with solutions in Matlab/Octave.

A.A. 2018/2019

(2)

Elements of numerical linear algebra and quadrature Materiale

Materiale

TUTTO IL MATERIALE SI TROVA AL SEGUENTE LINK E VERRA’

AGGIORNATO AD OGNI LEZIONE.

https://www.math.unipd.it/~emma/CN1819.html

(3)

Elements of numerical linear algebra and quadrature Exercises

Exercise 1

Exercise

On a script called Esercizio 1 compare SimpsonComposto and TrapezioComposto for the following two integrals with the same number of nodes (n = 11):

Z 1

0

1 + x2 dx . Z 1

0

1/8 + 2x dx . Compute the error.

Comment the results.

(4)

Elements of numerical linear algebra and quadrature Solving systems

Matlab routines

For solving a system Ax = b, with A ∈ Rn×n,x, b ∈ Rn in Matlab, we simply have to write x=A \ b.

\ Backslash or left matrix divide.

A\B is the matrix division of A into B, which is roughly the same as INV(A)*B , except it is computed in a different way.

If A is an N-by-N matrix and B is a column vector with N components, or a matrix with several such columns, then X = A\B is the solution to the equation A*X = B. A warning message is printed if A is badly scaled or nearly singular.

A\EYE(SIZE(A)) produces the inverse of A.

(5)

Elements of numerical linear algebra and quadrature Remarks

Gauss

Given a square matrix A ∈ Rn×n of elements aik, i , k = 1, . . . , n, for performing the gaussian reduction, we need to calculate for

k = 1, . . . , n − 1

mik = a(k)ik a(k)kk

, i = k + 1, . . . , n,

and then

a(k+1)ij = a(k)ij − mika(k+1)kj , i , j = k + 1, . . . , n.

One can interpret this as a factorization of the type LU = A, where the entries of L are given by mik (and a diagonal of ones) and the

(6)

Elements of numerical linear algebra and quadrature Exercices

Exercise 2

Exercise

Write the function for LU factorisation without pivoting (and call it LUnoPiv).

Riferimenti

Documenti correlati

the study of the structure of the Mumford-Tate group of M: he suggests one investigate the of the Lie algebra of the motivic Galois group of M interpreted as a

In section 3, the Weyl limit point-limit circle criterion [9] is used to prove that the squared Dirac operator for the free problem is essentially self-adjoint on the set C 0 ∞ ( 0,

Since our proofs mainly rely on various properties of Ramanujan’s theta functions and dissections of certain q-products, we end this section by defining a t-dissection and

We provide an algorithm that computes algebraic quadrature formulas with cardinality not exceeding the dimension of the exactness polynomial space, on the intersection of any number

shaming Italian runners, the credibility of those mayors is strengthened. By shaming the elderly, the efficiency of the Dutch healthcare system is reaffirmed. By shaming

Solution proposed by Roberto Tauraso, Dipartimento di Matematica, Universit`a di Roma “Tor Vergata”, via della Ricerca Scientifica, 00133 Roma,

(American Mathematical Monthly, Vol.118, January 2011). Proposed by Kieren MacMillan (Canada) and Jonathan

[r]