Optimal adaptive control and consistent parameter estimate for deterministic systems with quadratic cost