The Simpsons Movie comes out this week — is there much science in it?

The crisis that precipitates the plot is environmental — Lisa's trying to warn the town about it and she gives a lecture entitled 'An Irritating Truth'. She's often the voice for the writers, even though she's eight years old a lot of us identify with her. But she's also depicted as socially unpopular, and is not always listened to.

As writers do you set out to satirize public attitudes to science?

Our general agenda is to show both sides of an issue and to let the viewer make up his or her own mind. In my lifetime I've seen science viewed as the saviour for everything, but now it's almost come full circle, because nothing can completely solve everyone's problems, and the disappointment when that happens is extreme. So now people are casting scientists as villains and not listening to them, which I think is tragic.

But we make fun of everything, so if a scientist appears on the show we make fun of them too. Generally our depiction of scientists is that they're insular and have bad social lives, and say things in an obscure fashion that isn't always comprehensible to the layman. From my limited experience in the scientific world I wouldn't say it's completely off the mark.

One episode in which the show does take sides is the one in which Lisa protests against creationism in her school.

Stephen Hawking has featured as a guest character on The Simpsons. Credit: S. CRASTO/AP

What we say is that there are conservatives, like Pope John Paul II, who believe in the theory of evolution, and that it's far from a liberal theory: it's scientific, it's as close to a fact as can be. We did say that Flanders, who opposed the teaching of evolution, is sincere in his beliefs. We tried to take his emotions seriously.

What's really funny is that they had a debate here between the Republican candidates [for the presidential nomination], and the moderator said “so, which of you believe in evolution?” And you could see a couple sort of raising their hands and then changing their minds, and I'm going “how can you not be sure whether you think that's true or not? It's not a matter of opinion.”

You've had several famous scientists, including Stephen Hawking and Stephen Jay Gould, as guest stars on the show.

People seem thrilled that we've had Stephen Hawking on the show, and no one could be more thrilled than I. Although one joke that reflects the attitude of the public to science is when he appeared in front of the people of Springfield and told them what they should do, and Homer said, “Yeah, Larry Flynt is right!”

Do you have a dream scientific guest who you'd love to have on the show?

Living or dead, it would be Isaac Newton. But living would be a tough question. Fifty years ago, Albert Einstein was the epitome of a scientist as far as the public were concerned, and was regarded as a hero. But there isn't anybody comparable today. I think it shows how science has been made by some to appear in a more ambiguous light.

The Simpsons also boasts staggeringly obscure mathematical references.

One that always makes me laugh is in a recent episode in which Homer and Marge are at a baseball game where the public has to guess the attendance, and each of the options is a different mathematical irregularity — one's a perfect number, one's a sum of four squares. They're all in the thousands and they're numbers that nobody except a mathematician would, at face value, recognize as anything unusual, but if you're really sharp you'll pick it up. I love the fact that we can throw that sort of thing in.

My favourite mathematical reference on the show was when we did an episode where Apu was a witness in a courtroom and the lawyer asked if he had a good memory. He said, yes I do, I've memorized pi to one million decimal places, and Homer said “mmm... pi” and started drooling. We did call Caltech [the California Institute of Technology in Pasadena] to check that whatever we said the millionth decimal place was was correct.

My favourite mathematical equation is e + 1 = 0, and we threw that into one episode even though not all of our audience would necessarily understand it.

In one episode Professor Frink shocks a lecture theatre into silence by shouting “Pi is exactly three!”

One thing I always thought was funny was that in the 1890s, I believe, the state of Indiana declared that the value of pi was 22/7. I mean, it's just... the idea that you could change a mathematical concept to suit a legislative whim is nutty.

So is there a formula for writing good jokes?

I look at comedy writing mathematically, it's sort of like a proof in which you're trying to find the ideal punchline for a setup, and when you get it it's a very elegant feeling. It's a little like the feeling I used to get on completing a proof when I was doing maths at college.

Several Simpsons writers have backgrounds in maths and science. Are you a bunch of geeks at heart?

When we're alone we talk about maths [chuckles], but we've learned that there's a wider world, so we don't always expose others to it, and we do it in a subtle way.

Do you ever regret not pursuing your mathematical studies?

I wouldn't have been among the top people in my field; there were guys I knew in maths who were just the best. I don't know if I would ever have achieved what they did, so I'm very happy doing what I'm doing.

And what does Nature have to do to get a mention on The Simpsons?

We should mention Nature! There's still time, we're only 400 episodes young... (see Box)