You are on page 1of 8

MÉTODO CUASI - NEWTON

ITERACIÓN 1
PASO 1
∂x x2 + y2 - 1 ∂y x2 + y2 - 1
In[1]:= J[x_, y_] :=
∂x x2 - y2 + 1 / 2 ∂y x2 - y2 + 1 / 2

F[x_, y_] := x2 + y2 - 1, x2 - y2 + 1 / 2


J[x, y] // MatrixForm
forma de matriz
x0 = {{1}, {3}};
x0 // MatrixForm
forma de matriz
Out[3]//MatrixForm=
2x 2y
2 x -2 y
Out[5]//MatrixForm=
1
3

PASO 2
In[6]:= J[x_, y_] := {{2 x, 2 y}, {2 x, - 2 y}}
A = J[1, 3];
A // MatrixForm
forma de matriz
B = F[1, 3];
B // MatrixForm
forma de matriz
Out[8]//MatrixForm=
2 6
2 -6
Out[10]//MatrixForm=
9
15
-
2

Printed by Wolfram Mathematica Student Edition


2 CUASI-NEWTON.nb

PASO 3
In[11]:= c = Inverse[A];
matriz inversa
c // MatrixForm
forma de matriz
Out[12]//MatrixForm=
1 1
4 4
1 1
-
12 12

PASO 4
In[13]:= y0 = {{3 / 8 }, {11 / 8}};

PASO 5
In[14]:= X 1 = x 0 - y0 ;
X1 // MatrixForm
forma de matriz
Out[15]//MatrixForm=
5
8
13
8

PASO 6
In[17]:= error = (0.625 - 1)2 + (1.625 - 3)2
Out[17]= 1.42522

Printed by Wolfram Mathematica Student Edition


CUASI-NEWTON.nb 3

ITERACION 2

PASO 2
In[18]:= J[x_, y_] := {{2 x, 2 y}, {2 x, - 2 y}}
A = J[0.625, 1.625];
A // MatrixForm
forma de matriz
B = F[0.625, 1.625];
B // MatrixForm
forma de matriz
Out[20]//MatrixForm=
1.25 3.25
1.25 - 3.25
Out[22]//MatrixForm=
2.03125
- 1.75

PASO 3
In[23]:= c = Inverse[A];
matriz inversa
c // MatrixForm
forma de matriz
Out[24]//MatrixForm=
0.4 0.4
0.153846 - 0.153846

PASO 4
In[25]:= y1 = (c) (B);
y1 = {{0.1125}, {0.5817301875}};

PASO 5
In[27]:= X 2 = X 1 - y1 ;
X2 // MatrixForm
forma de matriz
Out[28]//MatrixForm=
0.5125
1.04327

Printed by Wolfram Mathematica Student Edition


4 CUASI-NEWTON.nb

PASO 6
In[29]:= error = (0.5125 - 0.625)2 + (1.0432698125 - 1.625)2
Out[29]= 0.592508

ITERACIÓN 3

PASO 2
In[30]:= J[x_, y_] := {{2 x, 2 y}, {2 x, - 2 y}}
A = J[0.5125, 1.0432698125];
A // MatrixForm
forma de matriz
B = F[0.5125, 1.0432698125];
B // MatrixForm
forma de matriz
Out[32]//MatrixForm=
1.025 2.08654
1.025 - 2.08654
Out[34]//MatrixForm=
0.351068
- 0.325756

PASO 3
In[35]:= c = Inverse[A];
matriz inversa
c // MatrixForm
forma de matriz
Out[36]//MatrixForm=
0.487805 0.487805
0.239631 - 0.239631

PASO 4
In[37]:= y2 = {{0.01234}, {0.16218}};

Printed by Wolfram Mathematica Student Edition


CUASI-NEWTON.nb 5

PASO 5
In[38]:= X 3 = X 2 - y2 ;
X3 // MatrixForm
forma de matriz
Out[39]//MatrixForm=
0.50016
0.88109

PASO 6
In[41]:= error = (0.5001599999999999 - 0.5125)2 + (0.8810898125 - 1.0432698125)2
Out[41]= 0.162649

ITERACION 3

PASO 2
In[42]:= J[x_, y_] := {{2 x, 2 y}, {2 x, - 2 y}}
A = J[0.5001599999999999, 0.8810898125];
A // MatrixForm
forma de matriz
B = F[0.5001599999999999, 0.8810898125];
B // MatrixForm
forma de matriz
Out[44]//MatrixForm=
1.00032 1.76218
1.00032 - 1.76218
Out[46]//MatrixForm=
0.0264793
- 0.0261592

PASO 3
In[47]:= c = Inverse[A];
matriz inversa
c // MatrixForm
forma de matriz
Out[48]//MatrixForm=
0.49984 0.49984
0.28374 - 0.28374

Printed by Wolfram Mathematica Student Edition


6 CUASI-NEWTON.nb

PASO 4
In[49]:=

y3 = {{0.00015}, {0.01493}};
y3 // MatrixForm
forma de matriz

Out[50]//MatrixForm=
0.00015
0.01493

PASO 5
In[51]:= X 4 = X 3 - y3 ;
X4 // MatrixForm
forma de matriz
Out[52]//MatrixForm=
0.50001
0.86616

PASO 6
In[53]:= error = (0.50001 - 0.5001599999999999)2 + (0.8661598125 - 0.8810898125)2
Out[53]= 0.0149308

Printed by Wolfram Mathematica Student Edition


CUASI-NEWTON.nb 7

ITERACION 4

PASO 2
In[61]:= J[x_, y_] := {{2 x, 2 y}, {2 x, - 2 y}}
A = J[0.50001`, 0.8661598125`];
A // MatrixForm
forma de matriz
B = F[0.50001`, 0.8661598125`];
B // MatrixForm
forma de matriz
Out[63]//MatrixForm=
1.00002 1.73232
1.00002 - 1.73232
Out[65]//MatrixForm=
0.000242821
- 0.000222821

PASO 3
In[59]:= c = Inverse[A];
matriz inversa
c // MatrixForm
forma de matriz
Out[60]//MatrixForm=
0.49999 0.49999
0.28863 - 0.28863

PASO 4
In[66]:=

y4 = {{0.0000099998}, {0.00013}};
y4 // MatrixForm
forma de matriz

Out[67]//MatrixForm=

9.9998 × 10-6
0.00013

Printed by Wolfram Mathematica Student Edition


8 CUASI-NEWTON.nb

PASO 5
In[68]:= X 5 = X 4 - y4 ;
X5 // MatrixForm
forma de matriz
Out[69]//MatrixForm=
0.5
0.86603

PASO 6
In[71]:= error = (0.5000000001999999 - 0.50001)2 + (0.8660298125 - 0.8661598125)2
Out[71]= 0.000130384

Printed by Wolfram Mathematica Student Edition

You might also like