Sie sind auf Seite 1von 12

1.

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:

Ingrese la funcin asociada f(x) = exp(-x)-x


Ingrese el limite inferior : 0
Ingrese limite superior : 1
it

aprox

error

3.01.000000 0.000000 1.000000 0.500000 1.000000


3.02.000000 0.500000 1.000000 0.750000 0.333333
3.03.000000 0.500000 0.750000 0.625000 0.200000
3.04.000000 0.500000 0.625000 0.562500 0.111111
3.05.000000 0.562500 0.625000 0.593750 0.052632
3.06.000000 0.562500 0.593750 0.578125 0.027027
3.07.000000 0.562500 0.578125 0.570313 0.013699
3.08.000000 0.562500 0.570313 0.566406 0.006897
3.09.000000 0.566406 0.570313 0.568359 0.003436
3.010.000000 0.566406 0.568359 0.567383 0.001721
3.011.000000 0.566406 0.567383 0.566895 0.000861
3.012.000000 0.566895 0.567383 0.567139 0.000430
3.013.000000 0.567139 0.567383 0.567261 0.000215
3.014.000000 0.567139 0.567261 0.567200 0.000108
3.015.000000 0.567139 0.567200 0.567169 0.000054
3.016.000000 0.567139 0.567169 0.567154 0.000027
3.017.000000 0.567139 0.567154 0.567146 0.000013
3.018.000000 0.567139 0.567146 0.567142 0.000007
3.019.000000 0.567142 0.567146 0.567144 0.000003
3.020.000000 0.567142 0.567144 0.567143 0.000002
La raz es: 0.567143440..(*)

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

Ingrese el lmite superior: 1


it
a
b
aprox
error
fr =
-0.9998
3.01.000000 10.6-1.500000 10.61.000000 10.60.020763 1.000000
fr =
-0.6368
3.02.000000 10.6-1.500000 10.60.020763 10.6-0.746563 1.027812
fr =
-0.2053
3.03.000000 10.6-1.500000 10.6-0.746563 10.6-1.043013 0.284225
fr =
-0.0509
3.04.000000 10.6-1.500000 10.6-1.043013 10.6-1.122040 0.070431
fr =
-0.0118
3.05.000000 10.6-1.500000 10.6-1.122040 10.6-1.140680 0.016342
fr =
-0.0027
3.06.000000 10.6-1.500000 10.6-1.140680 10.6-1.144942 0.003722
fr =
-6.0816e-004
3.07.000000 10.6-1.500000 10.6-1.144942 10.6-1.145910 0.000844
fr =
-1.3778e-004
3.08.000000 10.6-1.500000 10.6-1.145910 10.6-1.146129 0.000191
fr =
-3.1209e-005
3.09.000000 10.6-1.500000 10.6-1.146129 10.6-1.146179 0.000043
fr =
-7.0690e-006
3.010.000000 10.6-1.500000 10.6-1.146179 10.6-1.146190 0.000010
fr =
-1.6011e-006
3.011.000000 10.6-1.500000 10.6-1.146190 10.6-1.146192 0.000002
La raz es:-1.146192475..(*)

ingrese la funcin asociada f(x) = exp(-x)-2+x


Ingrese el limite inferior: 1.5
Ingrese el limite superior:2.5
it
a
b
aprox
error
fr =
-0.0160
3.01.000000 10.61.500000 10.62.500000 10.61.822333
fr =
6.0731e-004
3.02.000000 10.61.500000 10.61.822333 10.61.842127
fr =
-1.1002e-006
3.03.000000 10.61.842127 10.61.822333 10.61.841404
fr =
-7.4809e-011
3.04.000000 10.61.842127 10.61.841404 10.61.841406
La raz es: 1.841405660(**)

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

Ingrese limite superior : 1


