A projectile of mass m is launched from the surface of the earth directly upward with initial speed $v_0$. Neglecting air resistance, its velocity $v(t)$ satisfies the differential equation:
$$m\cdot{dv\over dt} = -mg$$
where $g$ is the acceleration due to gravity, a constant. Solve the differential equation subject to initial condition $v(0) = v_0$, where $v_0$ is a positive number, to discover:
a) The velocity at any time time $t$ seconds after launching the projectile in terms of $g$ and $v_0$
b) The height of the projectile at any time $t$
c) The max height $h_{max}$ reached by the projectile expressed in terms of $g$ and $v_0$
Start by simplifying $m$ (we assume the ball is not a photon). We rewrite the equation
$${dv\over dt}(t)=-g$$
We know $g$ is a constant that does not depend on $t$. Such an approximation is valid at short distance when the ball is not launched by Superman.
The general solution to that equation is $v(t)=-g\times t+C$ where $C$ is a constant determined by the initial conditions. At $t=0$, $v(0)=C=v_0$ and so
$$v(t)=-g\cdot t+v_0$$
Now the velocity is the derivative of the height at any time i.e $v(t)=dh/dt$. Therefore, $D$ being a constant determined by the initial conditions, one has
$$h(t)=-{1\over 2}g\cdot t^2+v_0\cdot t+D$$
but $h(0)=0$ and so $D=0$.
The ball reaches its max when its velocity is $0$ so $t_{max}=v_0/g$ and
$$h_{max}={v_0^2\over 2\cdot g}$$