Stochastic control by functional analysis methods