You are on page 1of 21

UNIVERSIDAD NACIONAL DE JAEN

CURSO:

MTODOS NUMRICOS

DOCENTE:

Mg. LENIN QUIONES HUATANGARI

ESTUDIANTES:
CUBAS QUEVEDO, HUMBERTO
MUNDACA TARRILLO, GLEYSI
SILVA GONZALES, ELBER HERNAN
TROYA GONZALES, JORDIN

FECHA: SEPTIEMBRE - 2015

P1
>>> A= [ 1 2 3;-8 5 7;-8 4 6]
A=
1 2 3
-8 5 7
-8 4 6
>>> B= [ 12 -5 4;7 11 6;1 8 13]
B=
12 -5 4
7 11 6
1 8 13
>>> C= [7 13 4;-2 8 -5;9 -6 11]
C=
7 13 4
-2 8 -5
9 -6 11
a)
>>> A+B
ans =
13 -3 7
-1 16 13
-7 12 19
>>> B+A
ans =
13 -3 7
-1 16 13
-7 12 19
b)
>>> A+(B+C)
ans =
20 10 11
-3 24 8
2 6 30

>>> (A+B)+C
ans =
20 10 11
-3 24 8
2 6 30

c)>>> 7*(A+C)
ans =
56 105 49
-70 91 14
7 -14 119
>>> 7*A+7*C
ans =
56 105 49
-70 91 14
7 -14 119
d)
>>> A*(B+C)
ans =
59 52 82
-57 45 109
-72 24 84
>>> A*B+A*C
ans =
59 52 82
-57 45 109
-72 24 84
P2
a)
>>> c=[1 8 5 4 3 2 1 1];
>>> c=roots(c)

c=
-7.38984 + 0.00000i
-0.65698 + 0.36131i
-0.65698 - 0.36131i
0.42677 + 0.54725i
0.42677 - 0.54725i
-0.07487 + 0.70299i
-0.07487 - 0.70299i
b)
>>> c=[-6 7 15 -10 -8 7 15];
>>> c=roots(c)
c=
1.98800 + 0.00000i
0.87875 + 0.68248i
0.87875 - 0.68248i
-1.32632 + 0.00000i
-0.62625 + 0.61130i
-0.62625 - 0.61130i
c)
>>> c=[1 -13 10 18 8 -15];
>>> c=roots(c)
c=
12.04153 + 0.00000i
1.78045 + 0.00000i
-0.76264 + 0.64280i
-0.76264 - 0.64280i
0.70330 + 0.00000i
d)
>>> c=[7 12 -25 8];
>>> c=roots(c)
c=
-3.02148
0.87484
0.43236
e)
>>> c=[1 15 -23 105];
>>> c=roots(c)
c=
-16.74768 + 0.00000i
0.87384 + 2.34647i

0.87384 - 2.34647i
f)
>>> c=[1 -18 23];
>>> c=roots(c)
c=
16.6158
1.3842
g)
>>> c=[1 7];
>>> c=roots(c)
c = -7
P2
>>> A=[1 0 2;2 5 4;-1 8 7]
A=
1 0 2
2 5 4
-1 8 7
>>> B=[7 8 2;3 5 9;-1 3 1]
B=
7 8 2
3 5 9
-1 3 1
>>> A+B
ans =
8 8 4
5 10 13
-2 11 8
>>> A*B
ans =
5 14 4
25 53 53
10 53 77
>>> A^2
ans =
-1 16 16
8 57 52

8 96 79
>>> A'
ans =
1 2 -1
0 5 8
2 4 7
>>> B^-1
ans =
0.0990991 0.0090090 -0.2792793
0.0540541 -0.0405405 0.2567568
-0.0630631 0.1306306 -0.0495495
>>> B'*A'
ans =
5 25 10
14 53 53
4 53 77
>>> A^2+B^2-A*B
ans =
65 104 100
10 80 59
-1 53 28
>>> det(A)
ans = 45
>>> det(B)
ans = -222.00
>>> det(A*B)
ans = -9990.0
P1.38
>>> A=[2 1;0 5; 7 4]
A=
2 1
0 5
7 4
>>> B=[5 3;-2 -4]
B=
5 3
-2 -4

>>> C=[2 3;-5 -2;0 3]


