  One can elucidate integrability properties of ordinary differential equations
(ODEs) by knowing the existence of second integrals (also known as weak
integrals or Darboux polynomials for polynomial ODEs). However, little is known
about how they are preserved, if at all, under numerical methods. Here, we show
that in general all Runge-Kutta methods will preserve all affine second
integrals but not (irreducible) quadratic second integrals. A number of
interesting corollaries are discussed, such as the preservation of certain
rational integrals by arbitrary Runge-Kutta methods. We also study the special
case of affine second integrals with constant cofactor and discuss the
preservation of affine higher integrals.
