ClearAll;
$DefaultFont = {"Times-Roman",10};
Needs["Graphics`Graphics`"];

pol[i_,n_]:= Graphics[{GrayLevel[0.65],Polygon[{{(i-1)/n,0},
					{i/n,0},
					{i/n,(i/n)^2},
					{(i-1)/n,((i-1)/n)^2}}]}];

vert[i_,n_]:= Graphics[{Dashing[{0.01,0.01}],Line[{{i/n,0},{i/n,(i/n)^2}}]}];
partit[n_]:= Show[Table[vert[i,n],{i,1,n}]];

pict[n_]:= Show[Table[pol[i,n],{i,1,n}],
			Plot[t^2,{t,0,1}], partit[n],
			PlotRange->{{0,1.05},{0,1.05}},
			PlotLabel -> "n ="OutputForm[n],
			Axes->True,
			AxesLabel->{"x","y"},
			Ticks->{{{1,"t"}},{0}}];

Show[GraphicsArray[{{pict[1],pict[2]},
					{pict[3],pict[4]},
					{pict[5],pict[6]}}],PlotLabel->"Figure 10.3\n  y = g(x)"]