This is a tricky one and I will tell you why. It is because if and whether can be used interchangeably, and more often than not, they are used that way in informal conversation.
In formal conversation or writing, however, they should be used properly. For that, you need to know the rule.
Use if when you have a conditional sentence and whether to show that two alternatives are possible.
Let’s take up both cases one by one.
Case I: When whether and if can be used interchangeably:
Priya didn’t know whether Leena would arrive on Tuesday.
Priya didn’t know if Leena would arrive on Tuesday.
In both the above statements, the meaning is the same – Leena may or may not arrive on Tuesday.
Case II: When whether and if cannot be used interchangeably:
Priya didn’t know whether Leena would arrive on Tuesday or Wednesday.
Using whether is indicative of two possibilities: Leena may either come on Tuesday or Wednesday.
Let’s see how the meaning changes once I replace whether with if:
Priya didn’t know if Leena would arrive on Tuesday or Wednesday.
Now, if implies that Leena may come on Tuesday or Wednesday or may not come at all.
So, in order to avoid confusion, you should use whether unless talking about a condition, as it is more consistent.
Here’s another example to make things clear:
Call Priya if you are coming on Tuesday.
Call Priya whether or not you are coming on Tuesday.
Again, in the first sentence, the condition is clear – Leena needs to call Priya ONLY if she is coming on Tuesday.
In the second sentence however, Priya needs to call in both cases. She has to call if she is coming and she has to call even if she is not coming.
To sum it up, use if in case there is a condition, otherwise use whether (to be technically correct!) in all cases.