Developing a work ethic, or learning/doing things you aren't interested in (prelim topics) Short version: Graduate prelims include lots of topics which are only distantly related to your particular research area. How does one motivate oneself to learn and do this stuff?

Long version with personal background: I'm a 3rd year undergrad who's planning on applying to graduate schools in the US next year (in mathematics). I'm taking a graduate course (Galois theory) which, in the graduate programs I'm looking at, typically amounts to less than 1/3 of the material on the algebra prelim, which is one of the usually 3 topical prelims. For me, the concrete consequences for failing this class are academic probation with possible loss of funding/scholarships; if I were in the graduate school here, this would be possibly ejection from the program.

Unfortunately, I find this topic to be horribly uninteresting. I did very well in the first half of the class because it was essentially a very fast-paced redux of group and field theory, but I can't find a single drop of inspiration or interest in my mind for these classic Galois theory results that we're developing. I've done some undergraduate research in algebra (factorization theory) and, if I were to go into that as a professional, I feel confident that I will never touch Galois theory ever again. So for me, Galois theory being mandated to be learned by me for only this one purpose, a prelim exam. Therefore, I'm having trouble finding motivation to learn it.

The lectures are in the usual "lemma: proof, theorem: proof, corollary: proof" style (occasionally throwing in a sentence or two of motivation, why we study this topic), with weekly homeworks which heavily supplement the lectures (only a small percentage of grade), and 2 tests (midterm and fnial). These homeworks are pretty in-depth and are expected to take upwards of 5 hours to properly complete. (Usually 1-2 pages of proofs for each problem, and 3-5 problems per week.) Nobody is holding my hand any more and walking me through the class like in undergrad classes. (E.g., the homework problems aren't even close to self-explanatory and often cover topics not even mentioned in lecture.) Even though I'm showing up to lecture and taking detailed notes, I haven't even started the last 3 homeworks. The final is still 3 weeks away so it's not impossible for me to catch up, but it's going to take a lot of hours to get this material learned so that I don't fail the class.

As far as I can tell, this class structure is more or less standard in graduate mathematics, so if I'm serious about wanting to continue in academia I'm going to need to find out how to manage this problem (lack of interest). How do others handle this? Where does the motivation come from? (other than Adderall.)
In this case, the best way to motivate yourself to study this uninteresting material is to try to become interested in it. It's important not to specialize too early, and as a third-year undergrad, you should only now be in the process of deciding a broad subfield of mathematics to specialize in (usually Algebra, Analysis, Geometry/Topology, Applied Math, or some combination of the above). Given that you're interested in becoming an algebraist, it's simply too early in the game to be crossing specific sub-fields of algebra off your list. Especially not Galois Theory, the basics of which you will very likely be expected to know if you take graduate courses in algebraic geometry, number theory, or the like. And even if you don't directly use this material in the future, it's a chance to develop mathematical maturity and intuition. (I'm glad to have been exposed to Galois Theory as an undergraduate, and I'm an analyst!)

As for this particular class, it sounds like it's simply going too fast for you. Which there's no shame in; I certainly had the same experience when taking graduate classes as an undergrad. If you revisit this material in a few years, you may be surprised to find yourself enjoying it. In which case you'll be thankful for anything you learned the first time around, even if it didn't fully sink in.

Basically, you should motivate yourself by keeping in mind that the effort you put into this class will benefit you in ways that aren't apparent right now.