For any form of potential of inflaton, numerically solve the Mukharnov equation, i.e.,  the e.o.m. of the primordial scalar perturbation; and compute the power spectrum of it.