Professional Documents
Culture Documents
UNIVERSIDAD NACIONAL
JORGE BASADRE
GROHMANN
Escuela Acadmico Profesional
de Ingeniera en Informtica y Sistema
MTODO QR
Alumnos
: - Catherine Linares
Rojas 2014-119001
- Joel Vilca Alannia 2014119069
Curso
Docente:
Mtodos Numricos
Ing. Luis Amaya Cedron
Tacna Per
2015
CONTENIDO
DEDICATORIA:............................................................................................................. 3
AGRADECIMIENTOS:..................................................................................................4
RESUMEN..................................................................................................................... 5
ABSTRACT................................................................................................................... 5
INTRODUCCIN........................................................................................................... 6
OBJETIVOS:................................................................................................................. 7
ALGORITMO MATEMTICO........................................................................................7
PROBLEMAS DE AUTOVALORES:................................................................11
ALGORITMO COMPUTACIONAL...............................................................................14
DIAGRAMA DE FLUJO................................................................................. 15
CODIFICACIN (MATLAB)........................................................................................16
CONCLUSIONES........................................................................................................17
BIBLIOGRAFA:..........................................................................................................18
Anexo.......................................................................................................................... 19
pg. 2
DEDICATORIA:
pg. 3
AGRADECIMIENTOS:
RESUMEN
pg. 4
ABSTRACT
In this paper we have tried to explain the most efficient way to finding the eigenvalues
and eigenvalues, using the QR method or solution Francis method.
Show step by step development of the initial equation by which we reach a final
equation which is used to solve the matrix, also we proceed to show the development
of this method for encoding the matlab program.
We solve matrices using the method in a code, creating a program capable of
response matrices eigenvalues entered, implementing linear graphs and the number of
iterations that are needed for the resolution of such a system.
Keywords: Francis QR method, eigenvalues, eigenvalues.
INTRODUCCIN
pg. 5
OBJETIVOS:
pg. 6
ALGORITMO MATEMTICO
A1
Algoritmo:
Q0R0
A1= Q0R0
A1
A2= Q1R1
A2
Q2R2 (A=Q0Q1A2Q1TQ0T)
Ai
QiRi (A=Q0Q1QI-1AiQTi-1QT1QTi0)
Ai= Qi-1Ri-1
A k = Qk R k
donde Qk
triangular superior.
Las matrices A i
Rk
es una matriz
Ai
tiende a una
pg. 7
AK
0
Si E <<1, k= k
Una vez obtenido un valor propio (cuando es muy pequeo) se vuelve a
aplicar el mtodo a la matriz que resulta de suprimir la ltima fila y columna
Si la matriz A es tridiagonal, las rotaciones para hacer cero la subdiagonal
aaden otra diagonal por encima. Sin embargo al hacer posteriormente el
producto A=R*Q se recupera la forma tridiagonal inicial.
Para poder emplear el mtodo qr se ncesita hallar la descomposicin de la
matres hallando lo que denominaaremos como S y C:
Ecuaciones de S y C.
-
U1
A , el elemento
a ' qp
a ' qp
lo igualamos a 0 y lo despejamos:
pp
1cos 2
+ cosqp = 0
pp
1cos 2
= qp cos
pg. 8
sen =
-
aqp
aqp cos
a pp
Para una mejor comprensin del mtodo, considere una matriz de orden 3.
Para reducirla de forma triangular debemos restablecer los elementos
a21 , a31, y a
. Por lo tanto, hacemos c = cos y s = sen, se deduce que:
32
a21
c s 0
s c 0
0 0 1
Y queremos
a21
, efectuamos el producto:
u1
, = 0 tenemos que:
-s 11 + c 21 = 0, donde
a21
S=
a
2)
2
11
+a
2
21
C=
a11
2
11
+a221
a31
producto:
c 0 s
0 1 0
s 0 c
Y queremos
a31
u2
, = 0 tenemos que:
pg. 9
-s 11 + c 31 = 0, donde
a31
a ' 11
C=
a32
S=
'2
11
+a231
'2
11
+a231
, efectuamos el producto:
1 0 0
0 c s
0 s c
U3
a ' ' 32
-s 22 + c 32 = 0, donde
a 32
S=
'2
22
+a '32' 2
C=
a ' 22
'2
22
+a ''322
Asimismo, obtenemos:
U 3 U 2 U 1 A=R 1
El producto
t
t
t
--> A = U 1 U 2 U 3 R1
R1 Q1
t
t
t
= R1 U 1 U 2 U 3
U tk ,k =1,2,
pg. 10
PROBLEMAS DE AUTOVALORES:
Problema 1:
Determine los autovalores de la matriz:
2 0 1
A= 0 1 0
1 0 1
Solucin:
Como
a21
para obtener
U2
a31
. Asimismo
U1
=I y
debemos:
pg. 11
U2
3= I .
1= U Debemos entonces
U
. Asimismo:
pg. 12
F=
1 2
2 3
Ejemplo 3:
0.9922 0.1240
0.1240 0.9922
8.0622 7.1940
0.0000 1.1163
Por tanto,
pg. 13
8.8923 6.1384
A1 = Q0R0 = 0.1384 1.1076
0.9998 0.1556
0.0155 0.9998
8.8933 6.1549
0.0000 1.0119
Por tanto,
8.9881 6.0157
A2 = Q1R1 = 0.0157 1.0118
Determinamos una factorizacin QR de A2:
A2 = Q2R2 =
0.9999 0.0017
0.0017 0.9999
8.9881 6.0175
0.0000 1.0013
Por tanto,
8.9986 6.0107
A3 = Q2R2 = 0.0017 1.0013
Concluimos que lo valores propios o auto valores de A son aproximadamente 9
y 1.
Ejemplo 4:
1 1 0
M= 1 1 1
0 1 1
Francis [M,40] // N
pg. 14
2.41421
9.77243 x 1016
0
16
9.77243 x 10
1
9.77243 x 1016
0
9.77243 x 1016
0.414214
Los autovalores de [M] // N
Son {2.41421, 1, -0.414214}
ALGORITMO COMPUTACIONAL
-
Datos de salida
autovalores
DIAGRAMA DE FLUJO
INICIO
A,x0,tol,numax
K=1
Vk=diag(A)
S=0
pg. 15
S==0
[Q,R]=qr(A)
A = R*Q
Abs(||vk+1 vk||/||vk||)<=tol
S =1
Vk=vk+1
K=k+1
k>numax
vk
CODIFICACIN (MATLAB)
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
% QR-Iteration Method
function [neu,k] = qr_iteration(A,tol,max_iter)
k = 1;
neu_0 = diag(A);
stop_flag = 0;
while stop_flag == 0;
[Q,R] = qr(A);
A = R*Q;
pg. 16
neu(:,k) = diag(A);
if abs(norm(neu(:,k)-neu_0)/norm(neu_0))<= tol
stop_flag = 1;
end
neu_0=neu(:,k);
k = k+1;
if k > max_iter
break
end
end
neu = [neu_0 neu];
neu = neu';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
CONCLUSIONES
pg. 17
BIBLIOGRAFA:
1. Franco B. Neide, CLCULO NUMRICO, Brasil: Edit. PEARSON;
2006.
2. Murrieta M. Jess, Algebra lineal y sus aplicaciones, Edit. Pearson
Educacin, 2007
3. Domnguez, victo, Matlab en cinco lecciones de Numrico,
http://www.unavarra.es/personal/victor dominguez/.pdf.
4. Domnguez S. Federico, Mtodos Numricos Aplicados a la Ingeniera, Edit.
Continental, Mxico, 2006.
pg. 18
Anexo
pg. 19
pg. 20