A particle $P$ of mass $4\,\mathrm{kg}$ is moving in a horizontal straight line. At time $t\,\mathrm{s}$ the velocity of $P$ is $v\,\mathrm{m\,s^{-1}}$ and its displacement from a fixed point $O$ on the line is $x\,\mathrm{m}$. The only force acting on $P$ is a resistive force of magnitude
$$(4e^{-x}+12)e^{-x}\,\mathrm{N}.$$
When $t=0$, $x=0$ and $v=4$.
(a) Show by integration that $v=\dfrac{1+3e^x}{e^x}$. [4]
(b) Find an expression for $x$ in terms of $t$. [4]