Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Trapecio
Simpson
Euler
Runge Kutta
Grupo: 2SM1
Equipo 5
Alumno
1. Castro Delgado Aldo Javier
Mtodos Numricos
Mtodos Numricos
Mtodo del Trapecio
Problema 1
Sea la funcin
o
[1,3]
f ( x )=x
f ( x )=x 4
[1,3]
n=5
Calcular
x 5x 0 3(1 )
=
=0.8
5
5
4
f ( x 0 ) + f ( x 0 ) n1
A T =h
+ f ( x i )
2
i =1
1+81
+0.0016+ 0.1296+3.8416+23.4256=54.71872
2
A T =0.8
x 4 dx=
1
Mtodos Numricos
x
3 1 243 1 244
3=
=
=
5 1 5
5
5
5
5
|2445 54.71872|=5.91872=592
Err=
Problema 2
Sea la funcin
[1,10 ] y
f ( x )=1x
e interpretar grficamente
Datos
f ( x )=1x
[1,10 ]
n=5
Calcular
f ( x 0=1 ) =1(1)=0
f ( x 5=10 )=1 (10 )=9
h=
x 5x 0 (10 )( 1 )
=
=1.8
5
5
Mtodos Numricos
Evaluar
A T =h
f ( x 0 ) + f ( x 0 ) n1
+ f ( x i )
2
i =1
( 0 )+ (9 )
1.83.65.47.2=40.5
2
A T =1.8
10
Err=|40.540.5|=0=0
][ ]
1
12
100
=[10100][ 10.5 ] =10
1+0.5=401+ 0.5=40.
2
2
Mtodos Numricos
Problema 3
Sea la funcin
[0, ]
e interpretar grficamente
Datos
f ( x )=sin x
[0, ]
n=5
Calcular
x 5x 0 ( ) ( 0 )
=
=
5
5
5
x 1=x 0+ h=0+ 1
( 5 )= 5 f ( 5 )=sin 5 =0.587785252
( 5 )= 25 f ( 25 )=sin 25 =0.951056516
x 2=x 0+ 2h=0+2
( 5 )= 35 f ( 35 )=sin 35 =0.951056516
x 3=x 0+ 3 h=0+ 3
x 4=x 0 + 4 h=0+4
( 5 )= 45 f ( 45 )=sin 45 =0.587785252
Evaluar
A T =h
f ( x 0 ) + f ( x 0 ) n1
+ f ( x i )
2
i =1
( 0 )+ ( 0 )
+ 0.587785252+ 0.951056516+0.951056516+0.587785252=1.933765598
2
AT =
5
Err=|21.933765598|=0.066234402=6.62
Mtodos Numricos
Mtodos Numricos
Problema 4
Sea la funcin
[0, ]
e interpretar grficamente
Datos
f ( x )=cos x
[0, ]
n=5
Calcular
x 5x 0 ( ) ( 0 )
=
=
5
5
5
x 1=x 0+ h=0+ 1
( 5 )= 5 f ( 5 )=cos 5 =0.809016994
x 2=x 0+ 2h=0+2
( 5 )= 25 f ( 25 )=cos 25 =0.309016994
x 3=x 0+ 3 h=0+ 3
( 5 )= 35 f ( 35 )=cos 35 =0.309016994
x 4=x 0 + 4 h=0+4
( 5 )= 45 f ( 45 )=cos 45 =0.809016994
Evaluar
A T =h
AT =
f ( x 0 ) + f ( x 0 ) n1
+ f ( x i )
2
i =1
( 0 ) +( 0 )
+0.809016994+ 0.3090169940.3090169940.809016994 =0
5
2
Err=|00|=0=0
Mtodos Numricos
Mtodos Numricos
Problema 5
Sea la funcin
interpretar grficamente.
Datos
f ( x )=x 3
[1,5 ]
n=5
Calcular
f ( x 0=1 ) =(1)3 =1
f ( x 5=5 )=(5)3 =125
h=
x 5x 0 5( 1 )
=
=0.8
5
5
A T =h
f ( x 0 ) + f ( x 0 ) n1
+ f ( x i )
2
i =1
(1 ) + ( 125 )
+ 5.832+17.576+ 39.304+74.088=159.84
2
AT =0.8
5
x 4 5 54 14 625 1 624
x dx= 4 1= 4 4 = 4 4 = 4 =156
1
3
[1,5 ]
Err=|156159.84|=3.84=384
Mtodos Numricos
Mtodos Numricos
Mtodo de Simpson
Problema 1
f ( x )=x 4 , encontrar el rea bajo la curva en el interval
Sea la funcin
o
[1,3]
e interpretar grficamente.
Datos
f ( x )=x
[ x 0 , x 2 n ]=[ x 0 , x 10 ]=[1,3]
n=5
Calcular
4
f ( x 0 ) =(1 ) =1
f ( x 10 )=( 3 )4=81
Para
i=1, ,2 n1
2 n2
f ( x i ); f ( xi )
i=2
2 n1
f ( x2 n )
i=1
h=
x 2 nx 0 x 10x 0 3(1 ) 4
=
=
=
2n
10
10
10
4
x 1=x 0+ h=1+
4 3
3
1
=
f
=
=0.1296
10 5
5
10
( )( )
x 2=x 0+ 2h=1+ 2
x 3=x 0+ 3 h=1+3
x 4=x 0 + 4 h=1+ 4
Mtodos Numricos
x 5=x 0+ 5 h=1+5
x 6=x 0 +6 h=1+6
x 7=x 0+ 7 h=1+7
x 8=x 0+ 8 h=1+8
x 9=x 0 +9 h=1+9
f ( x 1 ) + f ( x 3 ) + f ( x5 ) + f ( x 7 ) + f ( x 9 ) =57.3264
f ( x 2 ) + f ( x 4 ) +f ( x 6 ) + f ( x8 ) =27.3984
Evaluar
2 n1
2 n2
h
A T = f ( x 0 ) + f ( x 2 n ) + 4 f ( x i ) +2 f ( xi )
3
i=1
i=2
4
10
AT =
( 1+81+ 4(57.3264)+2 ( 27.3984 )) =48.81365333
3
3
3 = 3 1
x 4 dx= x5 1
5
5
243 1
=48.8
5
5
Err=|48.8136533348.8|=0.013653333=1.36
Problema 2
Sea la funcin
[1,10 ] y
f ( x )=1x
e interpretar grficamente.
f ( x )=1x
[ x 0 , x 2 n ]=[ x 0 , x 10 ]=[1,10]
n=5
Calcular
f ( x 0 ) =1(1)=0
f ( x 10 )=1(10)=9
Para
i=1, ,2 n1
2 n2
f ( x i ); f ( xi )
i=2
2 n1
f ( x2 n )
i=1
h=
x 2 nx 0 x 10x 0 10( 1 ) 9
=
=
=
2n
10
10
10
x 1=x 0+ h=1+
9 19
19
19 9
= f
=1 =
10 10
10
10 10
( )
x 2=x 0+ 2h=1+2
x 3=x 0+ 3 h=1+3
x 4=x 0 + 4 h=1+ 4
x 5=x 0+ 5 h=1+5
x 6=x 0 +6 h=1+ 6
Mtodos Numricos
Mtodos Numricos
x 7=x 0+ 7 h=1+7
x 8=x 0+ 8 h=1+ 8
x 9=x 0 +9 h=1+ 9
f ( x 1 ) + f ( x 3 ) + f ( x5 ) + f ( x 7 ) + f ( x 9 ) =22.5
f ( x 2 ) + f ( x 4 ) +f ( x 6 ) + f ( x8 ) =18
Evaluar
AT =
2 n1
2 n2
h
f ( x 0 ) + f ( x 2 n ) + 4 f ( x i ) +2 f ( xi )
3
i=1
i=2
9
10
AT =
( 09+ 4(22.5)+2 (18 ) ) =40.5
3
10
][ ]
2
1
100
=[10100][ 10.5 ] =10
1+0.5=401+ 0.5=40.
2
2
Err=|40.540.5|=0=0
Problema 3
Sea la funcin
[0, ]
e interpretar grficamente
Datos
f ( x )=sin x
[ x 0 , x 2 n ]=[ x 0 , x 10 ]=[0, ]
n=5
Calcular
f ( x 0 ) =sin 0=0
f ( x 10 )=sin =0
Para
i=1, ,2 n1
2 n2
f ( x i ); f ( xi )
i=2
2 n1
f ( x2 n )
i=1
h=
x 2 nx 0 x 10x 0 0
=
=
=
2n
10
10
10
x 1=x 0+ h=0+
= f
=sin =0.30901699
10 10
10
10
( )
x 2=x 0+ 2h=0+2
x 3=x 0+ 3 h=0+ 3
x 4=x 0 + 4 h=0+4
x 5=x 0+ 5 h=0+5
x 6=x 0 +6 h=0+6
x 7=x 0+ 7 h=0+7
x 8=x 0+ 8 h=0+8
x 9=x 0 +9 h=0+9
Mtodos Numricos
Mtodos Numricos
f ( x 1 ) + f ( x 3 ) + f ( x5 ) + f ( x 7 ) + f ( x 9 ) =3.236067977
f ( x 2 ) + f ( x 4 ) +f ( x 6 ) + f ( x8 ) =3.077683537
Evaluar
2 n1
2 n2
h
A T = f ( x 0 ) + f ( x 2 n ) + 4 f ( x i ) +2 f ( xi )
3
i=1
i=2
10
AT =
( 0+ 0+4 (3.236067977)+ 2 ( 3.077683537 )) =2.000109517
3
10
Err=|22.000109517|=0.000109517=0.01
Problema 4
Sea la funcin
[0, ]
e interpretar grficamente
Datos
f ( x )=cos x
[ x 0 , x 2 n ]=[ x 0 , x 10 ]=[0, ]
n=5
Calcular
f ( x 0 ) =cos 0=1
f ( x 10 )=sin =1
Para
i=1, ,2 n1
f ( x i ); f ( xi )
i=2
2 n1
f ( x2 n )
i=1
h=
x 2 nx 0 x 10x 0 0
=
=
=
2n
10
10
10
x 1=x 0+ h=0+
= f
=cos =0.951056516
10 10
10
10
( )
x 2=x 0+ 2h=0+2
x 3=x 0+ 3 h=0+ 3
x 4=x 0 + 4 h=0+4
x 5=x 0+ 5 h=0+5
x 6=x 0 +6 h=0+6
x 7=x 0+ 7 h=0+7
x 8=x 0+ 8 h=0+8
x 9=x 0 +9 h=0+9
f ( x 1 ) + f ( x 3 ) + f ( x5 ) + f ( x 7 ) + f ( x 9 ) =0
f ( x 2 ) + f ( x 4 ) +f ( x 6 ) + f ( x8 ) =0
Mtodos Numricos
Mtodos Numricos
Evaluar
AT =
2 n1
2 n2
h
f ( x 0 ) + f ( x 2 n ) + 4 f ( x i ) +2 f ( xi )
3
i=1
i=2
10
AT=
( 11+ 4( 0)+ 2 ( 0 )) =0
3
10
Err=|00|=0=0
Problema 5
Sea la funcin
y
interpretar grficamente.
Datos
f ( x )=x 3
[ x 0 , x 2 n ]=[ x 0 , x 10 ]=[1,5]
n=5
Calcular
f ( x 0 ) =( 1 )3 =1
3
f ( x 10 )=( 5 ) =125
Para
i=1, ,2 n1
2 n2
f ( x i ); f ( xi )
i=2
2 n1
f ( x2 n )
i=1
h=
x 2 nx 0 x 10x 0 5( 1 ) 4
=
=
=
2n
10
10
10
[1,5 ]
x 1=x 0+ h=1+
Mtodos Numricos
4
3
=1.4 f ( 1.4 ) =( 1.4 ) =2.744
10
x 2=x 0+ 2h=1+2
x 3=x 0+ 3 h=1+3
x 4=x 0 + 4 h=1+ 4
x 5=x 0+ 5 h=1+5
x 6=x 0 +6 h=1+ 6
x 7=x 0+ 7 h=1+7
x 8=x 0+ 8 h=1+ 8
x 9=x 0 +9 h=1+ 9
f ( x 1 ) + f ( x 3 ) + f ( x5 ) + f ( x 7 ) + f ( x 9 ) =192.6
f ( x 2 ) + f ( x 4 ) +f ( x 6 ) + f ( x8 ) =136.8
Evaluar
AT =
2 n1
2 n2
h
f ( x 0 ) + f ( x 2 n ) + 4 f ( x i ) +2 f ( xi )
3
i=1
i=2
4
10
AT =
( 1+125+ 4(192.6)+2 ( 136.8 ) )=156
3
x 3 dx=
1
Mtodos Numricos
x 5 5 1 625 1 624
= =
=
=156
4 1 4 4
4
4
4
Err=|156156|=0=0
Mtodo de Euler
Problema 1
Encontrar la solucin aproximada de las siguientes ecuaciones diferenciales, en
los intervalos dados y condiciones iniciales indicadas.
Ecuacion
f (x , y )
1
y ' = ( 1+ x ) y 2
2
Intervalo de anlisis
[0,0.5]
Condicion inicial
xi
y
y )= i
1
Iteraciones n
5
Solucion aproximada Euler
1.3898
Datos
[ x i , x f ] [ 0,0.5]
y ( xi ) = y i y ( 0 )=1
h=
x f x i 0.50 1
=
=
n
5
10
n=1
y i+1
Mtodos Numricos
y = y + hf ( x i , y i)
x i=0 i+1 i
1
y i=1 f ( x , y )= ( 1+ x ) y 2
2
| |
21
1
1 1
21 20
1
2
y i+1=1+
( 1+ 0 ) 1 = ,
= 100=4.76
10 2
20
21
21
20
n=2
y i+1=1.05+
1 1
( 1+0.1 ) 1.05 2 =1.1106375 ,
10 2
21
20
= 0.054597022100=5.46
1.1106375
1.1106375
n=3
y i+1=1.1106375 +
1 1
1.1846484391.1106375
( 1+0.2 ) 1.11063752 =1.184648439 ,
=0.062475024100
10 2
1.184648439
n=4
y i+1=1.184648439+
1 1
1.2758689151.184648439
( 1+ 0.3 ) 1.1846484392 =1.275868915 ,
=0.0714967
10 2
1.275868915
n=5
y i+1=1.275868915+
n
1
2
3
4
5
xi
0
0.1
0.2
0.3
0.4
1 1
1.3898178191.275868915
( 1+ 0.4 ) 1.2758689152 =1.389817819,
=0.0819883
10 2
1.389817819
yi
1
1.05
1.1106375
1.184648439
1.275868915
y i+1
1.05
1.1106375
1.184648439
1.275868915
1.389817819
Error %
4.76%
5.46%
6.25%
7.15%
8.20%
Mtodos Numricos
Problema 2
Encontrar la solucin aproximada de las siguientes ecuaciones diferenciales, en
los intervalos dados y condiciones iniciales indicadas.
Ecuacin
f (x , y )
y ' =x 2 y
Intervalo de anlisis
[0,1]
Condicin inicial
xi
y
y )= i
1
Iteraciones n
5
Solucion aproximada Euler
y i+1
0.5379
Datos
[ x i , x f ] [ 0,1]
y ( xi ) = y i y ( 0 )=1
h=
x f x i 10 1
=
=
n
5
5
n=1
1
0.81
y i+1=1+ ( 021 ) =0.8 ,
=0.25100=25
5
0.8
Mtodos Numricos
n=2
1
0.6480.8
y i+1=0.8+ ( 0.221 ) =0.648 ,
=0.234567901100=23.46
5
0.648
n=3
1
0.55040.648
y i+1=0.648+ ( 0.4 21 )=0.5504 ,
=0.177325581100=17.73
5
0.5504
n=4
1
0.512320.5504
y i+1=0.5504+ ( 0.6 21 )=0.51232,
=0.074328545100=7.43
5
0.51232
n=5
1
0.5378560.51232
y i+1=0.51232+ ( 0.821 ) =0.537856 ,
=0.047477392100=4.75
5
0.537856
Metodo de Runge-Kutta
Problema 1
y ' =3 x+3 y
[ 0,0.5 ] y i =1n=5
n=1
x i=0 y i=1
h=
0.50
=0.1
5
y i+1= yi + f ( x i , y i )h
y i+1=1+ 0.1 ( 3 ( 0 ) +3 ( 1 ) ) =1.3
100=23.07
|1.31
1.3 |
n=2
n=4
|3.04482.296
|100=24.59
3.0448
n=5
|4.07823.0448
|100=25.33
4.0782
Mtodos Numricos