Académique Documents
Professionnel Documents
Culture Documents
Ejemplo 1:
Ejercicio diferencia hacia atrás
Sea la función f(x) = Ln(x) tan ( gx) calcular la derivada por métodos numéricos en
el punto x=4 con h= 0.1 aplicando la formula diferencia hacia atrás
1. Se realiza tabla
x 3.7 3.8 3.9 4.0 4.1 4.2 4.3
F(x) 0.8173 1.0326 1.2894 1.6050 2.0085 2.5512 3.3341
Fórmula
𝑓(𝑥0 ) − 𝑓(𝑥0 − 1)
𝑓´(𝑥0 ) =
ℎ
𝑠𝑒 𝑟𝑒𝑚𝑝𝑙𝑎𝑧𝑎 𝑙𝑎 𝑓𝑜𝑟𝑚𝑢𝑙𝑎
1.6050 − 1.2849
𝑓’(𝑥0 ) = = 3.201
0.1
Se calcula el error
𝑉𝑣 − 𝑉𝑎
𝐸𝑟 = | |
𝑉𝑣
3.534 − 3.201
𝐸= 𝑋 100 = 9.4%
3.534
NOTA: 3.534 valor verdadero de la derivada
8.611 − 5.88
𝐸= 𝑋 100 = 31.71%
8.611
Formula
3𝑓(𝑥0 ) − 4𝑓(𝑥0 − 1) + 𝑓(𝑥0 − 2)
𝑓′′(𝑥0 ) =
2ℎ
𝑟𝑒𝑒𝑚𝑝𝑙𝑎𝑧𝑎𝑚𝑜𝑠 𝑙𝑎 𝑓𝑜𝑟𝑚𝑢𝑙𝑎
𝑉𝑣 − 𝑉𝑎
𝐸𝑟 = | |
𝑉𝑣
3.534 − 3.45
𝐸= 𝑥100 = 2.3%
3.534
Se reemplaza la formula
2(1.6050) − 5(1.2894) + 4(1.0326) − 0.8173
𝑓 ′′(𝑥0 ) = = 7.61
(0.1)2
Se calcula error
Formula
𝑉𝑣 − 𝑉𝑎
𝐸𝑟 = | |
𝑉𝑣
8.611 − 7.61
𝐸= 𝑥100 = 11.6%
8.611
Ejemplo 2:
En este siguiente ejemplo, encontraremos una tabla, en el cual se muestra la
posición para determinado tiempo de una partícula moviéndose en el espacio.
Debemos calcular la posible aceleración de la misma. Si la partícula describe un
movimiento parabólico dado por 𝑓(𝑡) = 𝑟 2 calcule el error de la aceleración
aproximada.
j Tj xj
0 0 0
1 0.01 0.0001
2 0.02 0.0004
3 0.03 0.0009
4 0.04 0.0016
5 0.05 0.0025
Para este caso podemos calcular la aceleración en t=0.01, 0.002, 0.003 y 0.04.
1
𝑓´´(0.01) ≈ [0.0004 − 2(0.0001) + 0] ≈ 2
0.012
1 1
𝑓´´(0.01) ≈ [ ]≈2
0.012 5000
1
𝑓´´(0.02) ≈ [0.0009 − 2(0.0004) + 0.0001] ≈ 2
0.012
1 1
𝑓´´(0.01) ≈ 2
[ ]≈2
0.01 5000
1
𝑓´´(0.03) ≈ [0.0016 − 2(0.0009) + 0.0004] ≈ 2
0.012
1 1
𝑓´´(0.03) ≈ 2
[ ]≈2
0.01 5000
1
𝑓´´(0.04) ≈ [0.0025 − 2(0.0016) + 0.0009] ≈ 2
0.012
1 1
𝑓´´(0.04) ≈ 2
[ ]≈2
0.01 5000
Ejemplo 3:
𝑓(𝑥𝑖+1 ) − 𝑓(𝑥𝑖−1 )
𝑓 ′ (𝑥𝑖 ) = + 𝑂(ℎ2 )
2ℎ
3 3
(1,1)2 − 𝑙𝑛(1, 1)2 − 2 (0,9)2 − 𝑙𝑛(0,9)2
𝑓 ′ (𝑥𝑖 ) = 2 +0
2ℎ
1,624 − 1,426 0,199
𝑓 ′ (𝑥𝑖 ) = = = 0,993293
2ℎ 0,2
2
3𝑥 −
𝑥
En x = 1 de la función:
2
3(1) − =1
(1)
h Δfi/h εr %
0,1 0,993 0,7
0,2 0,972 2,7
0,3 0,936 6,3
0,4 0,882 11,8
0,5 0,803 19,7
3
∫ 0,25078𝑒 𝑥 ln(𝑥 + 3,89023) 𝑑𝑥
0
Reemplazamos
𝒃
𝒉
∫ 𝒇(𝒙) ≈ [𝒇(𝒙𝟎 ) + 𝟒(𝒇(𝒙𝟏 ) + 𝟐(𝒇(𝒙𝟐 ) + 𝟒(𝒇(𝒙𝟑 ) + (𝒇(𝒙𝟒 )]
𝒂 𝟑
𝑏
0.75
∫ 𝑓(𝑥) ≈ [0.34067667572 + 4(0.814808112744) + 2(1.8933388131)
𝑎 3
+ 4(4.318164052855) + 9.7220345341986 ]
𝑏
∫ 𝑓(𝑥) ≈ 0,25 ∗ 34.3812774985146
𝑎
3
∫ 0.25078𝑒 𝑥 ln(𝑥 + 3.89023) 𝑑𝑥 = 𝟖. 𝟓𝟗𝟓𝟑𝟏𝟗𝟑𝟕𝟒𝟔𝟐𝟖𝟔𝟓
0
𝑿𝒊 = 𝒂 + 𝒊 ∗ ∆𝒙
𝑥0 = 0 + 0(1) = 0 𝑥1 = 0 + 1(1) = 1
𝑥2 = 0 + 2(1) = 2 𝑥3 = 0 + 3(1) = 3
Reemplazamos
𝒃
𝟑𝒉
∫ 𝒇(𝒙) ≈ [𝒇(𝒙𝟎 ) + 𝟑(𝒇(𝒙𝟏 ) + 𝟑(𝒇(𝒙𝟐 ) + 𝟑(𝒇(𝒙𝟑 ) + (𝒇(𝒙𝟒 )]
𝒂 𝟖
𝑏
3∗1
∫ 𝑓(𝑥) ≈ [0.34067667572 + 3(1.08200632169561)
𝑎 8
+ 3(3.285964465694861) + 9.7220345341986 ]
𝑏
∫ 𝑓(𝑥) ≈ 0.375 ∗ 23.166623572090013
𝑎
3
∫ 0.25078𝑒 𝑥 ln(𝑥 + 3.89023) 𝑑𝑥 = 𝟖. 𝟔𝟖𝟕𝟒𝟖𝟑𝟖𝟑𝟗𝟓𝟑𝟑𝟕𝟓𝟒𝟖𝟕𝟓
0
5,5
∫ 𝑥 0,333 ln(1,098𝑥) 𝑑𝑥
1,5
𝑏 𝑛−1
𝑏−𝑎
𝐼 = ∫ 𝑓(𝑥)𝑑𝑥 ~ [𝑓(𝑥𝑜 ) + 2 ∗ ∑ 𝑓(𝑥𝑖 ) + 𝑓(𝑥𝑛 )]
𝑎 2𝑛
𝑘=1
𝑏 𝑛−1
ℎ
𝐼 = ∫ 𝑓(𝑥)𝑑𝑥 ~ [𝑓(𝑥𝑜 ) + 2 ∗ ∑ 𝑓(𝑥𝑖 ) + 𝑓(𝑥𝑛 )]
𝑎 2
𝑘=1
Para h=1
1
𝐼(ℎ1 ) = {1.50,333 ln(1,098 ∗ 1.5) + 2 ∗ [ 2.50,333 ln(1,098 ∗ 2.5)
2
+ 3.50,333 ln(1,098 ∗ 3.5) + 4.50,333 ln(1,098 ∗ 4.5)]
+ 5.50,333 ln(1,098 ∗ 5.5)}
𝐼(ℎ1 ) = 7.924348210295503
4 1
(7.94769321201) − (7.92434821030)
𝐼(ℎ1 ) = 7,92434821030 3 3
4 1
𝐼(ℎ2 ) = 7,94769321201 3
(7.95356707198) − (7.94769321201)
3
𝐼(ℎ3 ) = 7,95356707198 4 1
(7.95503801050) − (7.95356707198)
𝐼(ℎ4 ) = 7,95503801050 3 3
𝐼(ℎ5 ) = 7,95540590190 4 1
(7.95540590190) − (7.95503801050)
3 3
7,92434821030
7,95547488
7,94769321201
7,94769321201
7,95552503
7,95356707198
7,95356707198
7,95552832
7,95503801050
7,95503801050
7,95552853
7,95540590190
Donde
7,95547487925
7,95552837
7,95552502531
7,95552502531
7,95552854
7,95552832334
7,95552832334
7,95552855
7,95552853237
Donde
7,95552836838
7,95552855
7,95552854321
7,95552854321
7,95552855
7,95552854630
Donde
7,95552854598
7,95552855
7,95552854635
1 2𝑥 1,5𝑦
∫ ∫ ∫ 0,25𝑥𝑦 2𝑧 𝑑𝑧𝑑𝑦𝑑𝑥
0 𝑥 0,5𝑦
Donde para cada integral use el método de Trapecio con n=4
𝑏
𝑏−𝑎
∫ 𝑓(𝑥) ≈ {𝑓(𝑥𝑜 ) + 2(𝑓(𝑥1 )) + 2(𝑓(𝑥2 )) + ⋯ + 2(𝑓(𝑥𝑛−1 )) + 𝑓(𝑥𝑛 )}
𝑎 2𝑛
1,5𝑦
∫ 0,25𝑥𝑦 2𝑧 𝑑𝑧
0,5𝑦
𝑏 − 𝑎 1.5𝑦 − 0.5𝑦 1𝑦 1
∆𝑥 = = = = 𝑦 = 0.25𝑦
𝑛 4 4 4
1,5𝑦
1.5𝑦 − 0.5𝑦
∫ 0,25𝑥𝑦 2𝑧 𝑑𝑧 ≈ {0,25𝑥𝑦 2∗0.5𝑦 + 2(0,25𝑥𝑦 2∗0.75𝑦 + 0,25𝑥𝑦 2∗1𝑦 + 0,25𝑥𝑦 2∗1.25𝑦 )
0,5𝑦 2∗4
+ 0,25𝑥𝑦 2∗1.5𝑦 }
1,5𝑦
1
∫ 0,25𝑥𝑦 2𝑧 𝑑𝑧 ≈ 𝑦{0,25𝑥𝑦𝑦 + 2(0,25𝑥𝑦1.5𝑦 + 0,25𝑥𝑦2𝑦 + 0,25𝑥𝑦2.5𝑦 ) + 0,25𝑥𝑦3𝑦 }
0,5𝑦 8
1,5𝑦
∫ 0,25𝑥𝑦 2𝑧 𝑑𝑧 ≈ 0,125𝑦{0,25𝑥𝑦𝑦 + 0,5𝑥𝑦1.5𝑦 + 0,5𝑥𝑦2𝑦 + 0,5𝑥𝑦2.5𝑦 + 0,25𝑥𝑦3𝑦 }
0,5𝑦
1,5𝑦
∫ 0,25𝑥𝑦 2𝑧 𝑑𝑧 ≈ 0.03125𝑥𝑦 𝑦+1 + 0.0625𝑥𝑦1.5𝑦+1 + 0.0625𝑥𝑦 2𝑦+1 + 0.0625𝑥𝑦 2.5𝑦+1
0,5𝑦
+ 0.03125𝑥𝑦 3𝑦+1
1 2𝑥
∫ ∫ 0.03125𝑥𝑦𝑦+1 + 0.0625𝑥𝑦1.5𝑦+1 + 0.0625𝑥𝑦2𝑦+1 + 0.0625x𝑦2.5𝑦+1 + 0.03125𝑥𝑦3𝑦+1 𝑑𝑦𝑑𝑥
0 𝑥
Para la siguiente integral más interna
2𝑥
∫ 0.03125𝑥𝑦𝑦+1 + 0.0625𝑥𝑦1.5𝑦+1 + 0.0625𝑥𝑦2𝑦+1 + 0.0625x𝑦2.5𝑦+1 + 0.03125𝑥𝑦3𝑦+1 𝑑𝑦
𝑥
𝑏 − 𝑎 2𝑥 − 𝑥 1𝑥 1
∆𝑥 = = = = 𝑥 = 0.25𝑥
𝑛 4 4 4
2𝑥 − 𝑥
≈ {0.03125𝑥𝑥𝑥+1 + 0.0625𝑥𝑥1.5𝑥+1 + 0.0625𝑥𝑥2𝑥+1 + 0.0625𝑥𝑥2.5𝑥+1
2∗4
+ 0.03125𝑥𝑥3𝑥+1 + 2
1
≈ 𝑥{0.03125𝑥𝑥+2 + 0.0625𝑥1.5𝑥+2 + 0.0625𝑥2𝑥+2 + 0.0625𝑥2.5𝑥+2 + 0.03125𝑥3𝑥+2 + 2
8
∗ [(0.0390625𝑥1.25𝑥+2 + 0.078125𝑥1.875x+2 + 0.078125𝑥2.5𝑥+2
+ 0.078125𝑥3.125𝑥+2 + 0.0390625𝑥3.75𝑥+2 )
+ 0.046875𝑥4.5𝑥+2 )
+ 0.078125𝑥3.125𝑥+2 + 0.0390625𝑥3.75𝑥+2 )
+ 0.046875𝑥4.5𝑥+2 )
+ 0.078125𝑥3.125𝑥+2 + 0.0390625𝑥3.75𝑥+2 )
+ 0.046875𝑥4.5𝑥+2 )
𝑏−𝑎 1−0 1
∆𝑥 = = = = 0.25
𝑛 4 4
1 1 1 1 1 1
≈ { ∗ 0 ∗ 𝑓(0) + 2 ∗ { ∗ 0.25 ∗ 𝑓(0.25) + ∗ 0.5 ∗ 𝑓(0.5) + ∗ 0.75 ∗ 𝑓(0.75)} +
4∗2 8 8 8 8 8
∗ 1 ∗ 𝑓(1)}
x F(x)
0 0
0,25 0,0683690816711561000
0,5 0,2734763266846240000
0,75 0,8855207631748850000
1 3,0000000000000000000
1 1
≈ { ∗0∗0+2
4∗2 8
1 1
∗ { ∗ 0.25 ∗ 0,0683690816711561000 + ∗ 0.5 ∗ 0,2734763266846240000
8 8
1 1
+ ∗ 0.75 ∗ 0,8855207631748850000} + ∗ 1 ∗ 3}
8 8
≈ 0.07243659394191452421875
√0.9𝑦
6. Solucionar la ecuación de valor inicial 𝑦′ = 𝑥 1,125 +1 , usando el Método
de Euler con:
Se halla el valor de 𝑥1 𝑦 𝑦1
Solución analítica (con ayuda de herramienta Wolfram)
√0.9𝑦
𝑦′ =
𝑥1,125 + 1
𝑑𝑦 √0.9𝑦
= 1,125
𝑑𝑥 𝑥 +1
1 1
𝑑𝑦 = 1,125 𝑑𝑥
√0.9𝑦 𝑥 +1
1 1
∫ 𝑑𝑦 = ∫ 1,125 𝑑𝑥
√0.9𝑦 𝑥 +1
1
∫(0.9𝑦)−2 𝑑𝑦 = ∫(𝑥1,125 + 1)−1 𝑑𝑥
2
√𝑦 = ∫(𝑥1,125 + 1)−1 𝑑𝑥
3
2 8
√𝑦 = 0.444444(−1.36808 tan−1(2.74748 − 2.9238 √𝑥)
3
8 8
− 3.4641 tan−1(0.57735 − 1.1547 √𝑥) − 2 log( √𝑥 + 1)
4 8 4 8
+ 1.87939 log( √𝑥 − 1.87939 √𝑥 + 1) + log( √𝑥 − √𝑥 + 1)
4 8
− 0.347296 log( √𝑥 − 0.347296 √𝑥 + 1)
4 8
− 1.53209 log( √𝑥 − 1.53209 √𝑥 + 1)
8
+ 3.93923tan−1 (1.01543 √𝑥 + 0.176327)
8
+ 2.57115tan−1 (1.55572 √𝑥 + 1.19175))
3 8
𝑦 = ( (0.444444(−1.36808 tan−1(2.74748 − 2.9238 √𝑥)
2
8 8
− 3.4641 tan−1(0.57735 − 1.1547 √𝑥) − 2 log( √𝑥 + 1)
4 8 4 8
+ 1.87939 log( √𝑥 − 1.87939 √𝑥 + 1) + log( √𝑥 − √𝑥 + 1)
4 8
− 0.347296 log( √𝑥 − 0.347296 √𝑥 + 1)
4 8
− 1.53209 log( √𝑥 − 1.53209 √𝑥 + 1)
8
+ 3.93923tan−1 (1.01543 √𝑥 + 0.176327)
2
−1 8
+ 2.57115tan (1.55572 √𝑥 + 1.19175)))) + 𝑐
Solución numérica
𝑥1 = 𝑥0 + ℎ = 0 + 0.59 = 0.59
√0.9(4)
𝑦1 = 𝑦0 + ℎ𝑓(𝑥0 , 𝑦0 ) = 4 + 0.59 ∗ = 4 + 1.119446291699606284
01,125 + 1
𝑦1 = 5.119446291699606284
x y h
1 0 4 0,59
2 0,59 5,119446292 0,59
3 1,18 5,935271641 0,59
4 1,77 6,553786919 0,59
5 2,36 7,047733161 0,59
6 2,95 7,457373468 0,59
7 3,54 7,806574271 0,59
8 4,13 8,110476746 0,59
9 4,72 8,37923463 0,59
10 5,31 8,619967131 0,59
7. Aplicar el Método de Taylor de orden dos a la ecuación y´ = Cos(xy),
con la condición inicial:
𝑦0 = 𝑦(0)
̅̅̅
ℎ2 ′
𝑦̅𝑗11 = 𝑦̅𝑗 + ℎ𝑓(𝑥𝑖 , 𝑦𝑖 ) + [𝑓 𝑥(𝑥𝑖 , 𝑦𝑖 ) + 𝑓 ′ 𝑦(𝑥𝑖 , 𝑦𝑖 ) 𝑓 (𝑥𝑖 , 𝑦𝑖 )]
2
𝑦 ′ = 𝑐𝑜𝑠(𝑥𝑦) = 𝑓(𝑥, 𝑦)
𝑦(0) = 1
ℎ = 0.19 [0,1]
𝑓 ′ 𝑥(𝑥 , 𝑦 ) = −𝑦𝑠𝑒𝑛(𝑥𝑦)
𝑓 ′ 𝑦(𝑥 , 𝑦) = −𝑥𝑠𝑒𝑛(𝑥𝑦)
𝑦0 = 1
𝐼𝑡𝑒𝑟𝑎𝑐𝑖ó𝑛 1 𝑥=0 𝑦0 = 1
0.192
𝑦̅𝑖 = 1 + 0.19 𝑐𝑜𝑠 (𝑜 (1)) + [−1 𝑠𝑒𝑛(0(1)) − 0 𝑠𝑒𝑛(0(1))𝑐𝑜𝑠(0(1))]
2
0.192
𝑦1 = 1 + 0.19 +
̅̅̅ [−0 − 0]
2
= 1 + 0.19 = 1.19
𝐼𝑡𝑒𝑟𝑎𝑐𝑖ó𝑛 2
𝑥 = 0.19 𝑦1 = 1.19
0.192
𝑦2 = 1.19 + 0.19 𝑐𝑜𝑠 (0.19(1.19)) +
̅̅̅ [−1.19 𝑠𝑒𝑛 (0.19(1.19))
2
− 0.19 𝑠𝑒𝑛 (0.19(1.19))𝑐𝑜𝑠 (0.19(1.19))]
0.192
𝑦2 = 1.19 + 0.18999852062295 +
̅̅̅ (−0.00544572145397306077077115)
2
𝑦2 = 1.3799002253507
̅̅̅
𝐼𝑡𝑒𝑟𝑎𝑐𝑖ó𝑛 3
𝑥2 = 0.38 ̅̅̅
𝑦2 = 1.3799002253507
x y h
1 0 1 0,19
2 0,19 1,19 0,19
3 0,38 1,37990022535063 0,19
4 0,57 1,56960155592214 0,19
5 0,76 1,75897538901489 0,19
6 0,95 1,94786301389718 0,19
7 1,14 2,13607518228023 0,19
8 1,33 2,32339193662662 0,19
9 1,52 2,50956276250914 0,19
10 1,71 2,69430713349520 0,19
Solución analítica
𝑑𝑦
= (𝑥 + 0,9)(𝑦 + 1,08)𝑠𝑒𝑛(𝑥 2 + 2,005𝑥)
𝑑𝑥
1
∫ 𝑑𝑦 = ∫(𝑥 + 0,9)𝑠𝑒𝑛(𝑥 2 + 2,005𝑥)𝑑𝑥
(𝑦 + 1,08)
Solución numérica
𝑑𝑦
= 𝑓(𝑥, 𝑦), 𝑦(𝑥𝑜 ) = 𝑦𝑜
𝑑𝑥
Fórmulas
𝑥𝑖+1 = 𝑥𝑖 + ℎ
𝑦𝑖+1 = 𝑦𝑖 + (𝑎1 𝑘1 + 𝑎2 𝑘2 )ℎ
Donde
𝑘1 = 𝑓(𝑥𝑖 , 𝑦𝑖 )
𝑘2 = 𝑓(𝑥𝑖 + 𝑝1 ℎ, 𝑦𝑖 + 𝑞11 𝑘1 ℎ)
También
𝑎1 = 1 − 𝑎2
1
𝑝1 =
2𝑎2
1
𝑞11 =
2𝑎2
1. Ralston
2
𝑎2 =
3
2 1
𝑎1 = 1 − 𝑎2 = 1 − =
3 3
1 1 3
𝑞11 = 𝑝1 = = =
2
2𝑎2 2 ( ) 4
3
1 2
𝑦𝑖+1 = 𝑦𝑖 + ( 𝑘1 + 𝑘2 ) ℎ
3 3
𝑘1 = 𝑓(𝑥𝑖 , 𝑦𝑖 )
3 3
𝑘2 = 𝑓 (𝑥𝑖 + ℎ, 𝑦𝑖 + 𝑘1 ℎ)
4 4
h = 0.59
y(0) = 3
𝑑𝑦
= (𝑥 + 0,9)(𝑦 + 1,08)𝑠𝑒𝑛(𝑥 2 + 2,005𝑥)
𝑑𝑥
Primer paso 𝑥𝑜 = 0 𝑦𝑜 = 3
1 2
𝑦1 = 𝑦𝑜 + ( 𝑘1 + 𝑘2 ) ℎ
3 3
1 2
𝑦1 = 3 + ( ∗ 0 + ∗ 0.1035289807534944) 0.59
3 3
𝑦1 = 3.040721399096374464
𝑥1 = 𝑥𝑜 + ℎ = 0 + 0.59 = 0.59
Podemos decir que 𝑦(0,59) = 3.040721399096374464 es una solución exacta
del ejercicio de integración planteado. Se simula para 10 valores de x dando
como resultado la siguiente tabla:
x k1 k2 y (numerica) h
1 0 3 0,59
2 0,59 0 0,10352898 3,04072139910 0,59
3 1,18 0,16404937 0,44334685 3,24736753846 0,59
4 1,77 0,58998972 1,18686543 3,83023258698 0,59
5 2,36 1,52544332 2,81867821 5,23891653554 0,59
6 2,95 3,68376148 6,85707707 8,66050660904 0,59
7 3,54 9,46376589 18,7835507 17,90991050931 0,59
8 4,13 28,3242823 62,2219995 47,95433915087 0,59
9 4,72 105,550824 262,568782 171,98972208954 0,59
10 5,31 511,707451 1457,65306 845,96905897130 0,59