Está en la página 1de 13

INSTITUTO POLITÉCNICO NACIONAL.

Unidad Profesional Interdisciplinaria de Biotecnología.

Métodos Numéricos.
Grupo 4FM3.
Tarea 5.
Método de la matriz inversa.
Equipo #3
Integrantes:
-García Hernández Marlene.
-Robles Ramírez María de los Ángeles.

Profesores:
-Jesús Granados Hernández.
-José Ignacio Flores Núñez.

Fecha de entrega: lunes 04, abril 2022.

INTRODUCCIÓN

.
OBJETIVOS.

R E P O R T E.

EJERCICIOS EN CLASE.

T A R E A.

Resolución de Sistemas de Ecuaciones Lineales por el Método de la Matriz


Inversa.
Objetivos de aprendizaje
En esta sección, usted:

A. un. Matriz de identidad.


B. Producto de dos matrices.
C. Escriba la matriz de coeficientes.
D. Realizar operaciones de fila en una matriz.
mi. Escriba la matriz que representa las variables.
F. Escriba la matriz de coeficientes aumentando con la matriz identidad.
gramo. Resolver los sistemas de ecuaciones lineales por el método de la
Matriz Inversa. Utilice los comandos de Matlab o
Octava.

1. A farmer constructed a chicken coop out of chicken wire, polyester, and cloth
cotton. The chicken wire cost $25 per square foot, the polyester $17 per square
foot, and the cloth cotton $ 13 per square foot. The farmer spent a total of $690,
and the total amount of materials used was 13.6 square feet. He used 3 ft 2 more
chicken wire than cloth cotton. How much of each material in did the farmer
use?
Con los datos proporcionados se realizaron los siguientes sistemas de
ecuaciones:
X= Tela metálica
Y= Poliéster
Z= Tela de algodón
1. 25 x + ¿ 17 y +¿ 13 z ¿ 690
2. x +¿ y +¿ z ¿ 13.6
3. x +¿ 0 −¿ z ¿ 3
Matriz de coeficientes:

[ ]
25 17 13
A= 1 1 1
1 0 −1

Matriz de términos independientes:

[ ]
690
K= 13.6
3

Matriz de incógnitas:

[]
x
X= y
z

Matriz identidad

[ ]
1 0 0
I= 0 1 0
0 0 1

Creamos nuestra matriz ampliada

[ ]
25 17 13 1 0 0
M= 1 1 1 0 1 0
1 0 −1 0 0 1

Resolvemos la matriz por Gauss-Jordan para crear la matriz inversa

[ ]
1 0 0 0.25000 −4.25000 −1.00000
M = 0 1 0 −0.5000 0 9.50000 3.00000
0 0 1 0.25000 −4.25000 −2.00000
La matriz inversa queda de la siguiente manera

[ ]
0.25000 −4.25000 −1.00000
invA = −0.50000 9.50000 3.00000
0.25000 −4.25000 −2.00000

Para encontrar X multiplicamos invA por K que es la matriz de términos


independientes

[ ]
112.0
X = −207.0
109.0

Por lo que los resultados serian:

x=1 12 , y =−2 07 , z =10 9

Por lo que se ocupó el agricultor de cada material fue lo siguiente:

Tela metálica 112 ft2

Poliéster 207 ft2

Tela de algodón 109 ft2

%Ejercicio 1 de Tarea M=
por metodo de matriz
25 17 13 1 0 0
inversa
clc, clear, close all 1 1 1 0 1 0

%Matriz de coeficientes 1 0 -1 0 0 1
A=[25, 17, 13;1, 1, 1;1, M=
0, -1];
Columns 1 through 2
%Matriz identidad
I=[1, 0, 0;0, 1,0;0, 0, 1.000000000000000 0.680000000000000

1]; 1.000000000000000 1.000000000000000


%Matriz ampliada 1.000000000000000 0
M=[A,I]
Columns 3 through 4
%Hacemos 1 M(1,1)
M(1,:)=(1/M(1,1))*M(1,:) 0.520000000000000 0.040000000000000

%Hacemos 0 M(2,1) 1.000000000000000 0


M(2,:)=- -1.000000000000000 0
M(2,1)*M(1,:)+M(2,:)
Columns 5 through 6
%Hacemos 0 M(3,1) 0 0
M(3,:)=-
1.000000000000000 0
M(3,1)*M(1,:)+M(3,:)
%Hacemos 1 M(1,1) 0 1.000000000000000

