<< Graphics`PlotField`

\(EulerMethod[f_, \ {x0_, y0_}, \ h_, \ n_]\  := \ 
\ \ 
      \((EMStep[{x_, y_}]\  := \ N[{x + h, \ y + h*f[x, y]}]; 
		\ \ 
        NestList[EMStep, \ {x0, y0}, \ n])\)\)

f[x_, y_]  :=  y

x0 = 0;  y0 = 1; h  =  0.1;  n = 10;

em  =  EulerMethod[f,  {x0, y0},  h,  n]

sol  =  
      DSolve[{y'[x]  ==  f[x, y[x]],  y[x0]  ==  y0},  y[x],  x]

y1[x_]  =  y[x]  /.  First[sol]

xfinal  =  x0  +  n*h

Error  =  Last[Last[em]]  -  y1[xfinal]

\(PlotVectorField[{1, f[x, y]}, {x, 0, 3}, {y, 0, 3}, Axes -> True, 

      	\ \ \ ScaleFunction -> \((1&)\), \ AspectRatio -> 1]\)