Beruflich Dokumente
Kultur Dokumente
Y=e-X-X
GRAFICAMOS
>> x=[-5:.5:5];
>> y=exp(-x);
>> z=x;
>> plot(x,y,'r',x,z,'--b')
MTODO DE LA BISECCIN:
aprox
error
NEWTON
ingrese la funcion asociada f(x)= exp(-x)-x
nombre_f = exp(-x)-x
ingrese el valor inicial: 0
it
aprox
g(x)
error
1 0.000000 0.500000 0.500000
2 0.500000 0.566311 0.566311
3 0.566311 0.567143 0.567143
4 0.567143 0.567143 0.567143
5 0.567143 0.567143 0.567143
La raz es: 0.567143290..(*)
2. e-X+X-2
GRAFICAMOS:
>> x=[-5:.5:5];
>> y=exp(-x)-2;
>> z=-x;
>> plot(x,y,x,z),grid on
METODO FALSE
ingrese la funcin asociada f(x) = exp(-x)-2+x
Ingrese el lmite inferior:-1.5
METODO BISECCION
Ingrese la funcion asociada f(x) = exp(-x)-2+x
Ingrese el limite inferior : -1.5
1.000000
0.010745
0.000393
0.000001
g(x)
-1.218042
-1.149772
-1.146203
-1.146193
-1.146193
-1.146193
error
-1.218042
-1.149772
-1.146203
-1.146193
-1.146193
-1.146193
La raiz es : -1.146193221..(*)
aprox
g(x)
error
1.500000 1.856392 1.856392
1.856392 1.841427 1.841427
1.841427 1.841406 1.841406
1.841406 1.841406 1.841406
1.841406 1.841406 1.841406
: 1.841405660..(**)
3. f(x) = x.^3+2*x-11
GRAFICAMOS
x=[-5:.5:5];
y=-2*x+11;
z=x.^3;
plot(x,y,'b--',x,z,'g')
METODO BISECCION
3.01.000000
3.02.000000
3.03.000000
3.04.000000
3.05.000000
3.06.000000
3.07.000000
3.08.000000
3.09.000000
3.010.000000
3.011.000000
3.012.000000
3.013.000000
3.014.000000
3.015.000000
3.016.000000
3.017.000000
3.018.000000
b
1.000000
1.500000
1.750000
1.875000
1.875000
1.906250
1.921875
1.921875
1.925781
1.925781
1.925781
1.926270
1.926270
1.926270
1.926270
1.926270
1.926270
1.926270
aprox
2.000000
2.000000
2.000000
2.000000
1.937500
1.937500
1.937500
1.929688
1.929688
1.927734
1.926758
1.926758
1.926514
1.926392
1.926331
1.926300
1.926285
1.926277
error
1.500000 1.000000
1.750000 0.142857
1.875000 0.066667
1.937500 0.032258
1.906250 0.016393
1.921875 0.008130
1.929688 0.004049
1.925781 0.002028
1.927734 0.001013
1.926758 0.000507
1.926270 0.000253
1.926514 0.000127
1.926392 0.000063
1.926331 0.000032
1.926300 0.000016
1.926285 0.000008
1.926277 0.000004
1.926273 0.000002
La raz es : 1.926273346..(*)
METODO FALSE
ingrese la funcion asociada f(x) = x.^3+2*x-11
ingrese el limite inferior:1
ingrese el limite superior:2
it
a
b
aprox
fr =
-0.4829
3.01.000000 10.61.000000
fr =
0.2611
3.02.000000 10.61.000000
fr =
-0.0043
3.03.000000 10.61.945985
fr =
-3.6931e-005
3.04.000000 10.61.945985
error
10.62.000000 10.61.888889 1.000000
10.61.888889 10.61.945985 0.029341
10.61.888889 10.61.925944 0.010406
10.61.925944 10.61.926268 0.000168
fr =
-3.1873e-007
3.05.000000 10.61.945985 10.61.926268 10.61.926270 0.000001
La raz es: 1.926270290..(*)
aprox
g(x)
error
1.000000 2.600000 2.600000
2.600000 2.071454 2.071454
2.071454 1.934872 1.934872
1.934872 1.926303 1.926303
1.926303 1.926270 1.926270
1.926270 1.926270 1.926270
1.926270 1.926270 1.926270
: 1.926270314..(*)
4. f(x) = x.*sin(1\x)-0.2*exp(-x)
GRAFICAMOS
>> x=[-6:.5:6];
>> y=x.*sin(1\x);
>> z=0.2*exp(-x);
>> plot(x,y,x,z)
METODO BISECCION
Ingrese la funcion asociada f(x) = x.*sin(1\x)-0.2*exp(-x)
Ingrese el limite inferior : -1
Ingrese limite superior : 0
it
a
b
aprox
error
3.01.000000 -1.000000 0.000000 -0.500000 1.000000
3.02.000000 -1.000000 -0.500000 -0.750000 0.333333
3.03.000000 -0.750000 -0.500000 -0.625000 0.200000
3.04.000000 -0.750000 -0.625000 -0.687500 0.090909
3.05.000000 -0.687500 -0.625000 -0.656250 0.047619
3.06.000000 -0.656250 -0.625000 -0.640625 0.024390
3.07.000000 -0.640625 -0.625000 -0.632813 0.012346
3.08.000000 -0.640625 -0.632813 -0.636719 0.006135
3.09.000000 -0.636719 -0.632813 -0.634766 0.003077
3.010.000000 -0.636719 -0.634766 -0.635742 0.001536
3.011.000000 -0.636719 -0.635742 -0.636230 0.000767
3.012.000000 -0.636230 -0.635742 -0.635986 0.000384
3.013.000000 -0.636230 -0.635986 -0.636108 0.000192
3.014.000000 -0.636108 -0.635986 -0.636047 0.000096
3.015.000000 -0.636047 -0.635986 -0.636017 0.000048
3.016.000000 -0.636017 -0.635986 -0.636002 0.000024
3.017.000000 -0.636017 -0.636002 -0.636009 0.000012
3.018.000000 -0.636017 -0.636009 -0.636013 0.000006
3.019.000000 -0.636013 -0.636009 -0.636011 0.000003
La raz es : -0.636011124..(*)
b
0.000000
0.000000
0.250000
0.375000
0.375000
0.375000
0.375000
0.375000
0.375000
0.375000
0.375000
0.375000
0.375000
0.375122
0.375122
0.375122
0.375122
0.375122
0.375122
0.375122
aprox
1.000000
0.500000
0.500000
0.500000
0.437500
0.406250
0.390625
0.382813
0.378906
0.376953
0.375977
0.375488
0.375244
0.375244
0.375183
0.375153
0.375137
0.375130
0.375126
0.375124
error
0.500000 1.000000
0.250000 1.000000
0.375000 0.333333
0.437500 0.142857
0.406250 0.076923
0.390625 0.040000
0.382813 0.020408
0.378906 0.010309
0.376953 0.005181
0.375977 0.002597
0.375488 0.001300
0.375244 0.000651
0.375122 0.000325
0.375183 0.000163
0.375153 0.000081
0.375137 0.000041
0.375130 0.000020
0.375126 0.000010
0.375124 0.000005
0.375123 0.000003
La raz es : 0.375123024..(***)
METODO FALSE
10.6-2.062402 1.000000
10.6-2.105941 0.020674
10.6-2.135242 0.013722
10.6-2.154474 0.008927
10.6-2.166889 0.005729
10.6-2.174816 0.003645
10.6-2.179842 0.002306
10.6-2.183015 0.001453
fr =
0.0075
3.09.000000 10.6-3.500000 10.6-2.183015 10.6-2.185011 0.000914
fr =
0.0047
3.010.000000 10.6-3.500000 10.6-2.185011 10.6-2.186266 0.000574
fr =
0.0030
3.011.000000 10.6-3.500000 10.6-2.186266 10.6-2.187054 0.000360
fr =
0.0019
3.012.000000 10.6-3.500000 10.6-2.187054 10.6-2.187548 0.000226
fr =
0.0012
3.013.000000 10.6-3.500000 10.6-2.187548 10.6-2.187857 0.000142
fr =
7.2763e-004
3.014.000000 10.6-3.500000 10.6-2.187857 10.6-2.188051 0.000089
fr =
4.5591e-004
3.015.000000 10.6-3.500000 10.6-2.188051 10.6-2.188173 0.000056
fr =
2.8564e-004
3.016.000000 10.6-3.500000 10.6-2.188173 10.6-2.188249 0.000035
fr =
1.7895e-004
3.017.000000 10.6-3.500000 10.6-2.188249 10.6-2.188297 0.000022
fr =
1.1210e-004
3.018.000000 10.6-3.500000 10.6-2.188297 10.6-2.188327 0.000014
La raz es: -2.188326553..(**)
error
10.61.000000 10.60.206634 1.000000
10.60.206634 10.60.518328 0.601345
10.60.206634 10.60.351955 0.472710
10.60.351955 10.60.372438 0.054996
10.60.372438 10.60.374819 0.006354
10.60.374819 10.60.375089 0.000720
10.60.375089 10.60.375120 0.000081
fr =
-3.7460e-007
3.08.000000 10.60.518328 10.60.375120 10.60.375123 0.000009
fr =
-4.2325e-008
3.09.000000 10.60.518328 10.60.375123 10.60.375124 0.000001
La raz es: 0.375123850..(***)
NEWTON RASPN
aprox
-1.000000
-0.644662
-0.636055
-0.636013
-0.636013
g(x)
error
-0.644662 -0.644662
-0.636055 -0.636055
-0.636013 -0.636013
-0.636013 -0.636013
-0.636013 -0.636013
aprox
-3.500000
-2.734175
-2.349848
-2.209974
-2.188852
-2.188377
-2.188377
g(x)
error
-2.734175 -2.734175
-2.349848 -2.349848
-2.209974 -2.209974
-2.188852 -2.188852
-2.188377 -2.188377
-2.188377 -2.188377
-2.188377 -2.188377
aprox
0.000000
1.000000
0.472363
0.382177
0.375169
0.375124
0.375124
g(x)
error
1.000000 1.000000
0.472363 0.472363
0.382177 0.382177
0.375169 0.375169
0.375124 0.375124
0.375124 0.375124
0.375124 0.375124