Metodos Numericos
Sistemas de ecuaciones lineales
Valenzuela Meza Jose Carlos
22440030
Dr. Lennin Enrique Amador Castro
Actividad 7
Parte 1
Parte 1.1.1
1 1 5
In[5]:= MatrixForm
2 -1 7
Out[5]//MatrixForm=
1 1 5
2 –1 7
1 1 5
In[4]:= MatrixForm RowReduce
2 -1 7
Out[4]//MatrixForm=
1 0 4
0 1 1
In[6]:= A = Plot y = 5 - x, x, 0, 10
Out[6]=
2 4 6 8 10
In[7]:= B = Plot y = 2 x - 7, x, 0, 10
10
Out[7]=
2 4 6 8 10
In[8]:= Show A, B
Out[8]=
2 4 6 8 10
Parte 1.1.2
2 1 1
In[10]:= MatrixForm RowReduce
3 2 4
Out[10]//MatrixForm=
1 0 –2
0 1 5
In[11]:= A = Plot y = 1 - 2 x, x, - 3, 3
2
Out[11]=
1 2 3
In[14]:= B = Plot y = 4-3 x 2, x, - 3, 3
Out[14]= 2
3 –2 –1 1 2 3
–2
In[15]:= Show A, B
2
Out[15]=
1 2 3
Parte 1.1.3
1 2 3
In[16]:= MatrixForm RowReduce
1 -1 4
Out[16]//MatrixForm=
11
1 0
3
0 1 – 13
In[17]:= A = Plot 3-x 2 , x, 0, 5
1.5
1.0
0.5
Out[17]=
1 2 3 4 5
In[19]:= B = Plot y = x - 4, x, 0, 5
1
1 2 3 4 5
Out[19]=
In[20]:= Show A, B
1.5
1.0
0.5
Out[20]=
1 2 3 4 5
Parte 1.1.4
2 1 2
In[21]:= MatrixForm [RowReduce [ - 1 1 - 3 ]]
2 1 0
1 0 0
0 1 0 (xEsta matriz contiene una incongruencia, no tiene solucionx)
0 0 1
In[22]:= A = Plot y = 2 - 2 x, x, - 5, 5
10
Out[22]=
–4 –2 2 4
–5
In[24]:= B = Plot y = x - 3, x, - 5, 5
2
–4 –2 2 4
–2
Out[24]=
–4
–6
–8
In[26]:= C1 = Plot y = - 2 x, x, - 5, 5
10
Out[26]=
–4 –2 2 4
–5
–10
In[27]:= Show A, B, C1
10
Out[27]=
–4 –2 2 4
–5
(*Las rectas paralelas indican que no tiene solucion*)
Parte 1.2.1
2 1 -1
In[30]:= A= 3 -1 1 ;
4 3 -2
- 6 1 -1
In[31]:= B= -5 -1 1 ;
- 1 3 -2
2 -6 -1
In[33]:= C1 = 3 -5 1 ;
4 -1 -2
2 1 -6
In[35]:= D1 = 3 - 1 -5 ;
4 3 -1
In[36]:= x = Det B Det A
11
Out[36]= –
5
In[37]:= y = Det C1 Det A
Out[37]= 11
In[38]:= Z = Det D1 Det A
63
Out[38]=
5
Parte 1.2.2
1 1 -1 1
Det[ 2 -1 3 2 ] (xAl no ser matriz cuadrada no tiene determinante,
- 4 5 - 11 - 4
no se puede resolver con regla de cramerx
Det::matsq :
Argument 1, 1, –1, 1 , 2, –1, 3, 2 , –4, 5, –11, –4 at position 1 is not a non–empty square matrix. »
Out[39]= Det 1, 1, – 1, 1 , 2, – 1, 3, 2 , – 4, 5, – 11, – 4
1 1 -1 1
In[40]:= MatrixForm[RowReduce[ 2 -1 3 2 ]]
- 4 5 - 11 - 4
1 0 2 1
3
0 1 -5 0 (xSe puede resolver usando otros metodosx)
3
0 0 0 0
Parte 1.2.3
3 1 1
In[41]:= B= 2 2 1 ;
1 -1 1
2 1 1
In[42]:= Bx = 5 2 1 ;
0 -1 1
3 2 1
In[43]:= By = 2 5 1 ;
1 0 1
3 1 2
In[44]:= Bz = 2 2 5 ;
1 -1 0
In[45]:= x = Det Bx Det B
Out[45]= –1
In[46]:= y = Det By Det B
Out[46]= 2
In[47]:= z = Det Bz Det B
Out[47]= 3
Parte 1.3.1 (Matriz inversa con Gauss Jordan)
2 1 -1 1 0 0
MatrixForm[RowReduce [ 3 - 1 1 0 1 0 ]]
4 3 -2 0 0 1
Out[48]//MatrixForm=
1 0 0 1 1 0
5 5
0 1 0 –2 0 1
2
0 0 1 – 13 1
5 5
.2 .2 0 -6
In[49]:= MatrixForm [ -2 0 1 . -5 ]
- 12 5 .4 1 -1
Out[49]//MatrixForm=
– 2.2
11.
11.4
Parte 1.3.2
3 1 1 1 0 0
In[50]:= MatrixForm [RowReduce [ 2 2 1 0 1 0 ]]
1 -1 1 0 0 1
Out[50]//MatrixForm=
1 0 0 3 –1 –1
4 2 4
1 1
0 1 0 – 1 –
4 2 4
0 0 1 –1 1 1
3 1 1
- - 2
4 2 4
In[52]:= MatrixForm [ - 1 1
- 1 . 5 ]
4 2 4
0
-1 1 1
Out[52]//MatrixForm=
–1
2
3
Parte 2.2.1
30 20 20 340
In[53]:= MatrixForm [RowReduce [ 20 20 20 320 ]]
10 10 10 140
1 0 0 0
0 1 1 0 (xComo se menciono en el procedimiento,
0 0 0 1
los resultados no concuerdan con los datos dados, hay errores en los gastosx
Parte 2.2.2
1 1 1 1 4
1 2 4 8 0
In[54]:= MatrixForm [RowReduce [ ]]
1 3 9 27 12
1 4 16 64 21
Out[54]//MatrixForm=
1 0 0 0 43
0 1 0 0 – 377
6
0 0 1 0 27
0 0 0 1 – 19
6
Parte 2.2.3 ( Matriz inversa con Gauss Jordan)
11 - 6 0 1 0 0
In[55]:= MatrixForm [RowReduce [ - 6 16 - 6 0 1 0 ]]
0 -6 9 0 0 1
Out[55]//MatrixForm=
1 1
1 0 0 1
8 16 24
11 11
0 1 0 1
16 96 144
11 35
0 0 1 1
24 144 216
1 1 1
8 16 24 240
1 11 11
In[56]:= MatrixForm[ 16 96 144
. 0 ]
1 11 35 0
24 144 216
Out[56]//MatrixForm=
30
15
10
Parte 2.2.4
10 12 6 1560
In[57]:= MatrixForm [RowReduce [ 2 2.5 1.5 340 ]]
2 2 1.5 320
Out[57]//MatrixForm=
1 0. 0. 60.
0 1 0. 40.
0 0 1 80.
Parte 3.3.1
In[60]:= Plot - x3 + 4 x2 - x - 6, x, - 2, 4
10
Out[60]=
1 2 3 4
Parte 3.3.2
In[66]:= Plot x3 - 2 x2 - 3 x + 6, x, - 2, 3
2
Out[66]=
2 –1 1 2 3
–2
–4