積分した値を折れ線して描いてみる

Clear[f]; f[x_] := 2  x

Clear[dF]; dF[n_, i_] := f[i/n]*(1/n)

dF[n, 0]

Clear[x]; x[n_, k_] := N[k/n]

Clear[y]; y[n_, k_] := Sum[dF[n, i], {i, 0, k - 1}]

Clear[T]; 
    T[n_, a_] := Table[{x[n, k], y[n, k]}, {k, 0, n*a}]

T[10, 1]

\(Clear[g]; 
    g[n_, a_] := 
      ListPlot[T[n, a], PlotJoined -> True, PlotStyle -> Hue[0.0], 
	
        AspectRatio -> Automatic, PlotRange -> {0, a^2}]\)

１　n = 4のとき，区間 [0, 1]で折れ線を描く

g[4, 1]

２　n = 5のとき，区間[0, 2]で折れ線を描く

g[5, 2]