... back to "simulator & Mathcad not same"
You take the real part of the components, thus eliminating the complex part. Maybe you should check if the simulator takes the argument |,|. The small imaginary part you remove then makes your result not true. The material above Marlett is what you should plug in the system (at the right place) and make the system work accordingly. That will make sense, fully visible in respect with the Mathcad unit system and practice, also as per the books (hopefully). Draw all the components by hand on paper, scan and post ... I will draw the circuit.
Also you didn't take into account to define discontinuous function completely, i.e: all conditions must be specified. Not detrimental in this work sheet but it will crash another project, and it did and a lot in this collab.
jmG