f2[x_] := (x-3) Cos[2 x]
p2 = {Plot[f2[x],{x,-2,3}], Plot[f2'[x],{x,-2,3}]}
f3[x_] := x^2 Sin[2 x]
p3 = {Plot[f3[x],{x,-2,3}], Plot[f3'[x],{x,-2,3}]}
f4[x_] := x Sin[2 x]
p4 = {Plot[f4[x],{x,-2,3}], Plot[f4'[x],{x,-2,3}]}