Numerical methods
Reminders on matrices
A ∈ Rn×n:
- A simmetrica se A=AT.
- Matrice A definita positiva se xTAx > 0 ∀x ∈ Rn con x≠∅.
- A non singolare = ATA simmetrica e positiva definita.
Natural norm
|||A||| = supy≠∅ ||Ay|| / ||y|| verifica → ||Ay|| ≤ ||A|| ||y|| ||A + B|| ≤ ||A|| + ||B||
Solving linear systems
The problem: given b ∈ C bn, A ∈ Cn×n, R ∈ R, we look X ∈ Cn solution of AX = b soli: X = A-1b.
soluzione unica se e solo se A e’ non singolare (o invertible) condizione abastanza e sufficiente e’che a abbia det(A)≠0
Simplest systems are diagonal systems
Dχ=b con D = d11 0 0 d22
xi = bi / djj i=1,2,...,n
n operations
Lower triangular matrices
L = [ l11 0 l21 l22 ln1 ln2 lnn]
System can be solved "forward"
x1 = b1 / l11 x2 = b2 - l21x1 / l22 xn = bn - ∑ lnjxj / lnn j=1
n2 operations
A special lower triangular matrix
(L has only 1 on the diagonal) -> L = [ 1 0 l21 1 ln1 ln2 1]
Two equivalent algorithms:
for i = 2, ..., n for j = i - 1, ..., 1 bi; b - Ii,j; bj; endend
for k = 1, ..., n - 1 for i = k + 1, ..., n bi; bi + Ii,k; bk; endend
Upper triangular matrices
U = [ u11 u12 u1n 0 u22 u2n 0 0 u33]
xn = bn / unnxn-1 = bn-1 - un-1,n xn / un-1,n-1x1 = b1 - ∑ u1,jxj / u11j=2
n2 operations
Execution time
t = # operations / # flops
Numerical methods
Reminders on matrices A ∈ Rn×n:
- A simmetrica se A = AT. Autovalori di una simmetrica sono reali.
- Matrice A definita positiva se:
- xTAx > 0 ∀ x ∈ Rn con x ≠
- xTAx = 0 se x =
- A non singolare = ATA simmetrica e positiva definita.
Natural norm:
‖A‖ = sup ‖A‖ / ‖‖ ≠
Verifica → ‖A‖ ≤ ‖A‖ ‖‖
‖A + B‖ ≤ ‖A‖ + ‖B‖
Solving linear systems:
The problem → given b ∈ Rn, A: Rn x Rn we look X ∈ Rn solution of AX = b soli: x = A-1b
Simplest systems are diagonal systems
Dx = b con D = d11 d22 n operations
xi = bi/dii i = 1,2,...,n
Lower triangular matrices →
L = [I11 I21 I22 In1 In2 Inn]
System can be solved “forward”
{x1 = b1/I11x2 = b2 - I21x1
xn = bn - Σj=1n-1 Injxj}Inn
n2 operations
A special lower triangular matrix
(L has only 1 on the diagonal) → L = [1 In1 1 In1 In2 1]
{x1 = b1
x2 = b2 - I21x1
xn = bn - Σj=1n-1 Injxj}
Two equivalent algorithms:
for i = 2,...,nfor j = 1,..,i-1bi = bi - Ii,jbjendend
for k = 1,...,n - 1for i = k+1,...,nbi = bi - Ii,kbkendend
Upper triangular matrices → U =
[U11 U22 U21 U33 Un2 ... ]
{xn = bn/Unn}
xn-1 = bn-1 - Un-1,n/Un-1,n-1
x1 = b1 - Σj=2n Ui,jxj
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
-
Temi d'esame risolti Numerical Methods (Advanced ), prof.Sangalli
-
Riassunti digitali (apple pencil) di tutte le domande di teoria dell'esame Numerical Methods for Engineering
-
Temi d'esame svolti - Numerical methods for civil engineering
-
Numerical Methods - Esame base - Pseudocodici ed esercizi