# ODE4.4

A ball is thrown straight up from the ground. How high will it go?

The height of the ball at time $t\,$ is $x(t)\,$, and the force acting on the ball is $-mg\,$.

Newton's second law gives the relation

$m{\frac {d^{2}x}{dt^{2}}}+mg=0\,$

Let $m=1\,$ for convenience.

${\frac {d^{2}x}{dt^{2}}}+g=0\,$

Integrate the last equation.

${\frac {dx(t)}{dt}}+gt+C=0\,$

To get $C\,$, start with an initial velocity $v_{0}\,$ and set $t=0\,$

$v_{0}+C=0\,$

So now,

${\frac {dx}{dt}}+gt-v_{0}=0\,$

Integrate again.

$x(t)+{\frac {1}{2}}gt^{2}-v_{0}t+D=0\,$

Since we have set $x(0)=0\,$, $D=0\,$

The equation of position is

$x(t)=-{\frac {1}{2}}gt^{2}+v_{0}t\,$

To find the maximum, set the first derivative equal to 0.

$-gt+v_{0}=0\,$

$t_{{max}}={\frac {v_{0}}{g}}\,$

Check that the second derivative at this point is negative.

$x''\left({\frac {v_{0}}{g}}\right)=-g\,$

So the answer is this point $t_{{max}}\,$ evaluated in the position function.

$x_{{max}}=x\left({\frac {v_{0}}{g}}\right)={\frac {v_{0}^{2}}{2g}}\,$