Course of action after failing a (non-maths) course in hopes of entering grad school for maths? I'm currently a second year student in a general science program with a specialization in mathematics (it's kind of like a double major, almost). I'm hoping to go to grad school for combinatorial optimization, operations research, or some other pure math stream.  The problem is, I failed a cell biology course this semester (that just ended). 

There are no medical reasons as to why I failed, just a matter of poor judgement when it came to choosing courses (I took an extra course than needed - the cell bio one - so that I could get it over with and take a computational biology course next year which requires this cell bio course), as well, I'm part of a major faculty society at my school and I'm doing research (non-math) with a group. All these factors lead to cell bio being my last priority and to sum it up, I have a U (0) in it, because I didn't pass. 

My question is, how will this look on my grad school application? Overall, I'm a good student, I had about a 3.8 cgpa last year and at most I think this will bring it down to about a 3.4-3.5. I'm sure the next few years I'll do much better in my courses and can hopefully bring my cgpa back up to it's original glory, but for now I'm kind of at a loss as to what to do, especially given that there isn't really anyone to talk to at my school (Canadian) about maths grad school (I went to see an adviser and was told I'd get an email with some helpful info, but haven't received anything yet). I am going to write the GREs and hopefully do well in that and I'm considering taking the Putnam to further enhance my application.

I'm very sorry if this is a duplicate of a question, but so far, people have had different (I'd think more severe) circumstances, i.e. medical, failed course was taken as a high school student, etc. If anyone was in a similar situation or have dealt with this and could help me out, I'd really appreciate it. Thank you!
In my experience, this should not have much/any impact on your grad school applications (assuming you do well in all of your other courses).  A single failed class in an unrelated area just doesn't say anything about your ability to do research in mathematics.  (This is predicated on all of your other grades being very good, and the F being unrelated to any sort of academic misconduct, of course.)  As for course of action, I think you've already identified it: make sure this is a single F in an otherwise excellent transcript, particularly high marks in challenging courses related to your intended area of graduate study.

Personal anecdote:

I am currently in my first year of a pure math phd program in a (roughly) top 20-25 program, and I failed a non-math class in my junior year of undergraduate (something to do with neural networks) for reasons along the lines of yours.  My overall GPA by the time I applied was a 3.75 or so.  I didn't say anything about the F in my applications since it was not particularly relevant to mathematical research.  (In my Statement of Purpose, I wrote about research I had done and areas I was interested in pursuing further research.  A failed neural networks class didn't seem worth noting.)  I did get rejected from two top 10 programs, and maybe that was the reason, though I doubt it.

Hopefully some people who have served on graduate admissions committees in math departments will weigh in on this since my experience may not generalize.