Exact solutions to the d-dimensional Schrödinger equation, d ≥ 2, for Coulomb plus harmonic oscillator potentials V (r) = −a/r + br 2 , b > 0 and a = 0 are obtained. The potential V (r) is considered both in all space, and under the condition of spherical confinement inside an impenetrable spherical box of radius R. With the aid of the asymptotic iteration method, the exact analytic solutions under certain constraints, and general approximate solutions, are obtained. These exhibit the parametric dependence of the eigenenergies on a, b, and R. The wave functions have the simple form of a product of a power function, an exponential function, and a polynomial. In order to achieve our results the question of determining the polynomial solutions of the second-order differential equation