  We present an efficient algorithm for calculating spectral properties of
large sparse Hamiltonian matrices such as densities of states and spectral
functions. The combination of Chebyshev recursion and maximum entropy achieves
high energy resolution without significant roundoff error, machine precision or
numerical instability limitations. If controlled statistical or systematic
errors are acceptable, cpu and memory requirements scale linearly in the number
of states. The inference of spectral properties from moments is much better
conditioned for Chebyshev moments than for power moments. We adapt concepts
from the kernel polynomial approximation, a linear Chebyshev approximation with
optimized Gibbs damping, to control the accuracy of Fourier integrals of
positive non-analytic functions. We compare the performance of kernel
polynomial and maximum entropy algorithms for an electronic structure example.
