Generally, people use can't in speech and informal writing, and cannot or can not in formal writing or very formal speech. Also (as @Kris points out in a comment), cannot might be used when you need to carefully distinguish it from can't in speech.
The phrase "can not" may mean "cannot" or "can't," but it also may mean "able not to," which is much different than "not able to" as it conveys the ability to not do something rather than the inability to do it.
8 Both are acceptable, but cannot is now more common. OED has this much to say about cannot: (ˈkænət) the ordinary modern way of writing can not: see CAN v. Notwithstanding, in some situations ambiguity may arise if you write can not, and the difference might not be a minor one. Compare: I cannot make love to you.
So, "cannot" means something (denoted S) is impossible, while "can not" means the inverse of that something (denoted !S) is possible. These two statements do not imply each other. Of course, the second statement could be rendered much more clearly as "The variable can be not initialized," by moving the "not" next to the word being negated.
Why is “cannot” spelled as one word whereas other similar constructions such as “do not,” “will not,” “shall not,” “may not” and “must not” are spelled as two words (unless they are contracted as “...
So here it’s about minimizing ambiguity: can not permits two interpretations, while cannot permits only one. Such care is critical in the language of mathematics. As another example, West would tell you that in mathematical discourse, both “x is a minimum” and “x is a minimal” are valid utterances, but they mean different things.
I did an English test and there was a question which made me really confused. You may not take this trip. In the sentence above, may not can be substituted by: You are prohibited to take this trip...
9 "cannot not say" would only rarely be used in English, and only in very specific circumstances. In particular, this is not a simple double negative. "cannot not" does not mean the same as "can", it means "must". It also carries a connotation that not saying is the expected or default action.