This article deals with the fractional problem of Sturm–Liouville and the Hilbert space associated with the solutions of this differential equation. We apply a quantization procedure to Schwarzschild space–time and obtain a fractional differential equation. The Hilbert space for these solutions is established. We used equations arising from quantization for the FRW and Reissner–Nordstron metrics to build the respective Hilbert spaces.