Professional Documents
Culture Documents
Curso:S4A
Nombre: Maldonado Arriaga Lobsang Alex
Resolver por Newton-Raphson las siguientes ecuaciones.
1.- 9*x^3 -3*x*sin(2*x) + 35 = 0
2.- 11*x^3 -2*x*cos(3*x) + 45 = 0
3.- 10*x^3 - (4/7)*tan(2*x) + 52 = 0
4.- 8*x^3 -(5/8)*x^2*cos(3*x) + 25 = 0
syms x;f=9*x^3 -3*x*sin(2*x) + 35
f=
9*x^3 - 3*x*sin(2*x) + 35
x=-4:1:4;
f=9*x.^3 -3*x.*sin(2*x) + 35
f=
-552.8723 -205.4853 -32.4592 23.2721 35.0000 41.2721 111.5408
280.5147 599.1277
plot(x,f)
grid on
df = diff(f)
df =
27*x^2 - 6*x*cos(2*x) - 3*sin(2*x)
i=0;x=-1.4;f=9*x.^3 -3*x.*sin(2*x) + 35;df=27*x^2 - 6*x*cos(2*x) - 3*sin(2*x);F=(x-(f/df));v0=[i
x f df F]
v0 =
0 -1.4000 8.8970 46.0103 -1.5934
i=1;x=F;f=9*x.^3 -3*x.*sin(2*x) + 35;df=27*x^2 - 6*x*cos(2*x) - 3*sin(2*x);F=(x-(f/df));v1=[i x f
df F]
v1 =
1.0000 -1.5934 -1.1919 58.8625 -1.5731
i=2;x=F;f=9*x.^3 -3*x.*sin(2*x) + 35;df=27*x^2 - 6*x*cos(2*x) - 3*sin(2*x);F=(x-(f/df));v2=[i x f
df F]
v2 =
2.0000 -1.5731 -0.0152 57.3646 -1.5729
i=3;x=F;f=9*x.^3 -3*x.*sin(2*x) + 35;df=27*x^2 - 6*x*cos(2*x) - 3*sin(2*x);F=(x-(f/df));v3=[i x f
df F]
v3 =
3.0000 -1.5729 -0.0000 57.3452 -1.5729
i=4;x=F;f=9*x.^3 -3*x.*sin(2*x) + 35;df=27*x^2 - 6*x*cos(2*x) - 3*sin(2*x);F=(x-(f/df));v4=[i x f
df F]
v4 =
4.0000 -1.5729 -0.0000 57.3452 -1.572
V=[v0;v1;v2;v3;v4]
V=
0 -1.4000 8.8970 46.0103 -1.5934
1.0000 -1.5934 -1.1919 58.8625 -1.5731
2.0000 -1.5731 -0.0152 57.3646 -1.5729
3.0000 -1.5729 -0.0000 57.3452 -1.5729
4.0000 -1.5729 -0.0000 57.3452 -1.5729
CUADRO DE CALCULO
I=
df
V=
0 -1.4000 8.8970 46.0103 -1.5934
1.0000 -1.5934 -1.1919 58.8625 -1.5731
2.0000 -1.5731 -0.0152 57.3646 -1.5729
3.0000 -1.5729 -0.0000 57.3452 -1.5729
v1 =
1.0000 -1.6099 -0.5242 75.7061 -1.6030
>> i=2;x=F;f=11*x^3 - 2*x*cos(3*x) + 45;df=6*x*sin(3*x) - 2*cos(3*x) + 33*x^2;F=((x(f/df)));v2=[i x f df F]
v2 =
2.0000 -1.6030 -0.0023 75.0332 -1.6030
>> i=3;x=F;f=11*x^3 - 2*x*cos(3*x) + 45;df=6*x*sin(3*x) - 2*cos(3*x) + 33*x^2;F=((x(f/df)));v3=[i x f df F]
v3 =
3.0000 -1.6030 -0.0000 75.0302 -1.6030
V=
0 -1.5000 7.2426 65.8738 -1.6099
1.0000 -1.6099 -0.5242 75.7061 -1.6030
2.0000 -1.6030 -0.0023 75.0332 -1.6030
3.0000 -1.6030 -0.0000 75.0302 -1.6030
CUADRO DE CALCULO
I=
df
V=
0 -1.5000 7.2426 65.8738 -1.6099
1.0000 -1.6099 -0.5242 75.7061 -1.6030
2.0000 -1.6030 -0.0023 75.0332 -1.6030
3.0000 -1.6030 -0.0000 75.0302 -1.6030
La solucion aproximada x*=-1.6030 porque se cumple la condicion
x3-x2|<= 1x10^-4
syms x;f=10*x.^3 - (4/7)*x.*tan(2*x) + 52
f=
10*x^3 - (4*x*tan(2*x))/7 + 52
x=-4:1:4;
f=10*x.^3 - (4/7)*x.*tan(2*x) + 52
f=
-572.4578 -217.5011 -29.3232 43.2486 52.0000 63.2486 130.6768 322.4989
plot(x,f)
grid on
f=
10*x^3 - (4*x*tan(2*x))/7 + 52
df = diff(f)
df =
30*x^2 - (4*x*(2*tan(2*x)^2 + 2))/7 - (4*tan(2*x))/7
i=0;x=-1.6;f=10*x.^3 - (4/7)*x.*tan(2*x) + 52;df=30*x^2 - (4*x*(2*tan(2*x)^2 + 2))/7 (4*tan(2*x))/7;F=((x-(f/df)));v0=[i x f df F]
v0 =
0 -1.6000 10.9865 78.6682 -1.7397
i=1;x=F;f=10*x.^3 - (4/7)*x.*tan(2*x) + 52;df=30*x^2 - (4*x*(2*tan(2*x)^2 + 2))/7 (4*tan(2*x))/7;F=((x-(f/df)));v1=[i x f df F]
v1 =
1.0000 -1.7397 -0.9982 93.2262 -1.7289
i=2;x=F;f=10*x.^3 - (4/7)*x.*tan(2*x) + 52;df=30*x^2 - (4*x*(2*tan(2*x)^2 + 2))/7 (4*tan(2*x))/7;F=((x-(f/df)));v2=[i x f df F]
v2 =
2.0000 -1.7289 -0.0063 92.0527 -1.7289
>> i=3;x=F;f=10*x.^3 - (4/7)*x.*tan(2*x) + 52;df=30*x^2 - (4*x*(2*tan(2*x)^2 + 2))/7 (4*tan(2*x))/7;F=((x-(f/df)));v3=[i x f df F]
v3 =
3.0000 -1.7289 -0.0000 92.0452 -1.7289
V=
df
V=
8*x^3 - (5*x^2*cos(3*x))/8 + 25
x=-4:1:4;
f=8*x.^3 -(5/8)*x.^2*cos(3*x) + 25
plot(x,f)
grid on
v1 =
v1 =
v2 =
v3 =
>> V=[v0;v1;v2;v3]
V=
df
F']
V=
0 -1.6000 12.0920 66.3966 -1.7821
1.0000 -1.7821 -1.4550 82.3400 -1.7644