Bad advisor + a research area that interesets me or an active advisor + research topic that doesn't interest me? I'm a beginning Master's student in Mathematics, I'm passionate about Mathematical Analysis and want to have my Master's thesis on some topic in Mathematical Analysis. Problem is, in my Department, the professors who work in this area are very few and they have a bad reputation. On the other hand, professors who work in Computational Mathematics and Numerical Optimization are more active in research and have a good reputation. I can't really decide whether is it more important to choose a potential supervisor and learn from him the elements of research in a research topic I'm not interested in or should I take the risk and stick to the topic I'm passionate about?. If I chose the research area which I'm passionate about there's a huge probability that my supervisor will not offer any guidance at all or even any interest in reading my thesis. 
I understand that the question is rather subjective as it depends on the personality of the student in the end. However, I'm looking forward to hearing other's analysis on the situation and if anyone had a similar experience or a challenge like this and how did they end up doing?

Thank you all for your time reading my post.
I'm going to assume that by "bad reputation" that you don't mean that they actively impede and harass students. Avoid such advisors like the plague - which they are. The following only refers to situations in which "bad" means that they aren't very active in the field and are without much of a publication record. 

If you really can't move to a more compatible place, then ask yourself how self directed are you and how much drive do you have to get it done on your own? If you have an advisor in analysis (my original field, actually) who is a decent person who will respond to your questions and concerns, even while not providing a lot of guidance, then you could probably be successful. It would be good training, actually, for an academic career, which you eventually need to be able to carry on by yourself. But it would take a lot of reading to find a good problem. 

However, if you aren't that self directed and need a lot of guidance, then it might be best to choose an advisor from a related subfield if you can find one who will give you the external direction you need. It is a tradeoff, as are many things in life. 

But study for Master's degree isn't forever. A lot of it is coursework most places and it isn't usually necessary to specialize so completely that you can't still keep a bit of generality in your program. (Yes, there are places in which that isn't true and where specialization is all, but not everywhere.)

Another option, if you have a good, compatible advisor, is to also seek advice on some aspects of your study via the internet from authors who write in your field. International collaboration is feasible now where it wasn't in the past. 

My suggestion, then, is that the human qualities of an advisor, and a willingness to help you can be as important as an international reputation in the field. 

But when/if it comes time to study for a doctorate, pick a place where you get more support for your field. 



Note that this advice would be much less valuable for a doctoral advisor. There, the student probably needs more guidance.