Title | ejercicio resuelto con Matlab tema 3 |
---|---|
Course | Álgebra/Algebra |
Institution | Universidad Pontificia Comillas |
Pages | 8 |
File Size | 262.6 KB |
File Type | |
Total Downloads | 44 |
Total Views | 167 |
ejercicio resuelto con Matlab tema 3 curso 2021 2022...
syms x1 x2 x3 L f=[2*x1+3*x2;0;-x2+2*x3] f =
A=[subs(f,[x1, x2, x3],[1, 0, 0]) subs(f,[x1 x2 x3], A =
%apartado a VECTOR=[-1;0;1] VECTOR = -1 0 1 A*VECTOR==L*VECTOR ans =
L=2 será el autovalor asociado al vector (-1 0 1) %Apartado b VECTOR2=[-1;2;-1] VECTOR2 = 1
-1 2 -1 A*VECTOR2==L*VECTOR2 ans =
Al no haber un solo valor de Lambda que haga válida las tres ecuaciones el vector (-1 2 -1) no es un autovector de A %Apartado c determina sus autovalores y autovectores %subespacios propios ID=[1 0 0;0 1 0;0 0 1] ID = 1 0 0
0 1 0
0 0 1
Ec=det(A-L*ID) Ec = solve(Ec==0) ans =
AUTOVALORES=eig(A)
2
AUTOVALORES =
%Para L=0 V=[x1;x2;x3] V =
P=(A-0*ID)*V P =
B=[2 3 0 0;0 0 0 0;0 -1 2 0] B = 2 0 0
3 0 -1
0 0 2
0 1 0
3 -2 0
rref(B) ans = 1 0 0
3
x3=valor libre x2=-2x3 x1=-3x3 S=[-3*x3, -2*x3, x3] S = D=[0 0 0;0 2 0;0 0 2] %poner los autovalores en la d D = 0 0 0
0 2 0
0 0 2
%Comprobación con D=inv(B)*A*B B=[-3 1 0;2 0 0;1 0 1] B = -3 2 1
1 0 0
0 0 1
D=inv(B)*A*B D =
EJERCICIO 2 syms a b L A=[2 1 -2;1 2 b;a -2 0] A =
4
V=[1;1;1] V = 1 1 1 A*V==L*V ans =
Si b=-2 y a=3 entoces L=1 y resolvería las 3 ecuaciones => V sería un autovector asociado a L=1
EJERCICIO 3 A=[1 1;8 3] A = 1 8
1 3
Id=[1 0;0 1] Id = 1 0
0 1
5
syms x1 x2 VECTOR=[x1;x2] VECTOR =
syms L eig(A) %autovalores ans = -1 5 (A-(-1)*Id)*VECTOR==0 ans =
SEL1=[2 1 0;8 4 0] SEL1 = 2 8
1 4
0 0
1/2 0
0 0
rref(SEL1) ans = 1 0
x2=parámetro libre x1=(-1/2)*x2 Subespacio asociado al valor -1 tiene dimensión 1 (1 solo parámetro) y está dado por: 6
SEL1=[-x2/2; x2] SEL1 =
(A-5*Id)*VECTOR==0 ans =
SEL2=[-4 1 0;8 -2 0] SEL2 = -4 8
1 -2
0 0
-1/4 0
0 0
format rat rref(SEL2) ans = 1 0
x2= parámetro libre diferente de 0 x1= 1/4*x2 El subespacio asociado a L=5 con dimensión 1 SEL5=[x2/4; x2] SEL5 =
7
8...