Answer
t=2.06 s
Work Step by Step
r reach its maximum value for $\frac{dr}{dt}=0$ (*)
We can write for r : $r=\sqrt{\ (x-x_{0})^{2}-(y-y_{0})^{2}}$
$x-x_{0}=v_{0}\cos\theta_{0}t$
$y-y_{0}=v_{0}\sin\ \theta_{0}t-\frac{gt^{2}}{2}$
$r=\sqrt{\ (v_{0}\cos\theta_{0}t)^{2}-(v_{0}\sin\ \theta_{0}t-\frac{gt^{2}}{2})^{2}}$
When we square :
$ r=\sqrt {(v_{0}t)^{2}-2v_{0}\sin\ \theta_{0}\frac {gt^{3}}{2}+\frac {g ^{2}t^{4}}{4}}$
$ r=t\sqrt {v_{0}^{2}-v_{0}\sin\ \theta_{0}gt+\frac {g ^{2}t^{2}}{4}}$
By derivation (*) :
$\frac{dr}{dt} =\frac{v_{0}^{2}-\frac {3v_{0}\sin\ \theta_{0}gt }{2}+\frac {g ^{2}t^{2}}{2}}{\sqrt {v_{0}^{2}-v_{0}\sin\ \theta_{0}gt+\frac {g ^{2}t^{2}}{4}}}=0$
This expression is 0 when the numerator is equal to 0.
For values :
$v_{0}=16 m/s $
$ \theta_{0}=40^{\circ}$
For values, the fraction numerator looks like : $256-151t+48t^{2}=0$
Since D<0, there is no real solution.
This means that the maximum is reached at the end of
the flight.
$t=\frac{2v_{0}\sin\theta_{0}}{g}=2.06$s