Switch function has little constraint in sampling

Thank you for your quickly answer. I want to transfer aa to another function. however the prior sampling points show Nan. do you have any idea about it?