M(2,:)=(1/M(2,2))*M(2,:) M=
%Hacemos 0 M(3,2) Columns 1 through 2
M(3,:)=-
1.000000000000000 0.680000000000000
M(3,2)*M(2,:)+M(3,:)
%Hacemos 0 M(1,2) 0 0.320000000000000

M(1,:)=- 1.000000000000000 0
M(1,2)*M(2,:)+M(1,:) Columns 3 through 4
%Hacemos 1 M(3,3)
0.520000000000000 0.040000000000000
M(3,:)=(1/M(3,3))*M(3,:)
%Hacemos 0 M(2,3) 0.480000000000000 -0.040000000000000

M(2,:)=- -1.000000000000000 0
M(2,3)*M(3,:)+M(2,:) Columns 5 through 6
%Hacemos 0 M(1,3)
0 0
M(1,:)=-
M(1,3)*M(3,:)+M(1,:) 1.000000000000000 0

%Matriz inversa 0 1.000000000000000


invA=M(:,[4,5,6]) M=
%Comprobación para saber
Columns 1 through 2
si esta bien
invA*A 1.000000000000000 0.680000000000000

%Matriz de terminos 0 0.320000000000000


independientes 0 -0.680000000000000
K=[690;13.6;3];
Columns 3 through 4
chi=invA*K
%Resultados 0.520000000000000 0.040000000000000

x=vpa(chi(1,1),3) 0.480000000000000 -0.040000000000000


y=vpa(chi(2,1),3) -1.520000000000000 -0.040000000000000
z=vpa(chi(3,1),3)
Columns 5 through 6
%Comprobación
%Ecuación 1 0 0

c1=vpa(25*x+17*y+13*z,3) 1.000000000000000 0
%Ecuación 2 0 1.000000000000000
c2=vpa(x+y+z,3)
M=
%Ecuación 3
c3=vpa(x+0-z,3) Columns 1 through 2

1.000000000000000 0.680000000000000

0 1.000000000000000

0 -0.680000000000000

Columns 3 through 4

0.520000000000000 0.040000000000000

1.500000000000000 -0.125000000000000

-1.520000000000000 -0.040000000000000

Columns 5 through 6

0 0

3.125000000000000 0

0 1.000000000000000

M=

Columns 1 through 2

1.000000000000000 0.680000000000000

0 1.000000000000000

0 0

Columns 3 through 4

0.520000000000000 0.040000000000000

1.500000000000000 -0.125000000000000

-0.500000000000000 -0.125000000000000

Columns 5 through 6

0 0

3.125000000000000 0

2.125000000000000 1.000000000000000

M=

Columns 1 through 2

1.000000000000000 0

0 1.000000000000000

0 0
Columns 3 through 4

-0.500000000000000 0.125000000000000

1.500000000000000 -0.125000000000000

-0.500000000000000 -0.125000000000000

Columns 5 through 6

-2.125000000000000 0

3.125000000000000 0

2.125000000000000 1.000000000000000

M=

Columns 1 through 2

1.000000000000000 0

0 1.000000000000000

0 0

Columns 3 through 4

-0.500000000000000 0.125000000000000

1.500000000000000 -0.125000000000000

1.000000000000000 0.250000000000000

Columns 5 through 6

-2.125000000000000 0

3.125000000000000 0

-4.250000000000003 -2.000000000000001

M=

Columns 1 through 2

1.000000000000000 0

0 1.000000000000000

0 0

Columns 3 through 4

-0.500000000000000 0.125000000000000

0 -0.500000000000000

1.000000000000000 0.250000000000000
Columns 5 through 6

-2.125000000000000 0

9.500000000000005 3.000000000000002

-4.250000000000003 -2.000000000000001

M=

Columns 1 through 2

1.000000000000000 0

0 1.000000000000000

0 0

Columns 3 through 4

0 0.250000000000000

0 -0.500000000000000

1.000000000000000 0.250000000000000

Columns 5 through 6

-4.250000000000003 -1.000000000000001

9.500000000000005 3.000000000000002

-4.250000000000003 -2.000000000000001

invA =

Columns 1 through 2

0.250000000000000 -4.250000000000003

-0.500000000000000 9.500000000000005

