code for diagram

> labeledarrow:=proc(tail,head,scalefactors, text,txtshift, size, colr) local txt,tmp,nrm,dir,cntr,txtat,dirperp:
dir:=head-tail:
nrm:=sqrt( dir[1]^2+dir[2]^2):
dir:=expand((1/nrm)*dir):
dirperp:=[dir[2],-dir[1]]:
cntr:=.5*(head+tail):
txtat:=cntr+txtshift[1]* dir+txtshift[2]*dirperp:
tmp:=plottools[arrow](tail, head, scalefactors[1]*.01*nrm,scalefactors[2]*.05*nrm,scalefactors[3]*.05,color=colr):
txt:=plots[textplot]([txtat[1],txtat[2],text],font=[TIMES,BOLD,size]): plots[display]({tmp,txt});end:

> f:=x->x^2+sin(2*x):
plot({x^2,sin(2*x)},x=-Pi/2..Pi/2);
p6:=plot(f(x),x=-Pi/2..Pi/2):
d1:=plottools[disk]([Pi/12,Pi^2/144+1/2],.04,
color=black,style=patch):
d2:=plottools[disk]([5*Pi/12,25*Pi^2/144+1/2],.04,color=black,style=patch):
A1:=labeledarrow([-0.31, 1.93],[1.2, 2.21],[1,2,2],`Points of Inflection`,[-1,-.4],14,blue):
mn:=plots[textplot]([-.5150,f(-.5150)-.2 ,`min`],font=[TIMES,BOLD,16]):
A2:=labeledarrow([-0.31, 1.93],[Pi/12,Pi^2/144+1/2+.1],[1,2,2],` `,[0,.2],12,blue):
d3:=plottools[disk]([-.5150,f(-.5150)],.04,
color=black,style=patch):
plots[display]({p6,d1,d2,d3,A1,A2,mn},xtickmarks=[-1,0,1],
ytickmarks=[],axesfont=[TIMES,BOLD,16],labels=[` `,` `]);