CUARTA PRÁCTICA (Recuperado Automáticamente)
CUARTA PRÁCTICA (Recuperado Automáticamente)
CUARTA PRÁCTICA (Recuperado Automáticamente)
MÉTODOS NUMÉRICOS I
PROFESOR: Ing. William Wilfredo Chauca Nolasco
ALUMNO: Joan Juniors Atencio Velasquez
2020-II
CUARTA PRáCTICA DOMICILIARIA DE
MéTODOS NUMéRICOS I
PROBLEMA 1
5.15 Como se ilustra en la figura, la velocidad del agua, v (m/s), en
la descarga de un tanque cilíndrico a través de un tubo largo se
puede calcular como:
2 gH
v=√ 2 gH tanh ( √ t)
2L
2 gH
v=√ 2 gH tanh ( √ t)
2L
2 ( 9.81 ) H
√ 2(9.81) H tan h (√ 2( 4) )
2.5 −5=0
clc
clear
x=-50:1:50;
y=(sqrt(2.*9.81.*x)).*tanh(sqrt((2.*9.81.*x).*2.5/8)-5;
plot(x,y,'r')
grid on
Ea =0.77 %
b) Por bisección
√ 2 ( 9.81 ) H 2.5 −5
F ( H )= √2(9.81) H tan h
( 2 (4 ) )
Del método gráfico obtuvimos 2 valores los cuales podemos usar para
el método de bisección:
x F(x)
1 -0.6327
1.2 -0.1903
1.4 0.2112
2 1.2528
Entonces:
1º Asignamos 2 valores iniciales a la incógnita H que den valores F(H)
con diferentes signos. Según la tabla que tenemos ese cambio de signo
ocurre entre 1 y 2, por lo tanto, la raíz se encontrará en ese intervalo:
1+2
x r= =1.5
2
F ( 1 )∗F ( 2 ) <0
1+1.5
x r= =1.25
2
1.25+1.5
x r= =1.375
2
1.25+1.375
x r= =1.3125
2
1.25+1.3125
x r= =1.28125
2
1.28125+1.3125
x r= =1.296875
2
1.296875+1.3125
x r= =1.3047
2
x r=1.3047
Ea =0.6 %
c) Posición falsa
x l=1 xu =2
f ( x l ) =−0.6327 f ( xu )=1.2528
1º iteración:
x f ( x u)∗(x l −x u)
r=¿ x u− ¿
f ( x l )− f ( xu )
x 1.2528∗(−1)
r=¿2− ¿
−0.6327−1.2528
x r=¿¿ 1.3356
2º iteración:
f ( x l )∗f ( x r ) < 0
x l=1 xu =1.3356
f ( x l ) =−0.6327 f ( x u ) =0.0857
x f ( x u)∗(x l −x u)
r=¿ x u− ¿
f ( x l )− f ( xu )
x 0.0857∗(−0.3356)
r=¿1.3356− ¿
−0.6327−0.0857
x r=¿1.2956 ¿
3º iteración:
f ( x l )∗f ( x r ) < 0
x l=1 xu =1.2956
f ( x l ) =−0.6327 f ( x u ) =0.006
x f ( x u)∗(x l −x u)
r=¿ x u− ¿
f ( x l )− f ( xu )
x 0.006∗(−0.2956)
r=¿1.2956− ¿
−0.6327−0.006
x r=1.2928
Ea =0.22 %
PROBLEMA 2
[ 3 R−h]
V =π h2
3
[ 3 R−h]
V =π h2
3
[3∗3−h]
30=π h 2
3
90=9 π h2−π h3
π h3−9 π h2 +90=0
h3 −9 h2 +90 /π=0
h=-1.64081238
h=8.61390665
h=2.02690572
f ( h )=h3 −9 h2 +90 /π
f ' ( h ) =3 h2−18 h
f (x¿¿i)
x i+1=x i− ¿
f ' ( x ¿ ¿i) ¿
f (h ¿¿1)
h2 =h1− ¿
f ' (h¿ ¿1 ) ¿
−4.2641
h2 =2.2− =2.0300
−25.0800
−0.0748
h3 =2.0300− =2.0269
−24.1773
0.000138
h 4=2.0269− =2.0269
−24.1592
h 4=2.0269
1º Iteración:
|aprox . actual−aprox
Ea =
. anterior
aprox . actual |∗100 %
|2.0300−2.2
Ea =
2.0300 |
∗100 %
Ea =8.37 %
2º Iteración:
|aprox . actual−aprox
Ea =
. anterior
aprox . actual |∗100 %
|2.0269−2.0300
Ea =
2.0269 |∗100 %
Ea =0.15 %
3º Iteración:
Ea =0 %
PROBLEMA 3
6.20 La ecuación de Manning se puede escribir para un flujo en un
canal abierto rectangular como:
5
3
√ S (BH )
Q= 2
n(B+2 H ) 3
Donde:
m3
Q=flujo [ ]
s
m
S= pendiente [ ]
m
H= profundidad [m]
n=coeficiente de rugosidad de Manning
Desarrolle un esquema de iteración para despejar H de esta ecuación dado
que Q=5 , S=0.0002 , B=20 , n=0.03. Pruebe que su esquema converge para
todos los valores iniciales mayores que cero o iguales que cero.
5
√ S (BH )3
Q= 2
3
n(B+2 H )
5
√ 0.0002(20 H )3
5= 2
3
0.03(20+2 H)
5
3
√ 0.0002(20 H)
1= 2
5∗0.03(20+2 H )3
5
√ 0.0002(20 H)3
FH= 2
−1=0
3
5∗0.03(20+2 H )
H=1 0=3.8477
H=0.9 0=2.4681
Ea =11.1 %
H=0.7 0=−0.0265
Ea = |0.7−0.9
0.7 |
∗100 %
Ea =28.57 %
H=0.70229 0=0
Ea = |0.70229−0.7
0.70229 |
∗100 %
Ea =0.33 %
H (m) FH
1 3.8477
0.9 2.4681
0.7 -0.0265
0.70229 0
H=0.70229m
f (x¿¿i)
x i+1=x i− ¿
f ' ( x ¿ ¿i) ¿
f ( x)=x 3−2 x2 −4 x +8
1º Iteración:
f (x¿¿0)
x 1=x 0− ¿
f ' (x ¿ ¿ 0) ¿
f (1.2)
x 1=1.2−
f ' (1.2)
2.0480
x 1=1.2−
−4.4800
x 1=1.6571
2º Iteración:
f ( x¿¿1)
x 2=x 1− ¿
f ' (x ¿ ¿1 ) ¿
f (1.6571)
x 2=1.6571−
f '(1.6571)
0.4300
x 2=1.6571−
−2.3905
x 2=1. 8370
3º Iteración:
f ( x¿¿2)
x 3=x 2− ¿
f ' (x ¿ ¿ 2) ¿
f (1.8370)
x 3=1.8370−
f ' (1.8370)
0.1019
x 3=1.8370−
−1.2243
x 3=1. 920 3
4º Iteración:
f (x¿¿ 3)
x 4 =x3 − ¿
f ' (x ¿ ¿3) ¿
f (1.9202)
x 4 =1.9202−
f ' (1.9202)
0.1019
x 4 =1.9202−
−1.2243
x 4 =1.9 606
5º Iteración:
f (x¿¿ 4)
x 5=x 4 − ¿
f ' (x ¿ ¿4 ) ¿
f (1.9206)
x 5=1.9206−
f ' (1.9206)
0.0247
x 5=1.9206−
−0.6163
x 5=1.9607
f (x ¿¿ i)
x i+1=x i−m ¿
f ' (x ¿ ¿i ) ¿
m: Es la multiplicidad de la raíz
x 0=1.2
1º Iteración:
f (x¿¿ 0)
x 1=x 0−m ¿
f ' (x ¿ ¿0) ¿
f (1.2)
x 1=1.2−2
f ' (1.2)
2.0480
x 1=1.2−2
−4.4800
x 1=2.1143
2º Iteración:
f (x¿¿1 )
x 2=x 1−m ¿
f ' ( x ¿ ¿1) ¿
f (2.1143)
x 2=2.1143−2
f ' (2.1143 )
0.0538
x 2=2.1143−2
0.9536
x 2=2.0016
3º Iteración:
f ( x¿¿2)
x 3=x 2− ¿
f ' (x ¿ ¿ 2) ¿
f (2.0016)
x 3=2.0016−
f ' (2.0016)
0.00001
x 3=2.0016−
0.0128
x 3=2