SMS dit: Polynomial methods in optimal control and filtering