It was rare for Louis Leithold to miss a day at Malibu High School, where he taught Advanced Placement calculus for the past several years.

He had been pounding theorems and proofs into the heads of his teenage charges for eight months straight. He had humored them into a homework load -- two hours a night -- that could incite rebellion in most other classrooms. He made them memorize and recite complicated rules of calculus until the theorems ruled their brains. And he moved them with his own mantra, which he recited daily. "We go step by step by step," he would say as he covered all the dry boards in the classroom with equations.

As if that weren't challenging enough, he scheduled two marathon study sessions at his house on Sundays -- the last two Sundays before the Advanced Placement exam May 4. From 9 a.m. to 4 p.m., his 17 students willingly set aside surf, sun and IPods for polynomials and Riemann sums.

"Dr. Leithold," as his students called him, was clearly no ordinary teacher.

First of all, he was 80 years old, a UC Berkeley graduate who earned his PhD in math education long before his students' parents were born. He started teaching high school in his 70s.

But he was revered not only because he had spurned retirement for the rigors of the classroom: He literally wrote the book on his specialty.

He was the author of "The Calculus," a widely used college and high school text praised for its thorough, lucid and logical presentation of one of the most demanding of subjects. Originally published in 1968, it is now in its seventh edition.

He also was a sought-after trainer of calculus teachers. His presence at Advanced Placement seminars could send a wave of excitement through the room.

So when Leithold was found dead at his Pacific Palisades home April 29, the loss was felt not only at Malibu High, where he taught for the last seven years, but across the country.

"Louis is a legend in AP calculus circles," said Trevor Packer, executive director of the AP program for the College Board, the organization that sponsors the exams taken by thousands of high school students every May. The Advanced Placement program offers high school students the opportunity to take college-level courses and earn college credits.

"A lot of his fame is not just due to his textbook," Packer said, "but to his impact on other teachers and students. That's where he left his mark -- in classrooms across the country, through their teachers."

He influenced one of the most famous calculus teachers in America, Jaime Escalante, the former Garfield High School instructor whose success with inner-city students in Los Angeles was told in the 1988 movie "Stand and Deliver."

Escalante, who met Leithold in the 1980s, consulted with him about when to teach certain concepts, such as limits and differentiation. He invited Leithold to lecture to his classes at Garfield and used copies of Leithold's textbook that Leithold helped him obtain at a discount.

"I called him my advisor," Escalante told The Times on Saturday from his son's home near Sacramento. "He was one of the great mathematicians. His book had beautiful problems. It made us believe that anybody could do calculus."

Leithold, who lived alone, failed to show up for class two Fridays ago. His body was discovered by a parent who accompanied three worried students to his house after school that day.

A spokesman for the coroner's office said Leithold had heart and pulmonary disease and attributed the death to natural causes.

His students were distraught at the loss of their teacher -- and not merely because the Advanced Placement exam was just days away.

"With any other teacher who tried to give us as much work, there would have been a class rebellion," said senior Matthew Mesher, 17. "But he inspired you to do mathematics. His face would just light up."

Leithold spent most of his 50-year career in college classrooms. In addition to Cal State L.A., he taught at Phoenix College in Arizona, the Open University of Great Britain, USC and, most recently, Pepperdine University, where he was an adjunct professor of mathematics.

As a boy growing up in San Francisco, he was academically gifted. He attended Lowell High School, an elite public school that accepted only the brightest students in the city. He later worked his way through UC Berkeley, where he earned his bachelor's, master's and doctorate degrees.

He was teaching in Arizona when a publisher approached him about writing a textbook. "The Calculus with Analytic Geometry" was published in 1968 by Harper and Row and quickly became a bestseller in English and several other languages, including German, Spanish and Chinese. In its latest edition, it is called simply "The Calculus 7."

"His text really led a major change in emphasis," said Shirley B. Gray, a professor of mathematics at Cal State L.A. "The previous calculus texts almost all centered on strong algebra skills developed via analytic geometry. Leithold was more or less the first to incorporate the concepts and vocabulary of set theory, a major component of 'New Math,' into the calculus curriculum of the 1960s.

"The next generation of authors always checked what they were doing," Gray added, "by looking at Leithold."

Leithold also wrote "Before Calculus," a textbook for pre-calculus students, and "The Calculus Virgin: An Artist's View of the Language of Calculus." The latter was the product of an unusual collaboration with D'Arcy Hayman, a painter, writer and longtime arts director of UNESCO, who illustrated the book with drawings inspired by calculus concepts.

