Answer
See the graph below.
Work Step by Step
We know, from Newton's second law, that
$$\sum F_x=ma_x$$
And in this case, there is only one force $F_x$ exerted on a 2-kg object.
$$F_x=ma_x=2a_x$$
Thus,
$$a_x=\dfrac{F_x}{2}$$
From the given figure, it is obvious that $F_x$ is not constant all the time.
So, the acceleration versus time graph is given by
- At $t=0$ s to $F_x=3$ N, and hence
$$a_x=\dfrac{3}{2}=1.5\;\rm m/s^2$$
$\rm \color{red}{(0\;s,1.5\;m/s^2)}$
- At $t=1$ s to $F_x=1$ N, and hence
$$a_x=\dfrac{1}{2}=0.5\;\rm m/s^2$$
$\rm \color{red}{(1\;s,0.5\;m/s^2)}$
- At $t=2$ s to $F_x=-1$ N, and hence
$$a_x=\dfrac{-1}{2}=-0.5\;\rm m/s^2$$
$\rm \color{red}{(2\;s,-0.5\;m/s^2)}$
- At $t=3$ s to $F_x=0$ N, and hence
$$a_x=\dfrac{0}{2}=0\;\rm m/s^2$$
$\rm \color{red}{(3\;s,0\;m/s^2)}$
- At $t=4$ s to $F_x=0$ N, and hence
$$a_x=\dfrac{0}{2}=0\;\rm m/s^2$$
$\rm \color{red}{(4\;s,0\;m/s^2)}$
Plugging all these dots into an acceleration versus time graph, as you see below.