What the world is — at least, as it’s personified by the family and friends zigzagging through the movie fielding jokes, confessing fears and tightly holding onto a man who nearly spun into the void — is welcoming, accepting, loving. “Silver Linings Playbook” is an outright comedy, but like Pat, it’s a bipolar one that swings between passionate highs and intentionally painful lows. When Pat’s mother, Dolores (a sensational Jacki Weaver), brings him home from the asylum— briefly accompanied by his pal in kookiness, Danny (Chris Tucker) — her husband, Pat Sr. (a moving Robert De Niro), complains that she didn’t tell him about springing their son. Dolores, her Kewpie Doll eyes darting with animal panic, responds the only way any loving mother and wife could: “It’s all under control.”
It isn’t, and not by a long shot, at least as far as these characters are concerned. Mr. Russell, on the other hand, a virtuoso of chaos, has supreme command over a movie that regularly feels as if it’s teetering on the edge of hysteria, in respect to the characters and director both. But Mr. Russell doesn’t just choreograph bedlam, he also tames it, and worrying that it might all go kablooey with one shout too many is one of the pleasures of his work, which includes films like the aptly titled “Flirting With Disaster.” Like a singer who quavers tauntingly, thrillingly close to going off-key, Mr. Russell never loses control. Watching him pull back from the brink can be a delight.
The movie is adapted from the 2008 novel of the same title by Matthew Quick, which Mr. Russell has gently bent to his own purposes. In the book Pat was hospitalized for years, which knocks him into a heavier, potentially more alarming mental-health diagnosis than the guy in the movie who breezes out of a psychiatric facility. Not that the character, with Mr. Cooper’s Hollywood smile straining maniacally, appears or sounds ready for ordinary human contact. Shortly after he returns home Pat immediately takes up the physical and psychological regimen that he created while locked away and believes will win back his estranged wife, Nikki (Brea Bee). That she’s taken out a restraining order against him is a minor obstacle.
Pat’s struggle to get Nikki back serves as his nominal quest, the mission that catapults him out of the house and running around the neighborhood wearing a large plastic garbage bag. He wears the bag to sweat off calories, but it’s also a conspicuous metaphor for a life that has been outwardly trashed. This being a David O. Russell movie it’s also a funny sight gag that keeps on giving, whether it inspires one of Pat Sr.’s double takes or whether Pat is running side by side with — and sometimes being chased by — a neighbor, Tiffany (Jennifer Lawrence, aching, tender, lovely). She enters the picture early during an entertainingly inappropriate dinner given by Pat’s friend Ronnie (John Ortiz, warmly appealing), and his bullying wife, Veronica (Julia Stiles, nicely chilled), an encounter that deeply unsettles Pat.
Tiffany, a heartbreak beauty, at once disturbs Pat and gives him fresh purpose. For reasons of her own she convinces him that she can pass a letter from him to Nikki, circumventing the law. In return Tiffany wants Pat to become her partner for a dance contest, a narrative turn that suggests the movie will soon be careening perilously into whimsy. Instead it deepens beautifully, and then it expands. Tiffany and Pat begin rehearsing in the dance studio in the home she has built in her parents’ garage, practicing moves with a tentative step, shuffle, step, shuffle. She leads and he follows, together and apart, and through bungled, awkward turns they fall into each other’s arms and into the larger, somewhat wary embrace of those around them.
Robert Frost wrote that “home is the place where, when you have to go there, they have to take you in.” Mr. Russell must agree because he has always played with the definition of family, pushing at its normative boundaries with humor and tales of incest, addiction and insanity. Like almost all his features “Silver Linings Playbook” features a large cast that seems to grow with each scene. Pat is alone in a room when you first see him in the movie, but as he nears the ridiculously wonderful finale he’s fighting for space, crowded in the frame and being jostled by family and friends in his parents’ house where, between plot twists and poignant details (his father’s worried caress of a good-luck charm, his mother’s anxious cooking), he find his place and a filmmaker’s worldview shines. 
As its title announces, “Silver Linings Playbook” honks, waves and pleads for happiness. Not long into the story Pat angrily tosses out a copy of “A Farewell to Arms” and rails about Hemingway’s sucker-punch finale. The world, Pat yells — at his parents, the neighbors, us — is hard enough. It’s both comical and somewhat pitiful, but it also feels like an authorial declaration because it dovetails with Mr. Russell’s belief in joyous, transporting cinema. It’s no wonder that Tiffany shows Pat a clip from “Singin’ in the Rain,” that blast of pure euphoria. Happy endings used to be de rigueur in American movies, and while they often still are, the feelings accompanying them tend to feel as canned as Katherine Heigl’s laughter, maybe because filmmakers no longer buy them, or think that we don’t.