Курсовая работа: Програма розв’язання звичайних диференціальних рівнянь однокроковими методами
{x2[i]=x2[i-1]+h2/2;
ze2[i]=ze2[i-1]+h2/2*f(x2[i-1],ye2[i-1],ze2[i-1]);
ye2[i]=ye2[i-1]+h2/2*ze2[i];
zi2[i]=zi2[i-1]+h2*f(x2[i],ye2[i],ze2[i]);
yi2[i]=yi2[i-1]+h2*zi2[i];
x2[i]+=h2/2;
// printf("\n[%d] %5.2f %5.2f %5.2f",i,x2[i],ye2[i],ym2[i]);
// setcolor(YELLOW);
// lineto((x2[i])*100,480-((ym2[i])*100));}
moveto((x1[0])*250+350,480-((yi1[0])*100)-30);
for(i=1;i<=n1+1;i++)
{x1[i]=x1[i-1]+h1/2;
ze1[i]=ze1[i-1]+h1/2*f(x1[i-1],ye1[i-1],ze1[i-1]);
ye1[i]=ye1[i-1]+h1/2*ze1[i];
zi1[i]=zi1[i-1]+h1*f(x1[i],ye1[i],ze1[i]);
yi1[i]=yi1[i-1]+h1*zi1[i];
x1[i]+=h1/2;
// printf("\n[%d] %5.2f %5.2f %5.2f",i,x1[i],ye1[i],ym1[i]);
setcolor(12);
lineto((x1[i])*250+350,480-((yi1[i])*100)-30);}
float c;
float s=0;
for(i=0;i<=n1+1;i++)
{c=(yi2[i*2]-yi1[i])/(h1*h1*h1-h2*h2*h2);
s+=c*h1*h1*h1;}
char *ch;
sprintf(ch,"%f",fabs(s));
setcolor(15);
settextstyle(0,0,1);