C=
2 3
-5 -2
0 3
>>> D=[1 2]
D=
1 2
a)
>>> (A*C')^-1
ans =
8.8765e+14 2.5361e+13 -2.5361e+14
3.5506e+14 1.0145e+13 -1.0145e+14
-6.5094e+14 -1.8598e+13 1.8598e+14
b)
>>> A*C'
ans =
7 -12 3
15 -10 15
26 -43 12
c)
>>> (C'*A)^-1
ans =
0.0078003 0.0358814
-0.0421217 0.0062402
P1.39
>>> A=[1 0 1;2 3 4;-1 6 7]
A=
1 0 1
2 3 4
-1 6 7
>>> B=[7 4 2;3 5 6;-1 2 1]
B=
7 4 2
3 5 6
-1 2 1

a)
>>> A+B
ans =
8 4 3
5 8 10
-2 8 8
b)
>>> A*B
ans =
6 6 3
19 31 26
4 40 41
c)
>>> A^2
ans =
0 6 8
4 33 42
4 60 72
d)
>>> A'
ans =
1 2 -1
0 3 6
1 4 7
e)
>>> B^-1
ans =
1.1111e-01 -2.7105e-19 -2.2222e-01
1.4286e-01 -1.4286e-01 5.7143e-01
-1.7460e-01 2.8571e-01 -3.6508e-01
f)
B'*A'
ans =
6 19 4
6 31 40
3 26 41
g)
>>> A^2+B^2-A*B

ans =
53 52 45
15 51 58
-2 28 42
h)
>>> det(A)
ans = 12
>>> det(B)
ans = -63.000
>>> det(A*B)
ans = -756.00
P1.40
a)
>>> A=[3 2 1;-1 5 4;5 7 -9]
A=
3 2 1
-1 5 4
5 7 -9
>>> inv(A)
ans =
0.318777 -0.109170 -0.013100
-0.048035 0.139738 0.056769
0.139738 0.048035 -0.074236
b)
>>> B=[1 6 3;-4 -5 7;8 4 2]
B=
1 6 3
-4 -5 7
8 4 2
>>> inv(A)
ans =
0.318777 -0.109170 -0.013100
-0.048035 0.139738 0.056769
0.139738 0.048035 -0.074236
c)
>>> C=[-1 -2 5;-4 7 2;7 -8 -1]
C=
-1 -2 5

-4 7 2
7 -8 -1
>>> inv(A)
ans =
0.318777 -0.109170 -0.013100
-0.048035 0.139738 0.056769
0.139738 0.048035 -0.074236
P1.43
>>> A=[0.5 -0.8;0.75 1.0]
A=
0.50000 -0.80000
0.75000 1.00000
>>> B=[8 3;-3 4]
B=
8 3
-3 4
>>> C=A*B
C=
6.4000 -1.7000
3.0000 6.2500
P1.44
>>> A=[1 -2;1 3]
A=
1 -2
1 3
>>> B=[1 5;-2 4]
B=
1 5
-2 4
>>> C=A*B
C=
5 -3
-5 17

P4
>>> A=[3 -1 2 1;1 2 4 7;7 -1 8 6;1 -2 3 4]
A=
3
1
7
1

-1
2
-1
-2

2
4
8
3

1
7
6
4

>>> B=[1 2 5 7;2 -1 -2 4;3 2 5 1;4 1 -3 6]


B=
1
2
3
4

2
-1
2
1

5
-2
5
-3

7
4
1
6

>>> C=A*B
C=
11
45
53
22

12 24 25
15 0 61
37 59 89
14 12 26

P5
>>> A=[4 5 -3;-1 2 3;2 5 7]
A=
4 5 -3
-1 2 3
2 5 7
>>> B=[1 2 3;8 9 6;5 3 -1]
B=
1 2 3
8 9 6
5 3 -1
>>> C=A*B
C=
29 44 45
30 25 6
77 70 29

P7
>>> A=[6 -3 4 1;0 4 2 6;1 3 8 5;2 2 1 4]
A=
6
0
1
2

-3
4
3
2

4
2
8
1

1
6
5
4

>>> B=[0 1 2 3;4 5 6 -1;1 5 4 2;2 -3 6 7]


B=
0
4
1
2

1
5
5
-3

2
6
4
6

3
-1
2
7

>>> C=A*B
C=
-6
30
30
17

8
12
41
5

16
68
82
44

36
42
51
34

P8
>>> A=[0 1 -3;2 3 -1;4 5 -2]
A=
0 1 -3
2 3 -1
4 5 -2
>>> B=[-7;9;15]
B=
-7
9
15
>>> C=A\B
C=
1.6667
3.0000
3.3333

P9
>>> A=[0 1 -3;2 3 -1;4 5 -2]
A=
0 1 -3
2 3 -1
4 5 -2
>>> B=[10;0;-50]
B=
10
0
-50
>>> C=A\B
C=
-68.333
50.000
13.333
P10
a)
>>> A=[2 1 1 -1;1 5 -5 6;-7 3 -7 -5;1 -5 2 7]
A=
2
1
-7
1

1
5
3
-5

1
-5
-7
2

-1
6
-5
7

>>> B=[12;35;7;21]
B=
12
35
7
21
>>> C=A\B
C=
35.278
-28.251
-40.852
-10.547

b)
>>> A=[1 -1 3 5;2 1 -1 1;-1 -1 -2 2;1 1 -1 5]
A=
1
2
-1
1

-1
1
-1
1

3
-1
-2
-1

5
1
2
5

>>> B=[7;6;5;4]
B=
7
6
5
4
>>> C=A\B
C=
4.29412
-4.82353
-1.66176
0.57353

