In formal use, if introduces one condition only; whether introduces alternate conditions, usually with or not expressed or implied: "If we try hard, we can do the work." "We were wondering whether we could do the work." In less precise use, both if and whether are used to introduce clauses of various kinds, but if is not used when it causes doubt about meaning; for example, the sentence "The physician asked to be telephoned if the patient was in a coma" could mean at what time or whether the patient was in a coma. Also, prefer whether in a sentence such as "If I was going to pay the bill was the question raised by the letter."
Dictionary of problem words and expressions. Harry Shaw. 1975.