Punto Fijo

Descargar como pptx, pdf o txt
Descargar como pptx, pdf o txt
Está en la página 1de 18

UNIVERSIDAD NACIONAL ALTIPLANO PUNO

EP.MECANICA ELECTRICA

CURSO
METODOS NUMERICOS
TEMA
PRACTICA METODO DE PUNTO FIJO
PRESTENDADO POR: RUEL YASMANI LAYME CANAZA
CODIGO: 190677
(E^X)-2-X X=(E^X)-2
•  ••  Iteración 2





• Iteración 3
•Iteración 1



• 
iteración 4

iteración 5

iteración 6
(e^x)-2-x   x=(e^x)-2    

iteracion x1 g(x) error abs error rel

0 -2 -1.86466472 0.135335283 7.2579%

1 -1.864664717 -1.84505185 0.019612869 1.0630%

2 -1.845051847 -1.84198287 0.003068975 0.1666%

3 -1.841982872 -1.84149718 0.000485696 0.0264%

4 -1.841497177 -1.84142017 7.70028E-05 0.0042%


cos(x)+1-x x=cos(x)+1
•  • 
Iteración 2
• Xo=1.2

• Iteración 1
Iteración 3
•Iteración
  4

Iteración 5

Iteración 6
cos(x)+1-x   x=cos(x)+1    

iteracion x1 g(x) error abs error rel

0 1.200000 1.362358 0.162358 0.119174

1 1.362358 1.206933 0.155425 0.128777

2 1.206933 1.355888 0.148955 0.109858

3 1.355888 1.213258 0.142630 0.117559

4 1.213258 1.349969 0.136711 0.101270

5 1.349969 1.219037 0.130932 0.107406

6 1.219037 1.344550 0.125513 0.093350

7 1.344550 1.224321 0.120229 0.098201

8 1.224321 1.339585 0.115264 0.086044

9 1.339585 1.229157 0.110428 0.089840

10 1.229157 1.335032 0.105875 0.079305

11 1.335032 1.233586 0.101446 0.082237

12 1.233586 1.330856 0.097270 0.073088

13 1.330856 1.237645 0.093211 0.075313

14 1.237645 1.327023 0.089378 0.067352

15 1.327023 1.241366 0.085656 0.069002

16 1.241366 1.323504 0.082137 0.062061

17 1.323504 1.244780 0.078724 0.063243

18 1.244780 1.320272 0.075492 0.057179

19 1.320272 1.247912 0.072360 0.057985

20 1.247912 1.317303 0.069391 0.052677


103 1.284522 1.282380 0.002142 0.001670

104 1.282380 1.284434 0.002054 0.001599

105 1.284434 1.282465 0.001969 0.001536

106 1.282465 1.284353 0.001889 0.001471

107 1.284353 1.282542 0.001811 0.001412

108 1.282542 1.284279 0.001737 0.001353

109 1.284279 1.282613 0.001666 0.001299

110 1.282613 1.284211 0.001597 0.001244

111 1.284211 1.282679 0.001532 0.001194

112 1.282679 1.284148 0.001469 0.001144

113 1.284148 1.282739 0.001409 0.001098

114 1.282739 1.284090 0.001351 0.001052

115 1.284090 1.282794 0.001296 0.001010

116 1.282794 1.284037 0.001243 0.000968

117 1.284037 1.282845 0.001192 0.000929

118 1.282845 1.283988 0.001143 0.000890

119 1.283988 1.282892 0.001096 0.000854

120 1.282892 1.283943 0.001051 0.000819

121 1.283943 1.282935 0.001008 0.000786

122 1.282935 1.283902 0.000967 0.000753

123 1.283902 1.282975 0.000927 0.000722


(x^2)-10x+23 x=(23+x^2)/10
•  Xo=6.5 •Iteración
  2

Iteración 1
Iteración 3
•Iteración
  4

Iteración 5

Iteración 6
DIVERGE
  (x^2)-10x+23 x=(23+x^2)/10    

iteracion x1 g(x) error abs error rel

0 6.5000 27.2 20.725 76.125%

1 27.2250 97.1 6.9895E+01 71.968%

2 97.1201 966.2 8.6911E+02 89.949%

3 966.2307 93383.2 9.2417E+04 98.965%

4 93383.1677 872041623.5 8.7195E+08 99.989%

5 872041623.4644 76045659305443600.0 7.6046E+16 100.000%


(x^2)-10x+23 x=(raiz(10x-23))
  (x^2)-10x+23 x=(raiz(10x-23))    
iteracion x1 g(x) error abs error rel
0 6.5 6.480741 0.019259 0.297%
1 6.480741 6.465865 0.014876 0.230%
2 6.465865 6.454351 0.011514 0.178%
3 6.454351 6.445426 0.008926 0.138%
4 6.445426 6.438498 0.006928 0.108%
5 6.438498 6.433116 0.005382 0.084%
6 6.433116 6.428931 0.004184 0.065%
7 6.428931 6.425676 0.003255 0.051%
8 6.425676 6.423143 0.002533 0.039%
9 6.423143 6.421170 0.001972 0.031%
10 6.421170 6.419634 0.001536 0.024%
11 6.419634 6.418438 0.001197 0.019%
12 6.418438 6.417505 0.000932 0.015%
13 6.417505 6.416779 0.000726 0.011%
clc;

f = input ( " Escribe la función f (x) = " , " s " );


f = inline (f);

xi = input ( " Escribe el valor de Xo = " );

cantidadIteraciones = input ( " Digite cantidad de iteraciones a realizar: " );

contador = 0 ;
fprintf ( " ----------------------------------------------- - | \ " )
fprintf ( " ")
fprintf ( " N \ Xo \ Xi \ Ea \ Er " )
fprintf ( " ")
fprintf ( " ----------------------------------------------- - | \ " )
fprintf ( " ")
function puntoFijo ( f , xnueva , contador , cantidadIteraciones )

while contador <= cantidadIteraciones


if contador >= 0
xanterior = xnueva;
xnueva = f (xanterior);
fprintf ( " % .0f \ " , contador);
fprintf ( " % .6f \ ", xanterior );
fprintf ( " % .6f \ " , xnueva);
ea = abs (xnueva - xanterior);
fprintf ( " % .6f " , ea);
er = abs ((xnueva - xanterior) / xnueva) * 100 ;
fprintf ( " % .2f " , er);

endif
fprintf ("\n");
contador = contador + 1 ;
endwhile
fprintf ( " ----------------------------------------------- - | \ " )
fprintf ( " ")
fprintf ( " LA RAIZ APROXIMADA:% .6f \ " , xnueva);
endfunction

puntoFijo (f, xi, contador, cantidadIteraciones)

También podría gustarte