There is a reason many romantic comedies conform to a tried-and-true formula, and it has little to do with the expectations of the audience. Most romantic comedies end with an affirmation of a relationship, whether it’s a marriage or a declaration of love, because of what comes afterward. By dwelling on the couple longer, there is a risk of reaching the ennui ofThe Graduate’s long, final bus ride. Formula tweaks are what make The Five-Year Engagement, the new romantic comedy by Jason Segel and Nicholas Stoller, unintentionally gloomy. By favoring realism, it sometimes has more in common with Ingmar Bergman’s work than it does with Nora Ephron’s.