ФІО = Горбаченко В.А. Запитання:#include #include // тут rand (), srand () #include #include #include #include // КОНСТАНТИ #define a 0 #define b 1.8 #define h 0.2 #define MAX_X 9 #define MAX_Y 2 // МАСИВ double mas[MAX_X][MAX_Y]={ // 10 x 2 {-0.1 ,-0.985}, {0.21 ,-0.934}, {0.63 ,-0.436}, {0.82 ,-0.0482}, {0.9 ,0.083}, {1.29 ,0.962}, {1.54 ,1.508}, {1.76 ,1.916}, {2.13 ,2.336}}; using namespace std; // ============================================================================= double func_a1(double x){// апроксимація поліном Лагранжа double sum=0; // сума. Волков. Стор 32 формула 5 for (int i = 0 ; i < MAX_X ; i++){ double z=1; for (int j = 0 ; j < MAX_X ; j++) { if (i!=j) z*=(x-mas[j][0])/(mas[i][0]-mas[j][0]); } sum+=z*mas[i][1]; } return sum; } // ============================================================================= double func_b(double x){ // похідна 1 // Центральная разностная производная return (func_a1(x+h)-func_a1(x-h))/(h*2); } //============================================================================== double func_c(double x){// похідна 2 // ФОРМУЛА | Друга похідна. Конспект лекцій return (func_a1(x+h)+func_a1(x-h)-2*func_a1(x) )/(h*h); } //============================================================================== int main() { cout<<"\tFunction f(x) = cos(2*x)*sin(x)\r\n"; cout<<"Interval of integration : \r\n"; cout<<"step of integration dx = \t"; double dx; dx=h; double x = a; cout<<"integration in process...\r\n"; double sum = (func_a1(x + dx) - func_a1(x))/2*dx; while(x < b) { sum += (func_a1(x + dx) - func_a1(x))/2*dx; x += dx; } cout<<"complete....\r\n"; cout<<"result is "<