P11
a)
>>> A=[2 1 1 -4;1 5 -5 6;-7 3 -7 -5;1 -5 2 7]
A=
2
1
-7
1

1
5
3
-5

1
-5
-7
2

-4
6
-5
7

>>> B=[10;25;5;11]
B=
10
25
5
11

>>> C=A\B
C=
12.0657
-9.3285
-14.9635
-2.5401
b)
>>> A=[1 -1 3 5;2 1 -3 1;-1 -1 2 2;1 1 -1 5]
A=
1
2
-1
1

-1
1
-1
1

3
-3
2
-1

5
1
2
5

>>> B=[5;4;3;1]
B=
5
4
3
1
>>> C=A\B
C=
1
-8
-3
1

P12
a)
>>> A=[1 2 3 5;-2 5 7 -9;5 7 2 -5;-1 -3 -7 7]
A=
1
-2
5
-1

2
5
7
-3

3 5
7 -9
2 -5
-7 7

>>> B=[21;17;23;26]
B=
21
17
23
26
>>> C=A\B
C=
-8.0756
12.8353
-4.6128
3.4487
b)
>>> A=[1 2 3 4;2 -2 -1 1;1 -3 4 -4;2 2 -3 4]
A=
1
2
1
2

2
-2
-3
2

3
-1
4
-3

4
1
-4
4

>>> B=[9;-5;7;-6]
B=
9
-5
7
-6
>>> C=A\B
C=
-0.13548
1.07097
2.47742
-0.10968

P13 Determine las races de los siguientes polinomios


(a) p1(x) = x7 + 8x6 + 5x5 + 4x4 + 3x3 + 2x2 + x + 1
>>> P1=[1,8,5,4,3,2,1,1];roots(P1)
ans =
-7.38984 + 0.00000i
-0.65698 + 0.36131i
-0.65698 - 0.36131i
0.42677 + 0.54725i
0.42677 - 0.54725i
-0.07487 + 0.70299i
-0.07487 - 0.70299i

(b) p2(x) = x6 7x6 + 7x5 + 15x4 10x3 8x2 + 7x + 15


>>> P2=[-6,7,15,-10,-8,7,15];roots(P2)
ans =
1.98800 + 0.00000i
0.87875 + 0.68248i
0.87875 - 0.68248i
-1.32632 + 0.00000i
-0.62625 + 0.61130i
-0.62625 - 0.61130i
(c) p3(x) = x5 13x4 + 10x3 + 12x2 + 8x 15
>>> P3=[1,-13,10,12,8,-15];roots(P3)
ans =
12.08667 + 0.00000i
-0.70568 + 0.70612i
-0.70568 - 0.70612i
1.48755 + 0.00000i
0.83714 + 0.00000i
(d) p4(x) = x4 + 7x3 + 12x2 25x + 8
>>> P4=[1,7,12,-25,8];roots(P4)
ans =
-4.13314 + 2.24113i
-4.13314 - 2.24113i
0.83052 + 0.00000i
0.43575 + 0.00000i
(e) p5(x) = x3 + 15x2 23x + 105
>>> P5=[1,15,-23,105];roots(P5)

ans =
-16.74768 + 0.00000i
0.87384 + 2.34647i
0.87384 - 2.34647i
( f ) p6(x) = x2 18x + 23
>>> P6=[1,-18,23];roots(P6)
ans =
16.6158
1.3842
(g) p7(x) = x + 7
>>> P7=[1,7];roots(P7)
ans = -7

P14
Una esfera de pared delgada de aluminio se utiliza como una boya de sealizacin. La esfera tiene un radio de 65 cm y un espesor de pared de 10 mm. La
densidad del aluminio es 2700 kg / m3. La boya se coloca en el ocano, donde
la densidad del agua es de 1.050 kg / m3. Determine la altura H entre la parte
superior de la boya y la superficie del agua.

P15 Determinar los valores de x, y, z para el siguiente conjunto de ecuaciones


algebraicas lineales:

x2 3x3 = 7
2x1 + 3x2 x3 = 9
4x1 + 5x2 2x3 = 15

>>> A=[0 1 -3;2 3 -3;4 5 -2]


A=
0 1 -3
2 3 -3
4 5 -2
>>> B=[-7;9;15]
B=
-7
9
15
>>> X=inv(A)*B
X = [x,y,z]
x=45
y=-37
z=-10

P16 Determinar los valores de x, y , z para el siguiente conjunto de ecuaciones


algebraicas lineales:
2x + y 3z = 11
4x 2y + 3z = 8
2x + 2y z = 6
>>> A=[2 1 -3;4 -2 3;-2 2 -1]
A=
2 1 -3
4 -2 3
-2 2 -1
>>> B=[11;8;-6]
B=
11
8
-6
>>> C=[x,y,z];
>>> C=inv(A)*B
C=
3
-1
-2

Gracias totales