Whether-uses
Whether is similar to if. It be used interchangebly in certain contexts, but has a different meaning in others.
E.g.
Interchangeable (reporting yes/no questions)
He asked me if/whether I had done my homework. (-did you do your homework? -yes/no)
I am not sure if/whether I´ll go tomorrow.
Different meaning
Let me know if you are free on friday-( sólo) Avísame si estás libre el viernes. (condition)
Let me know whether you are free on friday- Hazme saber si estás libre el viernes o no. (presenting two alternatives)
Only Whether
After prepositions- Its depends on whether we have time- depende de si tenemos tiempo
Before infinitives+to- I´m wondering whether to visit my mum- me estoy preguntando si vistiar a mi madre o no.
Whether or not
We are going whether you like it or not- Vamos a ir, te guste o no
Whether we travel by car or by train, it will cost us a fortune- viajemos en coche o en tren, nos costará una fortuna