A ball of mass $m\,\mathrm{kg}$ is projected vertically upwards with initial speed $U\,\mathrm{m\,s^{-1}}$ and moves under gravity. At time $t\,\mathrm{s}$ after projection, the ball has travelled a distance $x\,\mathrm{m}$ and its speed is $v\,\mathrm{m\,s^{-1}}$. There is a resistive force of magnitude $mkv^2\,\mathrm{N}$, where $k$ is a positive constant.
(a) Show that the distance travelled by the ball when it is moving upwards is
$$x=\frac{1}{2k}\ln\left(\frac{g+kU^2}{g+kv^2}\right).$$ [4]
It is given that $k=0.025$ and that $U=20$.
(b) Find the time taken for the ball to reach its maximum height. [4]