I'm in my 40s and honestly feel like my problem solving ability is increasing every year and that I'm more able to better understand and solve problems than at any other point in my life. I also drink and smoke plenty of weed, and hardly sleep so I doubt that's the source ;) a couple of points:

- I realize now that when I was younger I felt correct more often than I was.

I think one major reason for feelings of cognitive decline is simply that I was very ignorant of how wrong I was when I was younger. On a given day I felt much smarter, but in retrospect was very naive and had a lot of learning to do.

- Never stop learning and studying hard things. This means perpetually feeling stupid

I'm a perpetual learner, right now I have 4 text books that I'm working through in front of me. The challenge I've realized when talking to people is that in order to learn you have to allow yourself to feel stupid. This a big issue for many people. It's not a pleasant feeling and for most people they never want to feel that way after they get out of school. Ironically this is probably even more true for people with graduate degrees. I was shocked how many PhDs I've met that never want to pick up a text book, or paper outside their area of expertise again. It makes sense, you worked so hard for that degree and to feel like an expert why would you ever go back to feeling like an idiot? But if you want to keep learning that's the path you have to take.

- You're younger at 40 than at 30.

At 30 you really start to feel the difference between youth and age, but this intensifies the feeling of being "old". My newly 30 year old colleagues complain about far more aches and pains and other complications of aging than I do. They feel far more limited by age than I do. But I remember feeling the same at their age. After a decade of getting the hang of managing decline you realize you can do a lot more than you thought, you just have to be a bit more thoughtful about how you do it. As an example, I know lots of life long runners that get injured around 30 and give up. I started running in my late thirties and finished my first marathon within a few years. Young bodies don't have to worry about form or correct practice, in your 20s you can just do better by pushing harder. You cannot learn to run in your late 30s without first mastering and understanding your body. As you age, brute force becomes less of an option which means to do things you become more skilled in doing them, you have to learn it correct and as you do you realize you are better at many things.

- Decline teaches you that you lose everything eventually, learn to live accepting this not resisting it.

When I was younger I placed a lot of my self worth on how smart I felt I was. I really wanted to feel special and be appreciated for that. After many successes in life, achieving the things I only dreamed about in my 20s, I realized that that feeling is never satisfied. I realized that wanting to feel smart was really about wanting to be perceived as smart. What makes decline scary is a feeling that you will lose your value. You can pretend you wont, but a better solution is to accept that you will, and maybe that you never really had that value you thought you did. Look at this live as what you have and ask yourself what do you want from it? I study every day because it brings me pleasure in itself, I no longer care if other people even know about the fruits of that labor. If one day I lose most cognitive ability, I hope I can enjoy just sitting their and feeling the breeze.