An existence and localization theorem of solution for a Dirichlet problem