(*eulerova metoda*)

f[x_,y_]:=x*y^2
h=0.05;
x0=0;
y0=1;
koniec=1;

Numries[x_,y_,f_,h_]:=y+h*f[x,y]
Pres[x_]:=2/(2-x^2)

x[0]=x0;
y[0]=y0;
n=koniec/h;

Do[{x[i]=x0+i*h,y[i]=Numries[x[i-1],y[i-1],f,h]},{i,1,n,1}]
data=Table[{x[i],y[i]},{i,0,n}];
data1=Table[Abs[(y[i]-Pres[x[i]])],{i,0,n}];
vysledky=Table[{x[i],y[i],Pres[x[i]], Abs[(y[i]-Pres[x[i]])]},{i,0,n}];
maxerror=Max[data1];

PaddedForm[TableForm[vysledky],{12,4}]

g=Plot[Pres[x],{x,0,2},PlotRange->{{0,1},{0,2}},PlotStyle->{RGBColor[1,0,0],Thickness[0.005]}]

graf1=ListPlot[data,PlotRange->{{0,1},{0,2}},PlotStyle->{RGBColor[0,0,1]}]

Show[g,graf1]