Befitting its title, “Chaos Theory” is rather a mess. It has bleakly comedic elements, but it’s basically an overheated domestic drama, and it winds up a sorry combination of the two. You can describe it as an unfunny dark comedy or a bathetic family tale, but in reality it’s both.

Ryan Reynolds, following up his effort to leave his frat-boy image behind in “Definitely, Maybe,” again plays a husband and father in the throes of personal difficulty. But this time around the problems are more serious. He’s Frank Allen, a sternly serious motivational speaker who tries to manage his life by precise planning and punctuality and aims to teach others the secret of increasing productivity and happiness by doing the same. Unfortunately, one day he almost succumbs to the inducements of a female executive who’s attended his seminar (something his wife Susan, played by Emily Mortimer, finds out about), and on his way home escorts a very pregnant woman (Jocelyne Loewen) to the emergency room, where she gives birth to a child that the hospital erroneously records as his. Susan concludes that Frank’s not just unfaithful but a bigamist to boot, and throws him out of the house.

That causes Frank to alter his lifestyle radically. In his drive to win Susan back, he has a medical test to prove that the baby isn’t his; it does that, but also reveals that he’s always been sterile. That raises the issue of the paternity of his beloved daughter Jesse (Matreya Fedor), and sends him into an emotional tailspin in which he decides to jettison his methodical lifestyle and do everything on the basis of sheer chance, though even there his choices have a curiously calculated quality despite their supposed randomness.

But Daniel Taplitz’s script doesn’t have the guts to move into really harsh, bitter waters. It wants to stay in more conventional sitcom territory, and so fastens onto the issue of possible reconciliation. That brings into focus the figure of Buddy (Stuart Townsend), the lascivious playboy who’s been the couple’s best friend for years and turns out to be Jesse’s real dad (via a one-night stand that preceded the marriage, of course), and his attempt to become a responsible person to meet what he sees as his new obligations. And that drives the plot into a real farcical hole involving Frank’s decision to take revenge against his old friend in a badly-judged sequence involving a lake house, a boat and a shotgun. Needless to say, Susan—who’s now anxious to rebuild bridges with Frank—and Jesse show up there as well.

One can imagine that the basic idea behind “Chaos Theory” could have taken off if treated with some genuine courage and style. But Taplitz and director Marcos Siega instead have chosen to take the easy way out in every instance, opting for cheesy sentiment, tinny laughs and crude soap-operatic mawkishness instead of anything truly edgy or incisive. There’s a peculiarly maddening quality to the movie; it chickens out whenever the stakes are high. And even worse, it smothers its seriocomic mediocrity in one of the most irritating music scores on record—a series of songs, combining wailing and guitar, that turn many sequences into montages resembling turgid music videos.

Under the circumstances, the cast prove game but overwhelmed. Reynolds tries very hard, but comes across as overmatched, and Mortimer is attractive but defeated by a character who’s basically unsympathetic, willing to believe the worst of her husband while not admitting her own failings. The best of the lot is Townsend, who invests Buddy, potentially a purely cardboard figure, with some depth. Fedor overplays the cuteness as young Jesse.

“Chaos Theory” is bookended by a years-later sequence in which Jesse is getting married, and Frank prevents the doubt-ridden groom (Mike Erwin) from bolting by telling him the story of his own marital difficulties. It’s an unnecessary device, and also unfortunately reminiscent of the opening of another recent misfire, “Run, Fatboy, Run.” But in this case it’s a particular mistake, since the grown-up Jesse (Elizabeth Harnois), her husband-to-be Ed and their best man Damon (Christopher Jacot) seem even at short acquaintance much more amiable characters than Frank, Susan and Buddy, and a movie about them would probably have been far more enjoyable than this one. Unhappily, in the great wash of random occurrences things seem just to have turned out for the worse.