The range
of a projectile fired with an initial velocity
at an angle
with the horizontal is
, where
is the acceleration due to the gravity.
Consider
.
Derivative on each side with respect to
.

Equate derivative to zero.
\
, when
.
Consider
.
Derivative on each side with respect to
.

.
If
, then
.
By second derivative test, the range is maximum at
.
If
, then
.
By second derivative test, the range is minimum at
.
At
such that the range is maximum.