By 1987, the "Calculus Guru," as Leithold was sometimes called, was helping to score Advanced Placement exams and sharing his expertise through the College Board's Advanced Placement Calculus Summer Institutes at Pepperdine and Fordham University in New York. He also taught weekend workshops for Advanced Placement teachers.

When Malibu High teacher Brian Corrigan attended one such workshop last year, his instructor mentioned that "the famous Dr. Leithold" was running a session across the hall. "A buzz of excitement ran through the room," Corrigan recalled. "That's what math teachers get crazy about. They all knew who he was."

In 1998, when Leithold was 72, a teacher who had participated in one of his institutes invited him to help launch a calculus program at Malibu High, which had opened its doors only a few years earlier on a hill above Zuma Beach. Seventy-two would probably strike few people as the right age to plunge into the caldron of hormonal excess known as high school, but Leithold was undaunted. He signed on to co-teach first- and second-year calculus as an unpaid "consultant" to the fledgling school's math department and soon was not only spreading the gospel of calculus but picking up the lingo of the youthful world he had entered. ("Straight trippin' fool" became one of his favorite expressions.)

He later accepted a salary, but his friends were not surprised by his initial arrangement.

"Even at Pepperdine, he would turn his paycheck back to [the university] because he just wanted to teach calculus and make sure what he was writing in his textbook really worked," said Bob Barefoot, a longtime high school teacher in Arizona who knew Leithold for 20 years and co-taught many AP calculus institutes with him.

The results of his teaching were extraordinary.

The national average score on the Advanced Placement calculus exam is 3.01 on a 5-point scale. Over the past five years, Leithold's students scored an average of 4.6.

Although Malibu High's calculus program is small, every student who took the Advanced Placement class also took the exam. No one who wanted to take the class was barred because of ability.

"If every student took the exam and the average was 4.6, that is astounding ... off the charts," the College Board's Packer said.

"He had such a deep understanding of the content," Malibu High Principal Mark Kelly said, explaining Leithold's success. "He understood how he could give students a lens onto the subject matter and open it up. He used humor and stories that were motivating to kids, that hooked them into the subject."

Like Escalante, Leithold often livened up lessons with a bit of theatrics.

To introduce one of the great debates in calculus -- whether the system was invented by 18th-century English theorist Sir Isaac Newton or German mathematician Gottfried Wilhelm Leibnitz -- Leithold relied on cookies. He would bring in two plates of cookies, Fig Newtons on one and a brand called Leibnitz on the other. Then he would invite students to take their pick.

The biggest day of the year, next to the exam, was when Leithold taught the fundamental theorem, a central idea of calculus that says that the sum of infinitesimal changes in a quantity over time equals the net change in quantity.

Usually a casual dresser, he would wear a jacket to class. After a proper buildup, he removed the coat to reveal a T-shirt emblazoned with, what else, the famous theorem.

Then came the actual lesson.

"He had an amazing way of explaining things so that everything was really clear," Mesher said.

On his last day in class, it was business as usual. He arrived about 11:30 a.m. and prepared for his AP students. In addition to the usual heavy load of homework the night before, he had handed out a thick packet of 50 multiple-choice questions as practice for the exam just days away. The hour went by quickly as he called one student after another to the board to prove or disprove the solutions offered.

He left campus a little later than usual, about 3 p.m. He might have headed directly home to tend to his movie-poster business, an outgrowth of the other great passion in his life. He ran a vintage movie house in Scottsdale, Ariz., in the 1950s that director Steven Spielberg frequented as a child. Over the years, he accumulated an extensive collection of vintage posters that he sold over the Internet.

When he missed class the next day, his colleagues and students knew something was wrong.

That Sunday, after the news of his death spread, his students gathered at school to mourn and reminisce. Then they headed to his classroom to study.

"I was really sad not to have him there. He was invincible to us," said senior Beau Campbell, 17, who described his class as the most demanding of her high school career.

"One thing I have realized was how much he lived life to the fullest," Campbell said. "It helps to know he died doing what he loved."

Leithold is survived by two grandchildren and a brother, Arthur, of San Francisco.

A memorial service will be held at 11:30 a.m. Saturday at Forest Lawn in Glendale. His students have established a scholarship fund in his honor. Donations may be sent to the Malibu High Scholarship Fund for the Louis Leithold Scholarship, c/o Sunny Halpern, 30215 Morningview Drive, Malibu CA 90265.