Deber
Deber
Deber
clc
clear
x = -2:0.5:6;
y = 2*x.^3-11.7*x.^2+17.7*x-5;
plot( x, y )
grid on
title('Gráfica de la función')
Raíz= 3.5
x 2=5.133−
59.795
=4.2 f ' ( 5.33 )=6(5.33)2−23.4 ( 5.33 ) +17.7=¿63.43
63.43 f ( 5.33 ) =2(5.33)3−11.7 ( 5.33 )2 +17.7 ( 5.33 )−5=59.795
11.128
x 3=4.2− =3.76 f ' ( 4.2 ) =6(4.2)2−23.4 ( 4.2 ) +17.7=¿25.26
25.26
f ( 4.2 )=2(4.2)3−11.7 ( 4.2 )2 +17.7 ( 4.2 ) −5=11.128
5.133−3
ea= ∗100 %=41.55 %
5.133
4.2−5.133
ea= ∗100 %=22.21%
4.2
3.76−4.2
d) Con el método de la secante (tres iteraciones x–1 = 3, x0 = 4).
( 6.6 ) ( 3−4 )
x 1=4− =3.3265 f ( 3 )=2(3)3−11.7 (3 )2+17.7 ( 3 )−5=−3,2
(−3.2 )− ( 6.6 )
f ( 4 ) =2(4 )3 −11.7 ( 4 )2 +17.7 ( 4 )−5=6.6
(−1.969 ) ( 4−3.3265 )
x 2=3.3265− =3.4812 f ( 3.3265 ) =2(3.3265)3−11.7 ( 3.3265 )2 +17.7 ( 3.3265 )−5
( 6.6 )−(−1.969 )
(−0.796 )( 3.3265−3.4812 ) f ( 3.481 ) =2(3.481)3−11.7 ( 3.481 )2+17.7 ( 3.481 ) −5=−0
x 2=3.4812− =3.5861
(−1.969 )−(−0.796 )
3.3265−4
ea= ∗100 %=20.24 %
3.3265
3.4812−3.3265
ea= ∗100 %=4.44 %
3.4812
3.5861−3.4812
ea= ∗100 %=2.92%
6.3 Utilice los métodos de a) iteración de punto fijo y b) Newton-Raphson, para
3. 5861
determinar una raíz de f(x) = – 0.9x2 + 1.7x + 2.5 con el uso de x0 = 5. Haga el cálculo
hasta que ea sea menor que es = 0.01%. Asimismo, realice una comprobación del error
de su respuesta final.
a)
0=−0.9 x 2+1.7 x +2.5
1.7 x +2.5
x0=5
x1=3.496
g( x )=
√ 0.9
1.7 (5 )+ 2.5 ea=
3.496−5
3.496−5 ∗100 %=−43 %%
ea= %=−43
x2=2.9263
g ( 5 )=
√ 0.9
=3.496
3.063−3.496
x3=2.881 g ( 3.496 )=
x4=2.866
√ 0.9
1.7 ( 3. 063 ) +2.5
=3.063 ea=
ea= 3.063
3.063
2.9263−3.063
∗100
∗100%=−14.13 %%
%=−1 4.13
x5=2.862
g ( 3.063 )=
√ 0.9
1.7 (2.9263 )+ 2.5
=2.9263 ea= 2.9263−3.063
ea= 2.9263
2.9263
∗100 %=−4.67
∗100 %%
%=−4.67
x6=2.8607 g ( 2.9263 )=
x7=2.86 03
√ 0.9
1.7 ( 2.881 ) +2.5
=2. 881 ea=
2.881−2.9263
2.881−2.9263
ea= 2.881
2.881
∗100 %=−1.57
∗100 %%
%=−1.57
g ( 2.881 )=
√ 0.9
1.7 ( 2.8 66 ) +2.5
=2. 866
ea=
2.866−2.881
2.866−2. 881
ea= 2.866
2.866
∗100 %=−0.52%
∗100 %=−0.52 %
g ( 2.8 66 )=
√ 0.9
1.7 ( 2.86 2 ) +2.5
=2.86 2
ea=
2.862−2.866
ea=
2.86 2−2. 8 ∗100
2.862
66 %=−0.139%
∗100 %=−0. 139 %
g 2.86 2 =
( )
√ 0.9
=2.86 07
x 3=2.86 0 1−
[−0.9 ( 2.86 0 1 )2+ 1.7 ( 2.86 01 ) +2.5 ] =2.860104
−1.8 ( 2.86 0 1 )+ 1.7