Publishing a bad paper? First, I apologize if mathoverflow is a bad fit for this question, but it is the only place where I can think to get advice from professionals given my circumstance. I'm also sorry about any vagueness in my post since I need to make sure I maintain anonymity - anonymity is also why I can't get advice from folks in my department.
The short story is that I am a graduate student in a math related field and have been reached out to by a faculty member for writing up a paper about something we discussed to be submitted to a low ranking Mathematics journal. The material is very basic, coming very close to being trivial observations, and happens to be of, I suspect, no interest to anyone anywhere. Anyone who cared to prove what we proved would probably be able to do so within a day at most, if the results aren't already well known. At best, I think the results make good homework problems. 
Despite this, the faculty member seems excited about it. He works in a field that another faculty member has described as "toxic" to getting a job in academics, which is my ultimate goal, and advised me that I would probably be smart to leave papers in this research topic off my C.V. unless it is accepted to a top-tier journal. 
I'm in the strange position of working on this paper because I don't want to alienate him or offend him, but I'm hoping that the paper is rejected just so that my name isn't attached to the paper. This will be my first article submitted for publication, and I'm a little uneasy about even having random editors - who I conceivably could run into in the future - viewing the work.
So, my question to you: is this sort of thing worth getting worked up about? Should I just go along with it, figuring that it is highly unlikely that it will negatively impact my career, or is there some legitimate concern? Is there a chance that publishing trash might help me just because it increases my publication rate?
 A: When all else fails, try honesty.
I don't mean that you have to tell the professor to his face that you think his field is toxic and that the paper is garbage. But if your honest opinion is that the paper is too trivial to be worth publishing and that you're worried that it might hurt your career, then I would tell the professor that.
If you can suppress your name from the paper more easily, just by declining to work on it, then by all means do that.  But it sounds like you've already worked on the paper and can't extricate yourself that easily at this point.  In that case I'd recommend just telling the professor that you have had second thoughts and would like to remove your name from the paper, and explain why. The fact that you're a student and he's a professor makes this a scarier prospect, but I don't think your difference in social status should stop you from giving your honest professional opinion on the quality of the work. Intellectual honesty is what we are all striving for in our profession, after all. What's the point in being a scholar if you have to sacrifice honesty?
And maybe you're wrong after all and the paper is more interesting than you think. You won't find this out unless you give the professor an opportunity to openly defend the paper against honest criticism.
Honesty is so rare that it tends to confuse people, who are more accustomed to dealing with lies and excuses than with the straight dope. I know from experience that being honest does risk being misunderstood by people who assume that I can't possibly be telling the truth, so there is some risk of misunderstanding. In the long run, though, I believe that developing a reputation for honesty pays off handsomely, in terms of inner peace if nothing else.
A: *

*First, to the issue of "toxic" fields. To everyone out there who wrote that the idea is nonsense, there are people who are still working on elementary-ish approaches to special cases of Fermat's Last Theorem. There could be good math there, but if all I knew about somebody was that he submitted an elementary proof that $x^{17}+y^{17}\not=z^{17}$, I would be disimpressed, and suspect crank-hood. 

*There are also several comments about not putting it on your CV. If you make it onto a shortlist, you will be searched for at least through Google, the arXiv, and Math-SciNet. If it's out there, it will be attached to you. But also, if you have a couple of serious papers, and also one coauthored on a light topic, that would speak well of you (as a job candidate).

*Have you considered the possibility that this professor knows his field better than you? Perhaps the result is interesting, but the question hadn't arisen before. There are, after all, problems that are easy to solve once they are stated in the right way. It's also possible that it's one of those problems that isn't too hard if it is in a book, and you know which chapter/section is relevant, but perhaps people in his field don't usually have your exact background. Perhaps this was the warm-up question, and for "the paper" he has some nice generalization or application in mind that still needs to be worked out.

*The bottom line is that in math your name is your brand, and you need to nurture and develop and protect that brand. I know mathematicians that have pseudonyms that they use for exactly this class of publication: good enough to publish, not good enough to lump in with my "real" work.
A: I agree with what Rodrigo says: you don't have to include a paper which you do not like in your CV.
In general, people are usually evaluated by their best papers not by the worst.
From my own experience, I can conclude that my own opinion about my papers does not always coincide
with the public opinion. There were several papers I hesitated to publish, but they are more
appreciated than some papers I am proud with.
There were also results I did not publish, considering them too light-weight, and later had regrets.
And finally "toxic subject" is on my opinion a nonsense. 
A: I would like to add my own two cents in here as somebody who works in a "toxic" area.  


