  An autonomous dynamical system is described by a system of second order
differential equations whose solution gives the trajectories of the system. The
solution is facilitated by the use of first integrals (FIs) that are used to
reduce the order of the system of differential equations and, if there are
enough of them, to determine the solution. Therefore, it is important that
there exists a systematic method to determine the FIs. On the other hand, a
system of second order differential equations defines a kinetic energy, which
provides a symmetric second order tensor called kinetic metric of the system.
This metric via its symmetries brings into the scene the numerous methods of
differential geometry and hence it is apparent that one should manage to relate
the determination of the FIs to the symmetries of the kinetic metric. The
subject of this work is to provide a theorem that realizes this scenario. The
method we follow considers the generic quadratic FI of the form
$I=K_{ab}(t,q^{c})\dot{q}^{a}\dot{q}^{b}+K_{a}(t,q^{c})\dot{q}^{a} +K(t,q^{c})$
where $K_{ab}(t,q^{c}), K_{a}(t,q^{c}), K(t,q^{c})$ are unknown tensor
quantities and requires $dI/dt = 0$. This condition leads to a system of
differential equations involving the coefficients of $I$ whose solution
provides all possible quadratic FIs of this form. We demonstrate the
application of the theorem in the classical cases of the geodesic equations and
the generalized Kepler potential. We also obtain and discuss the time-dependent
FIs.
