Replaced 1/2 with S.Half and substituted dummy sinx2 and cosx2