ustify">// cout В«" x1 (n +2) = "В« x1 [5] В«" x2 (n +2) = "В« x2 [5] В«endl; p>
// Точка розтягування
x1 [6] = x1 [4] + gamma * (x1 [5]-x1 [4]); [6] = x2 [4] + gamma * (x2 [5]-x2 [4]);
f6 = 2 * (x1 [6] -2) * (x1 [6] -2) + (x2 [6] -2) * (x2 [6] -2); p>
// cout В«" x1 (n +4) = "В« x1 [6] В«" x2 (n +4) = "В« x2 [6] В«endl; (f6 < ; maxf)
{max = x1 [6]; max = x2 [6];
}
{(f5 <= srf)
{max = x1 [5]; max = x2 [5];
}
{
// Стиснення [7] = x1 [4]-beta * (x1 [4]-x1max);
x2 [7] = x2 [4]-beta * (x2 [4]-x2max);
x1max = x1 [7]; max = x2 [7]; = 2 * (x1 [7] -2) * (x1 [7] -2) + (x2 [7] -2 ) * (x2 [7] -2); (f7> srf)
{
// Редукціяsr = y1min-0.5 * (z1sr-y1min); sr = y2min-0.5 * (z2sr-y2min);
}
}
x21 = 0; x21 = z1sr; z1sr = 0; = 0; x22 = z2sr; z2sr = 0; + +;
double PFunc ();
} (fabs (minf-maxf)> e);
}
// ------------------------------- КІНЕЦЬ ЦИКЛУ МІНІМІЗАЦІЇ ------ ------- = 0; = 1;
psi01 = uX [0]; = uX [1]; = 2 * x02 - 9/4 * psi02; = 4 * x02 - 9/4 * psi02; = - 16 * x01 - 2 * psi01; = - 4 * x02 - 4 * psi02; x; x0 (4,1); (0) = dx1;
x0 (1) = dx2, (2) = dpsi1, (2) = dpsi2; = x0; (T = t0; T
{= RungeKuttStep (x, T, step, fu);
}
} while (fabs (x (2))> EPSnev && fabs (x (2))> EPSnev)