How do you internalize problems you were stuck on the first time around? Firstly, I'd like to apologize for the vague title. I found it difficult to contain within a short title the scope of discussion which I'd like to address here. I hope you continue reading to understand the concerns I am laying out here.
I've been working through Spivak's Calculus, a relatively rigorous and tough book for one to work through. Naturally, I've been stuck on many of the problems and have had to look up the solutions to those problems. With each 'mistake', I try to understand the main approach/key steps presented in the solutions before attempting the problem again using the suggested approach.
However, whenever I revisit such problems a few weeks later, I often find myself completely stuck at the first step again. I get rather discouraged when this happens since it implies that I have not really learnt anything from getting through those problems.
I know that at this point many would attribute this to forgetfulness over time. But for myself, I've realised that even after spending the time with all those problems my problem-solving ability really has not improved much. (i.e I'm still only able to solve the problems I could finish with ease the first time seeing the problem) This leads me to think that there may be a better approach to working through and internalising problems.
How can I do better? Or is problem-solving ability really just a testament to the collection of 'exercises' one has stored in memory?
 A: I'm working through Spivak too.
Spivak has some very tricky problems. IMO it's entirely expected that novice level readers will have trouble with many of the exercises, will get stuck, and will need to look up solutions. There were a few problems I had to look up the answers to to even understand what was being asked!
I think your willingness to do so, to try to understand the exercises that give you trouble instead of skipping them, means you're on the right track. Keep at it!
It's good you're concerned about actually absorbing the core lessons. Don't worry too much if, say, you go back to an earlier chapter and can't immediately remember how to solve all the problems, but do feel free to go back and review and rework things.
I found it very helpful to rework many of the problems in the first 2 parts of the book (chapters 1-8) before moving on to part 3. While I doubt I'd be able to perfectly solve every problem from those chapters even now, I definitely picked up on things that I missed the first time through.
Again, many of the exercises are hard! There were days when after getting through 1 or 2, I'd be like, "that's enough for today: my brain is full."  Since you're not cramming for exams, you have the luxury of taking the time to mull things over.
There are days when I just don't feel sharp and take the day off.
If you aren't already doing so, keep notes on concepts you're struggling with, particularly tricky exercises, or anything else that seems worth noting. Make notes on mistakes you find in the text and solution manual.
You might be encouraged to know, Spivak hints that the book's difficulty is front loaded. The first 8 chapters do a lot of heavy lifting. Take your time with them. The work you do there will pay off. There was a problem in chapter 1 or 2 about showing the general geometric mean $\leq$ the arithmetic mean for $n$ numbers...I think I struggled with that proof for like 3 or 4 days. Once I finally got it, it was this singularly ecstatic, wondrous feeling.
I haven't hit anything since that's given me as much difficulty, so take some solace in that. It does get easier. You'll likely find, if you are scrupulously diligent with the early chapters, that later on you'll be able to answer more and more of the exercises on your own.
The frustration and pleasure of that early hard problem reminded me though, of the delight that can come from such things. Rather than being discouraged and afraid of running into conceptual roadblocks, we should be eagerly anticipating the next head-scratcher because that's where things get fun.
This stuff takes time to absorb. Keep at it!
A: I'm in the third year of my PhD and I just recently started to feel like I really, deeply understand things I'm learning and can internalize them very well.
I don't really know what changed but if I had to guess, I would say it has to do with almost "meditating" on a problem. Now, if I am reading a paper and I get stuck, there's pretty much no one to help me, and often times even asking on stack exchange or searching the internet for hours won't get me anywhere. Instead I have to really think about it by myself and gain an intuition I didn't have before. So what that means is, when I'm not at my desk, while I'm having lunch, or trying to sleep, or going for a walk, my mind is struggling with the problem. I can't let it go until I know the answer. This kind of cements it into my head. After I find the answer, I'll never forget it and I can explain it to anyone.
As an undergrad, this kind of deep thinking is difficult to do because you probably have about 4 math classes and you have to turn in problems sets every week. Furthermore there are a lot of well-packaged answers that someone tells you, or you even figure out yourself, but you don't really really understand. You just write the solution and move on.
Memory has a lot to do with context. As in, if you have more things you can connect a piece of information to, you will be more likely to remember it in the future. That's why foreign names are more difficult to remember. So I would give two pieces of advice: First of all don't get discouraged because this skill will come with experience. Eventually you will know a lot of math and then at least some things will get a lot easier to learn. Also, I really really struggled with Calculus as an undergrad (I also used Spivak) but when I got into a topology class the next year, I felt really natural at it and could solve almost any problem faster than my friends. My point is you might have a better aptitude for different subjects. Not that you should neglect calculus. My research ended up dealing with more analysis than topology in the end.
Second of all, instead of merely trying to understand questions, make sure you can run through them in your head a couple hours after you find the answer, and furthermore, try to understand the implications of the problem. For calculus, I think formulating a visual, geometric image of what the problem means is possible most of the time. If you have a deep intuition about what the problems you have stored in memory mean this will really increase your ability to adapt the methods to other problems as well as to remember them in the future. Whenever I want to remember what "Lipschitz continuous" means, I think of the little animation on the Wikipedia page: https://en.wikipedia.org/wiki/Lipschitz_continuity Then, I have no problem writing down the definition. Similar pictures can be formulated for pretty much everything in calculus. You might not have that luxury in subjects later on.
Another trick I used while studying for complex analysis prelims (similar flavor to calculus honestly) is I kept my solutions to practice problems and would go over a random selection of them every day during breakfast.
