UNIVERSIDAD NACIONAL DE MOQUEGUACarrera profesional de Ingeniera agroindustrial
Trabajo Prctico Mtodos Numricos
Nombre: Julver Quispe Puma Cdigo: 2012102042 Curso: Mtodos NumricosCiclo: V
Ejercicios 1.1a)
>> x=(0:0.0001:1);>> y=x.^2.*exp(x)-1;>> plot(x,y) >> grid on
Mtodo de BiseccinMtodo de regla falsa
Ingrese la funcion: x^2*exp(x)-1Ingrese a : 0Ingrese c : 1Ingrese el error : 0.0001
A B C F(a) F(b) F(c) |c-a| 0.0000 0.5000 1.0000 -1.0000 -0.5878 1.7183 1.0000
0.5000 0.7500 1.0000 -0.5878 0.1908 1.7183 0.5000
0.5000 0.6250 0.7500 -0.5878 -0.2702 0.1908 0.2500
0.6250 0.6875 0.7500 -0.2702 -0.0600 0.1908 0.1250
0.6875 0.7188 0.7500 -0.0600 0.0600 0.1908 0.0625
0.6875 0.7031 0.7188 -0.0600 -0.0013 0.0600 0.0313
0.7031 0.7109 0.7188 -0.0013 0.0290 0.0600 0.0156
0.7031 0.7070 0.7109 -0.0013 0.0138 0.0290 0.0078
0.7031 0.7051 0.7070 -0.0013 0.0062 0.0138 0.0039
0.7031 0.7041 0.7051 -0.0013 0.0024 0.0062 0.0020
0.7031 0.7036 0.7041 -0.0013 0.0006 0.0024 0.0010
0.7031 0.7034 0.7036 -0.0013 -0.0004 0.0006 0.0005
0.7034 0.7035 0.7036 -0.0004 0.0001 0.0006 0.0002
0.7034 0.7034 0.7035 -0.0004 -0.0001 0.0001 0.0001
El resultado sera 0.7034>> reglafalingrese la funcion asociada f(x)= x^2*exp(x)-1limite inferior : 0limite superior : 1
it a b aprox error 1 0.00000000 1.00000000 0.367879441.00000000 2 0.36787944 1.00000000 0.569456420.35398139 3 0.56945642 1.00000000 0.655135860.13078118 4 0.65513586 1.00000000 0.686782550.04607964 5 0.68678255 1.00000000 0.697800030.01578888 6 0.69780003 1.00000000 0.701553190.00534979 7 0.70155319 1.00000000 0.702822110.00180546 8 0.70282211 1.00000000 0.703250020.00060848 9 0.70325002 1.00000000 0.703394200.00020497 10 0.70339420 1.00000000 0.703442760.00006904 11 0.70344276 1.00000000 0.703459120.00002325 12 0.70345912 1.00000000 0.703464630.00000783 13 0.70346463 1.00000000 0.703466480.00000264 14 0.70346648 1.00000000 0.703467110.00000089 15 0.70346711 1.00000000 0.703467320.00000030 16 0.70346732 1.00000000 0.703467390.00000010 17 0.70346739 1.00000000 0.703467410.00000003 18 0.70346741 1.00000000 0.703467420.00000001
la raiz es = 0.70346742
b)
>> x=(1:0.001:5);>> y=sin(x)-(1./x)-1;>> plot(x,y)>> grid on
Mtodo de BiseccinMtodo de regla falsa
Ingrese la funcion: sin(x)-(1/x)-1Ingrese a : 1Ingrese c : 5Ingrese el error : 0.001
A B C F(a) F(b) F(c) |c-a| 1.0000 3.0000 5.0000 -1.1585 -1.1922 -2.1589 4.0000
3.0000 4.0000 5.0000 -1.1922 -2.0068 -2.1589 2.0000
4.0000 4.5000 5.0000 -2.0068 -2.1998 -2.1589 1.0000
4.5000 4.7500 5.0000 -2.1998 -2.2098 -2.1589 0.5000
4.7500 4.8750 5.0000 -2.2098 -2.1919 -2.1589 0.2500
4.8750 4.9375 5.0000 -2.1919 -2.1773 -2.1589 0.1250
4.9375 4.9688 5.0000 -2.1773 -2.1686 -2.1589 0.0625
4.9688 4.9844 5.0000 -2.1686 -2.1639 -2.1589 0.0313
4.9844 4.9922 5.0000 -2.1639 -2.1614 -2.1589 0.0156
4.9922 4.9961 5.0000 -2.1614 -2.1602 -2.1589 0.0078
4.9961 4.9980 5.0000 -2.1602 -2.1596 -2.1589 0.0039
4.9980 4.9990 5.0000 -2.1596 -2.1592 -2.1589 0.0020
El resultado ser 4.9990
>> reglafalingrese la funcion asociada f(x)= sin(x)-(1/x)-1limite inferior : 1limite superior : 5
it a b aprox error 1 1.00000000 5.00000000 -3.632285111.00000000 2 -3.63228511 5.00000000 -4.780501260.24018740 3 -3.63228511 -4.78050126 -4.264500230.12099918 4 -3.63228511 -4.26450023 -4.043877270.05455728 5 -3.63228511 -4.04387727 -3.997695480.01155210 6 -3.63228511 -3.99769548 -3.990019720.00192374 7 -3.63228511 -3.99001972 -3.988800610.00030563 8 -3.63228511 -3.98880061 -3.988608420.00004818 9 -3.63228511 -3.98860842 -3.988578160.00000759 10 -3.63228511 -3.98857816 -3.988573400.00000119 11 -3.63228511 -3.98857340 -3.988572650.00000019 12 -3.63228511 -3.98857265 -3.988572530.00000003
la raz es = -3.98857253
c) >> x=(-3:0.001:3);>> y=x.^4-3*x.^2+2*x-1;>> plot(x,y)>> grid on
Mtodo de BiseccinMtodo de regla falsa
Ingrese la funcion: x^4-3*x^2+2*x-1Ingrese a : 0Ingrese c : 3Ingrese el error : 0.001
A B C F(a) F(b) F(c) |c-a| 0.0000 1.5000 3.0000 -1.0000 0.3125 59.0000 3.0000
0.0000 0.7500 1.5000 -1.0000 -0.8711 0.3125 1.5000
0.7500 1.1250 1.5000 -0.8711 -0.9451 0.3125 0.7500
1.1250 1.3125 1.5000 -0.9451 -0.5754 0.3125 0.3750
1.3125 1.4063 1.5000 -0.5754 -0.2095 0.3125 0.1875
1.4063 1.4531 1.5000 -0.2095 0.0303 0.3125 0.0938
1.4063 1.4297 1.4531 -0.2095 -0.0947 0.0303 0.0469
1.4297 1.4414 1.4531 -0.0947 -0.0335 0.0303 0.0234
1.4414 1.4473 1.4531 -0.0335 -0.0019 0.0303 0.0117
1.4473 1.4502 1.4531 -0.0019 0.0141 0.0303 0.0059
1.4473 1.4487 1.4502 -0.0019 0.0060 0.0141 0.0029
1.4473 1.4480 1.4487 -0.0019 0.0020 0.0060 0.0015
El resultado ser 1.4480
>> reglafalingrese la funcion asociada f(x)= x^4-3*x^2+2*x-1limite inferior : -3limite superior : 3
it a b aprox error
1 -3.00000000 3.00000000 -26.50000001.00000000 2 -26.50000000 3.00000000 3.003545279.82290679 3 3.00354527 3.00000000 2.359954590.27271316 4 2.35995459 3.00000000 2.078288920.13552768 5 2.07828892 3.00000000 1.915527090.08496973 6 1.91552709 3.00000000 1.808789060.05901077 7 1.80878906 3.00000000 1.733517900.04342105 8 1.73351790 3.00000000 1.677892710.03315182 9 1.67789271 3.00000000 1.635432400.02596274 10 1.63543240 3.00000000 1.602250250.02070972 11 1.60225025 3.00000000 1.575857050.01674848 12 1.57585705 3.00000000 1.554576420.01368902 13 1.55457642 3.00000000 1.537233810.01128170 14 1.53723381 3.00000000 1.522979610.00935942 15 1.52297961 3.00000000 1.511183000.00780621 16 1.51118300 3.00000000 1.501365390.00653912 17 1.50136539 3.00000000 1.493157070.00549730 18 1.49315707 3.00000000 1.486268030.00463512 19 1.48626803 3.00000000 1.480467880.00391778 20 1.48046788 3.00000000 1.475571560.00331825
la raz es = 1.45339032
d)
>> x=(0:0.001:2);>> y=4*exp(-x).*cos(x)-1;>> plot(x,y)>> grid on
Mtodo de BiseccinMtodo de regla falsa
Ingrese la funcion: 4*exp(-x).*cos(x)-1Ingrese a : 0Ingrese c : 2Ingrese el error : 0.01
A B C F(a) F(b) F(c) |c-a| 0.0000 1.0000 2.0000 3.0000 -0.2049 -1.2253 2.0000
0.0000 0.5000 1.0000 3.0000 1.1291 -0.2049 1.0000
0.5000 0.7500 1.0000 1.1291 0.3825 -0.2049 0.5000
0.7500 0.8750 1.0000 0.3825 0.0688 -0.2049 0.2500
0.8750 0.9375 1.0000 0.0688 -0.0730 -0.2049 0.1250
0.8750 0.9063 0.9375 0.0688 -0.0033 -0.0730 0.0625
0.8750 0.8906 0.9063 0.0688 0.0324 -0.0033 0.0313
0.8906 0.8984 0.9063 0.0324 0.0145 -0.0033 0.0156
El resultado ser 0.8984
>> reglafalingrese la funcion asociada f(x)= 4*exp(-x)*cos(x)-1limite inferior : 0limite superior : 2
it a b aprox error 1 0.00000000 2.00000000 1.420025111.00000000 2 0.00000000 1.42002511 1.105140620.28492708 3 0.00000000 1.10514062 0.973630050.13507242 4 0.00000000 0.97363005 0.927133160.05015125 5 0.00000000 0.92713316 0.911890210.01671578 6 0.00000000 0.91189021 0.907029740.00535867 7 0.00000000 0.90702974 0.905494100.00169591 8 0.00000000 0.90549410 0.905010350.00053452 9 0.00000000 0.90501035 0.904858100.00016825 10 0.00000000 0.90485810 0.904810200.00005294 11 0.00000000 0.90481020 0.904795130.00001666 12 0.00000000 0.90479513 0.904790390.00000524 13 0.00000000 0.90479039 0.904788900.00000165 14 0.00000000 0.90478890 0.904788430.00000052 15 0.00000000 0.90478843 0.904788290.00000016 16 0.00000000 0.90478829 0.904788240.00000005 17 0.00000000 0.90478824 0.904788220.00000002
la raz es = 0.90478822
e)
>> x= (-3:0.001:3);>> y= exp(-x)-x;>> plot(x,y)>> grid on
Mtodo de BiseccinMtodo de regla falsa
Ingrese la funcion: exp(-x)-x;Ingrese a : -3Ingrese c : 3Ingrese el error : 0.01
A B C F(a) F(b) F(c) |c-a| -3.0000 0.0000 3.0000 23.0855 1.0000 -2.9502 6.0000
0.0000 1.5000 3.0000 1.0000 -1.2769 -2.9502 3.0000
0.0000 0.7500 1.5000 1.0000 -0.2776 -1.2769 1.5000
0.0000 0.3750 0.7500 1.0000 0.3123 -0.2776 0.7500
0.3750 0.5625 0.7500 0.3123 0.0073 -0.2776 0.3750
0.5625 0.6563 0.7500 0.0073 -0.1375 -0.2776 0.1875
0.5625 0.6094 0.6563 0.0073 -0.0657 -0.1375 0.0938
0.5625 0.5859 0.6094 0.0073 -0.0294 -0.0657 0.0469
0.5625 0.5742 0.5859 0.0073 -0.0111 -0.0294 0.0234
0.5625 0.5684 0.5742 0.0073 -0.0019 -0.0111 0.0117
El resultado ser 0.5684>> reglafalingrese la funcion asociada f(x)= exp(-x)-x;limite inferior : -3limite superior : 3
it a b aprox error 1 -3.00000000 3.00000000 2.320116471.00000000 2 -3.00000000 2.32011647 1.853038540.25206056 3 -3.00000000 1.85303854 1.520855270.21841873 4 -3.00000000 1.52085527 1.279438210.18868989 5 -3.00000000 1.27943821 1.101549580.16148945 6 -3.00000000 1.10154958 0.969295440.13644358 7 -3.00000000 0.96929544 0.870388610.11363525 8 -3.00000000 0.87038861 0.796128650.09327633 9 -3.00000000 0.79612865 0.740223960.07552402 10 -3.00000000 0.74022396 0.698059390.06040255 11 -3.00000000 0.69805939 0.666216460.04779667 12 -3.00000000 0.66621646 0.642146180.03748412 13 -3.00000000 0.64214618 0.623939120.02918082 14 -3.00000000 0.62393912 0.610160380.02258216 15 -3.00000000 0.61016038 0.599729180.01739318 16 -3.00000000 0.59972918 0.591830160.01334678 17 -3.00000000 0.59183016 0.585847440.01021206 18 -3.00000000 0.58584744 0.581315480.00779604 19 -3.00000000 0.58131548 0.577882100.00594132 20 -3.00000000 0.57788210 0.575280790.00452182
la raz es = 0.56765165
Ejercicios 1.2a)
>> x=(-4:0.0001:4);>> y=exp(x)-9;>> plot(x,y)>> grid on
Mtodo de BiseccinMtodo de regla falsa
Ingrese la funcion: exp(x)-9Ingrese a : -4Ingrese c : 4Ingrese el error : 0.001
A B C F(a) F(b) F(c) |c-a| -4.0000 0.0000 4.0000 -8.9817 -8.0000 45.5982 8.0000
0.0000 2.0000 4.0000 -8.0000 -1.6109 45.5982 4.0000
2.0000 3.0000 4.0000 -1.6109 11.0855 45.5982 2.0000
2.0000 2.5000 3.0000 -1.6109 3.1825 11.0855 1.0000
2.0000 2.2500 2.5000 -1.6109 0.4877 3.1825 0.5000
2.0000 2.1250 2.2500 -1.6109 -0.6271 0.4877 0.2500
2.1250 2.1875 2.2500 -0.6271 -0.0871 0.4877 0.1250
2.1875 2.2188 2.2500 -0.0871 0.1958 0.4877 0.0625
2.1875 2.2031 2.2188 -0.0871 0.0533 0.1958 0.0313
2.1875 2.1953 2.2031 -0.0871 -0.0172 0.0533 0.0156
2.1953 2.1992 2.2031 -0.0172 0.0180 0.0533 0.0078
2.1953 2.1973 2.1992 -0.0172 0.0004 0.0180 0.0039
2.1953 2.1963 2.1973 -0.0172 -0.0084 0.0004 0.0020
El resultado ser 2.1963
>> reglafalingrese la funcion asociada f(x)= exp(x)-9limite inferior : -4limite superior : 4
it a b aprox error 1 -4.00000000 4.00000000 -2.683516071.00000000 2 -2.68351607 4.00000000 -1.588793920.68902715 3 -1.58879392 4.00000000 -0.685052861.31922822 4 -0.68505286 4.00000000 0.0507745514.49205309 5 0.05077455 4.00000000 0.636963390.92028656 6 0.63696339 4.00000000 1.090575670.41593838 7 1.09057567 4.00000000 1.430088970.23740711 8 1.43008897 4.00000000 1.675816550.14663156 9 1.67581655 4.00000000 1.848371150.09335495 10 1.84837115 4.00000000 1.966570430.06010427 11 1.96657043 4.00000000 2.046013230.03882810 12 2.04601323 4.00000000 2.098677260.02509391 13 2.09867726 4.00000000 2.133255380.01620909 14 2.13325538 4.00000000 2.155811010.01046271 15 2.15581101 4.00000000 2.170460350.00674941 16 2.17046035 4.00000000 2.179947480.00435200 17 2.17994748 4.00000000 2.186079990.00280525 18 2.18607999 4.00000000 2.190039220.00180784 19 2.19003922 4.00000000 2.192593330.00116488 20 2.19259333 4.00000000 2.194240160.00075052 21 2.19424016 4.00000000 2.195301640.00048352 22 2.19530164 4.00000000 2.195985680.00031150 23 2.19598568 4.00000000 2.196426430.00020067 24 2.19642643 4.00000000 2.196710400.00012927 25 2.19671040 4.00000000 2.196893340.00008327 26 2.19689334 4.00000000 2.197011200.00005364 27 2.19701120 4.00000000 2.197087120.00003456 28 2.19708712 4.00000000 2.197136030.00002226 29 2.19713603 4.00000000 2.197167540.00001434 30 2.19716754 4.00000000 2.197187830.00000924
la raz es = 2.19718783
b) Sen(t)t-2
>> t=(-3:0.0001:3);>> y=sin(t).*(t-2);>> plot(t,y)>> grid on
Mtodo de BiseccinMtodo de regla falsa
Ingrese la funcion: sin(x).*(x-2)Ingrese a : -3Ingrese c : 3Ingrese el error : 0.001
A B C F(a) F(b) F(c) |c-a| -3.0000 0.0000 3.0000 0.7056 -0.0000 0.1411 6.0000
-3.0000 -1.5000 0.0000 0.7056 3.4912 -0.0000 3.0000
-1.5000 -0.7500 0.0000 3.4912 1.8745 -0.0000 1.5000
-0.7500 -0.3750 0.0000 1.8745 0.8699 -0.0000 0.7500
-0.3750 -0.1875 0.0000 0.8699 0.4078 -0.0000 0.3750
-0.1875 -0.0938 0.0000 0.4078 0.1960 -0.0000 0.1875
-0.0938 -0.0469 0.0000 0.1960 0.0959 -0.0000 0.0938
-0.0469 -0.0234 0.0000 0.0959 0.0474 -0.0000 0.0469
-0.0234 -0.0117 0.0000 0.0474 0.0236 -0.0000 0.0234
-0.0117 -0.0059 0.0000 0.0236 0.0118 -0.0000 0.0117
-0.0059 -0.0029 0.0000 0.0118 0.0059 -0.0000 0.0059
-0.0029 -0.0015 0.0000 0.0059 0.0029 -0.0000 0.0029
-0.0015 -0.0007 0.0000 0.0029 0.0015 -0.0000 0.0015
El resultado sera -0.0007
>> reglafalingrese la funcion asociada f(x)= sin(x)*(x-2)limite inferior : 1limite superior : 3
it a b aprox error 1 1.00000000 3.00000000 2.712759411.00000000 2 1.00000000 2.71275941 2.266639390.19682002 3 1.00000000 2.26663939 2.018850570.12273757 4 1.00000000 2.01885057 1.998686420.01008870 5 1.99868642 2.01885057 2.000011640.00066261 6 1.99868642 2.00001164 2.000000010.00000582 7 1.99868642 2.00000001 2.000000000.00000000
la raiz es = 2.00000000
c) >> x=(1:0.001:3);>> y= x.^3-8*x.^5+5*x.^2-x+9;>> plot(x,y)>> grid on
Mtodo de BiseccinMtodo de regla falsa
Ingrese la funcion: x^3-8*x^5+5*x^2-x+9Ingrese a : 1Ingrese c : 3Ingrese el error : 0.01
A B C F(a) F(b) F(c) |c-a| 1.0000 2.0000 3.0000 6.0000 -221.0000 -1866.000 2.0000
1.0000 1.5000 2.0000 6.0000 -38.6250 -221.0000 1.0000
1.0000 1.2500 1.5000 6.0000 -6.8984 -38.6250 0.5000
1.0000 1.1250 1.2500 6.0000 1.2107 -6.8984 0.2500
1.1250 1.1875 1.2500 1.2107 -2.3533 -6.8984 0.1250
1.1250 1.1563 1.1875 1.2107 -0.4588 -2.3533 0.0625
1.1250 1.1406 1.1563 1.2107 0.4029 -0.4588 0.0313
1.1406 1.1484 1.1563 0.4029 -0.0211 -0.4588 0.0156
El resultado sera 1.1484>> reglafalingrese la funcion asociada f(x)= x^3-8*x^5+5*x^2-x+9limite inferior : 1limite superior : 3
it a b aprox error 1 1.00000000 3.00000000 1.006410261.00000000 2 1.00641026 3.00000000 1.012606250.00611886 3 1.01260625 3.00000000 1.018590220.00587475 4 1.01859022 3.00000000 1.024364750.00563718 5 1.02436475 3.00000000 1.029932760.00540619 6 1.02993276 3.00000000 1.035297500.00518183 7 1.03529750 3.00000000 1.040462470.00496411 8 1.04046247 3.00000000 1.045431470.00475305 9 1.04543147 3.00000000 1.050208490.00454864 10 1.05020849 3.00000000 1.054797750.00435085 11 1.05479775 3.00000000 1.059203640.00415963 12 1.05920364 3.00000000 1.063430720.00397494 13 1.06343072 3.00000000 1.067483660.00379672 14 1.06748366 3.00000000 1.071367220.00362487 15 1.07136722 3.00000000 1.075086280.00345931 16 1.07508628 3.00000000 1.078645750.00329994 17 1.07864575 3.00000000 1.082050580.00314664 18 1.08205058 3.00000000 1.085305740.00299930 19 1.08530574 3.00000000 1.088416210.00285779 20 1.08841621 3.00000000 1.091386930.00272197 21 1.09138693 3.00000000 1.094222840.00259171 22 1.09422284 3.00000000 1.096928800.00246685 23 1.09692880 3.00000000 1.099509640.00234726 24 1.09950964 3.00000000 1.101970090.00223277 25 1.10197009 3.00000000 1.104314820.00212325 26 1.10431482 3.00000000 1.106548410.00201852 27 1.10654841 3.00000000 1.108675320.00191843 28 1.10867532 3.00000000 1.110699940.00182283 29 1.11069994 3.00000000 1.112626530.00173157 30 1.11262653 3.00000000 1.114459240.00164448
la raiz es = 1.11445924
d)
>> x=(-2:0.01:2);>> y= x.*exp(-x)-sin(x)+3;>> plot(x,y)>> grid on
Mtodo de BiseccinMtodo de regla falsa
Ingrese la funcion: x*exp(-x)-sin(x)+3Ingrese a : -2Ingrese c : 2Ingrese el error : 0.01
A B C F(a) F(b) F(c) |c-a| -2.0000 0.0000 2.0000 -10.8688 3.0000 2.3614 4.0000
-2.0000 -1.0000 0.0000 -10.8688 1.1232 3.0000 2.0000
-2.0000 -1.5000 -1.0000 -10.8688 -2.7250 1.1232 1.0000
-1.5000 -1.2500 -1.0000 -2.7250 -0.4139 1.1232 0.5000
-1.2500 -1.1250 -1.0000 -0.4139 0.4370 1.1232 0.2500
-1.2500 -1.1875 -1.1250 -0.4139 0.0338 0.4370 0.1250
-1.2500 -1.2188 -1.1875 -0.4139 -0.1843 0.0338 0.0625
-1.2188 -1.2031 -1.1875 -0.1843 -0.0739 0.0338 0.0313
-1.2031 -1.1953 -1.1875 -0.0739 -0.0197 0.0338 0.0156
El resultado sera -1.1953>> reglafalingrese la funcion asociada f(x)= x*exp(-x)-sin(x)+3limite inferior : -2limite superior : 2
it a b aprox error 1 -2.00000000 2.00000000 1.286065121.00000000 2 -2.00000000 1.28606512 0.692575030.85693256 3 -2.00000000 0.69257503 0.155525873.45311791 4 -2.00000000 0.15552587 -0.308085221.50481445 5 -2.00000000 -0.30808522 -0.662882750.53523423 6 -2.00000000 -0.66288275 -0.898854370.26252486 7 -2.00000000 -0.89885437 -1.038172650.13419568 8 -2.00000000 -1.03817265 -1.113957100.06803175 9 -2.00000000 -1.11395710 -1.153216020.03404299 10 -2.00000000 -1.15321602 -1.173018740.01688185 11 -2.00000000 -1.17301874 -1.182870470.00832866 12 -2.00000000 -1.18287047 -1.187737610.00409782 13 -2.00000000 -1.18773761 -1.190133840.00201341 14 -2.00000000 -1.19013384 -1.191311550.00098859 15 -2.00000000 -1.19131155 -1.191889890.00048523 16 -2.00000000 -1.19188989 -1.192173780.00023813 17 -2.00000000 -1.19217378 -1.192313100.00011685 18 -2.00000000 -1.19231310 -1.192381470.00005734 19 -2.00000000 -1.19238147 -1.192415020.00002813 20 -2.00000000 -1.19241502 -1.192431480.00001381 21 -2.00000000 -1.19243148 -1.192439560.00000677 22 -2.00000000 -1.19243956 -1.192443520.00000332 23 -2.00000000 -1.19244352 -1.192445470.00000163 24 -2.00000000 -1.19244547 -1.192446420.00000080 25 -2.00000000 -1.19244642 -1.192446890.00000039 26 -2.00000000 -1.19244689 -1.192447120.00000019 27 -2.00000000 -1.19244712 -1.192447230.00000009 28 -2.00000000 -1.19244723 -1.192447290.00000005 29 -2.00000000 -1.19244729 -1.192447310.00000002
la raiz es = -1.19244731
e) Cos(t)-0.5>> t=(1:0.001:3);>> y=cos(t)-0.5;>> plot(t,y)>> grid on
Mtodo de BiseccinMtodo de regla falsa
Ingrese la funcion: cos(x)-0.5Ingrese a : 1Ingrese c : 3Ingrese el error : 0.001
A B C F(a) F(b) F(c) |c-a| 1.0000 2.0000 3.0000 0.0403 -0.9161 -1.4900 2.0000
1.0000 1.5000 2.0000 0.0403 -0.4293 -0.9161 1.0000
1.0000 1.2500 1.5000 0.0403 -0.1847 -0.4293 0.5000
1.0000 1.1250 1.2500 0.0403 -0.0688 -0.1847 0.2500
1.0000 1.0625 1.1250 0.0403 -0.0133 -0.0688 0.1250
1.0000 1.0313 1.0625 0.0403 0.0137 -0.0133 0.0625
1.0313 1.0469 1.0625 0.0137 0.0003 -0.0133 0.0313
1.0469 1.0547 1.0625 0.0003 -0.0065 -0.0133 0.0156
1.0469 1.0508 1.0547 0.0003 -0.0031 -0.0065 0.0078
1.0469 1.0488 1.0508 0.0003 -0.0014 -0.0031 0.0039
1.0469 1.0479 1.0488 0.0003 -0.0006 -0.0014 0.0020
El resultado sera 1.0479>> reglafalingrese la funcion asociada f(x)= cos(x)-0.5limite inferior : 1limite superior : 3
it a b aprox error 1 1.00000000 3.00000000 1.052672601.00000000 2 1.00000000 1.05267260 1.047120210.00530253 3 1.04712021 1.05267260 1.047197430.00007374 4 1.04719743 1.05267260 1.047197550.00000012 5 1.04719755 1.05267260 1.047197550.00000000
la raiz es = 1.04719755
f) >> x=(-3:0.001:3);>> y=sin(x.^2)-3/11*sqrt(abs(x))-1;>> plot(x,y)>> grid on
Mtodo de BiseccinMtodo de regla falsa
Ingrese la funcion: sin(x.^2)-3/11*sqrt(abs(x))-1;Ingrese a : -3Ingrese c : 3Ingrese el error : 0.001
A B C F(a) F(b) F(c) |c-a| -3.0000 0.0000 3.0000 -1.0603 -1.0000 -1.0603 6.0000
0.0000 1.5000 3.0000 -1.0000 -0.5559 -1.0603 3.0000
1.5000 2.2500 3.0000 -0.5559 -2.3484 -1.0603 1.5000
2.2500 2.6250 3.0000 -2.3484 -0.8711 -1.0603 0.7500
2.6250 2.8125 3.0000 -0.8711 -0.4590 -1.0603 0.3750
2.8125 2.9063 3.0000 -0.4590 -0.6353 -1.0603 0.1875
2.9063 2.9531 3.0000 -0.6353 -0.8215 -1.0603 0.0938
2.9531 2.9766 3.0000 -0.8215 -0.9352 -1.0603 0.0469
2.9766 2.9883 3.0000 -0.9352 -0.9965 -1.0603 0.0234
2.9883 2.9941 3.0000 -0.9965 -1.0281 -1.0603 0.0117
2.9941 2.9971 3.0000 -1.0281 -1.0441 -1.0603 0.0059
2.9971 2.9985 3.0000 -1.0441 -1.0522 -1.0603 0.0029
2.9985 2.9993 3.0000 -1.0522 -1.0562 -1.0603 0.0015
El resultado sera 2.9993
>> reglafalingrese la funcion asociada f(x)= sin(x^2)-3/11*sqrt(abs(x))-1limite inferior : 0limite superior : 3
it a b aprox error 1 0.00000000 3.00000000 -49.785087961.00000000 2 -49.78508796 3.00000000 35.860271432.38830762 3 35.86027143 3.00000000 -11.283603364.17808685 4 -11.28360336 3.00000000 -104.780115860.89231160 5 -104.78011586 3.00000000 63.353794602.65388856 6 63.35379460 3.00000000 -17.910831744.53717770 7 -17.91083174 3.00000000 32.721714511.54736838 8 32.72171451 3.00000000 -29.891190712.09469425 9 -29.89119071 3.00000000 76.350654691.39149881 10 76.35065469 3.00000000 -20.542623134.71669451 11 -20.54262313 3.00000000 80.847654541.25409053 12 80.84765454 3.00000000 -54.900855832.47261192 13 -54.90085583 3.00000000 23.963729513.29099798 14 23.96372951 3.00000000 -30.237308411.79252191 15 -30.23730841 3.00000000 26.022893682.16195027 16 26.02289368 3.00000000 -7.543311464.44979706 17 -7.54331146 3.00000000 35.573025491.21205145 18 35.57302549 3.00000000 -32.098962762.10822975 19 -32.09896276 3.00000000 26.497806852.21138187 20 26.49780685 3.00000000 -7.630741674.47250739 21 -44.74598319 3.00000000 22.395019592.99803278
la raiz es = 22.39501959
Top Related