How to overcome a mistake you make in your proof and regain motivation?

As an early-career mathematician, I have had this experience, more or less exactly, several times. I think I've solved a problem (or made good progress toward doing so) and I become proud and emotionally invested, only to show it to a mentor (first my PhD advisor, then my postdoc supervisor) who quickly points out a fatal flaw in my reasoning. Sometimes, he will propose a different and much better method. I completely get how demotivating this can be. After all, I would think, why am I even working on this project if my mentor could do it himself more quickly?

But you have to overcome these feelings. Here are some points of view that helped me do so:

  • Trying things and failing is how we learn. There's a mathematical lesson here about why my techniques failed and my mentor's succeeded. There's also a lesson about how to do research: how to do sanity checks, how to avoid "premature optimization," etc.

  • My mentor is a professional researcher with decades of experience. Of course he can solve things more quickly than me. Even if it feels like my role is to work out the details of his ideas, I'm learning a lot by doing that. And these "brilliant ideas" are usually adapted from previously existing techniques anyway--it's more an experience gap than an intelligence gap.

  • Experiences like this keep me humble, which comes in very handy when teaching people who understand less than I do.

I would encourage you to try to power through these feelings of inadequacy. Part of being a mature researcher is not being afraid of being wrong.

Having said all that, a good way to avoid situations like this is to keep the person you're working under more in the loop while you're doing the work, so that they can steer you away from dead ends. In your case, it wasn't necessarily your fault that your supervisor didn't devote much time to your project, but in the future you should try to get high-level feedback earlier in the process.


Perhaps I'm taking the OP too literally at his word, but my first inclination is to see it like this: an undergraduate tried his hand at research, had a predominantly negative experience, and now is not motivated to continue even though his advisor gave him something else to do. Well, there is one obvious answer: don't continue with your research if you don't want to. Whenever an undergraduate is doing mathematical research (TCS research counts), they are doing it for the purpose of getting a sense of whether they like it and want to continue with it more than any other purpose. So if you feel strongly enough that you don't like it, it may well be that in fact you achieved what you were supposed to achieve in a fundamentally deeper sense than the one you are feeling bad about. Most undergraduates doing mathematical research decide at some point that it is not really for them, at which point they stop.

To be honest, my experience with undergraduates doing mathematical research is that they are often rather fickle and flighty in their approach when viewed through the lens of a professional researcher. I have spent hours, days or more trying to give undergraduates the training they need to work on a problem that I've chosen for them, only to hear from them next week that they are now interested in something entirely different, e.g. some pattern they saw in the numerical output of some code that they wrote. Whether that is disappointing depends entirely on my expectations. I now think that treating an undergraduate as a "non-positive year graduate student" is the wrong approach: in particular they should not be assigned a problem that one would expect an older student or researcher to spend several months working on. Certainly they should not be given a problem such that a failure to solve it -- or even a complete neglect of it -- will have a significant negative impact on their advisor or anyone else.

Circling back to the situation: I worry that the OP has been placed in a situation which is "too serious" for an undergraduate student. A little context is missing; e.g., the OP writes

I have been working as an undergraduate researcher in theoretical computer science for 7 months.

Does that just mean that you've been thinking about TCS for 7 months? Are you getting paid to do it? (Most undergraduates in the US are not paid for academic work they do during the academic year...but the OP may well not be in the US.) Are you getting paid as a sort of undergraduate research assistant to your advisor?

There are some nuances in the situation that make it hard for me to read. On the one hand, it's possible that your supervisor is doing a bang-up job: he gave you a problem that you were interested enough to work on for several months (already a successful undergraduate research experience, I claim). You claimed to solve a piece of it, which is nice for you but not necessarily something that needed to be written up. Then your advisor discovered that there actually was interest in what you had done, and was involved in the process of discovering a mistake in your writeup. After that happened twice, he stepped in by sketching an approach of his own. That sounds really supportive to me. (I'm sorry that you put a lot of work into a writeup that he didn't comment on in detail, but: I've been on both sides of that situation. It happens, too often, to good people.) On the other hand, if your advisor actually expects you to function as someone who can mostly carry him through achieving his own research goals: when it comes to mathematical research, at least, that's very bad. At the most you have a short internship as a mathematical researcher: it's his career, and the burden of responsibility needs to fall on him in every way. If you are feeling bad because you think that you've derailed his own research plans or otherwise disappointed him: well, I think that's very poor behavior on his part.

To end, perhaps you should embrace the fickleness of undergraduate research. Not feeling excited about the project? Don't work on it...for now. If there is something else that interests you, anything else, look at that instead, and talk to your supervisor about that if you choose. It may well be that you could regain your positive feelings about TCS research by thinking about -- well, anything -- and when that occurs and/or some time has passed, you may actually enjoy returning to the problem and proposed solution your supervisor gave you. (A big secret: I am a real life research mathematician, and giving up on something that isn't going well for a little while in order to regain enjoyment and confidence is something that I do very often. Sometimes there is exactly one hard problem that I want to chip away at for days, weeks and months at a time...but more often, there isn't, and sometimes I wonder a bit at how hard people who only work on one thing are actually working.) Or not, which (according to me!) is really okay.

