I'm asking how do you say something like "I don't want to fail" in Japanese. Yes, in anime they say something like "makenai". But I want to say or write it like an actual Japanese sentence in the polite form not the informal form so no slang please. I know -tai is I want to (verb). Any answer on how to say it formally will be very helpful.
You are using what could be interpreted as two different verbs:
まける -> to lose
しっぱいする -> to fail
Formally, I usually hear "I cannot afford to fail" rather than "I don't want to fail".
If you want to sound cool, you could say "I don't have any intention on losing".
The way that I would say it is:
I'd be especially inclined to say it this way to the teacher of the class in question, as it sounds explanatory and somewhat humble. This roughly translates to "I'd like not to fail" or "I'd rather not fail." The "desu" is a copula verb that makes the sentence a polite one.