This is not for homework, but I would just like a hint please. The question asks
If a commutative ring $R$ (with $1$) has a unique maximal ideal, then the set of non-units in $R$ is an ideal.
This is actually an 'if and only if', but I have shown one direction. I'm not sure how to go about proving this direction, though. I don't think contradiction or contrapositive are useful, because assuming the set of non-units is not an ideal doesn't seem to give anything useful. However, showing this directly seems difficult too, because we don't know anything about the set of non-units in an arbitrary ring (it may not even be closed under addition). I also have the following fact at my disposal:
When $R$ is a nonzero ring (with $1$), then every ideal of $R$ except $R$ itself is contained in a maximal ideal.
I would really appreciate a hint about how to go about approaching this.