How can I apologize to my former research professor whom I ghosted? At my university, I worked with a professor in knot theory for about a year. I am an undergraduate, and I wanted some experience in research. This professor was one I had a fairly good relationship with, and he actually helped me be able to skip some classes which I had already self-studied. Because I enjoyed the professor, I decided I wanted to work with him and his research group. However, I have discovered that I currently do not enjoy knot theory; it's a rather esoteric subject with few resources from which I could learn it from and gain some intuitive understanding, and one needs a solid grounding in topology to do much in it (I do not have a solid grounding in topology).
Ultimately, I didn't really do much during my research (I both thoroughly disliked it and wasn't able to do much; the latter fact probably influenced the former) and when COVID-19 hit I simply fell off on researching and communication with the professor. I fully realize that both my lack of effort while researching and the actual ghosting was quite deeply wrong. I have no plans to do anything similar to my current research mentor or any future ones regardless of how the research goes, so please do not lambast me too much for this. I now do research in physics (where I am much, much happier), but I feel quite horrible for what I did to my professor. To make matters worse, I have several books on topology that I would like to return to him (on somewhat of a tangent, Munkres's books, while good, are not exactly the most stimulating textbooks I've read, so I didn't learn too much topology). I very much want to apologize for my actions and offer to return the books, but I don't know how to do so gracefully. If any advice could be granted, I'd appreciate it immensely.
Often enough in these kinds of interactions, the situation feels much more dire than it really is because you're not in touch with the professor. You are left to your own devices, building scenarios of how much this professor must hate you now and how terrible it is that you left.
You're fine.
Knot theory is knot for everyone (ha ha!), a fact your professor is probably well aware of. Sure, it would have been nice if you had let them know earlier, but I'm quite sure they realized it during your internship.
The best thing to do now is to reach out to them, apologize for not being in touch earlier. Keep the email short and to the point, no need to write a 1000 word essay. You're likely to get a short reply acknowledging your email and that would be that.
The only point that might have genuinely pissed them off is the books you took and didn't return. Offer to return those as soon as you can, at your expense. While I share your opinion about Munkres, an unpleasant read even for seasoned mathematicians, the books belong to someone else and should be returned.