Курсовая работа: Метод наискорейшего спуска
i : integer;
begin
StringGrid1.ColCount:=1;
h :=0.001;
hx:=0.001;
hy:=0.001;
e:=0.002;
x0:=StrToInt(Edit1.Text);
y0:=StrToInt(Edit2.Text);
if(ComboBox1.ItemIndex=0) then begin
f0:=(exp(x0)+exp(y0))/(exp(x0*x0)+exp(y0*y0));
gx:=exp(x0)/(exp(x0*x0)+exp(y0*y0))-exp(x0*x0)*x0*(2*(exp(x0)+exp(y0))/((exp(x0*x0)+exp(y0*y0))*(exp(x0*x0)+exp(y0*y0))));
gy:=exp(y0)/(exp(y0*y0)+exp(x0*x0))-exp(y0*y0)*y0*(2*(exp(y0)+exp(x0))/((exp(y0*y0)+exp(x0*x0))*(exp(y0*y0)+exp(x0*x0))));
end;
if(ComboBox1.ItemIndex=1) then begin
f0:=sin(x0)*sin(x0)/(sin(y0)*sin(y0)+1);
gx:=2*sin(x0)*cos(x0)/(sin(y0)*sin(y0)+1);
gy:=-2*sin(x0)*sin(x0)*cos(y0)*sin(y0)/((sin(y0)*sin(y0)+1)*(sin(y0)*sin(y0)+1));
end;
if(ComboBox1.ItemIndex=2) then begin
f0:=sin(x0)*cos(y0*y0);
gx:= cos(x0)*cos(y0*y0);
gy:=-2*sin(x0)*sin(y0*y0)*y0;
end;
g1x:=gx;
g1y:=gy;
x0:=x0+hx*gx;
y0:=y0+hy*gy;
if(ComboBox1.ItemIndex=0) then