(I think I'm going to open a can of worms with this answer but I've done some research so, don't blame me.)
In the student's text book, New English File Upper-Intermediate Oxford University press
Page 138 it says:
The opposite of "must have" is "can't have" NOT "mustn't have"
So for some it is considered standard English to use: can't have or couldn't have instead of mustn't have when you are speculating or guessing about the past in questions and negative sentences.
He couldn't have been hungry
means practically the same as
He can't have been hungry
They both express a strong conviction in the past, the speaker can choose to add further information in order to back up his claim.
A: John didn't eat his cereal this morning.
B: He can't/couldn't have been hungry. He usually has breakfast.
Thus the speaker is saying it's impossible that John was hungry because he knows John never leaves home without eating something. Must not (mustn't) means something quite different, you are forbidding someone or something from performing an action now, in the present and it is not used for speculating in the past.
On p394 in Practical English Usage by Michael Swan:
Must is used with the perfect infinitive for deductions about the past.
- "The lights have gone out" -- "A fuse must have blown."
- "We went to Majorca." -- "That must have been nice."
Must is only used in this way in affirmative sentences. In questions and negatives, we use can and can't instead.
This is also confirmed by A Practical English Grammar by A.J.Thomson A.V. Martinet 4th edition on page 148.
I don't know why OP says "the sentences are not interrogative". Obviously they are, regardless of whether the question mark is present or not.
1: How could you know if you have cancer?
2: How can you know if you have cancer?
OP has taken his two examples from titles of articles, in which context there's no possibility of them having different meanings. They'll both be followed by text answering the "title" question by setting out possible ways to self-diagnose that you have cancer.
In other contexts it would be possible to distinguish different implications. For example, interpreting could as the past tense of can in #1 leads to...
1a: How was it possible for you to know you have cancer? (perhaps implying disbelief or surprise)
...or one could see could there as equivalent to would, indicating an "irrealis" context. Using could/would like that "distances" the speaker from his enquiry ("I don't actually think I've got cancer - but if I did, how could/would I find out for sure?")
Best Answer
While they could be used for anything where eating the object is forbidden, on their own "You can not eat that" would be applicable to things that you literally could not eat (Like a rock, or a plate of food too large for you to stomach), while "You must not eat that" is more applicable to something that is wholly edible, but forbidden.
"Cannot" has connotations regarding ability, while "must not" is more about authority and requirements.