According to the Greek philosopher Aristotle, a play was a tragedy if everyone suffered in the end, even the innocent. A play was a comedy if the innocent triumphed and only the wicked came to a horrible end. Comedies weren't necessarily humorous. But during the Renaissance, the genre of tragicomedy became more accepted. In this genre, the ending was happy but solemn topics of danger, fall from position, and important public figures or events were dealt with. Comedy as we think of comedy, with jokes and buffoonish characters, was also part of tragicomedy.
Looking at tragicomedy through this lens, we can see it applies to Shakespeare's The Tempest perfectly. Serious issues normally portrayed in tragedies are present, including Prospero's fall from power, the low sub-human villain of Caliban, the murder plot of Sebastian and Antonio against Alonso, and the theme of revenge. On the other hand, we have a romance between Miranda and Ferdinand, a humorous subplot with the lower-class Stephano and Trinculo, and the lighter elements of the bridal masque and other harmless magic. Ultimately when Prospero draws those who have wronged him into his magic circle, the play hangs in the balance between comedy and tragedy: Will he take revenge on those who have wronged him, showing himself to be no better than they, or will he overcome his desires for retribution and heed his higher nature? When he forgives those who wronged him and dons his ducal robes, order is restored, and the happy ending for everyone ensues, confirming the play to be a perfect example of tragicomedy.