it
a
b
aprox
error
3.01.000000 -1.500000 1.000000 -0.250000 1.000000
3.02.000000 -1.500000 -0.250000 -0.875000 0.714286
3.03.000000 -1.500000 -0.875000 -1.187500 0.263158
3.04.000000 -1.187500 -0.875000 -1.031250 0.151515
3.05.000000 -1.187500 -1.031250 -1.109375 0.070423
3.06.000000 -1.187500 -1.109375 -1.148438 0.034014
3.07.000000 -1.148438 -1.109375 -1.128906 0.017301
3.08.000000 -1.148438 -1.128906 -1.138672 0.008576
3.09.000000 -1.148438 -1.138672 -1.143555 0.004270
3.010.000000 -1.148438 -1.143555 -1.145996 0.002130
3.011.000000 -1.148438 -1.145996 -1.147217 0.001064
3.012.000000 -1.147217 -1.145996 -1.146606 0.000532
3.013.000000 -1.146606 -1.145996 -1.146301 0.000266
3.014.000000 -1.146301 -1.145996 -1.146149 0.000133
3.015.000000 -1.146301 -1.146149 -1.146225 0.000067
3.016.000000 -1.146225 -1.146149 -1.146187 0.000033
3.017.000000 -1.146225 -1.146187 -1.146206 0.000017
3.018.000000 -1.146206 -1.146187 -1.146196 0.000008
3.019.000000 -1.146196 -1.146187 -1.146192 0.000004
3.020.000000 -1.146196 -1.146192 -1.146194 0.000002
La raz es: -1.146193981..(*)

Ingrese la funcion asociada f(x) = exp(-x)-2+x


Ingrese el limite inferior : 1.5
Ingrese limite superior : 2.5
it
a
b
aprox
error
3.01.000000 1.500000 2.500000 2.000000 1.000000
3.02.000000 1.500000 2.000000 1.750000 0.142857
3.03.000000 1.750000 2.000000 1.875000 0.066667
3.04.000000 1.750000 1.875000 1.812500 0.034483
3.05.000000 1.812500 1.875000 1.843750 0.016949
3.06.000000 1.812500 1.843750 1.828125 0.008547
3.07.000000 1.828125 1.843750 1.835938 0.004255
3.08.000000 1.835938 1.843750 1.839844 0.002123
3.09.000000 1.839844 1.843750 1.841797 0.001060
3.010.000000 1.839844 1.841797 1.840820 0.000531
3.011.000000 1.840820 1.841797 1.841309 0.000265
3.012.000000 1.841309 1.841797 1.841553 0.000133
3.013.000000 1.841309 1.841553 1.841431 0.000066
3.014.000000 1.841309 1.841431 1.841370 0.000033
3.015.000000 1.841370 1.841431 1.841400 0.000017
3.016.000000 1.841400 1.841431 1.841415 0.000008
3.017.000000 1.841400 1.841415 1.841408 0.000004
3.018.000000 1.841400 1.841408 1.841404 0.000002
La raz es: 1.841403961(**)

METODO NEWTON RASPN


Ingrese la funcion asociada f(x) = exp(-x)-2+x
Ingrese el limite inferior : -1.5
it
aprox
1 -1.500000
2 -1.218042
3 -1.149772
4 -1.146203
5 -1.146193
6 -1.146193

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..(*)

Ingrese la funcion asociada f(x) = exp(-x)-2+x


Ingrese el limite inferior : 1.5
it
1
2
3
4
5
La raiz es

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

Ingrese la funcion asociada f(x) = x.^3+2*x-11


Ingrese el limite inferior : 1
Ingrese limite superior : 2
it

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..(*)

METODO NEWTON RASPN


Ingrese la funcion asociada f(x) = x.^3+2*x-11
Ingrese el limite inferior : 1
it
1
2
3
4
5
6
7
La raz es

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..(*)

Ingrese la funcion asociada f(x) = x.*sin(1\x)-0.2*exp(-x)


Ingrese el limite inferior : -3.5

Ingrese limite superior : -2


it
a
b
aprox
error
3.01.000000 -3.500000 -2.000000 -2.750000 1.000000
3.02.000000 -2.750000 -2.000000 -2.375000 0.157895
3.03.000000 -2.375000 -2.000000 -2.187500 0.085714
3.04.000000 -2.375000 -2.187500 -2.281250 0.041096
3.05.000000 -2.281250 -2.187500 -2.234375 0.020979
3.06.000000 -2.234375 -2.187500 -2.210938 0.010601
3.07.000000 -2.210938 -2.187500 -2.199219 0.005329
3.08.000000 -2.199219 -2.187500 -2.193359 0.002671
3.09.000000 -2.193359 -2.187500 -2.190430 0.001337
3.010.000000 -2.190430 -2.187500 -2.188965 0.000669
3.011.000000 -2.188965 -2.187500 -2.188232 0.000335
3.012.000000 -2.188965 -2.188232 -2.188599 0.000167
3.013.000000 -2.188599 -2.188232 -2.188416 0.000084
3.014.000000 -2.188416 -2.188232 -2.188324 0.000042
3.015.000000 -2.188416 -2.188324 -2.188370 0.000021
3.016.000000 -2.188416 -2.188370 -2.188393 0.000010
3.017.000000 -2.188393 -2.188370 -2.188381 0.000005
3.018.000000 -2.188381 -2.188370 -2.188375 0.000003
La raz es : -2.188375473..(**)