*
*  In essentially all areas of mathematics there is both good work and bad work being done. Mainstream areas, however, tend to have a larger number of people doing good work (because, after all, few people are willing to spend 6-10 years attacking the hardest problem in an unpopular field when almost nobody will pat you on the back when you are done).  Because of that nobody will simply dismiss you out of hand for working in, say, Number Theory despite the fact that there are also plenty of bad papers published in this area.  

On the other hand, unfashionable areas also have good people trying to do good work who publish in very good journals.  If you want to go that route you must be very dedicated and be prepared to have papers rejected by good journals without being sent to a referee and to not get job interviews because you work in area X.  So you should only work in such an area if you love the mathematics.

On the other hand publishing a paper in a toxic area in a top journal can sometimes have the opposite effect: people realize that publishing in a top journal in certain areas is more difficult than others and will say wow he/she published in ((insert journal name)) on ((insert unfashionable area)), he/she must be doing good work.

So the point is good work in a toxic area can still end up receiving recognition if you work hard enough to get it recognized.  


*  However, you seem to indicate that it is not such good work in a toxic area that is at issue.  Here the question becomes more complicated because there is a scientific issue and a human issue.  Suppose that at a conference I spend an evening discussing mathematics with a colleague and we make progress on some problem he/she is interested in and he/she wants to make a paper out of it.  Then there is a human question.  If I tell this person that I only want to be thanked and not be an author, they might be offended.  Maybe this person is a friend or for some other reason I don't want to offend them.  The scientific vs. human issue can be complex.  The more senior you are the less effect having a paper in a weak journal is because people won't really notice it.  Nonetheless at any point in one's career people's feelings have importance, too. I don't have any good answer on how to balance this aspect.


*  Grad students often underestimate the difficulty of a problem they have solved without seemingly having done much.  For instance, there is the following famous story in computer science.  It was long an open problem whether non-deterministic space complexity classes were closed under complement because the obvious approach to recognize the complement of a language does not preserve space complexity.  People in the area generally believed that space complexity wasn't preserved by complementation.  The story goes that a certain grad student (somebody at MO probably knows who and can edit this) arrived late to class and thought that the prof was asking a homework problem rather than presenting an open problem and came up with a clever, but elementary proof that space complexity classes were in fact closed under complement.  Sometimes people coming with a fresh viewpoint and with training in other areas of math see things that nobody in the area saw and although the arguments seem like elementary observations, they may be important.
A: While it is true that if you have 5-6 good research papers after that, nobody will care about what you wrote in that paper (assuming it is as bad as you present it), if it is one of your only 3 official publications by the moment of the job search (whether you include it into your CV or not doesn't matter because once you reach the short list, the mathscinet and the grapevine become more important sources of information about you than your own presentation of yourself) and the other two papers are not readily available, you are a toast.
One thing you can do is to check quickly if what you've done is, indeed, well-known in some form. If it is, you are off the hook because knowingly publishing a published result as new is a no-no, so you may just regretfully say that somebody has "undercut" you there and you need to work on another project now. Whether there is any other clean exit depends on many details you haven't provided and many people gave you good advice already, so I'll stop here.
A: Besides the effect of bad papers in job search, I consider some kind of scientific dignity for myself and I try to do the right thing in the similar situations. So, I suggest you do the same. 
For example I have experienced at least two similar situations: 


*

*When I was a graduate student and even at the present time, I knew if I share my papers with some of the old professors by putting their names as the coauthor they are going to help me in my career and hopefully do not cause official difficulties for me. But I was not able to convince myself to do this, first because it is a lie, secondly because doing this kind of things makes me hate myself and that's the worst thing can happen for some one.  

*One of my colleagues suggested once we share our papers with each other so that by writing one paper, it will be counted two publications for us. I know this suggestion sounds juvenile and stupid, but it really happened. Because of scientific dignity, again, I rejected this suggestion. 
I think you should care about long term and about how you will feel about your today action in the future.   
A: You do not want to alienate professors in your department either, so I would say let it be published and forget about it. I don't think you are required to cite it in your CV. After all there is no fixed format for a resume; you put in whatever you estimate highlights your positive features.
As for people judging you from having read the paper, it seems there is little chance of that given that you are not going to work in that 'toxic" field later on. Also, your referee will probably not be a Fields medalist, so there should be no big harm from that quarter either.
A: I am tempted to attack some bits of the responses you have gotten so far! Instead I will tell you that I believe the answer is very simple. 



*

*Put yourself in the professors shoes. (I have to assume you have the ability to do that, even if it requires great effort.)

*Now, do what you would want a student to do if the tables were turned.



As simple (and as old hat) as this sounds, it is a cure for many ills that is far too rarely practiced.
(Another relevant fact: scientists - mathematicians included - almost always take themselves and what they do far too seriously!)
