Metodos Numericos
Enviado por plotface • 8 de Marzo de 2015 • 1.111 Palabras (5 Páginas) • 197 Visitas
digite funcion F=(20-x+sqrt(20-x))*(x+sqrt(x))-155.55
digite el intervalo a trabajar en vector de una fila I= [0 10]
diigte la tolerencia tol= 1*10^-4
digite el numero maximo de iteracciones= 100
a=0.000000 b=10.000000 c=5.000000 F(c)=-18.983810
a=5.000000 b=10.000000 c=7.500000 F(c)=8.631623
a=5.000000 b=7.500000 c=6.250000 F(c)=-2.791632
a=6.250000 b=7.500000 c=6.875000 F(c)=3.504647
a=6.250000 b=6.875000 c=6.562500 F(c)=0.503841
a=6.250000 b=6.562500 c=6.406250 F(c)=-1.106896
a=6.406250 b=6.562500 c=6.484375 F(c)=-0.292299
a=6.484375 b=6.562500 c=6.523438 F(c)=0.108075
a=6.484375 b=6.523438 c=6.503906 F(c)=-0.091536
a=6.503906 b=6.523438 c=6.513672 F(c)=0.008414
a=6.503906 b=6.513672 c=6.508789 F(c)=-0.041525
a=6.508789 b=6.513672 c=6.511230 F(c)=-0.016547
a=6.511230 b=6.513672 c=6.512451 F(c)=-0.004064
a=6.512451 b=6.513672 c=6.513062 F(c)=0.002175
a=6.512451 b=6.513062 c=6.512756 F(c)=-0.000944
a=6.512756 b=6.513062 c=6.512909 F(c)=0.000615
a=6.512756 b=6.512909 c=6.512833 F(c)=-0.000164
a=6.512833 b=6.512909 c=6.512871 F(c)=0.000226
a=6.512833 b=6.512871 c=6.512852 F(c)=0.000031
la raiz aproximada es=6.512852e+00
De donde y= α*=6.512852
x+y=20[1].
Ahora de de la ecuación [1]
x=20-y
x=20-(6.512852)
x= 13.487148
Ahora con el método de newton Raphsoh
digite la funcion F=(20-x+sqrt(20-x))*(x+sqrt(x))-155.55
digite un valor inicial= 6
digite la tolerancia= 1*10^-4
digite el # maximo de iteraciones= 100
iteracion n=0 x(0)= 6.000000 f(x0)=-5.642048
iteracion n=1 x(1)= 6.478766 f(x1)=-0.350166 error=0.478766
iteracion n=2 x(2)= 6.512679 f(x2)=-0.001739 error=0.033912
iteracion n=3 x(3)= 6.512849 f(x3)=-0.000000 error=0.000170
iteracion n=4 x(4)= 6.512849 f(x4)=0.000000 error=0.000000
y= α*=6.512849
Ahora de de la ecuación [1]
x=20-y
x=20-(6. 512849)
x= 13.487151
2.Ecuación de valor esperado.
digite la funcion F=(1500/x)*((1+x)^240-1)-750000
digite un valor inicial= 0.5
digite la tolerancia= 1*10^-4
digite el # maximo de iteraciones= 100
iteracion n=0 x(0)= 0.500000 f(x0)=5483065426045120500000000000000000000000000000.000000
iteracion n=1 x(1)= 0.493671 f(x1)=2012952779020813500000000000000000000000000000.000000 error=0.006329
iteracion n=2 x(2)= 0.487368 f(x2)=738999521501152360000000000000000000000000000.000000 error=0.006303
iteracion n=3 x(3)= 0.481091 f(x3)=271303347842469660000000000000000000000000000.000000 error=0.006277
iteracion n=4 x(4)= 0.474839 f(x4)=99601662949073105000000000000000000000000000.000000 error=0.006251
iteracion n=5 x(5)= 0.468613 f(x5)=36566086535004321000000000000000000000000000.000000 error=0.006226
iteracion n=6 x(6)= 0.462413 f(x6)=13424275279701072000000000000000000000000000.000000 error=0.006200
iteracion n=7 x(7)= 0.456239 f(x7)=4928374554135233600000000000000000000000000.000000 error=0.006175
iteracion n=8 x(8)= 0.450089 f(x8)=1809327036820923600000000000000000000000000.000000 error=0.006149
iteracion n=9 x(9)= 0.443965 f(x9)=664249088894895440000000000000000000000000.000000 error=0.006124
iteracion n=10 x(10)= 0.437866 f(x10)=243862718072479330000000000000000000000000.000000 error=0.006099
iteracion n=11 x(11)= 0.431791 f(x11)=89528317339024337000000000000000000000000.000000 error=0.006074
iteracion n=12 x(12)= 0.425742 f(x12)=32868207918824528000000000000000000000000.000000 error=0.006049
iteracion n=13 x(13)= 0.419717 f(x13)=12066803587995169000000000000000000000000.000000 error=0.006025
iteracion n=14 x(14)= 0.413717 f(x14)=4430054826408127400000000000000000000000.000000 error=0.006000
iteracion n=15 x(15)= 0.407742 f(x15)=1626397220091656100000000000000000000000.000000 error=0.005976
iteracion n=16 x(16)= 0.401791 f(x16)=597096929005425830000000000000000000000.000000 error=0.005951
iteracion n=17 x(17)= 0.395864 f(x17)=219211721288515290000000000000000000000.000000 error=0.005927
iteracion n=18 x(18)= 0.389961 f(x18)=80479164213532668000000000000000000000.000000 error=0.005903
iteracion n=19 x(19)= 0.384082 f(x19)=29546355922099587000000000000000000000.000000 error=0.005879
iteracion n=20 x(20)= 0.378227 f(x20)=10847388844519970000000000000000000000.000000 error=0.005855
iteracion n=21 x(21)= 0.372396 f(x21)=3982422592501390100000000000000000000.000000 error=0.005831
iteracion n=22 x(22)= 0.366588 f(x22)=1462077406828396900000000000000000000.000000 error=0.005807
iteracion n=23 x(23)= 0.360804 f(x23)=536777517196465290000000000000000000.000000 error=0.005784
iteracion n=24 x(24)= 0.355044 f(x24)=197069419926183950000000000000000000.000000 error=0.005761
iteracion n=25 x(25)= 0.349307 f(x25)=72351105857327555000000000000000000.000000 error=0.005737
iteracion n=26 x(26)= 0.343593 f(x26)=26562697106695220000000000000000000.000000 error=0.005714
iteracion n=27 x(27)= 0.337902 f(x27)=9752147869015525200000000000000000.000000 error=0.005691
iteracion n=28 x(28)= 0.332233 f(x28)=3580383520713769100000000000000000.000000 error=0.005668
iteracion n=29 x(29)= 0.326588 f(x29)=1314498339404458500000000000000000.000000 error=0.005645
iteracion n=30 x(30)= 0.320966 f(x30)=482604997038617580000000000000000.000000 error=0.005623
iteracion n=31 x(31)= 0.315366 f(x31)=177184175172176250000000000000000.000000
...