Mathematicians have found a way to predict whether an actor's career has peaked or if their most successful days lie ahead.