Can someone please help me to understand how the function in 6.5 is realized. I do not understand how they obtain (w2 OR w3) term, are there some intermediate steps I am missing? Thnak you.