Instituto Politécnico Nacional Escuela Superior de Ingeniería Mecánica y Eléctrica Unidad Zacatenco Departamento Ingeniería en Sistemas Automotrices Métodos Numéricos Tercer Tercer Parcial Parcial Métodos de ! ! ! !
Trapecio Simpson Euler "unge #u #utta $rupo %SM&
E'uipo (
Alumno 1. Castro Delgado Delga do Aldo Al do Javie J avier r
Pro)esor *ardoso "eyes +uis ,ernando ,ec-a de Entrega lunes %. de /unio del %0&(
Ingeniería en Sistemas Automotrices
Métodos Numéricos
Métodos Numéricos Método del Trapecio Trapecio Pro1lema & Sea la )unci2n o
[−1,3 ]
Error
f ( ( x )= x
4
3 encontrar el área 1a4o la cur5a en el inter5al
n =5 3 aplicando el Método del Trapecio3 Trapecio3 además encontrar el
e interpretar grá6camente7
Datos
f ( ( x )= x
4
[−1,3 ] n =5 Calcular
f ( ( x 0=−1 ) =(− =(−1) =1 4
f ( ( x 5=3 )=( 3 ) =81 4
x 5− x 0 3−(−1 ) h= = =0.8 5
5
4
x 1= x 0+ h=−1 + 1 ( 0.8 )=− )=−0.2 → f ( ( −0.2 ) =(−0.2 ) =0.0016 4
x 2= x 0+ 2 h =−1+ 2 ( 0.8 )=0.6 → f ( ( 0.6 ) =( 0.6 ) =0.1296 4
x 3= x 0+ 3 h=−1 + 3 ( 0.8 )=1.4 → f ( ( 1.4 )=( 1.4 ) =3.8416 4
x 4= x 0 + 4 h=−1 + 4 ( 0.8 )= 2.2 → f ( ( 2.2 )=( 2.2 ) =23.4256 Evaluar
A T = h 1 + 81 2
(
f ( ( x x 0 ) + f ( ( x 0 ) 2
n −1
)
+ ∑ f ( ( x i ) i =1
+ 0.0016 + 0.1296 +3.8416 + 23.4256 =54.71872 A T = 0.8 ¿
Ingeniería en Sistemas Automotrices 3
∫ x
4
x
5
5
−1 5
|
− 54.71872 =5.91872=592
−1
Err =
244 5
−
5
= 243 −
−1
dx =
∨ 3 =3 5 −1 5
5
5
Métodos Numéricos
= 244 5
|
Pro1lema % Sea la )unci2n
f ( x )=1− x 3 encontrar el área 1a4o la cur5a en el inter5alo
[1,10 ] y n =5 3 aplicando el Metodo del Trapecio3 además encontrar el e interpretar grá6camente Datos
f ( x )=1− x
[1,10 ] n =5 Calcular
f ( x 0=1 ) =1−( 1)= 0 f ( x 5=10 )=1− (10 )=−9 x 5− x 0 (10 )−( 1 ) h= = =1.8 5
5
x 1= x 0+ h=1 + 1 ( 1.8 )=2.8 → f ( 2.8 )=1 −( 2.8 )=−1.8 x 2= x 0+ 2 h =1 + 2 (1.8 )=4.6 → f ( 4.6 )=1 −( 4.6 ) =−3.6 x 3= x 0+ 3 h=1 + 3 ( 1.8 )= 6.4 → f ( 6.4 )=1 −( 6.4 ) =−5.4 x 4= x 0 + 4 h=1 + 4 ( 1.8 ) =8.2 → f ( 8.2 ) =1−( 8.2 )=−7.2
Error
Ingeniería en Sistemas Automotrices
Métodos Numéricos
Evaluar
A T =h
(
f ( x 0 ) + f ( x 0 )
( 0 ) + ( −9 ) 2
2
n −1
)
+ ∑ f ( x i ) i =1
−1.8−3.6 −5.4 −7.2=−40.5 A T =1.8 ¿
10
∫ 0
[ ] [ ]
10 (1− x ) dx = x − x ∨10 = 10 − 1 2 2
Err =|40.5− 40.5|=0= 0
2
2
− 1−
1
2
=[ 10− 100 ]−[ 1− 0.5 ] =10−
100 2
−1 + 0.5 =−40−1 + 0.5=−40
Ingeniería en Sistemas Automotrices
Métodos Numéricos
Pro1lema 8 f ( x )=sin x 3 encontrar el area 1a4o la cur5a en el inter5alo
Sea la )unci2n
[ 0, π ] y n =5 3 aplicando el Metodo del Trapecio3 además encontrar el e interpretar grá6camente Datos
f ( x )=sin x
[ 0, π ] n =5 Calcular
f ( x 0= 0 )=sin0 =0 f ( x 5= π ) =sin π =0 x 5− x 0 ( π ) −( 0 ) π h= = = 5
5
x 1= x 0+ h=0 + 1
5
() π
x 2= x 0+ 2 h =0 + 2
5
π
= → f 5
( )= π
2 π
5
5
( )= π
3 π
5
5
x 3= x 0+ 3 h=0 + 3
x 4= x 0 + 4 h= 0 + 4
() π 5
() π 5
→ f
2 π 5
sin
( )=
= 4 → f 5
5
( )=
→ f
π
π
=sin = 0.587785252
3 π 5
( ) 4 π 5
2 π
sin
5
=0.951056516
3 π 5
=0.951056516
π
=sin 4 =0.587785252 5
Evaluar
A T =h
(
( 0 )+ ( 0 ) 2
f ( x 0 ) + f ( x 0 ) 2
n −1
)
+ ∑ f ( x i ) i =1
+ 0.587785252+ 0.951056516 + 0.951056516 + 0.587785252=1.933765598 AT =
π 5
¿
Error
Ingeniería en Sistemas Automotrices 10
∫ sin x dx =−cos x∨ π 0 =[ −cos π ] −[ −cos0 ] =2 0
Err =|2 −1.933765598|= 0.066234402 =6.62
Métodos Numéricos
Ingeniería en Sistemas Automotrices
Métodos Numéricos
Pro1lema 9 f ( x )=cos x 3 encontrar el area 1a4o la cur5a en el inter5alo
Sea la )unci2n
[ 0, π ] y n =5 3 aplicando el Metodo del Trapecio3 además encontrar el e interpretar grá6camente Datos
f ( x )=cos x
[ 0, π ] n =5 Calcular
f ( x 0= 0 )= cos0=1 f ( x 5= π ) =cos π =−1 x 5− x 0 ( π ) −( 0 ) π h= = = 5
5
x 1= x 0+ h=0 + 1
5
() π 5
π
= → f 5
x 2= x 0+ 2 h =0 + 2
( )= π
2 π
5
5
x 3= x 0+ 3 h=0 + 3
( )= π
3 π
5
5
x 4= x 0 + 4 h= 0 + 4
() π 5
() π 5
→ f
2 π 5
cos
( )=
= 4 → f 5
5
( )=
→ f
π
π
=cos =0.809016994
3 π 5
( ) 4 π 5
2 π
cos
5
= 0.309016994
3 π 5
=−0.309016994
π
=cos 4 =−0.809016994 5
Evaluar
A T =h
A T =
(
f ( x 0 ) + f ( x 0 )
(
2
π (0 ) + ( 0 ) 5
2
n −1
)
+ ∑ f ( x i ) i =1
)
+ 0.809016994 + 0.309016994 − 0.309016994−0.809016994 =0
Error
Ingeniería en Sistemas Automotrices 10
∫ cos x dx = sen x ∨ π 0 =[ senπ ] −[ sen 0 ] =0 0
Err =|0−0|=0 =0
Métodos Numéricos
Ingeniería en Sistemas Automotrices
Métodos Numéricos
Pro1lema ( f ( x )= x
Sea la )unci2n
3
3 encontrar el área 1a4o la cur5a en el inter5alo
n =5 3 aplicando el Método del Trapecio3 además encontrar el Error e
y
interpretar grá6camente7 Datos
f ( x )= x
3
[1,5 ] n =5 Calcular
f ( x 0=−1 ) =(−1) =−1 3
f ( x 5=5 )=( 5) =125 3
x 5− x 0 5−( 1 ) h= = =0.8 5
5
x 1= x 0+ h=−1 + 1 (0.8 )=1.8 → f ( 1.8 )=( 1.8 ) =5.832 3
3
x 2= x 0+ 2 h =−1+ 2 ( 0.8 )=2.6 → f ( 2.6 )=( 2.6 ) =17.576 x 3= x 0+ 3 h=−1 + 3 ( 0.8 )=3.4 → f ( 3.4 )=( 3.4 ) =39.304 3
x 4= x 0 + 4 h=−1 + 4 ( 0.8 )= 4.2 → f ( 4.2 )=( 4.2 ) =74.088 3
Evaluar
A T =h
(
f ( x 0 ) + f ( x 0 ) 2
(−1 ) +( 125 ) 2
n −1
)
+ ∑ f ( x i ) i =1
+ 5.832+ 17.576 + 39.304 + 74.088 = 159.84 AT =0.8 ¿
5
∫ x 1
3
x
dx =
4
4
5 ∨5 = 4 1 4
4
1
625
4
4
− =
1
624
4
4
− =
=156
[1,5 ]
Ingeniería en Sistemas Automotrices Err =|156 −159.84|=3.84 =384
Métodos Numéricos
Ingeniería en Sistemas Automotrices
Métodos Numéricos
Método de Simpson Pro1lema & f ( x )= x
Sea la )unci2n o
[−1,3 ]
4
3 encontrar el área 1a4o la cur5a en el inter5al
n =5 3 aplicando el Método de Simpson3 además encontrar el
e interpretar grá6camente7 Datos
f ( x )= x
4
[ x , x ]=[ x , x ]=[−1,3 ] 2n
0
0
10
n =5 Calcular 4
f ( x 0 ) =(−1 ) =1 f ( x 10 )=( 3 ) =81 4
Para
i=1, … , 2 n −1 2 n−2
f (¿ x i ) ;
f ( x ) ∑ = i
i 2 2 n− 1
f ( x2 n )
¿ ∑ = i 1
x 2 n− x 0 x 10− x 0 3−(−1 ) 4 h= = = = 2n 10 10 10 x 1= x 0+ h=−1 +
4 10
=
−3 5
→ f
x 2= x 0+ 2 h =−1+ 2
( )=−
x 3= x 0+ 3 h=−1 + 3
( )=
4
x 4= x 0 + 4 h=−1 + 4
10
10
5
10
4
0.1296
0.2 → f ( 0.2 ) =0.0016
( )= 4
−1
0.2 → f ( −0.2 )= 0.0016
10 4
( )=( ) = −3
0.6 → f ( 0.6 )= 0.1296
Error
Ingeniería en Sistemas Automotrices
Métodos Numéricos
x 5= x 0+ 5 h=−1 + 5
( )=
x 6= x 0 + 6 h=−1 + 6
( )=
1.4 → f ( 1.4 )=3.8416
x 7= x 0+ 7 h=−1 + 7
( )=
1.8 → f ( 1.8 )=10.49
x 8= x 0+ 8 h=−1 + 8
( )=
2.2 → f ( 2.2 ) =23.4256
x 9= x 0 + 9 h=−1 + 9
( )=
2.6 → f ( 2.6 )= 45.6976
4
10
1 → f ( 1 )=1
4
10 4
10 4
10 4
10
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
A T =
h 3
( (
2 n −1
f x 0 ) + f ( x 2 n ) + 4
2 n− 2
f ( x ) + 2 ∑ f ( x ) ∑ = = i
i
i 1
i 2
)
4
A T = 3
∫ x −1
4
10 3
( 1 +81 + 4 (57.3264 )+ 2 ( 27.3984 )) =48.81365333 x
dx =
5
5
3 ∨3= 5 −1 5
−
−1 5 5
=
243 5
−
−1 5
=48.8
Err =|48.81365333 − 48.8|= 0.013653333 =1.36
Pro1lema % Sea la )unci2n
f ( x )=1− x 3 encontrar el área 1a4o la cur5a en el inter5alo
[1,10 ] y n =5 3 aplicando el Método del Simpson3 además encontrar el e interpretar grá6camente7
Error
Ingeniería en Sistemas Automotrices
Métodos Numéricos
Datos
f ( x )=1− x
[ x , x ]=[ x , x ]=[1,10 ] 0
2n
0
10
n =5 Calcular
f ( x 0 ) =1−(1 )= 0 f ( x 10 )=1 −(10 )= 9 Para
i =1, … , 2 n −1 2 n−2
f (¿ x i ) ;
f ( x ) ∑ = i
i 2 2 n− 1
f ( x2 n )
¿ ∑ = i 1
x 2 n− x 0 x 10− x 0 10−( 1 ) 9 h= = = = 2n 10 10 10 x 1= x 0+ h=1 +
9 10
=
19
→ f
10
( )
x 2= x 0+ 2 h =1 + 2
( )= 9
18
10
10
x 3= x 0+ 3 h=1 + 3
( )
27
9
10
x 4= x 0 + 4 h=1 + 4
=
10
( )= 9
10
19 10
=1−
19 10
=
→ f
( )=−
→ f
( )=−
18
8
10
10
27 10
−9 10
2.7
4.6 → f ( 4.6 )=−3.6
x 5= x 0+ 5 h=1 + 5
( )=
5.5 → f ( 5.5 )=− 4.5
x 6= x 0 + 6 h=1 + 6
( )=
6.4 → f ( 6.4 )=−5.4
9
10 9
10
Ingeniería en Sistemas Automotrices
Métodos Numéricos
x 7= x 0+ 7 h=1 + 7
( )=
7.3 → f ( 7.3 )=− 6.3
x 8= x 0+ 8 h=1 + 8
( )=
8.2 → f ( 8.2 )=−7.2
x 9= x 0 + 9 h=1 + 9
( )=
9.1 → f ( 9.1 ) =−8.1
9
10 9
10 9
10
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
A T =
h 3
( (
2 n −1
f x 0 ) + f ( x 2 n ) + 4
2 n− 2
f ( x ) + 2 ∑ f ( x ) ∑ = = i
i
i 1
i 2
)
9
A T = 10
∫ 0
10 3
( 0 −9 + 4 (−22.5 )+ 2 (−18 ) ) =−40.5
[ ] [ ]
10 (1− x ) dx = x − x ∨10 = 10 − 1 2 2
2
2
− 1−
1
2
=[ 10− 100 ]−[ 1− 0.5 ] =10−
100 2
−1 + 0.5 =−40−1 + 0.5=−40
Err =|40.5− 40.5|=0= 0
Pro1lema 8 Sea la )unci2n
f ( x )=sin x 3 encontrar el area 1a4o la cur5a en el inter5alo
[ 0, π ] y n =5 3 aplicando el Metodo del Simpson3 además encontrar el e interpretar grá6camente Datos
f ( x )=sin x
[ x , x ]=[ x , x ]=[0, π ] 0
2n
n =5 Calcular
f ( x 0 ) =sin 0=0
0
10
Error
Ingeniería en Sistemas Automotrices
Métodos Numéricos
f ( x 10 )=sin π = 0 Para
i =1, … , 2 n −1 2 n−2
f (¿ x i ) ;
f ( x ) ∑ = i
i 2 2 n− 1
f ( x2 n )
¿ ∑ = i 1
x 2 n− x 0 x 10− x 0 π −0 π h= = = = 2n 10 10 10 x 1= x 0+ h=0 +
π 10
=
π
→ f
10
x 2= x 0+ 2 h =0 + 2
( )
x 3= x 0+ 3 h=0 + 3
π
10
=
( )=
2 π 10
π
10
→ f
( )
3 π
( )= π
4 π
10
10
x 5= x 0+ 5 h=0 + 5
( )= π
5 π
10
10
x 6= x 0 + 6 h= 0 + 6
( )
=
6 π
x 7= x 0+ 7 h= 0 + 7
( )
7 = π → f
x 8= x 0+ 8 h= 0 + 8
( )= π
8 π
10
10
x 9= x 0 + 9 h= 0 + 9
( )
9 π
10
x 4= x 0 + 4 h= 0 + 4
π
10
π
10
π
10
10
10
→ f
10
10
2 π 10
→ f
=0.30901699
0.58778525
( )= 3 π 10
→ f
0.80901699
( )= 4 π 10
( )= 5 π 10
0.95105652
1
( )=
0.95105652
( )=
0.80901699
→ f
( )=
0.58778525
→ f
( )=
0.30901699
→ f
10
=
π
( )=
=
π
sin
6 π 10
7 π 10
8 π 10
9 π 10
Ingeniería en Sistemas Automotrices
Métodos Numéricos
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
A T =
h 3
( (
2 n −1
f x 0 ) + f ( x 2 n ) + 4
2 n− 2
f ( x ) + 2 ∑ f ( x ) ∑ = = i
i 1
i
i 2
)
π A T =
10 3
( 0 + 0 +4 ( 3.236067977 )+ 2 ( 3.077683537 )) =2.000109517
10
∫ sin x dx =−cos x∨ π 0 =[ −cos π ] −[ −cos0 ] =2 0
Err =|2 −2.000109517|=0.000109517=0.01
Pro1lema 9 Sea la )unci2n
f ( x )=cos x 3 encontrar el area 1a4o la cur5a en el inter5alo
[ 0, π ] y n =5 3 aplicando el Metodo de Simpson3 además encontrar el e interpretar grá6camente Datos
f ( x )=cos x
[ x , x ]=[ x , x ]=[0, π ] 0
2n
n =5 Calcular
f ( x 0 ) =cos0 =1 f ( x 10 )=sin π =−1 Para
i=1, … , 2 n −1
0
10
Error
Ingeniería en Sistemas Automotrices
Métodos Numéricos
2 n−2
f (¿ x i ) ;
f ( x ) ∑ = i
i 2 2 n− 1
f ( x2 n )
¿ ∑ = i 1
x 2 n− x 0 x 10− x 0 π −0 π h= = = = 2n 10 10 10 x 1= x 0+ h=0 +
π
=
10
x 2= x 0+ 2 h =0 + 2
π
→ f
10
( )=
x 3= x 0+ 3 h=0 + 3
( )
π
2 π
10
10
( ) π
10
π
10
→ f
10
( )
4 π
x 5= x 0+ 5 h=0 + 5
=
( )
5 π
x 6= x 0 + 6 h= 0 + 6
( )= π
6 π
10
10
x 7= x 0+ 7 h= 0 + 7
π
10
π
10
10
10
π 10
( )=
3 = π → f
=
x 4= x 0 + 4 h= 0 + 4
=cos 2 π 10
→ f
0.809016994
( )= 3 π 10
→ f
10
( )= 10
→ f
0.587785252
( )= 4 π
5 π
=0.951056516
0.309016994
0
( )=− 6 π 10
0.309016994
( )
= 7 → f
( )=−
x 8= x 0+ 8 h= 0 + 8
( )
8 = π → f
( )=−
x 9= x 0 + 9 h= 0 + 9
( )=
π
10
π
10
π
10
10
π
9 π
10
10
→ f
7 π 10
8 π 10
0.809016994
( )=− 9 π 10
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
0.587785252
0.951056516
Ingeniería en Sistemas Automotrices
Métodos Numéricos
Evaluar
A T =
h 3
( (
2 n −1
f x 0 ) + f ( x 2 n ) + 4
2 n− 2
f ( x ) + 2 ∑ f ( x ) ∑ = = i
i 1
i
i 2
)
π A T =
10
( 1−1 + 4 ( 0 )+ 2 ( 0 )) =0
3
10
∫ cos x dx = sen x∨ π 0 =[ sen π ] −[ sen 0 ] =0− 0=0 0
Err =|0−0|=0 =0
Pro1lema ( f ( x )= x
Sea la )unci2n y
3
3 encontrar el área 1a4o la cur5a en el inter5alo
n =5 3 aplicando el Método de Simpson3 además encontrar el Error e
interpretar grá6camente7 Datos
f ( x )= x
3
[ x , x ]=[ x , x ]=[1,5 ] 0
2n
0
10
n =5 Calcular 3
f ( x 0 ) =( 1 ) =1 3
f ( x 10 )=( 5 ) =125 Para
i =1, … , 2 n −1 2 n−2
f (¿ x i ) ;
f ( x ) ∑ = i
i 2 2 n− 1
f ( x2 n )
¿ ∑ = i 1
x 2 n− x 0 x 10− x 0 5−( 1 ) 4 = = = h= 2n 10 10 10
[1,5 ]
Ingeniería en Sistemas Automotrices
x 1= x 0+ h=1 +
4
Métodos Numéricos
=1.4 → f ( 1.4 ) =( 1.4 )3=2.744
10
x 2= x 0+ 2 h =1 + 2
( )=
x 3= x 0+ 3 h=1 + 3
( )=
4
10
1.8 → f ( 1.8 )= 5.832
4
10
x 4= x 0 + 4 h=1 + 4
2.2 → f ( 2 .2 )= 10.648
( )= 4
10
2.6 → f ( 2.6 )=17.576
x 5= x 0+ 5 h=1 + 5
( )=
3 → f ( 3 )=27
x 6= x 0 + 6 h=1 + 6
( )=
3.4 → f ( 3 .4 )=39.304
x 7= x 0+ 7 h=1 + 7
( )=
3.8 → f ( 3 .8 )=54.872
x 8= x 0+ 8 h=1 + 8
( )=
4.2 → f ( 4 .2 )=74.088
x 9= x 0 + 9 h=1 + 9
( )=
4.6 → f ( 4 .6 )=97.336
4
10 4
10 4
10 4
10 4
10
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
A T =
h 3
( (
f x 0 ) + f ( x 2 n ) + 4
2 n −1
2 n− 2
f ( x ) + 2 ∑ f ( x ) ∑ = = i
i 1
i
i 2
4
A T =
10 3
( 1 +125 + 4 (192.6 )+ 2 ( 136.8 ) )=156
)
Ingeniería en Sistemas Automotrices 5
∫ x
3
x
dx =
1
4
4
∨5 = 5 4 1 4
4
−1 4
Métodos Numéricos
= 625 − 1 = 624 =156 4
4
4
Err =|156 −156|=0 =0
Método de Euler Pro1lema & Encontrar la soluci2n apro:imada de las siguientes ecuaciones di)erenciales3 en los inter5alos dados y condiciones iniciales indicadas7 Ecuacion '
y =
1 2
f ( x , y )
( 1+ x ) y 2
Inter5alo de análisis
[ 0,0.5 ] *ondicion inicial
x i yi y ¿ ;<
1
Iteraciones n 5
Solucion apro:imada Euler 1.3898
Datos
[ x , x ] → [ 0,0.5 ] i
f
y ( xi ) = y i → y ( 0 )=1 x f − x i 0.5 −0 1 h= = = n 5 10 n =1
y i+1
Ingeniería en Sistemas Automotrices
{
Métodos Numéricos
y = yi + hf ( x i , y i) x i=0 i+1 1 y i=1 f ( x , y )= ( 1 + x ) y 2 2
| | 21
y i+1=1 +
1
(
1
10 2
2
)
( 1+ 0 ) 1 =
21 20
,
20
−1
21
=
1 21
∗100= 4.76
20
n =2
y i+ 1=1.05 +
1
(
1
10 2
|
)
( 1 + 0.1 ) 1.05 2 =1.1106375 ,
1.1106375 −
21 20
1.1106375
|
= 0.054597022∗100=5.46
n =3 y i+ 1=1.1106375 +
1
(
1
10 2
|
)
( 1 + 0.2 ) 1.11063752 =1.184648439 ,
1.184648439 − 1.1106375 1.184648439
|=
0.062475024 ∗10
n =4
y i+ 1=1.184648439 +
1
(
1
(
1
10 2
)
|
)
|
( 1+ 0.3 ) 1.184648439 2 =1.275868915 ,
1.275868915 −1.184648439 1.275868915
|=
0.0714967
|=
0.081988
n =5 y i+1=1.275868915 +
n 1 2 3 4 5
xi 0 07& 07% 078 079
1
10 2
( 1+ 0.4 ) 1.2758689152 =1.389817819 ,
yi & &70( &7&&0>8=( &7&@9>9@98. &7%=(@>@.&(
1.389817819−1.275868915
y i+1 &70( &7&&0>8=( &7&@9>9@98. &7%=(@>@.&( &78@.@&=@&.
1.389817819
Error %
97=>? (79>? >7%(? =7&(? @7%0?
Ingeniería en Sistemas Automotrices
Métodos Numéricos
Pro1lema % Encontrar la soluci2n apro:imada de las siguientes ecuaciones di)erenciales3 en los inter5alos dados y condiciones iniciales indicadas7 f ( x , y )
Ecuaci2n '
2
y = x − y Inter5alo de análisis
[ 0,1 ] *ondici2n inicial
x i yi y ¿ ;<
1
Iteraciones n 5
Solucion apro:imada Euler
y i+1
0.5379
Datos
[ x , x ] → [ 0,1 ] i
f
y ( xi ) = y i → y ( 0 )=1 x f − x i 1− 0 1 h= = = 5 5 n n =1
{
x i=0 y i + 1= y i + hf ( x i , y i ) y i=1 f ( x , y ) = x2 − y y i+ 1=1 +
1 5
| |
( 0 −1 ) =0.8 , 0.8 −1 =0.25∗100= 25 2
0.8
Ingeniería en Sistemas Automotrices
Métodos Numéricos
n =2
y i+ 1= 0.8 +
1 5
|
( 0.2 −1 ) =0.648 , 2
0.648 −0.8 0.648
|=
0.234567901∗100= 23.46
n =3 y i+ 1= 0.648 +
1 5
|
|
( 0.4 −1 )=0.5504 , 0.5504 −0.648 =0.177325581∗100 =17.73 2
0.5504
n =4
y i+ 1= 0.5504 +
1 5
|
( 0.6 −1 )= 0.51232 , 2
0.51232 −0.5504 0.51232
|=
0.074328545∗100=7.43
n =5 y i+ 1= 0.51232 +
1 5
2
Metodo de "unge!#utta Pro1lema & '
y =3 x + 3 y
[ 0,0.5 ] y i =1 n =5 n =1
x i=0 y i=1 h=
0.5 −0 5
=0.1
y i+1= yi + f ( x i , y i ) h y i+1=1 + 0.1 ( 3 ( 0 ) + 3 ( 1 ) ) =1.3
| |∗ 1.3−1 1.3
|
|
( 0.8 −1 ) =0.537856 , 0.537856 −0.51232 =0.047477392 ∗100= 4.75
100 =23.07
0.537856
Ingeniería en Sistemas Automotrices n =2
y i+ 1=1 .3 + 0.1 ( 3 ( 0 .1 )+ 3 (1 .3 ) ) =1.72
|
1.72 −1.3 1.72
|∗
100=24.41
n =3
y i+ 1=1.72 + 0.1 ( 3 ( 0.2 ) + 3 ( 1.72 ) )=2.296
|
2.296 −1.72 2.296
|∗
100 =25.08
n =4
y i+ 1=2.296 + 0.1 ( 3 ( 0.3 ) + 3 ( 2.296 ) ) =3.0448
|
3.0448 −2.296 3.0448
|∗
100=24.59
n =5
y i+ 1=3.0448 + 0.1 ( 3 ( 0. 4 ) + 3 ( 3.0448 ) )= 4.0782
|
4.0782 −3.0448 4.0782
|∗
100=25.33
Métodos Numéricos