0.250000000000000 -4.250000000000003

Column 3

-1.000000000000001

3.000000000000002

-2.000000000000001

ans =

Columns 1 through 2

1.000000000000001 0

-0.000000000000002 1.000000000000000
0.000000000000001 0

Column 3

0.000000000000000

-0.000000000000001

1.000000000000000

chi =

1.0e+02 *

1.117000000000001

-2.068000000000001

1.087000000000001

x=

112.0

y=

-207.0

z=

109.0

c1 =

690.0

c2 =

13.6

c3 =

3.0

2. In 1845, a German physicist, Gustav Kirchhoff developed a pair of laws that deal
with the conservation of current and energy
within electrical circuits. These two laws are
commonly known as Kirchhoff’s Voltage and
Current Law. Solve by Kirchhoff's first and
second law. Use meshes and nodes.

Find the current each one of resistances.


Solución
Se toma I1, I2 como X1 y X2
Se establecen las ecuaciones según las leyes de Kirchhoff
LKV
1.Primero se marcan las corrientes y se decide hacia dónde va a ir la dirección de estas

Para la malla 1 y malla 2

−8 V +3 I 1+1 ( I 1−I 2 )+ 2 I 1=0 Ecuacion 1

16 V −4 I 2−1 ( I 2 −I 1 ) =0 Ecuacion 2

Se simplifica las ecuaciones


6 I 1−I 2−8=0 Ecuacion 1

−I 1−5 I 2 +16=0 Ecuacion 2

Matriz aumentada
MATRIZ identidad

M=
[−16 −1 8 ¿1 0 0
−5 −16 ¿ 0 1 0 ]
Matriz Aumentada

Se llega a las matrices


MATRIZ de coeficientes
A=
[−16 −5−1
] Matriz de coeficientes
K=
[−168 ] Matriz de coeficientes
Método de la matriz inversa

M=
[−16 −1 8
−5 −16 ]
Matriz Aumentada

M=
[−11 −0.1667 0.1667 0
−5 0 1 ]
M=
[ 10 −0.1667 0.1667 0
−5.1667 0.1667 1 ]
M=
[ 1 −0.1667 0.1667
0 1
0
0.0323 −0.1935 ]
M=
[ 10 0 0.1613 −0.0323
1 −0.0323 −0.1935 ]
Matriz inversa

i=
[−0.0323
0.1613 −0.0323
−0.1935 ]
solucion S=i∗K

S=
[−0.0323
0.1613 −0.0323

][ ]
8
=
1.8065
−0.1935 −16 2.8387

La corriente de I1 es 1.8065 y la corriente de I2 es 2.8387


clc M
clear all Columns 1 through 3
%Matriz Inversa
%Tarea 6 -1 1
% sin pivoteo -1 -5 0
A=[6,-1;-1,-5]; Column 4
b=[8;-16]; 0
M=[A,eye(2)] 1
%Determinante determinante =
determinante=det(A) -31
%% 1 en M(1,1)
M(1,:)=M(1,:)/M(1,1) M=
% 0 en M(2,1) Columns 1 through 2
M(2,:)=M(2,:)-M(2,1)*M(1,:)
%%1 en M(2,2) 1.0000 -0.1667
M(2,:)=M(2,:)/M(2,2) -1.0000 -5.0000
% 0 EN M(1,2) Columns 3 through 4
M(1,:)=M(1,:)-M(1,2)*M(2,:) 0.1667 0
%%solucion 0 1.0000
%inversa
i=M(:,3:4) M=
%%Solucion Columns 1 through 2
s=i*b 1.0000 -0.1667
0 -5.1667
Columns 3 through 4
%comprobacion 0.1667 0
A*s 0.1667 1.0000
b
M=
Columns 1 through 2
1.0000 -0.1667
0 1.0000
Columns 3 through 4
0.1667 0
-0.0323 -0.1935

M=
Columns 1 through 2
1.0000 0
0 1.0000
Columns 3 through 4
0.1613 -0.0323
-0.0323 -0.1935
i=
0.1613 -0.0323
-0.0323 -0.1935
s=
1.8065
2.8387
ans =
8.0000
-16.0000
b=
8
-16
Conclusiones.
-García Hernández Marlene.

-Robles Ramírez María de los Ángeles

Referencias.

También podría gustarte