(*eulerova metoda   y`=x*)

(*problem,prava strana,poc.podmienka,krok metody,koncovy bod*)
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)

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];

(*graf presneho riesenia + graf numerickeh oriesenia*)

(*presneeee*)

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




(*numerickeeee*)

graf1=ListPLot[data,PLotRange->{{0,1},{0,2}},PLotStyle->{RGBColor[0,0,1]}]

Show[g,graf1]