The problem of maximizing the energy of a signal bandlimited to $[-\sigma, \sigma]$ on an interval $[-\tau, \tau]$ in the time domain is one of the important classical problems in signal processing. This problem was solved by a group of mathematicians, Slepian, Landau, and Pollak, at Bell Labs in the 1960s. The solution involved the prolate spheroidal wave functions. More recently, Pei and Ding solved the energy problem for more general transforms than the Fourier transform, such as the fractional Fourier transform and the linear canonical transform. Their solution involved what they called the generalized prolate spheroidal wave functions. The goals of this article are (1) to show that the problem of finding a bandlimited signal with maximum energy concentration in a given interval is a special case of a more general problem in reproducing-kernel Hilbert spaces, (2) to solve the problem in the setting of a Hilbert space and then obtain the solutions for the Fourier, fractional Fourier and linear canonical transforms, as well as the special affine Fourier transformation, as special cases, and (3) to show that the solution in the Hilbert space setting leads naturally to the solution of the energy problem for multidimensional signals.