Documentos de Académico
Documentos de Profesional
Documentos de Cultura
CÓDIGO: 100401A_761
Presentado a:
Entregado por:
Código: 1032437326
Código: 1214726460
Grupo: 67
30/03/2020
Medellín
INTRODUCCION
Sabemos que
𝑥𝑖−1 = 𝑥𝑖 − ℎ
𝑥𝑖 = 𝑥𝑖
𝑥𝑖+1 = 𝑥𝑖 + ℎ
Calculamos por excel
Hacia delante
Primera aproximación
𝑓(𝑥𝑖+1 ) − 𝑓(𝑥𝑖 )
𝑓 ′ (𝑥) = + 𝑂(ℎ)
ℎ
Segunda aproximación
Central
Primera aproximación
𝑓(𝑥𝑖+1 ) − 𝑓(𝑥𝑖−1 )
𝑓 ′ (𝑥) =
2ℎ
Segunda aproximación
𝑓(𝑥𝑖 ) − 𝑓(𝑥𝑖−1 )
𝑓 ′ (𝑥) =
ℎ
Segunda aproximación
Primera -
aproximación 0,19098301
Hacia Atrás
Segunda -
aproximación 0,36474508
Primera
aproximación 0
Central
Segunda
aproximación 0
Primera
Hacia aproximación 1,90983006
delante Segunda
aproximación 0,36474508
Como no podemos dar cuenta la derivada por diferencias finitas con h=0.2, no
se acerca en lo más mínimo a la respuesta real por lo cual cambiamos el h a
0.01
ℎ = 0.01
Primera -
aproximacion 0,00049344
Hacia Atrás
Segunda -2,4348E-
aproximacion 06
Primera
aproximacion 0
Central
Segunda -1,8504E-
aproximacion 16
Primera
Hacia aproximacion 0,0049344
delante Segunda
aproximacion 2,4348E-06
Central -1,85037E-16
Hacias adelante -2,43483E-06
Problema 2:
Desafío 3: Dada la función 𝑓(𝑥) = cot (10𝑥), encuentre 𝑓′(0.175) usando las
representaciones de diferencias finitas hacia adelante, atrás y central, con ℎ =
0.075 compare los resultados obtenidos con la solución analítica. ¿Tienen sentido
las respuestas obtenidas? Haga un análisis basado en la teoría y el conocimiento
de la función acerca de lo que sucede en este caso.
Solución
Punto f(Punto)
xi+3 0,4 0,863691154
xi+1 0,25 -1,338648128
xi+2 0,325 9,188302971
xi 0,175 -0,181146953
xi-1 0,1 0,642092616
xi-2 0,025 3,916317365
xi-3 -0,05 -1,830487722
Centradas Error
Resultado dos Puntos -13,2049383 2,87679611
Resultado tres Puntos -23,4643462 13,136204
Análisis
Graficando la función:
Desafío 5:
x f(x)
0,00 1,00
0,50 0,80
1,00 0,20
1,50 0,25
2,00 0,31
2,50 0,38
3,00 0,44
h 0,25
𝑓 𝑥 𝑖+1 − 𝑓(𝑥𝑖 )
Adelante 𝑓 ′ 𝑥𝑖 =
ℎ
𝑓 𝑥 𝑖 − 𝑓(𝑥𝑖−1 )
𝑓 ′ 𝑥𝑖 =
Atrás ℎ
𝑓 𝑥 𝑖+1 − 𝑓(𝑥𝑖−1 )
Central 𝑓 ′ 𝑥𝑖 =
2ℎ
Adelante 0,240000
Atrás 0,200000
Central 0,013750
Problema 1:
𝝅/𝟐
𝒔𝒆𝒏(𝒙)
∫ 𝑑𝑥
𝟎 𝟏 + 𝒙𝟐
Integración Simple
Integración Compuesta
𝜋
𝑏−𝑎 2−0
ℎ= = = 0.39269908
𝑛 4
𝝅/𝟐
𝒔𝒆𝒏(𝒙)
∫ 𝑑𝑥
𝟎 𝟏 + 𝒙𝟐
ℎ
≅ [𝑓(𝑎) + 2𝑓(𝑎 + ℎ) + 2𝑓(𝑎 + 2ℎ) + 2𝑓(𝑎 + 3ℎ) + 𝑓(𝑎 + 4ℎ)]
2
𝝅/𝟐
𝒔𝒆𝒏(𝒙) 1
∫ 𝟐
𝑑𝑥 ≅ ℎ[𝑓(𝑥0 ) + 4𝑓(𝑥1 ) + 2𝑓(𝑥2 ) + 4𝑓(𝑥3 ) + 𝑓(𝑥4 )]
𝟎 𝟏+𝒙 3
𝝅/𝟐
𝒔𝒆𝒏(𝒙) 3
∫ 𝟐
𝑑𝑥 ≅ ℎ[𝑓(𝑥0 ) + 3𝑓(𝑥1 ) + 3𝑓(𝑥2 ) + 3𝑓(𝑥3 ) + 𝑓(𝑥4 )]
𝟎 𝟏+𝒙 8
valor de la
a b # Trapecios # puntos h integral
0 1,57079633 6 7 0,261799388 0,526978558
Problema 2:
𝟑
∫ 𝟐𝒍𝒏(𝟑𝒙)𝑑𝑥
𝟏
Problema 3:
𝜋
2 1
∫ 𝑑𝑥
1 1 + sin (𝑥)
Solución
𝑛−2 𝑛−2
𝑏 2 2
(𝑏 − 𝑎)
∫ 𝑓(𝑥)𝑑𝑥 ≈ 𝑓(𝑎) + 𝑓(𝑏) + 4 ∑ 𝑓(𝑥2𝑘+1 ) + 2 ∑ 𝑓(𝑥2𝑘 )
𝑎 3𝑛
𝑘=0 𝑘=1
( )
Donde
𝑖(𝑏 − 𝑎)
𝑥𝑖 = 𝑎 +
6
Con Excel se obtiene:
xi f(xi) Resultado
0 1 0,543044125
1 1,09513272 0,529383698
2 1,19026544 0,518546439
3 1,28539816 0,510321344 0,29340816
4 1,38053088 0,50455256
5 1,47566361 0,501132988
6 1,57079633 0,5
𝑏−𝑎
Donde 𝑥𝑘 = 𝑎 + 𝑘 ( )
𝑛
Análisis:
Buscando los errores de los métodos sobre el resultado original:
Resultado
Método Resultado Error
Original
Trapecio
0,29352812 0,00012013
compuesto
3/8
0,29340836 3,6451E-07
compuesto
Problema 5
3
ln (𝑥)
∫ 𝑑𝑥
1 𝑥
a 1
b 3
n 6
h 0,33333333
k a+k*h f(a+hk)
0 1,000000 0,000000
1 1,333333 0,215762
2 1,666667 0,306495
3 2,000000 0,346574
4 2,333333 0,363128
5 2,666667 0,367811
6 3,000000 0,366204
a) Método de Euler
𝑡=1
𝑥=1
ℎ = 0.1
𝑡𝑛+1 = 𝑡𝑛 + ℎ
𝑥𝑛+1 = 𝑦𝑛 + ℎ 𝑓(𝑥𝑛 , 𝑦𝑛 )
d) Método de Euler
EDO
xEuler xRalston xRungeKutta4
900,98
800,98
700,98
600,98
500,98
400,98
300,98
200,98
100,98
0,98
0 0,1 0,2 0,3 0,4 0,5 0,6
Tomando h=0,01
De todas formas cuando el valor está cercano al 0,3 los valores se
tornan muy grandes y el valor de exp(k) se torma tan grande que excel
sigue arrojando #NUM
EDO 2
2,35
2,15
1,95
1,75
1,55
1,35
1,15
0,95
0 0,05 0,1 0,15 0,2 0,25
Tomando valores más grande de h, evidentemente el error de NUM afectara más rápido
Jhon Edisson Martinez
Problema 3
𝑥 ′ (𝑡) = cos (𝑥), 𝑥(0) = 2𝜋
g) Método de Euler
Método de Euler
𝑥𝑖 = 𝑥𝑖−1 + ℎ
{
𝑦𝑖 = 𝑦𝑖−1 + ℎ𝑓(𝑥𝑖−1 , 𝑦𝑖−1 )
Sabemos que 𝑓(𝑥, 𝑡) = cos (𝑥), por otro lado 𝑥0 = 0, 𝑡0 = 2𝜋, empleando
Excel para hacer el proceso iterativo hasta 5h, se tiene que :
Iteraciones xi yi
0 0 6,28318531
1 0,1 6,38318531
2 0,2 6,48268572
3 0,3 6,58070229
4 0,4 6,67630903
5 0,5 6,76868072
𝑥𝑖+1 = 𝑥𝑖 + ℎ
{ 1 2
𝑦𝑖+1 = 𝑦𝑖 + ℎ ( 𝑘1 + 𝑘2 )
3 3
Donde
𝑘1 = 𝑓(𝑥𝑖 , 𝑦𝑖 )
3 3
𝑘2 = 𝑓 (𝑥𝑖 + ℎ, 𝑦𝑖 + 𝑘1 ℎ)
4 4
Sabemos que 𝑓(𝑥, 𝑡) = cos (𝑥), por otro lado 𝑥0 = 0, 𝑡0 = 2𝜋, empleando
Excel para hacer el proceso iterativo hasta 5h, se tiene que:
xi yi k_i1 k_i2
0 6,283185 0,1 0,09988
0,1 6,38306 0,099502 0,09888
0,2 6,481943 0,098031 0,09695
0,3 6,578889 0,095660 0,09416
0,4 6,673046 0,092496 0,09064
0,5 6,763686
𝑥𝑖+1 = 𝑥𝑖 + ℎ
{ 1
𝑦𝑖+1 = 𝑦𝑖 + ℎ(𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 )
6
Donde
𝑘1 = 𝑓(𝑥𝑖 , 𝑦𝑖 )
1 1
𝑘2 = 𝑓 (𝑥𝑖 + ℎ, 𝑦𝑖 + 𝑘1 ℎ)
2 2
1 1
𝑘3 = 𝑓 (𝑥𝑖 + ℎ, 𝑦𝑖 + 𝑘2 ℎ)
2 2
𝑘4 = 𝑓(𝑥𝑖 + ℎ, 𝑦𝑖 + 𝑘3 ℎ)
Sabemos que 𝑓(𝑥, 𝑡) = cos (𝑥), por otro lado 𝑥0 = 0, 𝑡0 = 2𝜋, empleando
Excel para hacer el proceso iterativo hasta 5h, se tiene que:
Solución
Si el valor de h disminuye implica que el valor se acerca más al valor real
de la ecuación diferencial, pues a mayor número de iteraciones mayor
efectividad del método. De forma inversa si el tamaño de h aumenta, se
tiene una diferencia mayor en cada iteración, y por ende la respuesta se
aleja un poco de la respuesta real.
Error
0,102
0,1
0,098
0,096
0,094
0,092
0,09
0,088
0,086
0,084
1 2 3 4 5
Problema 5
𝑦 ′ (𝑡) = −𝑦(𝑡), 𝑦(0) = 0
t0 0
y(t0) 2
h 0,1
a 0
b 5
n ti y f(x,y)
0 0,0 2,00000 0,000000
1 0,1 2,00000 -0,200000
2 0,2 2,00000 -0,400000
3 0,3 0,00000 0,000000
4 0,4 0,00000 0,000000
5 0,5 0,00000 0,000000
6 0,6 0,00000 0,000000
7 0,7 0,00000 0,000000
8 0,8 0,00000 0,000000
9 0,9 0,00000 0,000000
10 1,0 0,00000 0,000000
11 1,1 0,00000 0,000000
12 1,2 0,00000 0,000000
13 1,3 0,00000 0,000000
14 1,4 0,00000 0,000000
15 1,5 0,00000 0,000000
16 1,6 0,00000 0,000000
17 1,7 0,00000 0,000000
18 1,8 0,00000 0,000000
19 1,9 0,00000 0,000000
20 2,0 0,00000 0,000000
21 2,1 0,00000 0,000000
22 2,2 0,00000 0,000000
23 2,3 0,00000 0,000000
24 2,4 0,00000 0,000000
25 2,5 0,00000 0,000000
26 2,6 0,00000 0,000000
27 2,7 0,00000 0,000000
28 2,8 0,00000 0,000000
29 2,9 0,00000 0,000000
30 3,0 0,00000 0,000000
31 3,1 0,00000 0,000000
32 3,2 0,00000 0,000000
33 3,3 0,00000 0,000000
34 3,4 0,00000 0,000000
35 3,5 0,00000 0,000000
36 3,6 0,00000 0,000000
37 3,7 0,00000 0,000000
38 3,8 0,00000 0,000000
39 3,9 0,00000 0,000000
40 4,0 0,00000 0,000000
41 4,1 0,00000 0,000000
42 4,2 0,00000 0,000000
43 4,3 0,00000 0,000000
44 4,4 0,00000 0,000000
45 4,5 0,00000 0,000000
46 4,6 0,00000 0,000000
47 4,7 0,00000 0,000000
48 4,8 0,00000 0,000000
49 4,9 0,00000 0,000000
50 5,0 0,00000 0,000000
b) Método de Runge – Kutta de orden 2
METODO DE RUNGE- KUTTA 2DO. ORDEN
n ti y k1 t+h/2 y+k1h/2 k2
0 0,0 2,000000 0,000000 0,050000 2,000000 -0,100000
1 0,1 1,996667 -0,199667 0,100000 1,996667 -0,199667
2 0,2 1,996667 -0,399333 2,700000 0,998333 -2,695500
3 0,3 -2,828611 0,848583 0,300000 -2,828611 0,848583
4 0,4 -2,828611 1,131444 0,400000 -2,828611 1,131444
5 0,5 -2,828611 1,414306 0,000000 0,000000 0,000000
6 0,6 0,000000 0,000000 0,600000 0,000000 0,000000
7 0,7 0,000000 0,000000 0,750000 0,000000 0,000000
8 0,8 0,000000 0,000000 0,900000 0,000000 0,000000
9 0,9 0,000000 0,000000 1,050000 0,000000 0,000000
10 1,0 0,000000 0,000000 1,200000 0,000000 0,000000
11 1,1 0,000000 0,000000 1,350000 0,000000 0,000000
12 1,2 0,000000 0,000000 1,500000 0,000000 0,000000
13 1,3 0,000000 0,000000 1,650000 0,000000 0,000000
14 1,4 0,000000 0,000000 1,800000 0,000000 0,000000
15 1,5 0,000000 0,000000 1,950000 0,000000 0,000000
16 1,6 0,000000 0,000000 2,100000 0,000000 0,000000
17 1,7 0,000000 0,000000 2,250000 0,000000 0,000000
18 1,8 0,000000 0,000000 2,400000 0,000000 0,000000
19 1,9 0,000000 0,000000 2,550000 0,000000 0,000000
20 2,0 0,000000 0,000000 2,700000 0,000000 0,000000
21 2,1 0,000000 0,000000 2,850000 0,000000 0,000000
22 2,2 0,000000 0,000000 3,000000 0,000000 0,000000
23 2,3 0,000000 0,000000 3,150000 0,000000 0,000000
24 2,4 0,000000 0,000000 3,300000 0,000000 0,000000
25 2,5 0,000000 0,000000 3,450000 0,000000 0,000000
26 2,6 0,000000 0,000000 3,600000 0,000000 0,000000
27 2,7 0,000000 0,000000 3,750000 0,000000 0,000000
28 2,8 0,000000 0,000000 3,900000 0,000000 0,000000
29 2,9 0,000000 0,000000 4,050000 0,000000 0,000000
30 3,0 0,000000 0,000000 4,200000 0,000000 0,000000
31 3,1 0,000000 0,000000 4,350000 0,000000 0,000000
32 3,2 0,000000 0,000000 4,500000 0,000000 0,000000
33 3,3 0,000000 0,000000 4,650000 0,000000 0,000000
34 3,4 0,000000 0,000000 4,800000 0,000000 0,000000
35 3,5 0,000000 0,000000 4,950000 0,000000 0,000000
36 3,6 0,000000 0,000000 5,100000 0,000000 0,000000
37 3,7 0,000000 0,000000 5,250000 0,000000 0,000000
38 3,8 0,000000 0,000000 5,400000 0,000000 0,000000
39 3,9 0,000000 0,000000 5,550000 0,000000 0,000000
40 4,0 0,000000 0,000000 5,700000 0,000000 0,000000
41 4,1 0,000000 0,000000 5,850000 0,000000 0,000000
42 4,2 0,000000 0,000000 6,000000 0,000000 0,000000
43 4,3 0,000000 0,000000 6,150000 0,000000 0,000000
44 4,4 0,000000 0,000000 6,300000 0,000000 0,000000
45 4,5 0,000000 0,000000 6,450000 0,000000 0,000000
46 4,6 0,000000 0,000000 6,600000 0,000000 0,000000
47 4,7 0,000000 0,000000 6,750000 0,000000 0,000000
48 4,8 0,000000 0,000000 6,900000 0,000000 0,000000
49 4,9 0,000000 0,000000 7,050000 0,000000 0,000000
50 5,0 0,000000 0,000000 7,200000 0,000000 0,000000
c) Método de Runge – Kutta de orden 4
METODO DE RUNGE- KUTTA 4DO. ORDEN
El método que permite calcular con gran exactitud, así como la serie de
Taylor de tal manera que no se debe calcular derivadas superiores.