Spectral analysis and applications