Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Informe Grupal Los Electricos
Informe Grupal Los Electricos
INGENIER
A
MECNICA
Y
ELCTRICA
NDICE
CAPITULO I
INTRODUCCIN..........................................................................................
MARCO TEORICO........................................................................................
1.1.
CONCEPTOS PREVIOS.......................................................................
1.1.1.
Funciones...................................................................................
1.1.1.1.
Definicin :............................................................................
1.1.1.2.
Tipos de funciones................................................................
1.1.2.
Cifras Significativas.....................................................................
1.1.3.
1.1.4.
Error...........................................................................................
1.1.5.
1.1.6.
Lenguaje de Programacin.........................................................11
1.1.7.
1.2.
1.2.1.
1.2.1.1.
METODO DE BISECCIN.........................................................13
A.
Definicin :................................................................................ 13
B.
C.
CRITERIO DE PARO...................................................................14
D.
E.
1.2.1.2.
A.
DEFINICIN............................................................................... 17
B.
TEOREMA DE BOLZANO............................................................18
C.
CRITERIO DE PARO...................................................................18
D.
E.
1.2.2.
1.2.2.1.
METODOS ABIERTOS................................................................22
METODO DE PUNTO FIJO.......................................................22
A.
DEFINICIN............................................................................... 22
B.
CONVERGENCIA........................................................................23
C.
MTODOS NUMRICOS
D.
1.2.2.2.
A.
DEFINICIN............................................................................... 28
B.
CONVERGENCIA.......................................................................28
C.
D.
1.2.2.3.
METODO DE LA SECANTE.......................................................31
A.
DEFINICIN:.............................................................................. 31
B.
C.
CONCEPTOS PREVIOS.....................................................................36
2.2.1.
ALGEBRA MATRICIAL................................................................36
2.2.1.1.
MATRICES...........................................................................36
2.2.1.2.
2.2.1.3.
MATRICES ESPECIALES......................................................37
2.2.1.4.
2.2.1.5.
2.2.1.6.
MULTIPLICACIN DE MATRICES..........................................40
2.2.1.7.
2.2.1.8.
2.2.1.9.
MATRIZ
2.2.1.10.
2.2.1.11.
2.2.2.
TEOREMA DE ROUCH-FROBENIUS..........................................47
2.2.3.
2.2.3.1.
DEFINICIN.........................................................................48
2.2.3.2.
METODOS PARA RESOLVER UN SISTEMA DE ECUACIONES
ALGEBRECIAS LINELAES : METODO DE CRAMER................................48
2.2.3.3.
METODOS PARA RESOLVER UN SISTEMA DE ECUACIONES
ALGEBRECIAS LINELAES : METODO DE GAUSS- JORDAN....................49
2.2.3.4.
METODOS PARA RESOLVER UN SISTEMA DE ECUACIONES
ALGEBRECIAS LINELAES : METODO DE GAUSS-SEIDEL.......................50
MTODOS NUMRICOS
CAPITULO III
REGRESIN E INTERPOLACIN........................................52
INTRODUCCIN........................................................................................ 53
3.1.
CONCEPTOS PREVIOS.....................................................................54
3.1.1.
3.2.
3.3.
3.1.1.1.
MEDIA ARITMETICA.............................................................54
3.1.1.2.
DESVIACIN ESTANDAR.....................................................54
3.1.1.3.
3.1.1.4.
VARIANZA...........................................................................55
3.1.1.5.
COEFICIENTE DE VARIACIN..............................................55
3.1.1.6.
COEFICIENTE DE DETERMINACIN.....................................55
3.1.1.7.
COEFICIENTE DE CORRELACIN........................................56
REGRESIN..................................................................................... 57
3.2.1.1.
3.2.1.2.
REGRESIN NO LINEAL......................................................62
INTERPOLACIN............................................................................. 66
3.3.1.1.
DEFINICIN.........................................................................66
3.3.1.2.
INTERPOLACIN DE LAGRANGE.........................................67
3.1.1.1.
CAPITULO IV
INTEGRACIN...................................................................73
INTRODUCCIN........................................................................................ 74
3.1.
CONCEPTOS PREVIOS.....................................................................75
3.1.1.
3.2.
INTEGRAL................................................................................. 75
METODOS DE INTEGRACIN...........................................................76
3.2.1.
POLINOMIO DE TAYLOR.............................................................76
3.2.2.
RECTANGULO...........................................................................76
3.2.3.
3.2.4.
SIMPSON 1/3............................................................................. 78
3.2.5.
SIMPSON 3/8............................................................................. 79
ANEXOS................................................................................................... 82
MTODOS NUMRICOS
MTODOS NUMRICOS
CAPITU
LO I
SOLUCIONES
DE
ECUACIONES
NO LINEALES
MTODOS NUMRICOS
INTRODUCCIN
En este informe se presentan, de manera sencilla, los conceptos bsicos
ms comunes relacionados con el tema que se desarrolla, de tal forma que
el lector haga una remembranza de los tpicos que debe conocer y tenga
una motivacin inmediata. Ello facilitar que las aplicaciones sean ms
expeditas y amenas, porque ver con satisfaccin que obtiene resultados
tan exactos como los que tendra con los mtodos analticos, cuando sea
posible hacerlos de esa forma.
por
MTODOS NUMRICOS
MARCO TEORICO
1.1.
CONCEPTOS PREVIOS.
1.1.1.Funciones
1.1.1.1. Definicin :
Una funcin f de un conjunto A en un conjunto B es una regla que
hace corresponder a cada elemento x perteneciente al conjunto A,
uno y solo un elemento y del conjunto B, llamado imagen de x por f,
que se denota y=f (x).
En smbolos, se expresa f: AB, siendo el conjunto A el dominio de
f, y el conjunto B el codominio.
1.1.1.2. Tipos de funciones
MTODOS NUMRICOS
1.1.2.Cifras Significativas
MTODOS NUMRICOS
1.1.4.Error
En ciertos mtodos numricos, se usan esquemas iterativos para
calcular resultados, y se hace la aproximacin en base a la
aproximacin anterior, para calcular ms y mejores aproximaciones .
Ea =
X iX i1
100
Xi
que
una
tolerancia
prefijada
ES,
donde
Es =( 0.5102n )
Quedando entonces definido el criterio de aceptacin o de paro para
cualquier mtodo:
|Ea| < ES
El resultado ser correcto en al menos n cifras significativas
MTODOS NUMRICOS
tener
su
origen
como
modelos
matemticos
10
1.1.6.Lenguaje de Programacin.
La mayora de los lectores de este informe, tendr en mente alguna
idea en programacin, en un lenguaje de alto nivel para computadora,
tal como MATLAT, MAPLE entre muchos ms. Esos lenguajes de
programacin permiten al usuario escribir programas en una forma en
la que incluye frmulas algebraicas y proposiciones lgicas en ingls,
para instrucciones de entrada y salida. Tales lenguajes de alto nivel son
virtualmente independientes de la mquina en la cual correr el
programa. Mediante el uso de un programa de computadora llamado
compilador, el programa de alto nivel puede ser convertido al cdigo
fundamental de la mquina con lo que el programa ser actualmente
ejecutado.
La aparicin de cada nuevo lenguaje de programacin es bien recibida
por un buen promedio de usuarios. Estos lenguajes imponen nuevas
reglas que tienen que ser aprendidas y posiblemente confundidas con
otros lenguajes. Sin embargo, cualquier perdona razonablemente
flexible encontrar pocas dificultades en adaptarse a un nuevo lenguaje
si es necesario. Lo ms importante es la economa, los programas de
computadora largos son muy caros y la conversin de esos programas
a otro lenguaje puede ser la mejor tarea, pero involucrar muchos
meses de trabajo. Esta es una de las razones principales por las que
MAPLE es el lenguaje estndar en aplicaciones de la ciencia y
nicamente debe desplazarse hacia el futuro.
MTODOS NUMRICOS
11
MTODOS NUMRICOS
12
Entonces existe
a+b
2
Luego si
f ( a )f ( b )=0
b=xi . Si
a=xi
.Por ltimo,
es la raz de la ecuacin.
C. CRITERIO DE PARO
MTODOS NUMRICOS
13
E P=
x ix i1
100
xi
|ba|
i =
2i+1
En sntesis:
|ba|
2i+1
100<0.5 102n
Ingresamos la
f ( x )=0 , A0 , B 0
cifras significativas.
MTODOS NUMRICOS
14
A
B
f ( 0)
f ( 0) y
II.
III.
A
B
f
(
0)
Evaluamos si (
entonces continuamos, pero de no ser
f ( 0)< 0 ,
as se regresara al paso I.
IV.
forma
VI.
VII.
VIII.
IX.
( Iter=i) .
evaluamos :
adems si
x i=
A i+ B i
2
f ( xi )
x
A
f ( 0)
0 , entonces B i+1=x i y Ai +1= Ai
f ( i)
0 , entonces A i+1=x i y Bi+1 =B i
x
A
f ( 0)=0
, de cumplirse esto
f ( i)
y se parara el programa.
De no cumplirse lo anterior se evaluara el error en la ensima
iteracin:
| | .100%
Ei =
B i A i
i +1
MTODOS NUMRICOS
15
X.
Ei 0.510
si se cumple
x i , pero de no ser
2n
INICIO
,yn
E. DIAGRAMA DE FLUJO DEL METODO DE BISECCIN
NO
SI
SI
NO
SI
NO
SI
MTODOS NUMRICOS
SI
FIN
NO
16
(a , f (a)) y (b , f (b))
es
f (b) f (a)
=
bx i ax i
Si ahora hacemos y = 0 en esa expresin para determinar la
abscisa de corte de la recta con el eje de abscisas se tiene
x=
af ( b )bf (a)
f ( b )f (a)
MTODOS NUMRICOS
17
Entonces existe
a+b
2
Luego si
b=xi . Si
MTODOS NUMRICOS
18
f ( a )f ( b )=0
a=xi
.Por ltimo,
es la raz de la ecuacin.
C. CRITERIO DE PARO
E p=0.5 10
E P=
x ix i1
100
xi
|ba|
i =
2i+1
En sntesis:
|ba|
i+1
100<0.5 102n
19
I.
Ingresamos la
f ( x )=0 , A0 , B 0
cifras significativas.
II.
III.
A
B
f ( 0)
Evaluamos si (
entonces continuamos, pero de no ser
f ( 0)< 0 ,
as se regresara al paso I.
IV.
forma
VI.
VII.
VIII.
( Iter=i) .
B
A
f ( i)f ( i)
A i ( f ( Bi ) ) B i(f ( A i))
x i=
f ( xi ) .
x
A
f ( 0)
0 , entonces B i+1=x i y Ai +1= Ai
f ( i)
0 , entonces A i+1=x i y Bi+1 =B i
evaluamos :
adems si
x
A
f ( 0)=0
, de cumplirse esto
f ( i)
y se parara el programa.
MTODOS NUMRICOS
20
IX.
iteracin:
X.
| |.
Ei =
B i A i
2i +1
Ei 0.5102n si se cumple
x i , pero de no ser
INICIO
FALSA
NO
SI
NO
NO
SI
MTODOS NUMRICOS
SI
SI
FIN
NO
21
f ( x )= 0 de tal
MTODOS NUMRICOS
22
x 2 +3
2
sin ( x )=0 puede transformarse en la forma de la ecuacin
Mientras que
en funcin de
| a|=
x i+1x
100
x i+1
B. CONVERGENCIA.
Sea la funcin g(x) para el intervalo cerrado [a,b] [a,b] continua,
entonces se tiene:
a) g(x), posee al menos un punto fijo.
MTODOS NUMRICOS
23
r
'
Convergencia Unilateral 0<g ( x ) <1
'
Convergencia Bilateral 1< g ( x )< 0
MTODOS NUMRICOS
24
'
Divergencia Bilateral g ( x ) <1
I.
Ingresamos la
II.
cifras significativas.
En este segundo paso evaluamos la funcin y la reescribimos de la
forma
g ( x ) =x
f ( x )=0
III.
g ( x ) =x
, lo derivamos y obtenemos
g' (x)
MTODOS NUMRICOS
25
g ( x 0) =M , y continuamos
IV.
Evaluamos la
V.
IX.
( Iter=i) .
VIII.
g ( x ) =x .
x i+1=g ( x 0 )
Ei=M i( B A)
Ei 0.5102n si se cumple
( Iter=i+ 1 )
MTODOS NUMRICOS
26
INICIO
,yn
DESPEJANDO x
O AGREGANDO x, etc
Derivamos
NO
SI
.
NO
SI
MTODOS NUMRICOS
FIN
27
x0
x i=x 0
f (x 0 )
f (x 0 )
Por lo tanto diremos que la raz est dada por la siguiente formula
x i+1=x i
f ( xi )
f (x i )
B. CONVERGENCIA
MTODOS NUMRICOS
28
I.
Ingresamos la
f ( x )=0, x 0 ,
significativas.
II.
III.
IV.
'
''
Calculamos f ( x ) , f ( x ) , f ( x ) seguimos,
Se evala
M =g ( x 0 )=
f ( x )f ' ' ( x )
[ f ' (x )]
( Iter=i) .
'
Evaluamos f ( x i ) , f ( xi )
La forma iterativa para aproximarse a la raz se determina de la
forma
VIII.
x0 .
x i+1=x 0
E i=
f ( xi )
f ' ( xi )
x ix i1
xi
MTODOS NUMRICOS
29
IX.
Ei 0.510
( Iter=i+ 1 )
2n
si se cumple
INICIO
n
RAPHSON
M(Xi)
NO
SI
.
NO
SI
Xi
FIN
MTODOS NUMRICOS
30
Tabla
MTODOS NUMRICOS
31
f ( x i1 )f (x i)
xi 1 xi
x i+1=x i
f ( xi )( x i1 xi )
f ( x i1 )f ( x i )
II.
III.
significativas.
Una vez cumplida la condicin anterior se escribir
( Iter=i) .
'
Evaluamos f ( x i ) , f ( xi )
MTODOS NUMRICOS
32
IV.
forma
V.
VI.
x i+1=x 0
f ( xi ) [ x i1x i ]
f ( x i1 )f (x i)
E i=
x ix i1
xi
Ei 0.510
( Iter=i+ 1 )
2n
si se cumple
MTODOS NUMRICOS
33
INICIO
n
NO
SI
Xi
FIN
MTODOS NUMRICOS
34
CAPITU
LO II
SISTEMA DE
ECUACIONES
SIMULTNEAS
ALGEBRAICAS
LINEALES
MTODOS NUMRICOS
35
INTRODUCCIN
Este nuevo captulo, nos enfocaremos, a la resolucin de sistemas
de ecuaciones lineales, la solucin de tales sistemas, permiten que una
gran variedad de problemas se resuelvan incluyendo la solucin numrica
de ecuaciones diferenciales ordinarias y parciales, anlisis estructural,
optimizacin.
Este sistema consiste bsicamente de un gran nmero de
ecuaciones simultneas y se tendr que elegir el mejor mtodo. Puesto
que las tcnicas bsicas del algebra matricial son requeridas en este
captulo.
Para resolver todos estos mtodos descritos en este
informe,
MTODOS NUMRICOS
36
ALGEBRA MATRICIAL
2.2.1.1.
MATRICES
Una matriz,
As tendremos:
()
El vector columna
se le llama FILA i .
se le llama COLUMNA j.
A=
[]
2
3
2
B=
2 5 3 0
4 0 1 2
, C=
aij
bij
1i 4+2 i
2 15 i
3+ 2i 3
R
R
MTODOS NUMRICOS
37
A mxn = [ aij ]
i=1,2,3, , m; j=1,2,3 .. , n
o ( aij ),
donde aij
i=fila , j=columna .
2.2.1.2.
mxn
Si
mxn
, donde m
el nmero de columnas.
aij
con elementos
se denota por
Es decir
Si
mxn
R , entonces
a
( ij)mxn /aij
R mxn=
C , entonces
a
( ij)mxn / aij
C mxn=
C .
A n es diagonal si
38
a11 0
0 0
0 a22 0 0
A n= 0 0 a 33
0
a
0 0
0
nm
es
diferente de cero.
EJEMPLOS:
[ ]
20 0 0
00 0 0
A4=
0 0 3 0
00 0 0
de
5 x5
4x 4
; Es de k
.
[ ]
3
0
B 5= 0
0
0
0
0
2
0
0
0
0
0
8
0
0
0
0
0
4
; Es
[ ]
1
0
I n= 0
0
0
0
4
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
aij =0 ;
I n es la matriz
si i j y aii =1 .
EJEMPLOS:
MTODOS NUMRICOS
39
[ ]
I2 =
1 0
0 1
[ ]
1 0 0
I3 = 0 1 0
0 0 1
[ ]
1
0
I 4=
0
0
0
1
0
0
0
0
1
0
0
0
0
1
E. MATRIZ TRIANGULAR:
a). La matriz cuadrada
An
es
TRIANGULAR superior si
aij =0, para todo i> j .
An
es
TRIANGULAR inferior si
aij =0, para todo i< j .
[ ]
a11 0 0 0
a a 0 0
A 4 = 21 22
a31 a 32 a 33 0
a 41 a 42 a 43 a 44
[ ]
a 11 a12 a 13 a 14
a a
A 4 = 0 a22 23 24
0 0 a 33 a 34
0 0 0 a 44
F. MATRIZ NULA:
A mxn Es nula si, y solo si aij =0, para todo
i, j .
Denotaremos por:
[ ]
0 0
mxn = 0 0
0 0
G. MATRIZ TRANSPUESTA:
Sean las matrices
A= [ aij ] mxn
y B=[ b ij ]nxm
. Diremos que B es la
1 i m ,1 j n
t
y denotaremos B= A , es decir:
t
B= A b ij =aij
para todo i, j .
EJEMPLO:
MTODOS NUMRICOS
40
Sea
3 1 2 4
A= 2 5 3 2
1 0 0 4
[ ]
3 2 1
1 5 0
A=
2 3 0
4 2 4
t
4x3
H. MATRIZ SIMETRICA:
A n= [ aij ] , A es simtrica si, y solo si
A= A t .
I. MATRIZ ANTISIMETRICA:
A= At . Una matriz cuadrada A no es
A es anti simtrica, si
2.2.1.4.
conjunto.
D ( a11 , a22 , a33 , . a nn ).
EJEMPLO:
2
3 1 5
1 4
3 2
A4=
3
4
8 1
4
3
2 0
A4
2.2.1.5.
41
2.2.1.6.
Tr ( A 4 ) =9
MULTIPLICACIN DE MATRICES
A mxn =[ aij ] por
El producto de
modo:
n
c ij = aik bkj
k=1
, 1 i m ,1 j p .
EJEMPLO:
Dadas las siguientes matrices:
[ ]
A= 5 3
0 5
B= 8 0 7
1 3 2
Hallar AB , A2
Solucin:
[ ][
AB=
][
AB =
37 9 41
5
15 10
]
MTODOS NUMRICOS
42
A 2= A . A=
[ ][ ][ ((
5 3 5 3
0 5 0 5
][
][
2.2.1.7.
A= [ aij ]
aij
de la matriz.
NOTACION:
det :
Rnxn R
A det ( A )
det
det
hace
A, que por
2). Para
n=1,
n=2,
A=a11
A=
entonces
det ( A )=a11
a11 a 12
entonces det ( A )=a11 a22a 21 a12
a21 a 22
MTODOS NUMRICOS
43
a11 a 12 a13
a
a
A= a21 a 22 a23 entonces det ( A )=a11 22 23
a32 a33
a31 a 32 a33
a12
| |
a21 a 23
a a
+ a13 21 22
a31 a 33
a31 a32
En general:
si A=
a11 a 12 a1 n
a21 a 22 a2 n
an 1 an 2 anm
||
abc
a b c de f
Asi : d e f = g h i =( aei+ dhc+ gbf )( dbi+ ahfgec)
g h i abc
de f
| |
. Este
| |
3 12
3 1 2 2 2 3
2 2 3 = 4 12 =(124 +12 )(4 +916 )=7
4 1 2
3 12
2 2 3
Si
MTODOS NUMRICOS
44
Sea la matriz
|B| 0 y el
NOTACION:
A= [ aij ] m n , denotamos
si
p ( A )=P
A.
PROPIEDADADES:
Si
A= [ aij ] mxn
1 . p ( A ) min( m, n)
3 . p ( At )= p( A)
MTODOS NUMRICOS
45
F . C ( A )=
Ip
N p (n p )
N ( m p) ( np )
N (m p ) p
m n
2.2.1.10.
n n
AB=BA=I n . La
tal que
A1 .
a).
i
A( )
j
Ejemplo: sea
es la submatriz
|A( ij )|
es el i-jesimo
| |
i
ij=(1)i + j A ( )
j
el i-jesimo cofactor.
a).
2 3 5
2
A
=3 0 0
3
8 3 4
()
b).
2 3 5
2
2+1
3 5
A
= 3 0 0 (1 ) ( 3 )
=81
3
3 4
8 3 4
menor complementario.
c).
[ ]
2 3 1 5
2 5 0 1
A4=
3 0 7 0
8 3 2 4
()
es
c).
MTODOS NUMRICOS
46
23=(1)
2 3 5
2
A ( ) 3 0 0 =81
3
8 3 4
| |
2 +3
An
es un
nmero real:
(2)
[ ]
2 3 1 5
3 1 5
2 3 5
2 5 0 1 (1 )3+1 ( 3 )
3+3
+
(
1
)
(
7
)
5
0 1
2 5 1
3 0 7 0
3 2 4
8
3 4
8 3 2 4
MTODOS NUMRICOS
47
| || |
3 1 5
2 3 5
5
0 1
2 5 1
3 3 2 4 7 8
3 4
3 1 5
2 3 5
5
0 1
2 5 1
| |
i
A= [ aij ] n y sea ij=(1)i + j A ( ) .
j
adj( A) ) a la matriz: [ ij ]T
Llamaremos
, es decir:
adj ( A )=[ ij ]T
, donde
T
[ ij ]
Cof A
Adjunta de A es igual al cofactor de A
TEOREMA:
Sea la matriz cuadrada
, entonces:
A . adj ( A ) =| A|. I
PRUEBA:
MTODOS NUMRICOS
48
1). Se tiene
a).
[ ij ]
dnde:
es la matriz COFACTOR de A
| |
i
i+j
b). ij=(1) A ( j )
c).
[ ij ]
elemento de
es la transpuesta de
[ ij ]
Por lo tanto: si
, entonces ij es un elemento de
[ ij ] .
adj ( A )
es otra matriz
[ c ij ]
[ ij ]
ij
T
es un
, cuyos elementos
son de la forma:
n
c ij = aik jk .
k=1
es decir:
A . adj ( A ) =[ c ij ] , tal que
n
c ij = aik jk .
k=1
Dnde:
n
a). si
i+ k
b).
j i cij =0
COROLARIO:
A1=
1
adj ( A ) , Si| A| 0.
| A|
PROPIEDADES:
MTODOS NUMRICOS
49
P1 adj ( I )=I .
P5 adj ( A n) =( adj ( A ) )
P6 |adj ( A )|=| A|
P3 adj ( A1 ) =( adj ( A ) ) .
n
(n1)
P7 |adj(adj ( A ))|=| A|
SUGERENCIA:
Estas propiedades se demuestran aplicando el corolario
adj ( A )=| A| . A1 .
2.2.2.
TEOREMA DE ROUCH-FROBENIUS.
soluciones de un
a x +
am 1 x 1+ 32 2 a m 2 x 2+
a m 1 am 2 am 3
amn bm
a11 a1 n
A=
am 1 amn
MTODOS NUMRICOS
50
a33 x 3+
am 3 x 3 +
[]
b1
B=
bm
En conclusin:
Existen soluciones para el sistema si y solo si el rango de la matriz
completa es igual al rango de la matriz incompleta.
Entonces, si existen soluciones, ests forman un sub-espacio afn de
de dimensiones
Kn
nrg(A ) . Adems.
i.
Si
rg( A/ B)=n=rg(B)
ii.
Si
rg( A/ B)=rg(B)< n
iii.
Si
2.2.3.
2.2.3.1.
DEFINICIN
a33 x 3+
am 1 x 1+ 32 2 a m 2 x 2+
am 3 x 3 + . f
Donde :
MTODOS NUMRICOS
51
a m 1 am 2 am 3
amn bm
[] []
b1
B=
bm
x1
X=
xn
a11 a1 n
A=
am 1 amn
AX =B
2.2.3.2.
Si
AX =B
x 1 , x 2 , x 3 , . , xn
en el cual
j=1,2, .. n .
Donde
remplazar
la
columna,
, si
de
C j = matriz obtenida de A al
por
la
matriz
comuna
B,
, es el determinante de la sub-matriz
A ( k / j)
que resulta de
(1)k + j .
52
x j=
|C j|
| A|
2.2.3.3.
ii.
Se volver a evaluar :
si w=n , existe unica solucin
w,n
si w< n , existen infinitas soluciones
viii.
2.2.3.4.
MTODOS NUMRICOS
53
a33 x 3+
am 1 x 1+
a m 2 x 2+
am 3 x 3 + . f
iii.
ii.
iv.
cada
v.
x 1=
x n=
vi.
MTODOS NUMRICOS
54
Ei=
vii.
x i1x i
xi
daremos
fin
la
iteracin.
MTODOS NUMRICOS
55
CAPITU
LO III
REGRESIN E
INTERPOLACI
N
MTODOS NUMRICOS
56
INTRODUCCIN
MTODOS NUMRICOS
57
CONCEPTOS PREVIOS.
3.1.1.ESTADISTICA APLICADA A LA REGRESIN
3.1.
3.1.1.1.
MEDIA ARITMETICA
Y =
Yi
Y 1 +Y 2+ Y 3+ +Y N i=0
=
N
N
3.1.1.2.
DESVIACIN ESTANDAR
SY =
Donde
St
N 1
St
MTODOS NUMRICOS
58
3.1.1.3.
SY /X=
Sr
N2
3.1.1.4.
VARIANZA
S Y 2=
St
N 1
3.1.1.5.
COEFICIENTE DE VARIACIN
C.V=
3.1.1.6.
SY
100
Y
COEFICIENTE DE DETERMINACIN
MTODOS NUMRICOS
59
R 2=
S t S r
St
3.1.1.7.
COEFICIENTE DE CORRELACIN
MTODOS NUMRICOS
60
3.2. REGRESIN
3.2.1.1. REGRESIN LINEAL POR MINIMOS CUADRADOS
a=
xi
x i 2
n
n ( xi ) ( y i ) ( x i )( y i)
b= y
a x
y iba x i
error=
MTODOS NUMRICOS
61
s y=
x
sr
n2
Donde el subndice
y
x
Si:
s r = ( y i f (x i ))2
COEFICIENTE DE DETERMINACIN
r 2=
s t s r
st
COEFICIENTE DE CORRELACION
r= x 2
62
ii.
iii.
iv.
v.
vi.
vii.
cero
entonces
el
ajuste
no
presenta
mejoras.
xi
yi
0.5
2.5
3.5
5.5
Solucin:
El nmero de datos: n=7
La sumatoria de los valores de x:
x i=
28
y i= 24
El promedio de x:
x =
28
=4
7
El promedio de y:
y =
24
=3.428571
7
( x i ) ( y i )=119.5
MTODOS NUMRICOS
63
Encontramos:
s t = ( y i y )2 = 22.7143
(xi )2=140
( x i ) ( y i )=119.5
a=
n ( x i ) ( y i ) xi y i
2
n (x i )2( x i )
a=
7 ( 119.5 )28(24 )
2
7 ( 140 )( 28)
a=0.8392857
b= y a x
b=3.42285710.839287(4)
b=0.07142857
Error =
( y iba x i)2
= 0.1687
= 0.5625
= 0.3473
= 0.3265
= 0.5896
= 0.7972
= 0.1993
MTODOS NUMRICOS
64
s r = 2.9911
c . v=
s y=
x
r 2=
sr
n2
s t s r
st
sy
y
c . v=
1.9457
100
3.428571
c .v
= 56.75%
2.9911
=0.7735
72
22.71432.9911
=0.868
22.7143
r=0.932
s y=
st
22.7143
=
=1.9457
n1
71
(s y )2=3.78572
La ecuacin es:
y=ax+b
MTODOS NUMRICOS
65
y=0.84 x +0.07
3.2.1.2.
REGRESIN NO LINEAL
y=a1 e
b1 x
Pero, ya que
ln e=1 , se tiene
ln y=ln a1+ b1 x
MTODOS NUMRICOS
66
ln
La ecuacin
y=a2 x b
b1
y contra
y una interseccin de
genera una
ln a1 .
y obtener:
log y=b 2 log x +log a2
La ecuacin
y=a3
x
b3 + x
b2
log
y contra
log x
y una interseccin de
genera
log a2 .
1 b3 1 1
=
+
y a3 x a 3
b3
a3
y una interseccin de
1
y
contra
1
a3
1
x
MTODOS NUMRICOS
67
POTENCIAL
y=a1 e b x
y=a2 x b
ln y=ln a1+ b1 x
LOGISTICA
x
y=a3
b3 + x
1 b3 1 1
=
+
y a3 x a 3
MTODOS NUMRICOS
68
i.
POTENCIAL
ln y
LOGISTICA
1
x
log ylog y
1
y
iv.
1
1.2
1.5
2
3
3.7
4
4.5
3
3.4
5
2
4.1
5
7
6.5
ln x
ln x
0
0.1823
0.4054
0.6931
1.0986
1.3083
1.3862
1.5040
0
0.0332
0.1643
0.4803
1.2069
1.7116
1.9215
2.2620
ln xy
0
0.6198
2.027
1.3862
4.5042
6.5415
9.7034
9.776
lnx
y a Y.
9
11.56
25
4
16.81
25
49
42.25
MTODOS NUMRICOS
69
20.9
36
6.5779
7.7798
34.5581
182.62
34.55814.5(6.5779)
a=2.090513
3.3. INTERPOLACIN
3.3.1.1. DEFINICIN
Supongamos que conocemos N+1 puntos
la curva
y=f ( x) ,
manera que
a x 0 < x 1 << x N b e y k =f (x k )
MTODOS NUMRICOS
70
f (N +1)
(x) o
(x k , y k )
Cuando
interpolado; si se tiene
x< x0
o bien
71
Es el mtodo de Horner:
P ( x )=( ( a N x +a N1 ) x+ +a1 ) x +a0
INTERPOLACIN DE LAGRANGE
3.3.1.2.
Pn ( x )= Li( x) yi
i=0
Donde la funcin
Li ( x ) =
Li (x) cumple
Li (x j) =0 si i j
Li ( x i ) =1
( xx 0 ) ( xx 1 ) .. ( xx i1 ) ( xx i+1 ) ( xx n )
=1
( x ix 0 ) ( xi x 1) .. ( x ix i1) ( x ix i+1 ) ( x ix n )
Li ( x i ) =1 y que
Li (x j) =0 para
los puntos
MTODOS NUMRICOS
72
i=0
j=0
j i
P n ( x )= f ( x i )
(xx i )
(x ix j )
iii.
Fin.
Ejemplo:
Obtener el polinomio de interpolacin usando la frmula de interpolacin
de Lagrange con la siguiente tabla de valores
X
f(x)
-6
8
6
-16
-1
-2
SOLUCION:
MTODOS NUMRICOS
73
i=0
j=0
j i
P n ( x )= f ( x i )
L0 ( x ) =
(xx i )
(x ix j )
( xx 1 ) ( xx 2 ) ( x6 )( x +1 )
=
60
( x 0x 1 ) ( x 0x 2 )
x 5 x6
60
L1 ( x ) =
( xx 0 )( xx 2) ( x+ 6 ) ( x+1 )
=
84
( x 1x 0 )( x1 x2 )
x +7 x+ 6
84
L2 ( x ) =
( xx 0 ) ( xx 1) ( x+6 )( x6 )
=
35
( x 2x 0 ) ( x2 x1 )
x 236
84
El polinomio solucin es
MTODOS NUMRICOS
74
3.1.1.1.
MTODOS NUMRICOS
75
f [ x i ] =f ( x i)
f [ x i ] f [ x i1 ]
x ix i1
MTODOS NUMRICOS
76
f [ x i2 , x i1 , x i ]=
f [ xi 1 , xi ] f [ x i2 , x i1 ]
xi xi2
f [ x i j +1 , , xi ]f [ x i j , , x i1 ]
x ix i j
MTODOS NUMRICOS
77
CAPITU
LO IV
INTEGRACIN
INTRODUCCIN
MTODOS NUMRICOS
78
La integracin es
matemtico.
un concepto
Bsicamente,
una integral es
una
del anlisis
generalizacin
de
MTODOS NUMRICOS
79
Dada
una funcin
un intervalo
[ a , b]
f (x)
de
x .
f ( x ) dx
b
MTODOS NUMRICOS
80
i.
f (x) dx , declaro mi a , b ,
Defino mi integral
m=
a+b
,
2
ii.
Calculo el
iii.
iv.
v.
P ( x )=
vi.
P(x )dx
Finalmente
3.2.2.
Y OBTENGO LA APROXIMACIN.
RECTANGULO
i.
Defino mi integral
de rectngulos.
ii.
iii.
iv.
Calculo el
H=
f ( x)dx , declaro mi a , b
a
, n = numero
ba
n
x i1 + x i
2
I =H f ( m i )=integral aproximada
i=1
MTODOS NUMRICOS
81
I= f ( x)dx P1 (x) dx
a
P1 ( x ) =
Donde:
( xb )
( xa )
f ( a )+
f (b )
ab
ba
f ( x ) dx= h2 [f ( x 0 ) +f ( x 1 ) ]
a
f ( x ) dx= h2 [f ( x 0 ) +2 f ( x 1 )+ 2 f ( x 2) + 2 f ( x3 ) + 2 f ( xn1 ) + f ( x n ) ]
a
i. Defino mi integral
f (x) dx , declaro mi a , b ,
=n
ii.Calculo el
iii.
H=
y el nmero de trapecios
ba
,
n
Calculo , x i=a+ iH ; f ( x i ) ,
MTODOS NUMRICOS
82
n1
f ( x ) dx= h2 f ( x 0 ) +2 f ( x i ) + f ( x n )
i=1
a
v.
3.2.4.SIMPSON 1/3
La regla Simpson 1/3 resulta cuando un polinomio de segundo grado se
sustituye en la ecuacin:
b
I = f ( x ) dx P ( x)dx
a
Para obtener:
I=
H
f ( x )+ 4 f ( x1 )+ f ( x2 )]
3 [ 0
1/3
MTODOS NUMRICOS
83
I = P ( x ) dx=
a
H
[ f ( x 0 ) + 4 f ( x1 ) + f ( x 2) ]
3
Tambin aplicamos esta regla para n-simo puntos los cuales veremos a
continuacin, donde a=x 0 y b=x n :
b=x n
x2
x4
xn
x0
x2
x n2
Integramos y obtenemos:
I=
H
H
H
f ( x 0 ) + 4 f ( x 1 ) + f ( x 2 ) ] + [ f ( x2 ) + 4 f ( x3 ) + f ( x 4 ) ] + + [ f ( x n2 ) +4 f ( x n1 ) +4 f ( x n1) + f ( x n )]
[
3
3
3
f ( x i ) +2
i=2,4,6,8
f ( x i ) + f (x n)
n1
f ( x0 ) + 4
I=
i=1,3,5,7
i. Defino mi integral
f (x)dx , declaro mi a , b ,
a
el
Calculo , x i=a+ iH ; f ( x i ) ,
Evaluo mis datos en la formula :
n2
f ( x i ) +2
i=2,4,6,8
f ( x i ) + f (x n)
n1
f ( x0 ) + 4
i=1,3,5,7
MTODOS NUMRICOS
84
3.2.5.SIMPSON 3/8
De manera similar a la obtencin de la regla del trapecio y Simpson 1/3, es
posible ajustar un polinomio de Lagrange de tercer grado a cuatro puntos e
integrarlo:
b
I = f ( x ) dx P ( x)dx
a
Para obtener:
I=
3H
f ( x 0 ) +3 f ( x 1 ) +3 f ( x 2 ) + f (x 3) ]
8 [
Donde
debido a que
se multiplica por
3/8
a=x 0
b= x 3
P ( x )=
( xx 1) ( x x2 ) ( xx 3 )
( xx 0 ) ( xx 2 )( xx 3)
( xx 0 ) ( xx 1 ) ( xx 3 )
(
f ( x0 )+
f ( x1)+
f ( x2 ) +
( x 0x 1 ) ( x 0x 2 )( x0 x3 )
( x 1x 0 )( x 1x 2 ) ( x 1x 3 )
( x 2x 0 )( x2 x1 ) ( x 2x 3 )
(x
I = P ( x ) dx=
a
3H
[ f ( x 0 ) +3 f ( x1 ) +3 f ( x2 ) + f (x 3) ]
8
MTODOS NUMRICOS
85
Tambin aplicamos esta regla para n-simo puntos los cuales veremos a
continuacin, donde
b=x n
a=x 0 y b=x n :
x3
x6
xn
x0
x3
x n3
Integramos y obtenemos:
I=
3H
3H
3H
f ( x 0 ) +3 f ( x 1 ) +3 f ( x 2 ) + f ( x 3) ] +
f ( x ) +3 f ( x 4 ) +3 f ( x 5 ) + f (x 6) ] ++
f ( x n3 )+ 3 f ( x n2 )
8 [
8 [ 3
8 [
f ( x i ) +3
n1
f ( x i) + 2
i=2,5,8,11
i=3,6,9,12
n3
f ( x 0 ) +3
i =1,4,7,10
I=
3H
i.
Defino mi integral
f (x)dx , declaro mi a , b ,
a
el
Calculo , x i=a+ iH ; f ( x i ) ,
Evalu mis datos en la frmula :
MTODOS NUMRICOS
86
x
f ( i)+ f (x n)
n2
f ( x i ) +3
n1
f ( x i) + 2
i=2,5,8,11
i=3,6,9,12
n3
f ( x 0 ) +3
i =1,4,7,10
I=
3H
MTODOS NUMRICOS
87
ANEXO
S
MTODOS NUMRICOS
88
3. EL
METODO
DE
REGRESIN
LINEAL
EN
EXCEL.
(CONTROL+CLICK)
4. DIAPOSITIVAS DE TODO LO EXPLICADO EN ESTE INFORME
(CONTROL+CLICK)
MTODOS NUMRICOS
89