Sunteți pe pagina 1din 100

uba facultad de ingeniera

ANLISIS NUMRICO I ANLISIS NUMRICO I ANLISIS NUMRICO I ANLISIS NUMRICO I


SISTEMAS DE ECUACIONES
LINEALES
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[1]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Muchos problemas que resuelve la ingeniera
se expresan matemticamente mediante
sistemas de ecuaciones lineales.
Ejemplos:
Circuitos elctricos;
Sistemas estructurales estticos;
Sistemas dinmicos;
Problemas de transmisin del calor;
.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[2]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
En forma genrica, un sistema de ecuaciones
lineales puede expresarse as:
O, en forma abreviada:
n n nn n n n
n n
n n
b x a x a x a x a
b x a x a x a x a
b x a x a x a x a
= + + + +
= + + + +
= + + + +
K
M M M M M M
K
K
3 3 2 2 1 1
2 2 3 23 2 22 1 21
1 1 3 13 2 12 1 11
B Ax =
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[3]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Matricialmente, la solucin es:
Por lo tanto, para que el sistema tenga
solucin, se debe cumplir que:
La matriz A sea cuadrada
La matriz A sea No Singular, es decir,
Sin embargo, no siempre es fcil obtener AA
-1
.
Busquemos formas alternativas.
B A x
1
=
0 ) det( A
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[4]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Supongamos un sistema sencillo de resolver:
Se trata de un sistema triangular, pues la
matriz AA es triangular superior.
(
(
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(

(
(
(
(
(
(
(
(

n n
n n
n n
n
n
b
b
x
x
u
u
u
u u u
u u u
M
M
M
M
M
M
M
M
L L L
O O M
M O O O M
M O M
L L L
1 1
1
3 3
2 3 2 2 2
1 2 1 1 1

0 0
0
0
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[5]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
La solucin la obtenemos haciendo:
i i
n
i j
j ij i
i
n n
n n n n n n n
n
n n
n n n n
n
n n
n
n
u
x u b
x
u
x u x u b
x
u
x u b
x
u
b
x

+ =

=

=

=
=
1
2 2
2 1 1 2 2
2
1 1
1 1
1

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[6]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Otro sistema sencillo de resolver es:
En este caso la matriz AA es triangular inferior.
(
(
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(

(
(
(
(
(
(
(
(

n n
n n n n n
b
b
x
x
l l l
l l
l l
l
M
M
M
M
M
M
M
M
L L L
O O M
M O O O M
M O M
L L L
1 1
1 1
3 3 2 3
2 2 1 2
1 1

0
0 0
0 0
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[7]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
La solucin pasa por hacer:
i i
i
j
j j i i
i
l
x l b
x
l
x l x l b
x
l
x l b
x
l
b
x

=

=

=
=
1
1
3 3
2 2 3 1 1 3 3
3
2 2
1 1 2 2
2
1 1
1
1

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[8]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Ambos sistemas podemos resolverlos sin
invertir la matriz A.
El primer caso se conoce como Sustitucin
Inversa.
El segundo, como Sustitucin Directa.
Por lo tanto, una forma conveniente para
resolver un Sistema de Ecuaciones Lineales
general, sera convertirlo en un sistema
triangular para no tener que invertir la matriz
AA.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[9]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Mtodo de Eliminacin de Gauss (EG)
Consiste en transformar una matriz AA cualquiera
en una nueva matriz UU, es decir, en una matriz
Triangular Triangular Superior Superior:
(
(
(
(
(

(
(
(

n n
n n
n
n n n
n
u
u
u u u
a a
a a
U A
0 0
0
1
1 12 11
1
1 11
L
O O M
M O O
L
L
M O M
L
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[10]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
El nuevo sistema ser entonces
(
(
(
(
(

=
(
(
(
(

(
(
(
(
(

n
n
n n
n n
n
b
b
x
x
u
u
u
u u u
*
1
*
1
1
2 2
1 2 1 1 1

0 0
0
M
M
M
M
L
O O M
M O
L
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[11]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Para obtener esta matriz UU debemos operar
de la siguiente manera:
Fijar la primera fila de AA, ampliada con el vector B;
Transformar las filas 2 a n, de manera de que los
coeficientes a
j1
se anulen, es decir, pivotar con
a
11
;
Fijar la siguiente fila y repetir el paso anterior,
pero con las filas 3 a n, pivotando con a
ii
;
Repetir el paso anterior hasta obtener una matriz
triangular superior.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[12]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
En definitiva, tenemos:
Para los coeficientes a
2i
y b
2
:
Para cualquier coeficiente a
ji
y b
j
:
1 1 2 2
*
2 1 1 2 2
*
2 2
1 1
1 2
1 2
; b m b b a m a a u
a
a
m
i i i i
= = = =
k k j j j i k k j i j i j i j
k k
k j
k j
b m b b a m a a u
a
a
m ;
* *
= = = =
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[13]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Qu hacemos si un a
*
ii
resulta nulo?
(
(
(
(
(
(

*
*
3
*
2
1
* *
1
*
2
*
3
*
33
*
32
*
2
*
23
1 12 11
0
0
0
n
n n n n n
n
n
n
b
b
b
b
a a a
a a a
a a
a a a
M
L
M O O M M
L
L
L L
0 00 0
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[14]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Intercambiamos filas, por ejemplo, la 3 en
lugar de la 2 y viceversa:
(
(
(
(
(
(

*
*
2
*
3
1
* *
1
*
2
*
2
*
23
*
3
*
33
*
32
1 12 11
0
0
0
n
n n n n n
n
n
n
b
b
b
b
a a a
a a
a a a
a a a
M
L
M O O M M
L
L
L L
0 00 0
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[15]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Qu hacemos si tambin son nulos varios
coeficientes de la diagonal principal?
(
(
(
(
(
(

*
*
3
*
2
1
* *
1
*
2
*
3
*
2 3
*
2
*
3 2
1 12 11
0
0
0
n
n n n n n
n
n
n
b
b
b
b
a a a
a a
a a
a a a
M
L
M O O M M
L
L
L L
0 00 0
0 00 0
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[16]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Podemos intercambiar las columnas:
Pero esto requiere modificar el vector xx.
(
(
(
(
(
(

*
*
3
*
2
1
* *
1
*
3
*
3
*
2 3
*
2
*
3 2
1 3 1 11
0
0
0
n
n n n n n
n
n
n
b
b
b
b
a a a
a a
a a
a a a
M
L
M O O M M
L
L
L L
0 00 0
0 00 0
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[17]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
El primer caso, el intercambio de filas, se
conoce como Eliminacin de Gauss con
Pivoteo Parcial (EGPP).
Cuando adems del intercambio de filas es
necesario el intercambio de columnas,
entonces se lo conoce como Eliminacin de
Gauss con Pivoteo Total (EGPT).
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[18]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Veamos la cantidad de operaciones que
requiere Eliminacin de Gauss simple:
Transformacin de la matriz AA ampliada:
Aplicacin de sustitucin inversa:
El mtodo completo:
( ) ( )( ) [ ] n
n
n k n k n k n
n
k
6
7
2 3
2
1 2
2
3
1
1
+ = + +

=
( ) [ ]
2
1
1
1 2 1 n k n
n
k
= + +

=
3 2 3 2
2
3

6
7
2
3
3
2
6
7
2 3
2
n C n n n n n
n
n + = + +
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[19]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Aplicar Eliminacin de Gauss tiene estas
ventajas:
El resultado final debera ser exacto, salvo por
el error de redondeo;
La cantidad de operaciones a realizar es finita.
Pero tambin tiene desventajas:
Aplicar el pivoteo parcial o el pivoteo total lo
vuelven lento;
Si se tienen varios vectores BB, debera hacerse la
transformacin de AA para cada vector BB.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[20]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Si los vectores BB son independientes,
entonces podemos transformar todos los
vectores BB en una sola operacin:
(
(
(

> <
> <
> <
> <
> <
> <
k
n
k
n n n n n
n
b
b
b
b
b
b
a a
a a
M L M M
L
M O M
L
1
2
2
1
1
1
1
1
1 1 1
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[21]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Este procedimiento no es posible si los
siguientes vectores BB dependen de nuestra
solucin.
En ese caso, deberamos repetir todo el
procedimiento de nuevo.
Entonces, la idea es buscar un nuevo
procedimiento que no repita la
transformacin de la matriz A A.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[22]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Busquemos expresar la matriz AA mediante
otra matrices, a saber:
En este caso, el problema se resuelve
mediante dos sustituciones, pues
B x LU LU A = =
{

=
= =
=
y x U
B y L B x U L
B x A
y

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[23]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
En la primera ecuacin el sistema est
formado por:
Con este sistema obtenemos el vector yy.
(
(
(
(

=
(
(
(
(

(
(
(
(
(

n n
n n n n n
b
b
y
y
l l l
l
l
M
M
M
M
L
O O M
M O O
L
1 1
1 1
1 2
1 1

0
0 0
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[24]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
En la segunda ecuacin tenemos:
Con este sistema obtenemos finalmente el
vector xx.
(
(
(
(

=
(
(
(
(

(
(
(
(
(

n n
n n
n n
n
y
y
x
x
u
u
u u u
M
M
M
M
L
O O M
M O O
L
1 1
1
1 2 1 1 1

0 0
0
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[25]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Esta forma diferente de plantear y resolver el
sistema se conoce como Factorizacin LU.
Consiste en obtener dos matrices, LL y UU, para
luego aplicar la Sustitucin Directa (LLyy=BB) y
la Sustitucin Inversa (UUxx=y y).
La pregunta es: Cmo obtenemos esas
matrices L L y UU?
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[26]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Una forma es aprovechar el mtodo de
Eliminacin de Gauss, que transforma AA en
una matriz UU.
Falta cmo obtener la matriz LL.
Para obtenerla, impongamos que todos los
coeficientes de la diagonal principal de LL
sean iguales a 1, es decir, l
ii
= 1.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[27]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Con esta suposicin podemos obtener los
restantes coeficientes de LL pues:
2 3
*
2 2
*
2 3
2 2
*
2 3
2 3
*
2 3 2 1 1 3 2 3 2 1 1 3 2 3 2 2 2 3 2 3 2 2 32 2 1 31
1 3
1 1
1 3
1 1
1 3
1 3 1 3 1 1 1 3
1 2
1 1
1 2
1 1
1 2
1 2 1 2 1 1 1 2
1 1

1
m
a
a
u
a
l
a a m a u l a u l a u l u l
m
a
a
u
a
l a u l
m
a
a
u
a
l a u l
l
= = =
= = = = +
= = = =
= = = =
=
K
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[28]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
En consecuencia, la matriz LL se forma con los
coeficientes m
ji
de la Eliminacin de Gauss, y
por lo tanto, resulta ser:
(
(
(
(
(

1
0
0 0 1
1 1
1 2
n n n
m m
m
L
O O M
M O O
L
L
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[29]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
As, el sistema completo queda como sigue:
Se conoce como Mtodo de Doolittle, y suele
expresarse matricialmente como
{ {
B x
U L
(
(
(
(

=
(
(
(
(

(
(
(
(
(

(
(
(
(
(

n n
n n
n n
n
n n n
b
b
x
x
u
u
u u u
m m
m
M
M
M
M
4 4 4 3 4 4 4 2 1
L
O O M
M O O
L
4 4 4 3 4 4 4 2 1
L
O O M
M O O
L
1 1
1
1 2 1 1 1
1 1
1 2

0 0
0

1
0
0 0 1
B P x U L U L A P = =
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[30]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Otra forma de factorizacin es la siguiente:
Supongamos que la matriz AA tiene ciertas
caractersticas que permiten expresar la
factorizacin LU LU as:
D es una matriz diagonal, con todos los d
ij
= 0 y los
d
ii
0
La primera condicin para que esto sea
posible es que AA sea simtrica, es decir:
T
L D L A =
T
A A =
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[31]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Hagamos ahora lo siguiente:
Esto slo es posible si los valores de DD son
todos positivos. Adems podemos hacer:
Etonces, la segunda condicin es que AA sea
definida positiva.
T
L D D L A =
( )( )
T T
S S L D D L A = =
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[32]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Por lo tanto, si la matriz AA es simtrica
definida positiva, el sistema queda:
Esta forma de factorizar una matriz simtrica
definida positiva se conoce como Mtodo de
Cholesky. Los coeficientes de la matriz SS se
obtienen con las siguientes expresiones:
i i
i
k
k i k j i j
i j
i
k
k i i i i i
s
s s a
s s a s

= =
1
1
1
1
2

;
B x S S x A = =
T
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[33]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Todos los mtodos vistos tienen una
particularidad: son formas alternativas de
obtener el resultado sin invertir la matriz AA.
Pero se basan en
Como dijimos, el resultado debera ser
exacto.
Por eso, a estos mtodos se los conoce como
Mtodos Directos para resolver un SEL.
B A x
1
=
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[34]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Analicemos como inciden los errores de los
datos en la solucin del sistema.
Supongamos que definimos los siguiente:
Analicemos estas operacin haciendo:

=
=
n
j
j j i i
b n x
1

=
=
=
n
j
j i
j j i j
s x
b n s
1

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[35]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
El error relativo para el primer valor es:
El error absoluto ser:
Por lo tanto, el error absoluto de x
i
ser:
j b n s
j j i j
er er er + + =
j j j i b j i n j s
b n ea n ea b a e
j j i j
+ + =
( )

= =
+ + =
n
j
j j j i
n
j
b j i n j x
b n ea n ea b a e
j j i i
1 1

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[36]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
El error relativo de x ser:
Operando algebraicamente obtenemos:
Y reordenando otra vez los trminos:

= = =
+ +
+
=
n
k
k
n
j
j
i
j j i
n
j
i
b j i n j
x
x
b n
x
ea n ea b
r e
j j i
i
2 1 1



( )

= = =
+ + + =
n
k
k
n
j
j
i
j j i
n
j
b n
i
j j i
x
x
b n
er er
x
b n
r e
j j i i
2 1 1



( )

= =
+ + =
n
j
j
j
e
n
j
b n
j
p x
T er er C r e
j j i i
1 1

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[37]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Si suponemos:
Entonces:
Es decir, la condicin del problema depende
de AA (AA
-1
) y de BB, como debera ser.

j b n
r er er
j j i
;
1

2 + =
i
j j i
j
e
i
j j i
j
p
x
b n
T
x
b n
C
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[38]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Supongamos que al resolver un SEL
obtenemos una solucin aproximada.
Entonces tendremos:
donde x es la solucin exacta.
Para evaluar el error tomemos alguna norma,
por ejemplo, la infinita:
R A x x x A x A x A B R

1
= = =

= R A R A x x

1 1
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[39]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Una mejor manera de evaluar el error es con
el error relativo. Sabemos que:
El error relativo ser:

= =
B
A
x
x A x A B x A B
1

B
R
A A
x
x x

1
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[40]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Si tenemos en cuenta los errores inherentes
de AA y BB, la propagacin de los errores
resulta ser:
A su vez, la propagacin de los errores de
redondeo resulta ser:
|
|

\
|
+

B
B
A
A
A A
x
x

1
( ) max 3 01 , 1
2 3 1

+
A
A A
x
x
j i
a
n n
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[41]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Para que el error sea poco significativo o que
no se amplifique, deberamos tener que:
A este coeficiente lo llamaremos condicin de
una matriz. Para el caso de la norma infinito,
lo representamos como:
1
1

A A
( )

=
1
A A A
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[42]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Una matriz ideal tendr una condicin tal que:
A su vez, para una matriz singular (no existe
AA
-1
) definimos que:
Definiremos como matriz bien condicionada a
aquella que cumpla con
( ) 1 /
1
> > =

A A A
( ) 1 = A
( ) A
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[43]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Por lo visto, si una matriz est mal
condicionada, es decir:
el resultado puede no ser una buena
aproximacin.
Necesitamos encontrar un mtodo que
reduzca la distancia entre el resultado
exacto y nuestra aproximacin inicial.
( ) 1 >>> A
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[44]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Hemos visto que:
Como conocemos AA y RR, podemos obtener
y con esto mejorar nuestra aproximacin del
vector xx mediante la siguiente expresin:
x x + =

( ) R A x x A x A x A x A B R

= = = =

3 2 1
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[45]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Si esta nueva aproximacin no es lo
suficientemente buena, podramos repetir el
procedimiento. Si lo sistematizamos
obtenemos:
Por lo tanto, si repetimos el proceso
tendremos:
> < > < > < > < > < > <
+ + = + =
2 1 1 2 2 3
x x x
> < > < > <
> < > < > < > <
+ =
= =
1 1 2
1 1 1 1

x x
R A x A B R
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[46]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Podemos escribir entonces que:
Y que la solucin exacta ser cuando:
Como no se puede hacer una suma infinita,
entonces se trunca el procedimiento cuando

=
> < > <
+ =
n
i
i
1
1
x x


=
> < > <
+ =
n
i
i
1
1
x x
Tolerancia

> <k

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[47]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Este mtodo, cuyo algoritmo se escribe como
se vio:
se conoce como Mtodo del Refinamiento
Iterativo. Es muy usado para resolver
sistemas mal condicionados pero que no
sean muy mal condicionados. Es un
algoritmo destinado a mejorar los mtodos
directos de resolucin de SEL.

=
> <
=
> < > <
+ = + =
n
i
i
n
i
i
1 1
1

x x x
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[48]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Los mtodos vistos sirven para resolver
cualquier sistema de ecuaciones lineales.
Tienen la ventaja de que el nmero de
operaciones es finito.
En general son muy tiles cuando la matriz de
coeficientes est formada mayoritariamente
por componentes no nulos.
0 : extremo Caso
j i
a
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[49]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Pero no siempre los SEL estn formadas por
este tipo de matrices, denominadas
densas.
Suele ser muy comn que los sistemas estn
formados por matrices AA con mayora de
coeficientes nulos, llamadas matrices ralas.
En estos casos, como la mayora de los
coeficientes son nulos, transformar la matriz
puede ser un problema.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[50]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
La transformacin de esas matrices por algn
mtodo numrico puede significar cambiar
una componente nula por una nueva no nula,
con el consiguiente error.
Es por eso que se han desarrollado mtodos
que se utilizan casi con exclusividad para
resolver Sistemas de Ecuaciones Lineales
Ralos.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[51]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Veamos, entonces, otra forma de obtener la
solucin de nuestro sistema
Si sumamos PPxx en ambos miembros
tenemos:
Si despejamos xx tenemos:
0 = = x A B B x A
B x A x P x P + =
( ) B P x A P P P B P x A P x P P x
1 1 1 1 1 1
+ = + =
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[52]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Finalmente podemos escribir
Podemos obtener un mtodo iterativo para
obtener nuestro vector xx, pues:
Que se puede escribir en forma genrica
como:
B P C A P I T
C x T x
;

1 1
1

> < > + <
= =
+ =
i i
( ) B P x A P I x
1 1 1 > < > + <
+ =
i i
( ) B P x A P I x
1 1
+ =
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[53]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Analicemos ahora como obtener la matriz TT y
el vector CC. Escribamos AA de la siguiente
forma:
donde.
LL: matriz estrictamente triangular inferior;
DD: matriz diagonal, y;
UU: matriz estrictamente triangular superior
) ( U L D A U D L A = + + =
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[54]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Si definimos PP=DD, tenemos
Que puede expresarse como
( )
( )
B D C
U L D T
U D D D L D I
U D L D I A P I T
I

;

1
1
1 1 1
1 1



=
+ =
=
+ + = =
3 2 1
( ) [ ]
> < > + <
+ =
i i
x U L B D x
1 1
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[55]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Este mtodo se conoce como Mtodo Mtodo de de
Jacobi Jacobi.
La expresin tradicional de este mtodo es:
pues
j j
n
j k
i
k k i
j
k
i
k k i j
i
j
a
x a x a b
x

+ =
> <

=
> <
> + <

=
1
1
1
1

(
(
(
(

=
(
(
(
(
(

=
(
(
(
(
(

0 0 0
0 0
0
;
0 0
0
0 0
0 0
;
0
0
0 0
0 0 0
1
1 2 1
2 2
1 1
1 1
1 2
L
O O M
M O
L
L
O O M
O
L
L
O O M
O
L
n n
n
n n n n n
a
a a
a
a
a
a a
a
U D L
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[56]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Si ahora definimos PP=D+L D+L, tenemos
Si partimos de la expresin inicial, obtenemos
( ) ( )
( ) B L D C
U D L L D I A P I T


1
1
1

+ =
+ + + = =
( ) ( ) ( )
( )
> < > + < > + <
> + < > < > < > < > < > < > + <
> < > < > + <
=
+ + =
+ + + + = +
i i i
i i i i i i i
i i i
x U x L B D x
B x L x U x L x L x D x D x D
x U D L B x L D x L D



1 1 1
1
0 0
1
1
4 43 4 42 1 4 43 4 42 1
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[57]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Este otro mtodo se conoce como Mtodo Mtodo de de
Gauss Gauss--Seidel Seidel.
La expresin tradicional de este mtodo es:
pues
j j
n
j k
i
k k i
j
k
i
k k i j
i
j
a
x a x a b
x

+ =
> <

=
> + <
> + <

=
1
1
1
1
1

(
(
(
(

=
(
(
(
(
(

=
(
(
(
(
(

0 0 0
0 0
0
;
0 0
0
0 0
0 0
;
0
0
0 0
0 0 0
1
1 2 1
2 2
1 1
1 1
1 2
L
O O M
M O
L
L
O O M
O
L
L
O O M
O
L
n n
n
n n n n n
a
a a
a
a
a
a a
a
U D L
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[58]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Ahora definamos la siguiente matriz PP:
Si nuevamente partimos de la expresin
inicial, obtenemos
|

\
|
+ = L D P

1
( )
( )
B x U x L x L x L x D x D x D
x U D L B x L D x L D
x D
+ + =
+ + +
|

\
|
+ =
|

\
|
+
> < > + < > < > <

> < > < > + <


> < > < > + <
> <
i i i i i i i
i i i
i

1

1

1

1
1
0
1
1
1
1
4 43 4 42 1
4 4 3 4 4 2 1



a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[59]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Que simplificada queda:
Este mtodo se conoce como Mtodo Mtodo de de las las
Sobrerrelajaciones Sobrerrelajaciones Sucesivas Sucesivas (SOR).
El mtodo debe cumplir que:
Y para ser de sobrerrelajaciones en forma
estricta debe cumplir que
2 0 < <
( ) ( )
> < > + < > < > + <
+ =
i i i i
x U x L B D x x 1
1 1 1

25 , 1 2 1 = <
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[60]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
La forma usual de escribir este mtodo es:
Podemos ver fcilmente que si
el mtodo SOR resulta ser Gauss-Seidel
pues:
( )
j j
n
j k
i
k k j
j
k
i
k k j j
i
j
i
j
a
x a x a b
x x

+ =
> <

=
> + <
> < > + <

+ =
1
1
1
1
1

1
1 =
j j
n
j k
i
k k j
j
k
i
k k j j
i
j
a
x a x a b
x

+ =
> <

=
> + <
> + <

=
1
1
1
1
1

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[61]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Los tres mtodos vistos tienen una
caracterstica principal: tanto TT como CC no se
modifican en cada iteracin.
Estos mtodos se denominan Mtodos Mtodos
Iterativos Iterativos Estacionarios Estacionarios.
Para analizar la convergencia analicemos TT:
( )
{
> < + > < > < > < > + <
> < > < > + < > + <
> < > < > + < > + <
= = = = =
+ + = +
+ + = + =
> + <
0 1 2 3 1 1
1 1
1 1

2
1
e T e T e T T e T e
e T C x T e x
C e x T e x x
T
x
i i i i i
i i i i
i i i i
i
K
43 42 1
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[62]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Para que los mtodos sean convergentes
debe cumplirse que:
Para que la convergencia sea muy rpida,
entonces se debe cumplir que:
1 < T
1 << T
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[63]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Los mtodos de Jacobi y Gauss-Seidel son
convergentes cuando la matriz AA cumple que:
El mtodo SOR es convergente si la matriz AA
es simtrica definida positiva, es decir:
por lo tanto, tambin Gauss-Seidel es
convergente.

=
>
n
i j
j
j i i i
a a
1
2 0 con 0 < < > = x A x A A
T T
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[64]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Partamos otra vez de nuestro sistema, pero
propongamos lo siguiente:
Y reemplacemos en nuestra expresin ya
conocida:
Es decir:
I P

1
=
( ) ( ) R x B I x A I I B P x A P I x
1 1 1
+ = + = + =

> < > < > + <
+ =
i i i
R x x
1

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[65]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Tenemos otra expresin para obtener en
forma iterativa nuestra solucin. Pero ahora
depende de un coeficiente . Cmo
hacemos para obtenerlo?
Puesto que afecta al vector RR, analicemos el
caso de RR
<i+1>
.
Es decir:
( )
> < > < > + < > + <
+ = =
i i i i
R x A B x A B R
1 1

> < > < > + <


=
i i i
R A R R
1

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[66]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Debemos buscar que el RR
<i+1>
sea menor que
RR
<i>
. Como estamos tratando con vectores, la
forma de relacionar un vector con otro es con
la norma, en este caso, la norma eucldea, es
decir:
O, lo que es lo mismo:
2 2
1 > < > + <
<
i i
R R
2
2
2
2
2
2
1

> < > < > < > + <
< =
i i i i
R R A R R
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[67]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Encontrar un RR
<i+1>
que sea menor al RR
<i>
no
es todo el trabajo. Deberamos encontrar al
menor de todos los RR
<i+1>
posibles. En
consecuencia, nos interesa aquel cuya norma
eucldea sea la menor.
Para ello vamos a proponer lo siguiente:
0
d
d
d
d
2
2
2
2
1
=

=
> < > < > + <

i i i
R A R R
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[68]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Esta ecuacin puede escribirse como:
de la que obtenemos:
( ) ( ) ( ) [ ]
0
d
d
d
d
1 1
=

=
> < > < > < > < > + < > + <

i i
T
i i i
T
i
R A R R A R R R
[ ] [ ]
[ ] [ ]
[ ]
[ ]
> < > <
> < > <
> < > < > < > <
> < > < > <
=
=
=
i
T
i
i
T
i
i
i
T
i i
T
i
i i
T
i
R A R A
R R A
R A R A R R A
R A R R A



0

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[69]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Con esta ltima expresin tenemos un nuevo
mtodo para obtener el vector xx:
Se denomina de los Residuos Mnimos.
Converge cuando AA es simtrica y definida
positiva. (Algunos slo exigen la segunda.)
[ ]
[ ]
> < > < > + <
> < > < > + <
> < > <
> < > <
> < > <
=
+ =
=
=
i
i
i i
i
i
i i
i
T
i
i
T
i
i
R A R R
R x x
R A R A
R R A
x A B R

1
1
0 0

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[70]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
El mtodo no convergen rpidamente.
Busquemos otra forma de obtener. Para ello
partamos de la siguiente funcin:
Se conoce como Forma Cuadrtica. Para
obtener un mnimo de esta funcin, debemos
hacer:
( ) C
T T
+ = B x x A x x
2
1
F
( )
0
2
1

2
1
d
F d
= + = B x A x A
x
x
T
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[71]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Si imponemos que AA es simtrica y definida
positiva, entonces queda:
O sea, nuestro sistema de ecuaciones
lineales.
Pero la derivada de este tipo de funciones
tambin tiene otro significado.
( )
0
d
F d
= = B x A
x
x
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[72]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
As, tenemos que:
no es otra cosa que el gradiente de F(x), con
lo cual.
( ) x A B x F =

( )
( )
( )
( )
(
(
(
(
(

=
n
x
x
x
x
x
x
x
F
F
F
d
F d
1
M
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[73]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Finalmente, tambin tenemos que:
Si nuestro mtodo tiene la forma
lo ideal sera que RR
<i+1>
sea nulo. Debemos
obtener un coeficiente que haga mnimo
F(x
<i+1>
), es decir:
( )
> < > < > <
= =

i i i
R x A B x F
> < > < > + <
+ =
i i i
R x x
1

( )
( ) ( ) 0 F
d
d
F
d
F d
1 1
1
1
1
= =

=
> < > + < > < > + <
> + <
> + <
> + <
i
T
i i
T
i
i
T
i
i
R R R x
x
x
x

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[74]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Entonces lo que tenemos es:
Si desarrollamos nos queda:
de donde obtenemos el coeficiente :
( ) ( ) [ ] 0 F
1
= + =

> < > < > < > < > + < i
T
i i i
T
i
R R x A B R x
( ) ( ) 0 = =
> < > < > < > < > < > < > < i
T
i i
T
i i
T
i i
R R A R R R R A R
> < > <
> < > <
> < > <
> < > <
= =
i
T
i
i
T
i
i T
T
i
i
T
i
i
R A R
R R
R A R
R R

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[75]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
El nuevo mtodo es el siguiente:
que se conoce como del Descenso Ms
Rpido (o del Descenso Ms Empinado).
> < > < > + <
> < > < > + <
> < > <
> < > <
> < > <
=
+ =
=
=
i
i
i i
i
i
i i
i
T
i
i
T
i
i
R A R R
R x x
R A R
R R
x A B R

1
1
0 0

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[76]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Este mtodo tampoco converge muy rpido.
Veamos el grfico de una forma cuadrtica.
Podemos observar que el gradiente depende
del punto en el que nos posicionemos.
F
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[77]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
En un punto determinado, podemos obtener
el gradiente y su plano tangente.
F T , P ,
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[78]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Para acercarnos al mnimo de F(xx), podemos
elegir cualquier direccin contenida en el
plano tangente.
F P
.0
, T
.0
,
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[79]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Con varias iteraciones, obtenemos lo
siguiente:
F P
1
, T
1
, F P
2
, T
2
,
F P
3
, T
3
, F P
4
, T
4
,
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[80]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
En el punto mnimo el plano tangente debe
ser horizontal:
F P , T ,
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[81]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
El mtodo solamente determina las
direcciones de aproximacin considerando
que estn contenidas en los planos tangentes
(gradientes).
La lentitud se debe a que el mtodo repite las
direcciones en el proceso iterativo, es decir,
usa varias veces algunas direcciones de
aproximacin.
Debemos buscar una forma de no repetir
direcciones.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[82]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Una primera idea es pensar cmo optimizar
los gradientes obtenidos en las sucesivas
aproximaciones, de forma tal de no repetir
direcciones.
Otra idea es buscar que esas direcciones
sean ortogonales entre s, y as evitar
repeticiones.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[83]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Pero tenemos un problema. Conseguir
direcciones ortogonales limitara la aplicacin
de dicho mtodo.
F P
0
, T
0
, T
1
,
F P
0
, T
0
, T
1
,
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[84]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Vamos a definir nuestra aproximacin como:
En lugar de que se cumpla:
propondremos que se cumpla:
Esta condicin se denomina direcciones
conjugadas.
0
1
=
> < > + < i
T
i
d d
0
1
=
> < > + < i
T
i
d A d
> < > < > + <
+ =
i
i
i i
d x x
1

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[85]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Si aplicamos lo ya visto pero con esta
modificacin, tenemos:
Si desarrollamos nos queda:
de donde obtenemos el coeficiente :
( ) ( ) 0 F
1
1 1
=
(
(

+ = =

> < > < > < > < > + < > < > + <
> + <
i
T
i i i i i
T
i
i
d d x A B d R d x
x
4 43 4 42 1

( ) ( ) 0 = =
> < > < > < > < > < > < > < i
T
i i
T
i i
T
i i
d d A d R d d A R
> < > <
> < > <
> < > <
> < > <
= =
i
T
i
i
T
i
i T
T
i
i
T
i
i
d A d
d R
d A d
d R

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[86]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Todava nos falta encontrar las direcciones
dd
<i>
.
Lo que debemos hallar es un conjunto de
direcciones dd
<0>
, dd
<1>
, , dd
<n>
, conjugadas,
obtenidas a partir de los RR
<i>
.
Si fueran ortogonales, podramos obtenerlas
mediante el proceso de Gram-Schmidt:

=
> < > < > <
+ =
1
0

i
j
j
j i
i i
d u d
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[87]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Algo podemos plantear para obtener el
coeficiente
ij
:
> < > <
> < > + <
+
> < > <
+
> < > + <
=
> < > <
+
> < > + < > < > + <
=
= +
= + =

i
T
i
i
T
i
i i
i
T
i
i i
i
T
i
i
j
j
T
j
j i
i
T
i i
T
i
d A d
d A u
d A d d A u
d A d d A u d A d


0
0
1
1
1
1
0
1
1 1

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[88]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Ya vimos que se cumple que
y por lo tanto:
Entonces, tambin se cumple que
0 = =
> < > < > < > < j
T
i j
T
i
R d e A d
j i
j
T
i
j
T
k
i
k
k i
j
T
i j
T
i
< =
+ =
> < > <
> < > <

=
> < > < > < > <

para 0

1
0
R u
R d R u R d
> < > < > < > <
=
i
T
i i
T
i
R u R d
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[89]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Ahora, si uu
<j>
= RR
<j>
, tenemos para cualquier
RR
<j+1>
:

+
+ =
=
=
=
=
> + < > + <
> < > <
> < > <
> + < > < > < > < > < > <
> < > < > < > < > + < > <
1 para 0
1 con
1
con
1



1 1
1
1
j i j i
j i
j i
j
T
j
j
i
T
i
j
j
T
i
j
T
i j
T
i j
T
i
j
j
T
i
j
j
T
i j
T
i
R R
R R
d A R
R R R R d A R
d A R R R R R

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[90]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
El caso i=j+1, lo reescribimos como:
Adems tenemos que
> + < > + < > < > + <
=
1 1 1

1

i
T
i
i
i
T
i
R R d A R

> < > <


> < > <
> < > <
> < > <
= =
i
T
i
i
T
i
i
i
T
i
i
T
i
i
d R
d A d
d A d
d R

> < > <


> < > + <
> < > <
> < > + <
+
= =
i
T
i
i
T
i
i
T
i
i
T
i
i i
d A d
d A R
d A d
d A u




1 1
1

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[91]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Entonces:
Y simplificando
pues
> < > <
> + < > + <
> < > <
> < > <
> < > <
> + < > + <
+
= =
i
T
i
i
T
i
i
T
i
i
T
i
i
T
i
i
T
i
i
i i
d A d
R R
d R
d A d
d A d
R R



1
1 1 1 1
1

> < > <


> + < > + <
> < > <
> + < > + <
+
= =
i
T
i
i
T
i
i
T
i
i
T
i
i
R R
R R
d R
R R

1 1 1 1
1

> < > < > < > <


=
i
T
i i
T
i
R R d R
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[92]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Finalmente nuestro nuevo mtodo queda de
esta forma:
> <
+
> + < > + <
> < > <
> + < > + <
+
> < > < > + <
> < > < > + <
> < > <
> < > <
> < > < > <
+ =
=
=
+ =
=
= =
i
i
i i
i
T
i
i
T
i
i
i
i
i i
i
i
i i
i
T
i
i
T
i
i
d R d
R R
R R
d A R R
d x x
d A d
R R
x A B R d

1
1 1
1 1
1
1
1
0 0 0

a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[93]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Este mtodo se denomina Mtodo de los
Gradientes Conjugados (MGC MGC).
Las direcciones de aproximacin surgen,
finalmente, de que los gradientes sean
conjugados entre si.
Es un poderoso mtodo para resolver
sistemas de ecuaciones lineales con matrices
de coeficientes ralas.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[94]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Partiendo del mismo punto, con dos
iteraciones del MGC obtenemos:
F P
0
, T
0
, T
1MGC
, F P
1MGC
, T
1MGC
, T
2MGC
,
F P
2MGC
, T
2MGC
, T
1MGC
,
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[95]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Vemos que la convergencia fue casi
instantnea.
Algebraicamente se puede demostrar que si
no hubieran errores de redondeo, la
convergencia se da en n iteraciones, siendo
n el rango de la matriz.
En consecuencia, un sistema de dimensin
10 x 10, convergera en 10 iteraciones.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[96]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Ms an, la velocidad de convergencia
depende casi exclusivamente de la cantidad
de autovalores distintos que tenga la matriz
AA.
Si la matriz tiene, por ejemplo, k autovalores
repetidos, entonces la convergencia ser en
n-k iteraciones.
En consecuencia, el mtodo es muy poderoso
para sistemas ralos, simtricos y definidas
positivos.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[97]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Resumen de los mtodos iterativos:
Mtodo de Jacobi: Fcil. Converge cuando la
matriz es estrictamente diagonal dominante.
Mtodo de Gauss-Seidel: Adems converge
cuando la matriz es simtrica definida positiva
(SPD).
Mtodo SOR: Converge cuando la matriz es SPD
pero no es fcil obtener el .
Mtodo de los Residuos Mnimos: Converge
cuando la matriz es definida positiva. Rapidez
similar a Jacobi.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[98]
SISTEMAS DE ECUACIONES LINEALES SISTEMAS DE ECUACIONES LINEALES
Mtodo del Descenso Ms Rpido: Slo para
sistemas SPD. Suele ser equivalente en rapidez a
Gauss-Seidel.
Mtodo de los Gradientes Conjugados: Para
sistemas SPD, pero la velocidad de convergencia
es mucho mayor. Si la matriz tiene k autovalores
repetidos, converge en p=n-k iteraciones. Es muy
usado para resolver grandes sistemas de
ecuaciones lineales.
a
n

l
i
s
i
s

n
u
m

r
i
c
o

i
SISTEMAS DE ECUACIONES LINEALES uba facultad de ingeniera
[99]
BIBLIOGRAFA Y ARTCULOS BIBLIOGRAFA Y ARTCULOS
Burden, R.L. y Faires, J.D. Anlisis Numrico.
International Thomson. Sexta edicin. 1998.
Shewchuk, J. R. An Introduction to the Conjugate
Gradient Method Without the Agonizing Pain. Edition
1. 1994.
Saad, Y. Iterative Methods for Sparse Linear Systems.
First Edition. 1996.
Gonzlez, H. Anlisis numrico. Primer curso. Nueva
Librera. 2002.
Higham, N.J. Accuracy and stability of numerical
algorithms. SIAM. 1996
Gavurin, M.K. Conferencia sobre los mtodos de
clculo. Mir. 1973.

S-ar putea să vă placă și