The problem of cosmic inflation and how to solve it