We prove an exact relation between the tensor and the scalar primordial power spectra generated during inflation. Such a mapping considerably simplifies the derivation of any power spectra as they can be obtained from the study of the tensor modes only, which are much easier to solve. As an illustration, starting from the second order slow-roll tensor power spectrum, we derive in a few lines the next-to-next-to-leading order power spectrum of the comoving curvature perturbation in generalized single field inflation with a varying speed of sound.
Beltran Jimenez, J., Musso, M., & Ringeval, C. (2013). Exact mapping between tensor and most general scalar power spectra. Physical Review D, 88(4), 43524. https://doi.org/10.1103/PhysRevD.88.043524 (Original work published 2013)