Final word: don't do mathematical research if you don't enjoy it. Seriously.

Added: I am concerned that my "final word" is not being understood as I meant it. First of all, an equivalent version is "If you don't enjoy mathematical research, then don't do mathematical research." Maybe this stops people from reading this as "don't do mathematical research [plus other words]"! Second, the statement has to be construed in a reasonable way, and in fact anyone who is doing mathematical research has to construe it in a reasonable way for them. Certainly I don't mean "If you wake up one (or two, or three...) days and have negative feelings about mathematical research -- or if you have one (or two, or three...) setbacks in your mathematical research -- then you're not cut out for it; just stop now"! What I mean is "The main reason that people do mathematical research is because of the joy and sense of personal fulfillment it gives them -- not that it always makes them happy and fulfilled, but that in choosing which of the many things to do with their life, this choice seems to make them more happy and fulfilled than the alternatives." There are extrinsic rewards to mathematical research as well -- if you are successful enough at it, you make more than enough money to survive, you have more control of your daily schedule than many other professionals, there are many opportunities for travel, and so forth -- but if you remove the intrinsic rewards, the extrinsic rewards don't stack up against other careers that a similarly talented, hard-working person could probably achieve. Also not enjoying mathematics is not a failure and is not the same as being bad at it. It almost seems silly to have to say this out loud, but: the people who do mathematical research as a career are not the ones who in all the world are the most talented or most successful at mathematics -- they are the ones who are talented and successful enough to get paid to do it and who value the activity enough to devote their lives to it. Most undergraduates who do some mathematical research do not want to devote their lives to it. That's not a character flaw or an intellectual weakness on their parts: there are just a lot of other valuable things to do. Finally, I'm not saying "Look, most undergraduates quit, so you'll probably quit." I'm saying "Most undergraduates quit, so the idea that you might quit should not be so horrific that you can't even contemplate it." All things in moderation: if you have a bad experience with something, taking a small break from it, reassessing your commitment to it, adjusting your practice of it to rekindle your joy are all reasonable, healthy responses. So is powering through the pain, sometimes. These are all good things for us to have in our repertoire.


Okay. I was in a well respected PhD program for two years, doing research, when I got sick, and now I've been sick for 3 years unable to do math. I'm won't say what your experiencing isn't real or unpleasant, but I'd like to suggest I have some perspective to offer you. A lot of it comes from realizing unhealthy emotional habits doing math that contributed to the stress that brought me to where I am now, unable to do math.

Fundamentally, I believe the healthiest way to approach mathematical research is to truly and deeply appreciate your ability to exercise your mental faculties, your ability to ponder interesting ideas, and your abilities to think of interesting questions. This is something like, "Neat, summation by parts is a neat tool and it's neat how it can be used in all these sorts of problems and, wow, maybe it is useful in this problem in such-and-such a way," vs, "Gosh, my attempt to use summation by parts fails to solve the problem. I suck."

This is different from successfully solving problems. That is a fine goal, but if you allow it to dominate how you relate to doing math research, you will be stressed out all the time unless you happen to be wildly and luckily successful.

I'm suggesting an attitude of humility. With this sort of an attitude, you can more easily accept what everyone else tells you, that failing and making mistakes is a big part of research. Of course it will happen to you. It happens to others too, though you don't get the inside scoop into their research lives. Certainly some people appear to never fail, and maybe some people really are that successful, but envy will only stress you out and make you feel depressed.

You need to practice this by expressing wonder or thankfulness for what you do understand. Here are some examples.

"Wow. I actually do understand the problem statement!"

"Neat! People actually care about this problem, it impacts the world in some small way, and I get to participate in the community by thinking about it."

"It's neat that I was able to use [this clever integration by parts trick] in an attempted argument."

"I am thankful I have an opportunity to participate in the mathematical community and potentially write a paper."

"[Anything you think it positive: i.e., something about your experience, your paper, etc., you'd rather have than not have, no matter how small or trivial.]"

Fake it until you make it. If you think there is a modicum of merit in adopting the humble attitude, then you are being honest when you practice such thoughts.

The point is, if you approach things from a humbler perspective, the experience wasn't wasted even if you don't achieve your goal. And it really is a privilege to think about mathematics. If you find you cannot, not matter what you do, enjoy the process of thinking of mathematics and working through ideas on your own regardless of whether it is fruitful or not, then maybe it is true that research isn't your path.

I miss my days of research and have realized I love thinking about math on my own. Hope there's something useful here.