I've been wondering this for quite some time and decided to ask finally. What really is the role of math in computer science on higher levels like master's and PhD? Currently I am working on my BSc and hopefully get it done next summer. I have done like 5 math courses(linear algebra etc) + 5 statistics courses. I also did calculus in high school(integrals, derivatives etc) as I took the longer version of math which typically increases your chances to attend STEM programs here(EU country). Some of my professors have spoken how important they think math is in computer science, but is it really unless you go to some very specific fields like theoretic computer science? Because I haven't found it that useful outside of a few specific courses.
I am not sure whether I would like to pursue a PhD in the future but I've been leaning more towards it lately. Security research has gotten my interest and I've done some reverse engineering + vulnerability analysis and working on a small JIT assembler. Sadly not many undergrad courses teach these things so I've worked on them largely by myself. I haven't had any use for university level math on that, maybe I've just scratched the surface?
In some ways I feel bad for not taking more math courses and it's something that keeps annoying me but it's very hard to try to convince myself that some proofs about integrals are going to be useful in my future work/research. It would be nice if someone could elaborate what kind of role math plays in higher level of computer science studies. I have never honestly liked math that much but instead seen it as a something that you just need to know. What are some really useful math courses one should take?