I am getting an error that just gets stuck formatting notepad, i don't think there's anything in my code that is wrong, but I'm never sure.
f[x_, y_] = xy^2 + x^3 y;
fx[x_, y_] = 2 xy^2 + y^3;
fy[x_, y_] = 2 x^2 y + 3 xy^2;
g[x_, y_] = x^2 y - xy^4;
gx[x_, y_] = 2 xy - y^4;
gy[x_, y_] = x^2 - 4 xy^3;
u = 1.6;
v = 0.7;
For[i = 0, i < 7, i++,
d = fx[u, v] gy[u, v] - fy[u, v] gx[u, v];
h = (g[u, v] fy[u, v] gy[u, v])/d;
k = (f[u, v] gx[u, v] - g[u, v] fx[u, v])/d;
u = u + h;
v = v + k;
Print[u, " ", v, " ", f[u, v], " ", g[u, v]]];
xy
(a new variable) when you meanx y
(x * y
). The syntax highlighting (colour of the variable names) should give you a clue. $\endgroup$For
andPrint
, useTable[]
, or even in this caseNestList
. $\endgroup$