Is there a phrase for when a teacher uses an example that they think should be obvious. but the students get it wrong. So the teacher is disappointed in that they've wasted all that time and need to reteach the basic principles again.
Having been a teacher, I know the feeling of giving my students what I consider to be the perfect example to illustrate a concept I'm teaching, only to be met with stony faces or uncomprehending looks.
Competent teachers learn not to take that reaction personally; rather, they attempt to come up with another example that rings their students' bells or causes their light of understanding to turn on.
I am not saying that a teacher' failure to make a concept crystal clear is always, or even necessarily, the teacher's fault. Sometimes a significant portion of a class can be resistant to learning, inattentive, hindered by learning disabilities, and so on. Resourceful teachers, however, when facing uncomprehending looks, simply attack the concept from a different vantage point by using different examples and sometimes even wildly diverse and far-out methods.
The teacher who takes a temporary setback personally and with a deep sigh goes back to the line-upon-line, precept-upon-precept method of re-teaching foundational facts is likely experiencing a form of cognitive dissonance, a concept elucidated by Dr. Leon Festinger years ago and elaborated by countless theoreticians and social psychologists ever since the theory burst on the scene.
In essence, cognitive dissonance arises in a person when he fails to experience an expected outcome. Consequently, his dis-ease triggers disappointment, ambivalence, embarrassment, frustration, discomfort and even anger.
Put differently, cognitive dissonance rears its head when a person entertains two conflicting ideas or concepts in his or her mind at the same time, and then through a process of choosing one idea in preference to the other idea attempts to get rid of the dissonance. Some people are more immune to cognitive dissonance than others, but it is most likely a universal human experience.
A teacher who sees herself as a really good teacher may, upon experiencing the phenomenon you describe in your question, begin to question her teaching ability, asking such questions as
Am I really as good as I think I am?
Am I in the right profession?
What am I doing wrong, such that the whole class doesn't seem to "get it"?
Another tack might be to cast blame on the students and resolve the dis-ease she feels by saying such things as
This class is simply not very bright.
This class is not willing to learn.
These students are apathetic.
The truly competent teacher, on the other hand, engages neither in self-doubt nor the blame-game; rather, he regroups with his self-concept intact and attacks the problem as he believes a good teacher would by inventing new examples, trying different teaching methods, and forging ahead despite a temporary setback.
The former teacher is tempted to "cut her losses" and give up. The latter teacher takes his students' failure to understand as a challenge for him to step up his game.
Disappointment itself is a universal human experience and emotion. Some people deal with it better than others. Some folks do not even feel disappointment until they reach a certain fairly high threshold, as in the case of a teacher who has used numerous examples (not just one) to elucidate a concept for her students, only to be confronted with the furrowed brows of incomprehension.
In summary, I think cognitive dissonance describes aptly the phenomenon you describe in your question. How a teacher experiences and deals with the frustration and disappointment triggered by an apparent failure to teach (or a failure of students to learn) depends a great deal on her tenacity, flexibility, resourcefulness, and good humor, all of which keep a temporary setback in the learning process in perspective by not allowing it to define either her or her students.
With drooping crest; hence, cast down in confidence, spirits, or courage; humbled, abashed, disheartened, dispirited, dejected.
(Oxford English Dictionary, accessible online at the Word Finder)
A feeling of dissatisfaction, often accompanied by anxiety or depression, resulting from unfulfilled needs or unresolved problems.
For example: I could sense his frustration at not being able to help. -- Source Cambridge Dictionary Online
Incompetent - lacking necessary ability or skills
Jobs are about using your ability and skills to get work done. When you fail at your job, you feel incompetent.