Решете моделната задача
u’(x)=10u(1-u), 0<x<=6,
u(0)=0.1
при n=10, 20,35,75, 100 и сравнете с точното решение.

RungeKuttaLogistic[f_,n_,t0_,T_]:= (
h=(T-t0)/n;
x=Table[t0+i*h,{i,0,n}];
y=Table[0,{n+1}];

y[[1]] = 0.1;
For[i=1, i<n+1, i++,
k1 = h*f[x[[i]],y[[i]]];
k2 = h*f[x[[i]]+h/2,y[[i]]+k1/2];
k3 = h*f[x[[i]]+h/2,y[[i]]+k2/2];
k4 =h* f[x[[i]]+h,y[[i]]+k3];
y[[i+1]] = y[[i]]+1/6k1+1/3k2+1/3k3+1/6k4];

Transpose[{x,y}]
)

exact[x_]=DSolve[{u'[t]==10u[t](1-u[t]),u[0]==0.1},u[t],t][[1, 1, 2]];
plotExact = Plot[exact[x],{x,0, 6}, PlotStyle->Red, PlotRange->All];

Manipulate[
f[x_,u_]:=10u(1-u);
appr =RungeKuttaLogistic[f,n,0,6];
plotAppr = ListLinePlot[appr, PlotMarkers->●,PlotRange->All];
Show[plotExact, plotAppr],
{n,100,500,5}]