Лабораторная работа: Градієнтні методи
{
double f;
N0++;
f=3*x1-1.2*x2+exp (0.02*x1*x1+1.3*x2*x2);
return (f);
}
double fdx1 (double x1,double x2)
{double fx1;
N1++;
fx1=3+0.04*x1*exp (0.02*x1*x1+1.3*x2*x2);
return (fx1); }
double fdx2 (double x1,double x2)
{ double fx2;
N1++;
fx2=-1.2+2.6*x2*exp (0.02*x1*x1+1.3*x2*x2);
return (fx2); }
void evrist ()
{ double x1 [100],x2 [100],A1,A2,E2,del1,del2,f1,f2,h [4],g [4],b [4],r [4];
double d,N;
int k;
x1 [0] =-1;
x2 [0] =0;
E2=0.0001;
del1=0.01;
del2=3;
A1=0.5;
A2=2;
k=0;
label1: