  We construct the linear and quadratic polynomial dynamical invariants for the
classical and quantum time-dependent harmonic oscillator driven by a
time-dependent force. To obtain them, we use exclusively the associated
equations of motion for the system. We also find an algebraic relationship
between the linear and quadratic invariants at the classical and quantum level.
