Professional Documents
Culture Documents
LABORATORIO N0 1
E1. Empleando el mtodo grfico determine la solucin aproximada de
las ecuaciones.
a)
2 2x/3
e +Cos 2 x =0;
3
3
2
2
x>0
b) Ln(2x +2)-(x-1) =0
c) Tan(x+1)=x-1 0<x+1<
d) x2+x+2x-1-20=0 x>0
SOLUCION
a) Definimos dos funciones y graficamos.
g(x)= 2 e2x/3 y
3
h(x)=-Cos 2 x
3
5
4
3
y
2
1
0
-4
-2
-1
-2
x
METODOS NUMERICOS
10
9
8
7
6
5
4
3
2
1
0
-2
-1
Solucin grafica:
x=0,145
x=2,45.
c) Definimos dos funciones y graficamos:
g(x)=Tan(x+1) y h(x)=x-1
2.00
1.50
y=x-1
1.00
0.50
y
0.00
-1.5
-1
-0.5
-0.50
0.5
1.5
2.5
-1.00
-1.50
-2.00
-2.50
x
METODOS NUMERICOS
-0.4
-0.2
0.2
0.4
0.6
0.8
1.2
-5
-10
-15
-20
-25
x
Solucin grfica:
x=0,12.
E2. Determine g(x) y un valor x0 tal que g'(x0)<1 de la relacin
f(x)=0 x=g(x). De ser posible encuentre el intervalo en el que
puede encontrar a x0.
a)x3-10x+x2-2=0
b) e2x+Ln(x+1)=0
c)ex+Cos(x)=0
SOLUCION
a)
Hallamos g(x) despejamos x del segundo termino, luego
verificamos si se cumple la regla de convergencia:
x=0,1x3+0,1x2-0,2 x=g(x)= 0,1x3+0,1x2-0,2
Derivamos:
g'(x)=0,3x2+0,2x 0,3x2+0,2x <1
Para x=0, tendremos:
g'(x)= 0<1
Luego g(x)= 0,1x3+0,1x2-0,2 con x0=0.
b) Hallamos g(x) despejamos x del segundo termino, luego
verificamos si se cumple la regla de convergencia:
Ln(x+1)=-e2x x+1= e
x= e -1
e2 x
e2 x
METODOS NUMERICOS
Derivamos:
g'(x)=-2e2x e
e2 x
2e 2 x e
2x
<1
Luego:
e2 x
g'(x)=
e x e e
1 e e
e x e e
1 e e
<1
Para x=0,5:
g'(x)=
e x e e
1 e e
=0,8987237364<1
ex
METODOS NUMERICOS
5
6
-1,8932892 2,393E-11
-1,8932892 2,2204E-16
METODOS NUMERICOS
Luego:
xi+1=x- f ( x ) =x- Ln(x) x 2 = x[Ln(x) 1]
f ' (x)
1/ x 1
x 1
2 1
x2= 3,386294361 [Ln (3,386294361 ) 1] =3,386294361
3,386294361 1
i 1
f ( x i ) f ( x i 1 )
METODOS NUMERICOS
x2=3- 3 2(0,69314718 )
0,09861229 0,69314718
=3,16586459
f(xi-1)
0,6931471
0,0986122
-0,013438
0,0001507
f(xi)
0,0986122
-0,013438
0,0001507
2,183E-07
xi+1
3,1658645
3,1459722
3,1461929
3,1461932
xi+1-xi
-0,01989238
0,00022069
3,2015E-07
0
1
1 2,5
2 2,5
3 2,875
4 3,0625
OLCJ Estudios Superiores (949229274)
b
4
4
3,25
3,25
3,25
c=(a+b)
/2
2,5
3,25
2,875
3,0625
3,15625
f(c)
0,41629073
-0,071345
0,18105267
0,05673158
-0,00686539
7
METODOS NUMERICOS
0,02504674
0,00911866
0,00113358
-0,00286417
-0,00086486
0,00013447
-0,00036517
-0,00011534
9,5648E-06
2x 3 2x 3 3
= 2
3x 2 2
3x 2
x1= 2(0)
METODOS NUMERICOS
i 1
f ( x i ) f ( x i 1 )
xi-1
-1
-2
-1,8
-1,886877
-1,8936963
-1,8932875
-1,8932892
xi
-2
-1,8
-1,886877
-1,893696
-1,8932875
-1,8932892
-1,8932892
f(xi-1)
f(xi)
4
-1
-1
0,768
0,768
0,05588955
0,0558895 -0,0035652
-0,003565 1,487E-05
1,487E-05 3,928E-09
3,928E-09 -3,5527E-15
xi+1
-1,8
-1,88687783
-1,89369638
-1,8932875
-1,8932892
-1,8932892
-1,8932892
xi+1-xi
0,768
0,05588955
-0,0035652
1,487E-05
3,928E-09
-3,5527E-15
0
METODOS NUMERICOS
a
B
c=(a+b)/2
f(c)
-2
-1
-1,5
2,625
-2
-1,5
-1,75
1,140625
-2
-1,75
-1,875
0,15820313
-2
-1,875
-1,9375 -0,39819336
-1,9375
-1,875
-1,90625 -0,1144104
-1,90625
-1,875
-1,890625 0,0232811
-1,90625
-1,890625 -1,8984375 -0,04521704
-1,8984375 -1,890625 -1,89453125 -0,01088125
-1,89453125 -1,890625 -1,89257813 0,00622158
-1,89453125 -1,89257813 -1,89355469 -0,00232441
-1,89355469 -1,89257813 -1,89306641 0,00194994
-1,89355469 -1,89306641 -1,89331055 -0,0001869
-1,89331055 -1,89306641 -1,89318848 0,00088161
-1,89331055 -1,89318848 -1,89324951 0,00034738
-1,89331055 -1,89324951 -1,89328003 8,0244E-05
-1,89331055 -1,89328003 -1,89329529 -5,3325E-05
-1,89329529 -1,89328003 -1,89328766 1,346E-05
-1,89329529 -1,89328766 -1,89329147 -1,9933E-05
La raz es x=-1,89328909.
E5. Resuelva y compare la solucin del sistema de ecuaciones. Haga
las grficas.
a)
b)
SOLUCION
a)
10
METODOS NUMERICOS
0,12065x 0,98175y 2,0145 0,12032
-0,0141516608x-0,0142516799y=-0,24238464
0,0141516608x+0,2393669512y=0,609946075
0,2251152713y=0,367561435
y=5,481268575 x=-27,90497657
b)
-0,0141516608x-0,0142516799y=-0,24238464
0,0141516608x+0,2393669512y=0,609946075
0,2251152713y=-0,367561435
y=-0,04694175078 x=17,05375105
E6. Resuelva el sistema de ecuaciones lineales.
6x1+2x2+3x3=13
3x1+5x2-4x3=-3
x1+x2-3x3=-2
mediante:
a) Gauss.
b) Factorizacin.
c) Jacobi.
d) Gauss-Seidel.
SOLUCION
a) Gauss. La matriz aumentada es:
6 2 3 13
3 5 4 3
1 1 3 2
0 4 21
0 2
5
1 1 3
25
0 0 31
3 F +2F = 0 2 5
2
1
2
1 1 3
31x3=31 x3=1
OLCJ Estudios Superiores (949229274)
F1-6F3; F2-3F3.
x2=-1
31
3
2
x1=2
11
METODOS NUMERICOS
13
B= 3
2
0
1
L 22
0
0
1
U 11
U= 0
0
U 12
U 22
0
U 13
U 23
U 33
U22=4
U23=-5,5
L32=2/3
U33=0,166667
3
6 2
U= 0 4 5,5
0 0 0,16667
Ahora Lc=b
0 0 C 1 13
1
0,5
1 0 C 2 = 3
1 / 6 2 / 3 1 C 3 2
12
METODOS NUMERICOS
3
6 2
0 4
5,5
0 0 0,16667
x1=2
x 1 13
x = 19 / 2
2
x 3 0,166667
x2=-1 x3=1
c) Mtodo de Jacobi.
6x1+2x2+3x3=13
3x1+5x2-4x3=-3
x1+x2-3x3=-2
Se determina las reglas de correspondencia para iterar
x1=13/6-x2/3-x3/2
x2=-3/5-3x1/5+4x3/5
x3=x1/3+x2/3+2/3
Si tomamos x=(0,0,0)
x1=13/6=2,16666667
x2=-3/5-3(0)/5+0=-0,6
x3=0/3+0/3+2/3=0,66666667
Estos valores se vuelven a sustituir en las expresiones anteriores y
se obtiene los nuevos valores de iteracin. Estos resultados se muestran
en la siguiente tabla.
i
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
OLCJ Estudios Superiores (949229274)
x1
0
2,16666667
2,03333333
2,02777778
2,01185185
2,0087037
2,0038642
2,0027428
2,00125597
2,00086578
2,00040727
2,00027369
2,0001318
2,00008663
2,00004258
2,00002745
2,00001374
x2
0
-0,6
-1,36666667
-0,86888889
-1,10555556
-0,96474074
-1,03020988
-0,99059506
-1,00867119
-0,99751418
-1,00249686
-0,9993506
-1,00072144
-0,99983292
-1,00020922
-0,99995789
-1,00006091
x3
0
0,66666667
1,18888889
0,88888889
1,05296296
0,96876543
1,01465432
0,99121811
1,00404925
0,99752826
1,0011172
0,99930347
1,0003077
0,99980345
1,00008457
0,99994446
1,00002319
13
METODOS NUMERICOS
17
18
19
20
21
22
23
24
25
26
27
2,00000871
2,00000443
2,00000277
2,00000142
2,00000088
2,00000046
2,00000028
2,00000015
2,00000009
2,00000005
2,00000003
-0,99998969
-1,0000178
-0,99999758
-1,00000523
-0,99999947
-1,00000154
-0,9999999
-1,00000046
-0,99999999
-1,00000014
-1
0,99998428
1,00000634
0,99999554
1,00000173
0,99999873
1,00000047
0,99999964
1,00000013
0,9999999
1,00000003
0,99999997
De donde:
x1=2
x2=-1
x3=1
d) Mtodo de Gauss-Seidel.
6x1+2x2+3x3=13
3x1+5x2-4x3=-3
x1+x2-3x3=-2
Este mtodo es similar al anterior, despus de determinar las reglas
de correspondencia, se sustituye en forma simultanea los valores del
vector inicial y con ello se obtiene el nuevo vector, para luego obtener
el vector siguiente, y as sucesivamente hasta determinar las races.
x1=13/6-x2/3-x3/2
x2=-3/5-3x1/5+4x3/5
x3=x1/3+x2/3+2/3
Si tomamos x=(0,0,0)
x1=13/6=2,16666667
x2=-3/5-3(2,16666667)/5+0=-1,9
x3=2,16666667/3-1,9/3+2/3=0,75555556
Los dems resultados se muestran en la siguiente tabla.
i
0
1
2
3
4
5
6
x1
0
2,16666667
2,42222222
2,15407407
2,02409877
1,99594403
1,9962355
x2
0
-1,9
-1,44888889
-1,09955556
-0,99992099
-0,99111901
-0,99645463
x3
0
0,75555556
0,99111111
1,01817284
1,00805926
1,00160834
0,99992696
14
METODOS NUMERICOS
7
8
9
10
11
12
13
14
15
16
1,99885473
1,99987651
2,00005241
2,00003194
2,00000812
2,00000041
1,99999944
1,99999974
1,99999995
2
-0,99937127
-1,00006365
-1,00008135
-1,00002688
-1,00000352
-0,99999902
-0,99999929
-0,99999981
-0,99999998
-1,00000001
0,99982782
0,99993762
0,99999035
1,00000169
1,00000153
1,00000046
1,00000005
0,99999998
0,99999999
1
x2=-1
x3=1
De donde:
x1=2
(1,0)
x=0
x=1
x y 1
x y 1
y x 1
x y 1
15
METODOS NUMERICOS
(0,1)
(1,0)
(-1,0)
(0,-1)
x=0
c) x=y3 y=x3
(1,1)
(-1,-1)
x=1
xi+1=x- f ( x ) =x- x
f ' (x)
16
METODOS NUMERICOS
+ g <1
2
g 1
y
+ g <1
2
=(2x-1)/3
g 2
x
=1/3
g 1
y
=2y/3
g 2
y
=1/3
Luego:
g 1
x
g 1
y
+ g =2y/3+1/3<1
2
2y+1<3
y<1
17
METODOS NUMERICOS
BIBLIOGRAFIA.
1. Nieves Hurtado, Antonio y Domnguez Snchez, Federico.
"Mtodos Numricos aplicados a la ingeniera". Compaa editorial
Continental, S.A. de C.V. primera edicin en espaol. Mxico,
1995.
2. Raffo Lecca, Eduardo. "Mtodos Numricos para ciencia e
Ingeniera con Pascal". Raffo Lecca editores, Lima, Per, 1997.
18