code for diagrams below

> f:=x->.13*(x^2+2*sin(x*7)):

> P1:=plot(f(x), x=2..4,thickness=3,title=
`Area Under the Curve`,titlefont=[TIMES,BOLD,22]):

> lines:=plot({[[2,0],[2,f(2.0)]], [[4,0],[4,f(4.0)]],[[2,0],[4,0]]}, thickness=3,color=red):

> txt:=plots[textplot]({[2,-.2,`a`],[4,-.2,`b`],[3,f(3)+.3,
`y=f(x)`]},font=[TIMES,BOLD,16]):

> plots[display]({P1,lines,txt},view=[1..5,-1..f(4)+1],
xtickmarks=[],ytickmarks=[],scaling=constrained);

> R1:=student[leftbox](f(x), x=2..4,5,
color=RED,style=patchnogrid,title=`n=5 left Riemann Sum`,titlefont=[TIMES,BOLD,22]):

code for labeledarrow

> A1:=labeledarrow([3.2,-.4],[3.6,-.4],[3,4,5],
`Delta x`,[0,.2],14,blue):

> A2:=labeledarrow([3.6,-.4],[3.2,-.4],[3,4,5],`
`,[3,.3],14,blue):

> dotlines:=plot({[[3.2,0],[3.2,-.5]],
[[3.6,0],[3.6,-.5]]},thickness=3,linestyle=3,color=blue):

> plots[display]([R1,txt,lines,A1,A2,dotlines],
scaling=constrained,xtickmarks=[],ytickmarks=[],
view=[1..5,-1..f(4)+1] );

>