It's okay, I had a headache, but I liked it, it was nice, how muscles ache after classes, it means they grow, so my head hurts after math, it means that it grows smarter.
Personally, I got rid of this very simply - I finished nine classes and just "dumped" away, to college, to a specialty where mathematics and physics are not needed at all. And you know what? .. It got better.
Contact a neurologist, you just won't find the reason, if you need to sweat a little, you may have to do an MRI, take some medications.
I wish you good luck. Everything will be fine
I can't speak for everyone else, but personally, my head ached during these lessons because I didn't understand anything.
But since it was necessary to understand, I strained my brain with all my might for this. As a result, my head ached incredibly both during the lesson and after it.
Plus, everything still depends on the teacher. If in his lesson he creates an atmosphere in which it is comfortable for students who understand the subject and for those who, like me, are complete humanities, then the students will feel great. Unfortunately, my teachers of these subjects were very peculiar ... One has only to remember how a mathematics teacher threw chalk at those who could not solve an example or problem.
I personally got rid of the pain when I realized that mathematics and physics are not worth making me feel bad)
Many factors can influence: did you eat well, classes at the end of the day and are you very tired, the room is not ventilated, a lot of dust, etc. In this case, take a meal, carry coffee in a thermos, do not be afraid to ask the teacher to open window.
A psychological factor may affect. I am not a psychologist or a psychotherapist, just the level of a home bookworm who has read a couple of books by psychologists who, apparently, except by writing, do not know how to make a living. But I knew people who hated some subjects to horror, and when the bell rang and it became clear that 10 minutes of change separated us from the unfortunate lesson with the shrew teacher, these people felt bad. It was not window dressing, a runny nose, nausea, headaches, fever, and anything else began. Everyone has it differently. Changing the teacher / institution solves the problem.
But I hope that everything is much easier. Get well soon :)