Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Esercizio 1
Risolvere il sistema lineare
x1 + x 4 = 1
x + x = 2
1
2
+
x
1 x 2 + x3 = 1
x 2 + x3 + x 4 = 2
Soluzione
1
1
1 1
1 0
0 0 1 1
1 0 0 2
1 1 0 1
1 1 1 2
1 0 0 1 1
0 1 0 1 1
1 0 1 1 1 2
1 0 1 1 1 2
x1 + x 4 = 1
x x = 1
2
4
x3 + 2 x 4 = 1
0 = 0
1 0 0 1 1
0 1 0 1 1
0 0 1 2 1
1 0 0 1 2 1
x1 = 1 x 4
x = 1 + x
2
4
x3 = 1 2 x 4
0 = 0
0
0
1 1
1 0 1 1
0 1 2 1
0 0 0 0
0 0
Esercizio 2
Detti A e b la matrice e il vettore dei termini noti dellesercizio precedente, dire se i metodi
di Jacobi e Gauss-Seidel convergono se applicati al sistema lineare ( A + I )x = b , dove I
denota la matrice identit.
Soluzione
1
1
A=
1
0 0 1
1 0 0
1 1 0
1 1 1
Metodo di Jacobi: B J = D 1 (L + U )
1
2
b=
1
2
0 0 0
2 0 0
0 2 0
0 0 2
2
1
A+ I =
1
0 0 1
2 0 0
1 2 0
1 1 2
0
0 0
1 0
0
L=
1 1 0
0 1 1
0
0
0
0
0
U =
0
0 0 1
0 0 0
0 0 0
0 0 0
Per Jacobi:
D 1
0
0 1
0
0
1 2
0
0
1 0
1 2
0 0
0
0
0
L +U =
BJ =
1 1 0 0
1 2 1 2
0
0
1 2 1 2
0
0 1 1 0
0
1 2
0
0
1 2
0
0
det (B J I ) = 0
det
=0
1 2 1 2
0
1 2 1 2
0
0
0
1 2 0
0 12 0
0
=
0
0 12 0
0
0 1 2
0
( )2 +
1 1 1 1
1
+ = 0
2 2 4 2
4
1
1 = 2 =
2
1 1
2 8
4 + = 0
3 = 4 =
1 = 2 = 3 = 4 =
4 =
1
16
1
2
(BJ ) < 1
1
2
0
0 0
0 0
BGS =
0 0
0 0
1
3
16
0 0 0
2 0 0
1 2 0
1 1 2
0 1 2
0 1 4
0 3 8
0 1 16
)= 0
0
0
0
12
1 4 1 2
0
0
(D L )1 = (D L )
(D L )1 =
3 8 1 4 1 2
0
det (D L )
1 16 1 8 1 4 1 2
0
1 2
0
0 0
14
det (BGS I ) = 0
det
= 0
0
0
3 8
0
0 1 16
0
1
1
1 = 2 = 3 = 0
(BGS ) < 1
4 =
max =
16
16
+
Esercizio 3
Si calcoli il numero di condizionamento con indice 1, 2 e della matrice
1 0 1
A = 0 1 1
0 0 1
Soluzione
m
A 1 = max aij
j =1,...,n
i =1
A 2 = AT A
= max aij
i =1,...,m
j =1
Numero di condizionamento:
K ( A) = A A
A+
A =
det( A)
1 0 0
A = 0 1 0
1 1 1
det( A) = 1
K 2 ( A) =
1 0 1
A = 0 1 1
0 0 1
+
max (AT A)
min (AT A)
1 0 1
A = 0 1 1
0 0 1
1
K1 ( A) = A 1 A 1 = 9
1
K ( A) = A A 1
=4
(1 )[(1 )(3 ) 1] (1 ) = 0
1 = 1
(1 )[(1 )(3 ) 1 1] = 0
K 2 ( A) =
2 3 = 2 3
det AT A I = 0
0
1
1
det 0
1
1 = 0
1
1
3
2+ 3
2 3
(1 )(2 4 + 1) = 0
= 2+ 3
Esercizio 4
Classificare la seguente formula alle differenze finite per la risoluzione numerica di un
problema di Cauchy
h
0 = y 0
Soluzione
( x, y; h ) =
] ( )
h
f x ( x , y ) + f y ( x, y ) f ( x, y ) + O h 2
2
1
[ f (x, y ) + f (x + h, y + hf (x, y ))]
+1
] ( )
1
f ( x, y ) + f (x, y ) + h( f x ( x, y ) + f y ( x, y ) f ( x, y )) + O h 2
+1
+1
1
2
(x, y; h ) = 1
f ( x, y ) + h f x ( x, y ) + f y ( x, y ) f ( x, y ) + O h
+
1
2
] ( )
] ( )
Esercizio 5
Dimostrare che la seguente matrice
1 3 3
3
A=
1
3
3
3
3
3
3
ortogonale per = 2 , mentre non lo per = 1 .
-1
Soluzione
1 3 3
3 3
3
3
AT A =
1
1
3
3 3
3
3
3
1
1
3
3
3 3
3
3
+
=1
1 +
3
9
9
2 2 2 2
+
+
+
=1
3
9
9
9
=0
=2
1
( 2 ) = 0
3
Esercizio 6
Dare una condizione necessaria e sufficiente per la convergenza del metodo iterativo di
Jacobi applicato al sistema lineare
3x1 + x 2 + x3 = 8
x1 + 3x 2 x3 = 4
x x + 3x = 8
2
3
1
dipendente dal parametro reale . Posto = 1 ,calcolare le due iterate x(1) e x(2) a partire dal
Soluzione
3 1
A = 1 3
1
1
3
8
b = 4
8
Condizione necessaria e sufficiente per la convergenza: (BJ ) < 1
B J = D 1 (L + U )
3 0 0
D = 0 3 0
0 0 3
0
1 3 0
= 0 1 3 0
0
0 1 3
0 1 1
L + U = 1 0
1
0
0 0
L = 1 0
1
0
0
0
1 3 1 3
0
3
B J = 1 3
0
1 3 3
0
0 1 1
U = 0 0 0
0 0 0
det (B J I ) = 0
1 3 1 3
1
2 11
1 1
+ + = 0
det 1 3 3 = 0
2
9 33
9 3 9
3
1 3 3
1 1
1
1
+ + + + + = 0
+ + + = 0
3
3 9 9
3
3 9
3 9
3
2
2
+ = 0
3
3
9
1 =
2 =
2 3 =
+8
2
(B J ) < 1
3 =
<1
2 +8
<1
6
6
2
+ +8 <1
6
6
In generale:
n
A( x ) < B( x )
B(x ) > 0
A( x ) 0
n
A( x ) < [B( x )]
8
9
2 +8
6
+8
2
1 < < 1
2 +8
<1
1 <
6
6
2 +8
1
<
+
<1
6
6
con n pari
1 <
1 <
A( x ) > B( x )
B(x ) < 0
A( x ) 0
3< < 3
2 +8
<1
6
6
2 +8
+
<1
6
6
con n pari
B(x ) 0
n
A( x ) > [B( x )]
1 <
+8
2 +8
<1
6
6
2
+ 8 > 1
6
6
<1
2 +8
> 1
6
6
2
+
8
< +1
6
6
2 +8 6
>
2 + 8 > 6
6
6
2
2
+ 8 < + 6
+8 < +6
6
6
6 0
6< 0
2 +8 > 6
e 2
2
2
+ 8 0
+ 8 > ( 6)
6
<6
e 2
2
2
8
+ 8 > 12 + 36
6
< 6
<6 e 6
> 7
S .V .
3
+6 >0
> 6
2
2
2 8
+8 < +6
+8 0
2 + 8 < ( + 6 )2
2 + 8 < 2 + 12 + 36
> 6
S .V .
> 7
>
7
3
1 <
+8
6
2 +8
< +1
6
6
2
+
8
> 1
6
6
+8 < 6
2
< 6
S .V .
< 7
2 +8
6
< 1 : >
7
3
2 +8
+
<1
6
6
2 +8
> 1
6 +
6
<1
2 +8 6
<
6
6
2
+
8
>
6
6
6 > 0
2
+8 0
2 + 8 < (6 )2
<
7
3
2 + 8 < 6
2
+ 8 > 6
<6
2 8
2 + 8 < 36 12 + 2
6 < 0
e
2
+8 0
6
> 6
e 2
2
2
8
+ 8 > + 12 + 36
6
> 6
7
e
> 6
<
S .V .
2 + 8 > 6
1 <
Quindi il sistema di disequazioni
1 <
7
7
Per < < il metodo converge.
3
3
6 0
2
2
+ 8 > ( 6 )
2 +8
6
3< < 3
2 +8
<1
6
6
2 +8
+
<1
6
6
< 6
< 1 : <
diventa:
7
3
3 < < 3
7
>
3
7
<
Dx (k +1) = b + Lx (k ) + Ux (k )
x (k +1) = D 1b + D 1 Lx (k ) + D 1Ux (k )
x (k +1) = D 1b + D 1 (L + U )x (k )
x ( k +1) = B J x ( k ) + f
Per k = 0:
Per k = 1:
Per = 1
x (1) = B J x (0 ) + f
x ( 2 ) = B J x (1) + f
1 3 1 3
0
B J = 1 3
0
1 3
1 3 1 3
0
0 8 8
1 3 0
f = 0 1 3 0 4 = 4
0
0 1 3 8 8
Per k = 0:
x (1)
0
1
=
3
1
3
0
1
=
3
1
3
1
3
0
1
3
1
8 7
3 0 3 3
1 4 4
1 + =
3 3 3
0 8 3
0
3
Per k = 1:
x (2 )
1
3
0
1
3
1 7 8 11
3 3
3
9
1 4 4 14
+ =
3 3 3 9
3
8
7
0
3 3
3
3
3