Inhomogeneous Quadratic Functionals on Time Scales