Star Trek Beyond opens in movie theaters July 22. Yes, a half century after Captain Kirk, Mr. Spock, and Dr. McCoy hit the airwaves, after five TV series and 12 movies, the enterprise (and The Enterprise) is still going strong. And much of the popularity of the series, and the loyalty of its fans, can be traced to the real social issues that it tackles, beneath the overlay of warp coils, dilithium crystals, and tachyon pulses. One such issue, which resonates powerfully with my rabbinic work, played a major role in Star Trek II: The Wrath of Khan, and concerned a simulation known as the Kobayashi Maru.Every cadet in Starfleet Academy had to face the Kobayashi Maru, but until Jim Kirk, no one had beaten it. In the simulation, the cadet pilots a starship that receives a distress call. Following all the proper protocol, the cadet responds to the emergency only to be attacked on multiple fronts by unexpected enemies and faced with the inevitable destruction of his ship. It is a classic no-win scenario. In The Wrath of Khan, Kirk explains that as he doesn’t believe in no-win situations, he characteristically reprogrammed the simulation the night before he was to take it, “cheating” in order to come out on top. (This incident was later dramatized in J.J. Abrams’ 2009 reboot, Star Trek.)Spock, however, found a different solution; it takes place toward the end of the movie. The villain, genetically engineered superhuman Khan, has been defeated but he has unleashed a powerful force, known as the Genesis Effect, which threatens to obliterate The Enterprise unless she goes to warp speed and outruns it. With destruction imminent, Spock enters unprotected into the radioactive warp chamber and engages the warp drive, saving the ship and its crew. But he does so at the cost of his own life. Kirk races down to bid farewell to his Vulcan first officer. The scene that follows sums up the relationship of the two men and captures the difference in their philosophies.“Spock!”Spock staggers to his feet, pulling down his tunic, as if preparing for inspection. His steps are awkward, almost taking him in a circle, as if his body were no longer his own. He feels his way to the glass, bumping his forehead against it.“Jim. Ship out of danger? Don’t grieve, admiral. It is logical … I never took the Kobayashi Maru test until now. What do you think of my solution?”His legs give way, and he sinks to the ground.“I have been and always shall be your friend.”Fingers spread against the glass.“Live long and prosper.”The man who had always been the perfect physical specimen, stronger than a human, and who could think his way out of any predicament by judicious application of logic, comes face to face with the one implacable foe whom no one defeats. Spock cannot see. He cannot walk. His voice is a croak. But his soul remains untouched. He pushes his rebelling body beyond its limits to take his last leave, enunciating the feelings that dissolve the barriers between himself and Kirk, and expressing so concisely the philosophy by which he lived.I’ve seen this play out in life.It was the fast of Tisha B’Av, recalling the destruction of the Jewish Temple in the year 70 C.E. On Tisha B’Av, every Jew is a mourner, and mourners sit low.Sometimes even mourners with multiple sclerosis.In our synagogue, as we sat on the floor intoning the mournful dirges known as Kinot, my eyes were drawn to Michael (not his real name), a slightly built man whose M.S. had been getting worse. He knew that no one ultimately beats this disease but wouldn’t give an inch without a struggle. A university professor, he had finished the entire Talmud and was the congregation’s flawless Torah chanter, having memorized the vocalization and melody of the entire five books of Moses. He kayaked regularly, despite his physical limitations. Had he asked me, his rabbi, I would have told him that he was not required to sit low on Tisha B’Av. Health trumps custom. But he didn’t ask me. Instead I watched, careful not to be obvious, as he contorted his limbs and grasped for fingerholds on nearby furniture to pull himself up when the prayers demanded that he stand. I half expected him to tug at his tunic and croak, “Jim!”Since that day, Michael’s condition has steadily deteriorated. When he could not walk, even with canes, he resorted to a mechanical scooter that can be adjusted for permissible use on the Sabbath. Characteristically, he first delivered a carefully researched paper on the finer points of Jewish law as they apply to using his scooter. But soon the M.S. affected the swallowing muscles in his throat and sent him spiraling through hospital stays and rehab stints for aspiration pneumonia. It is now at his bedside that I encounter my Spock, ensconced in his version of a warp chamber. And it is there that, amid failing physical systems, he manages to gather his dignity and discuss Torah topics with his visitors, expectorating into a Styrofoam cup to avoid unnecessary swallowing, which could lead to another aspiration pneumonia.Some of Michael’s friends who cannot visit him study with him via Skype. Picturing him on one screen and them on another gives me flashbacks to the hands of Kirk and Spock on opposite sides of the impenetrable glass. I have been and always shall be your friend. The same Spock who modeled dignity in The Wrath of Khan found a way to engineer his own return to life in Star Trek III: The Search for Spock. If there is anyone I know who can find a way to hang on until a way is found to return him to full health, it is my friend Michael. Even now he has found ways to reduce both the incidence and duration of his hospital stays, wresting a hard-fought victory from an implacable opponent. We root for him and pray daily that his determination be rewarded.***Flash back 22 years. My first rabbinic appointment was as assistant rabbi in a major metropolitan congregation, where one of the most impressive men I’ve ever met was Dr. Zalman, a professor of biochemistry and a Torah scholar of the first rank. If Michael had studied the entire Talmud, Zalman had taught it—day after grueling day, for 10 years—to a class that came at 6 every morning. He did it in memory of his mother and in gratitude for having gone into remission from cancer. The month after he celebrated the completion with a Siyyum, or ritual party, the cancer returned. It turned a graceful and gentle giant into an awkward and hesitant semiambulatory man. The image that stays with me is meeting him as he was coming out of a car, being taken to an appointment. Apparently, unawares, he had bumped his head on exiting, and a trickle of blood ran down the fragile skin of his forehead. He was taken by surprise, too, and somehow maintained his composure and his conversation with me even as he wiped away the offending droplets.Several months later, I was visiting him in his hospital room, when he was no longer conscious. The family had stepped out for just a moment and I sat at the bedside, when I suddenly noticed that it was too still, too quiet. I have been and always shall be your friend.I have seen proud, vigorous, independent people forced to accept help for the most elementary and embarrassing functions. It is then that the true dignity of a human being can be seen. In a hospital gown, denied the “cover” behind which we all hide our frailties, shorn even of control over our bodies, what are we left with? The Talmud enumerates ways in which we resemble animals and those in which we are like angels. At moments like these, I have seen people revert to their inner animal. But I have also seen humans become angels.Felicity, a congregant of mine, died of ovarian cancer at the age of 50. How much heartache, roller-coaster emotion, and sleeplessness hide between the words of that simple sentence? How many unanswered questions and how much ongoing grief suffuse it? But I remember watching this remarkable woman as she grew thinner and thinking how she was shedding everything that wasn’t essence. What remained were relationships—with family, friends, co-workers—and a kind word for each who came to say goodbye. I know I am romanticizing, but she seemed more angelic every time I saw her, even when it became time to say the final confessional. I have been and always shall be your friend.When we say “so-and-so lost her battle with cancer,” we are missing the point. Ultimately, we all lose our battle with mortality. Life is a Kobayashi Maru. The test is to see who we become when the battle is lost, when we sense that we are on a downward trajectory, when the footsteps are coming up behind us. It is then that beasts are unleashed or angels unveiled. Rather than an occasion for limp resignation, it can be a time of coalescing of the ideals of a lifetime or courageous peacemaking with paths not taken. And it can be a time of legacy, when we articulate our hopes, accomplishments, and disappointments to those who carry on.For some whose trajectory is downward, however, the twilight is a longer one, and there is scant chance to communicate a deathbed legacy. When dementia comes, for example, authors, surgeons, Talmudic scholars, philosophers are equal prey for the fell fingers of forgetfulness. I remember watching from afar, as the least significant student of his thousands, when Joseph B. Soloveitchik, the titan of American Orthodox Judaism, faded over the course of a decade. In his prime, he was not just articulate but virtuosic in Hebrew, English, and Yiddish. He could thunder and cajole, evoke terror and tears with his words. To hear him untangle the questions that formed the opening movement of a public lecture was to watch the sun come out. To such a man, being robbed of his eloquence, his intellect, and his masterful self-control was his greatest nightmare made real.The Talmud is aware of the indignities that age and health thrust upon us. It even relates the story of how the sage Abayei used to gently remind his teacher, Rav Yosef, of his Torah discourses, after the latter had forgotten them due to illness. I have found one Talmudic admonition to be particularly comforting: “Be vigilant about the honor of a sage who has forgotten his wisdom, for both the (second set of) tablets and the shards of the first set were kept in the Holy Ark.” The Talmudic sage compares the ailing scholar to the shattered fragments of the first tablets of the Ten Commandments that Moses brought down from Sinai, only to smash them when he beheld the Israelites worshipping the golden calf. The Talmud is saying, “Do not give up on the elderly or the senile; even if they be only a shadow—they still contain the spark of holiness. The image of God has not departed these human beings simply because Alzheimer’s has taken control.”I have wondered: Did the rabbis mean to say that somewhere, deeply buried within a stilled brain, the person is still there, or merely that respect must be tendered for the person who used to be there? I admit that I do not know, but I would like to think the former.The Trek storyline that speaks to me most on this theme traces the relationship of Spock’s father, Sarek, and Jean-Luc Picard in the Next Generation episode called “Sarek.” When the hyperlogical Vulcan ambassador visits The Enterprise on his way to negotiating a delicate treaty, Picard discovers that he is suffering from Bendii Syndrome, which humiliates older Vulcans by involuntarily releasing their long-repressed emotions. Picard, sensitive to what this means to the reputation and self-image of the ambassador, supports him through a mind-link in which the captain temporarily and excruciatingly contains the overwhelming feelings so that Sarek can go about his diplomatic business. What Picard does, briefly, highlights what the true caregivers, Sarek’s wife and aides, must do on an ongoing basis. Eventually, it must be presumed that all forms of support will be insufficient, and even the greatest proponent of logic and self-control in the galaxy will be forced to yield to the Kobayashi Maru of life.My own four decades of following Star Trek have taken me to the stars and back. They have introduced me to new life and new civilizations. But they have also taught me that I need not chart a path to the heavens to find the Undiscovered Country. Often an inward look to my soul, my traditions, and the brave souls around me, will just as surely take me where no one has gone before.***Like this article? Sign up for our Daily Digest to get Tablet Magazine’s new content in your inbox each morning.