For each major, in addition to directly major-related topics, students also need to learn auxiliary topics –- e.g., math topics –- which are needed to understand more direct major-related ones. To learn these auxiliary topics, students are required to take some prerequisite math class. The problem is that when the students take these classes, they do not fully understand how these classes are related to their major. As a result, they often lack motivations, do not study well, and this hinders their performance in the follow-up major-related classes. One way to enhance the students' motivation is to use just-in-time teaching, when each part of the auxiliary material is taught exactly when the need for this part appears in a major-related course. This idea definitely increases the students' motivation, but is this the most efficient way to increase their motivation? In this paper, we use a simple mathematical model to show that the traditional approach is more efficient –- and thus, other ways of raising students' motivation are desirable.