Ingrese la funcin asociada f(x) = x.*sin(1\x)-0.2*exp(-x)


Ingrese el limite inferior : 0
Ingrese limite superior : 1
it
a
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
3.019.000000
3.020.000000

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

ingrese la funcion asociada f(x) = x.*sin(1\x)-0.2*exp(-x)

ingrese el limite inferior:-1


ingrese el limite superior:0
it
a
b
aprox
error
fr =
-0.1418
3.01.000000 10.6-1.000000 10.60.000000 10.6-0.401756 1.000000
fr =
-0.0293
3.02.000000 10.6-1.000000 10.6-0.401756 10.6-0.594712 0.324453
fr =
-0.0036
3.03.000000 10.6-1.000000 10.6-0.594712 10.6-0.631017 0.057533
fr =
-4.0596e-004
3.04.000000 10.6-1.000000 10.6-0.631017 10.6-0.635455 0.006984
fr =
-4.4894e-005
3.05.000000 10.6-1.000000 10.6-0.635455 10.6-0.635951 0.000780
fr =
-4.9578e-006
3.06.000000 10.6-1.000000 10.6-0.635951 10.6-0.636006 0.000086
fr =
-5.4742e-007
3.07.000000 10.6-1.000000 10.6-0.636006 10.6-0.636012 0.000010
fr =
-6.0444e-008
3.08.000000 10.6-1.000000 10.6-0.636012 10.6-0.636013 0.000001
La raz es: -0.636012674..(*)

ingrese la funcion asociada f(x) = x.*sin(1\x)-0.2*exp(-x)


ingrese el limite inferior:-3.5
ingrese el limite superior:-2
it
a
b
aprox
error
fr =
0.2452
3.01.000000 10.6-3.500000 10.6-2.000000
fr =
0.1686
3.02.000000 10.6-3.500000 10.6-2.062402
fr =
0.1122
3.03.000000 10.6-3.500000 10.6-2.105941
fr =
0.0731
3.04.000000 10.6-3.500000 10.6-2.135242
fr =
0.0470
3.05.000000 10.6-3.500000 10.6-2.154474
fr =
0.0299
3.06.000000 10.6-3.500000 10.6-2.166889
fr =
0.0189
3.07.000000 10.6-3.500000 10.6-2.174816
fr =
0.0119
3.08.000000 10.6-3.500000 10.6-2.179842

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..(**)

ingrese la funcion asociada f(x) = x.*sin(1\x)-0.2*exp(-x)


ingrese el limite inferior:0
ingrese el limite superior:1
it
a
b
aprox
fr =
-0.1203
3.01.000000 10.60.000000
fr =
0.1377
3.02.000000 10.60.000000
fr =
-0.0193
3.03.000000 10.60.518328
fr =
-0.0023
3.04.000000 10.60.518328
fr =
-2.5954e-004
3.05.000000 10.60.518328
fr =
-2.9342e-005
3.06.000000 10.60.518328
fr =
-3.3154e-006
3.07.000000 10.60.518328

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

ingrese la funcion asociada f(x) = x.*sin(1\x)-0.2*exp(-x)


ingrese el limite inferior:-1
it
1
2
3
4
5

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

La raz es: -0.636012757..(*)

ingrese la funcion asociada f(x) = x.*sin(1\x)-0.2*exp(-x)


ingrese el limite inferior:-3.5
it
1
2
3
4
5
6
7

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

La raz es: -2.188376690..(**)

ingrese la funcion asociada f(x) = x.*sin(1\x)-0.2*exp(-x)


ingrese el limite inferior:0
it
1
2
3
4
5
6
7

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

La raz es: 0.375123899..(***)

Das könnte Ihnen auch gefallen