From the comic-genius brain of Judd Apatow, This Is 40 mixes a surprising amount of drama into the writer-director’s characteristically ribald comedy.

A follow-up to 2007’s Knocked Up, This Is 40 features encore appearances by two characters from the earlier Apatow project, the married with children Pete and Debbie. Paul Rudd and Leslie Mann are back as the suburban couple in charge of two growing daughters and two struggling businesses.

Just because This Is 40 contains child actresses playing the couple’s 13-year-old and 8-year-old daughters does not make it a family comedy, at least not in the conventional Hollywood sense.

This Is 40 features a slug fest of swearing, multiple bathroom visits, sex and occasional nudity. It is, after all, a Judd Apatow movie, and obviously the work of the filmmaker behind Bridesmaids, The 40-Year-Old Virgin, Pineapple Express and Knocked Up.

As the story begins, Pete and Debbie are each turning 40. Debbie engages in full-scale denial of the inevitable landmark number, insisting she’s only 38. “I don’t want to shop at old-lady stores!” she protests.

While Debbie is busy rejecting the march of time, Pete and a friend speculate about how great it would be if their wives died. Widowers, they muse, get all the sympathy. Even so, they generously prefer that their wives die peacefully, without pain.

All the while the four people who live in Pete and Debbie’s house can’t stand to be near each other. This is especially true of the couple’s recently turned a teenager daughter, Sadie. She is disgusted, offended, humiliated and horrified by her silly parents and gross little sister.

While big sister Sadie rages, charming little sister Charlotte serves as a Greek chorus, spouting sly observations about her parents’ and sibling’s descent into insanity.

Maude and Iris Apatow, the real-life children of the movie’s leading lady and writer-director, co-star as the siblings. Although Maude Apatow’s blisteringly angry Sadie can be frightening, the girls in general are great, maybe way more talented than their parents.

Unfortunately for Pete and Debbie and their kids, the crises in their lives is multiplying. A cash shortfall is a big part of it, but there’s also the fact that Pete and Debbie behave more like children than the real children in their house. From a comedic standpoint, this works better some times than other times.

Apatow recruits another of his previous players, Melissa McCarthy, for the role of Catherine. The fiercely protective Catherine has a son at Sadie’s school. A few gonzo confrontations between Catherine and Pete and Debbie almost make the movie worth the price of admission.

For all the individual, standout scenes in This Is 40, the movie’s wildly varying tone grows disorienting. One moment the audience thinks it’s watching a comedy. The next the moment the story plummets into dark, scary drama.

This Is 40 is less than its parts, so much so that it may be worth waiting for the next Apatow movie. Maybe he’ll integrate comedy and drama more smoothly, cushion the audience’s filmgoing ride or, at least, prevent whiplash.