Documentos de Académico
Documentos de Profesional
Documentos de Cultura
1
Ts = 1.906854249492380
>>
2
function [Bos ] = boolesimple3 (f,a,b,n)
% [Bos]= boolesimple3( @(x) ((x^3)/(1+x^(1/2))),1,2,3 )
f(a);
f(b);
hs=(b-a)/n;
Bos =2*hs/45*(7*f(a)+(32*f(a+hs))+(12*f(a+2*hs))+(32*f(a+3*hs))+7*f(b)
ErrorBos= abs(1.6470454-Bos)
endfunction
>> [Bos]= boolesimple3( @(x) ((x^3)/(1+x^(1/2))),1,2,3 )
ErrorBos = 1.200171426825041
Bos = 2.847216826825041
>>
(x − x1 ) (x − x0 )
P1 (x) = y0 + y1
(x0 − x1 (x1 − x0 )
Si f (x) ≈ P1
(x)yf (xk ) = fk e integramos a ambos lados, tenemos:
R x1 R x1 (x − x1 ) R x1 (x − x0 )
x0 f (x) dx ≈ x0 (x − x ) y 0 + x0 (x − x ) y1
0 1 1 0
3
R1 R 1 h(t − 1) R1 h∗t
0 f (x) dx ≈ f0 0 h dt + f 1 0 h dt
(−h) h
R1 R1 R1
0 f (x) dx ≈ f 0 (h) 0 (−t + 1) dt + f 1 (h) 0 t dt
R3 h
0 f (x) dx = ∗ [f0 + f1 ]
2
INTEGRAL SIMPLE SIMPSON (3/8)
R 3h
0 f (x) dx = ∗ [f0 + 3f1 + 3f2 + f3 ]
8
DEMOSTRACIÓN
Con los puntos P0 (x0 , y0 ), P1 (x1 , y1 ), P2 (x2 , y2 ), P3 (x3 , y3 ) construimos el
polinomio interpolador de Lagrange, ası́:
Si f (x) ≈ P1
(x)yf (xk ) = fk e integramos a ambos lados, tenemos:
R x3
x0 f (x) dx
≈
R x3 (x − x1 )(x − x2 )(x − x3 ) R x3 (x − x0 )(x − x2 )(x − x3 )
x0 (x − x )(x − x )(x − x ) y 0 + x0 (x − x )(x − x )(x − x ) y1 +
0 1 0 2 0 3 1 0 1 2 1 3
R x3 (x − x0 )(x − x1 )(x − x3 ) R x (x − x0 )(x − x1 )(x − x2 )
x0 y2 + x03 y3
(x2 − x0 )(x2 − x1 ))(x2 − x3 ) (x3 − x0 )(x3 − x1 ))(x3 − x2 )
Si se reemplaza x=x0 + h.t de manera que se realiza un cambio de
variable y calculamos su derivada, tenemos:
dx=h.dt
Como los nodos son equiespaciados, podemos reemplazar:
xi − xj = (i − j)hyx − xi = (t − i)h
Los nuevos lı́mites deRintegración, serán: t = 0 y t = 3.
3
0 f (x) dx ≈
4
R 3 h(t − 1)h(t − 2)h(t − 3) R 3 h ∗ t ∗ h(t − 2)h(t − 3)
≈ f0 0 h dt + f 1 0 h dt+
(−h)(−2h)(−3h) (h)(−h)(−2h)
R 3 h ∗ t ∗ h(t − 1)h(t − 3) R 3 h ∗ t ∗ h(t − 1)h(t − 2)
f2 0 h dt + f 3 0 h dt
(2h)(h)(−h) (3h)(2h)(h)
R3
0 f (x) dx ≈
h R3 3 2 h R3 3
≈ f0 − 0 t − 6t + 11t − 6 dt + f 1 0 t − 5t2 + 6t dt+
6 2
h R3 3 2 h R3 3
f2 − 0 t − 4t + 3t dt + f 3 0 t − 3t2 + 2t dt
2 6
R3 h 9 h 9
0 f (x) dx ≈ f0 − 6 ∗ −
4
+ f1
2
∗
4
h 9 h 9
f2 − ∗ − + f3
2 4 6 4
R3 3h
0 f (x) dx ≈ ∗ [f0 + 3f1 + 3f2 + f3 ]
8
Demostrar las fórmulas que permiten calcular la tercera derivada de
orden 2 centrada, la primera derivada progresiva y la segunda derivada
regresiva con orden de aproximación 2.
f (x + 2h) − 2f (x + h) + 2f (x − h) − f (x − 2h)
f (3) (x0 ) = 3
+ O(h2 )
2h
DEMOSTRACIÓN DE LA TERCERA DERIVADA DE ORDEN 2
CENTRADA
00
0 f (x) ∗ h2 f (3) (x) ∗ h3
f (x + h) = f (x) + f (x) ∗ h + + (1)
2! 3!
00
0 f (x) ∗ h2 f (3) (x) ∗ h3
f (x − h) = f (x) − f (x) ∗ h + − (2)
2! 3!
00
0 4f (x) ∗ h2 8f (3) (x) ∗ h3
f (x + 2h) = f (x) + 2f (x) ∗ h + + (3)
2! 3!
00
0 4f (x) ∗ h2 8f (3) (x) ∗ h3
f (x − 2h) = f (x) − 2f (x) ∗ h + − (4)
2! 3!
5
Ahora, si observamos la fórmula que debemos demostrar, es necesario
que la ecuación (1) este multiplicada por el valor (-2), la ecuación (2)
por (2) y la ecuación (4) por (-1), tenemos:
0 f (3) (x) ∗ h3
00
2
−2f (x + h) = −2f (x) − 2f (x) ∗ h − f (x) ∗ h − (5)
3
0 00 f (3) (x) ∗ h3
2
2f (x − h) = 2f (x) − 2f (x) ∗ h + f (x) ∗ h − (6)
3
0 00 4f (3) (x) ∗ h3
2
f (x + 2h) = f (x) + 2f (x) ∗ h + 2f (x) ∗ h + (7)
3
0 4f (3) (x) ∗ h3
00
2
−f (x − 2h) = −f (x) + 2f (x) ∗ h − 2f (x) ∗ h + (8)
3
Sumando las ecuaciones (5), (6), (7) y (8), obtenemos:
f (x + 2h) − 2f (x + h) + 2f (x − h) − f (x − 2h)
f (3) =
2h3
NOTACIÓN
f (x + h) = fk+1 = f1
f (x + 2h) = fk+2 = f2
f (x − h) = fk−1 = f−1
f (x − 2h) = fk−2 = f−2
Una vez reemplazo en la fórmula anterior tenemos
6
PROGRESIVA
0 −3f0 + 4f1 − f2
f (x0 ) = + O(h2 )
2h
DEMOSTRACIÓN DE LA PRIMERA DERIVADA PROGRESIVA
Esta demostración, vamos a realizar utilizando el polinomio
interpolador de Lagrange. Al observar la fórmula que se va a
demostrar, esta depende de 3 valores f0 , f1 , f2 , lo que nos indica que
debemos utilizar 3 nodos: P0 (x0 , y0 ); P 1(x1 , y1 ); P2 (x2 , y2 );
0 (x − x2 ) + (x − x1 ) (x − x2 ) + (x − x0 ) (x − x1 ) + (x − x0 )
f (x) = f0 + f1 + f2
(x0 − x1 )(x0 − x2 ) (x1 − x0 )(x1 − x2 ) (x2 − x0 )(x2 − x1 )
Reemplazando x = x0 y xi − xj = (i − j)h, yi = fi , tenemos:
0 −2h − h −2h −h
f (x) = f0 + f1 + f2
(−h)(−2h) (h)(−h) (2h)(h)
0 −3 2 −1
f (x) = f0 + f1 + f2
2h h 2h
0 −3f0 + 4f1 − f2
f (x) = + O(h2 )
2h
REGRESIVA
7
demostrar, esta depende de 3 valores f0 , f−1 , f−2 , f−3 , lo que nos indica
que debemos utilizar 4 nodos:
P0 (x0 , y0 ); P 1(x1 , y1 ); P2 (x2 , y2 ); P3 (x3 , y3 );
8
(x1 − x) + (x2 − x) + (x0 − x) + (x2 − x) + (x0 − x) + (x1 − x)
+ f−3
(x3 − x0 )(x3 − x1 ))(x3 − x2 )
Tiempo (s) 0 1 2 3 4 5
Espacio (m) 0 10 25 45 80 120
Xi Yi Xi ∗ Yi X 2 X 3 X 2 ∗ Yi X4
1 0 0 0 0 0 0 0
2 1 10 10 1 1 10 1
3 2 25 50 4 8 100 16
4 3 45 135 9 27 405 81
5 4 80 320 16 64 1280 256
6 5 120 600 25 125 3000 625
Sumatoria 15 280 1115 55 225 4795 979
9
n
X n
X
yi = nb0 + b1 ∗ xi
i=1 i=1
n
X n
X n
X
xi ∗ yi = b0 ∗ xi + b1 ∗ x2i
i=1 i=1 i=1
6b0 + 15b1 = 280
15b0 + 55b1 = 1115
Resolvemos el sistema de ecuaciones
b0 = −12, 619047
b1 = 23, 714285
641, 904766
R2 = 1 −
10483, 33333
R2 = 0, 93876902
R = 0, 938769021/2
R = 0.96890093
Interpretación
El coeficiente de determinación: Decimos entonces que el 93,876902
porciento del espacio recorrido por el autompvil, es explicado mediante
los cambios en el tiempo transcurrido.
El coeficiente de correlación: Existe una correlación positiva muy
fuerte.
La ecuación de regresión cuadrática
Tiempo (s) 0 1 2 3 4 5
Espacio (m) 0 10 25 45 80 120
11
y = b0 + b1 x + b2 x2
n
X n
X n
X
yi = nb0 + b1 ∗ xi + x2i
i=1 i=1 i=1
n
X n
X n
X n
X
xi ∗ yi = b0 ∗ xi + b1 ∗ x2i + b2 ∗ x3i
i=1 i=1 i=1 i=1
n
X n
X n
X n
X
x2i ∗ yi = b 0 ∗ x2i + b1 ∗ x3i + b2 ∗ x4i
i=1 i=1 i=1 i=1
Xi Yi Xi ∗ Yi X 2 X 3 X 2 ∗ Yi X4
1 0 0 0 0 0 0 0
2 1 10 10 1 1 10 1
3 2 25 50 4 8 100 16
4 3 45 135 9 27 405 81
5 4 80 320 16 64 1280 256
6 5 120 600 25 125 3000 625
Sumatoria 15 280 1115 55 225 4795 979
6b0 + 15b1 + 55b2 = 280
15b0 + 55b1 + 225b2 = 1115
55b0 + 225b1 + 979b2 = 4795
12, 142857
R2 = 1 −
10483, 33333
R2 = 0, 998842
R = 0, 9988421/2
R = 0.999421
13
Interpretación
El coeficiente de determinación: Decimos entonces que el 99,8842
porciento del espacio recorrido por el automovil, es explicado mediante
los cambios en el tiempo transcurrido.
El coeficiente de correlación: Existe una correlación positiva muy
fuerte.
x1 = 0
f (x) = x − e−x
f 0 (x) = 1 + e−x
x − e−x
g(xn ) = xn + 1 = xn −
1 + e−x
f (x1 )
x2 = x1 − 0
f (x1 )
0 − e−0
x2 = 0 −
1 + e−0
1
x2 = 0 +
2
1
x2 =
2
f (x2 )
x3 = x2 − 0
f (x2 )
0.5 − e−0.5
x3 = 0.5 −
1 + e−0.5
−0.1065306597
x3 = 0.5 −
1.60653066
x3 = 0.5663110032
f (x3 )
x4 = x3 − 0
f (x3 )
0.5663110032 − e−0.5663110032
x4 = 0.5663110032 −
1 + e−0.5663110032
−0.001304509812
x4 = 0.5663110032 −
1, 567615513
x4 = 0.5663110032 + 0.0008321618415
x4 = 0.567143165
14
(x − 1.1)(x − 1.2)(x − 1.3)
P3 (x) = ∗4
(1 − 1.1)(1 − 1.2)(1 − 1.3)
(x − 1)(x − 1.2)(x − 1.3)
+ ∗ 4.26
(1.1 − 1)(1.1 − 1.2)(1.1 − 1.3)
(x − 1)(x − 1.1)(x − 1.3)
+ ∗ 4.15
(1.2 − 1)(1.2 − 1.1)(1.2 − 1.3)
(x − 1)(x − 1.1)(x − 1.2)
+ ∗ 5.15
(1.3 − 1)(1.3 − 1.1)(1.3 − 1.2)
2000
P3 (x) = − ∗ (x3 − 3.6x2 + 4.31x − 1.716)+
3
2130 ∗ (x3 − 3.5x2 + 4.06x − 1.56) + (−2075) ∗ (x3 − 3.4x2 + 3.83x − 1.43)
2575
∗ (x3 − 3.3x2 + 3.62x − 1.32)
3
740 3 1665 2 56063 6891
P3 (x) = x − x + x−
3 2 60 20
x1 0
x2 0.5
x3 0.5663110032
x4 0.567143165
E = |x − a| (1)
E = 0.5671436158258 − 0.567143165 (2)
E = 0.000000450784341 (3)
2 3 1 −2
3 −5 −6 1
5 2 −4 −5
(4)
1 4 −3 −6
−1
2 3 1 −2 −2
3 −5 −6 1
∗ 5
5 2 −4 −5 −3 (5)
1 4 −3 −6 1
15
Det(A) = 79
−5 −6 1
C11 = (−1)1+1 ∗ 2 −4 −5 (6)
4 −3 −6
C11 = 13
3 −6 1
C12 = (−1)1+2 ∗ 5 −4 −5 (7)
1 −3 −6
C12 = 134
3 −5 1
C13 = (−1)1+3 ∗ 5 2 −5 (8)
1 4 −6
C13 = −83
3 −5 −6
C14 = (−1)1+1 ∗ 5 2 −4 (9)
1 4 −3
16
C14 = (−1) ∗ [(−18 − 120 + 20) − (−12 − 48 + 75)]
C14 = 133
3 1 −2
C21 = (−1)2+1 ∗ 2 −4 −5 (10)
4 −3 −6
C21 = 1
2 1 −2
C22 = (−1)2+2 ∗ 5 −4 −5 (11)
1 −3 −6
C22 = 65
2 3 −2
C23 = (−1)2+3 ∗ 5 2 −5 (12)
1 4 −6
C23 = −55
17
2 3 1
C24 = (−1)2+4 ∗ 5 2 −4 (13)
1 4 −3
C24 = 71
3 1 −2
C31 = (−1)3+1 ∗ −5 −6 1 (14)
4 −3 −6
C31 = 13
2 1 −2
C32 = (−1)3+2 ∗ 3 −6 1 (15)
1 −3 −6
C32 = −103
2 3 −2
C33 = (−1)3+3 ∗ 3 −5 1 (16)
1 4 −6
18
C33 = 75
2 3 1
C34 = (−1)3+4 ∗ 5 −5 −6 (17)
1 4 −3
C34 = −104
3 1 −2
C41 = (−1)4+1 ∗ −5 −6 1 (18)
2 −4 −5
C41 = −15
2 1 −2
C42 = (−1)4+2 ∗ 3 −6 1 (19)
5 −4 −5
C42 = 52
2 3 −2
C43 = (−1)4+3 ∗ 3 −5 1 (20)
5 2 −5
19
C43 = (−1) ∗ (44)
C43 = −44
2 3 1
C44 = (−1)4+4 ∗ 3 −5 −6 (21)
5 2 −4
C44 = 41
13 1 13 −15
134 65 −103 52
−83 −55 75 −44 −2
133 71 −104 41 5
∗
−3
(22)
79
1
75
−
79
418
79
(23)
378
−
79
442
79
20
No cumple la condición de diagonal dominante por filas.
Despejo las variables
2x4 − 3x2 − x3 − 2
x1 = (28)
2
(29)
3x1 − 6x3 + x4 − 5
x2 = (30)
5
(31)
5x1 + 2x2 − 5x4 + 3
x3 = (32)
4
(33)
x1 + 4x2 − 3x3 − 1
x4 = (34)
6
Reemplazo con el P0 (1, 1, 0, −2)
2(−2) − 3 − 0 − 2
x1 = (35)
2
(36)
9
x1 = − = −4, 5 (37)
2
(38)
3−0−2−5
x2 = (39)
5
(40)
4
x2 = − = −0, 8 (41)
5
(42)
5 + 2 − 5(−2) + 3
x3 = (43)
4
(44)
x3 = 5 (45)
(46)
1+4−0−1
x4 = (47)
6
(48)
2
x4 = = 0, 66666667 (49)
3
21
2 4
2∗ −3∗ − −5−2
3 5
x1 = (50)
2
(51)
49
x1 = − = −1, 633333 (52)
30
(53)
9 2
3∗ − − 6 ∗ (5) + − 5
2 3
x2 = (54)
5
(55)
287
x2 = − = −9, 56666667 (56)
30
(57)
9 4 2
5∗ − +2∗ − −5∗ +3
2 5 3
x3 = (58)
4
(59)
733
x3 = − = −6, 10833333 (60)
120
(61)
9 4
− +4∗ − − 15 − 1
2 5
x4 = (62)
6
(63)
79
x4 = − = −3, 95 (64)
20
22
79 287 733
2∗ − −3 − + −2
20 30 120
x1 = (65)
2
(66)
2989
x1 = = 12, 45416667 (67)
240
(68)
49 733 79
3∗ − −6 − − −5
30 120 20
x2 = (69)
5
(70)
114
x2 = = 4, 56 (71)
25
(72)
49 287 79
5∗ − +2∗ − −5∗ − +3
30 30 20
x3 = (73)
4
(74)
x3 = −1, 1375 (75)
(76)
49 287 −733
− +4∗ − −3∗ −1
30 30 120
x4 = (77)
6
(78)
301
x4 = − = −3, 76245 (79)
80
Puntos x1 x2 x3 x4
P0 1 1 0 -2
P1 -4,5 -0,8 5 0,6666667
P2 -1,63333 -9,5666667 -6,1083333 -3,95
P3 12,454165 4,56 -1,1375 -3,76245
23