The positivity of quadratic integrals involving variable coefficients and derivatives of any order is studied. The result is determined by the solution of an initial value problem for a system of first order nonlinear differential equations. The system is identified as the matrix Riccati differential equation in control theory. A complete conclusion is reached by considering the cases when the solution is bounded and when the solution is unbounded.