Piecewise Polynomial Approximate Solutions of an Automatic Control Problem