according to sine rule,
\[cos\text{ }\left( A\text{ }+\text{ }B \right)/2\text{ }=\text{ }cos\text{ }\left( A/2\text{ }+\text{ }B/2 \right)\text{ }=\text{ }cos\text{ }A/2\text{ }cos\text{ }B/2\text{ }+\text{ }sin\text{ }A/2\text{ }sin\text{ }B/2\]
\[cos\text{ }\left( A\text{ }\text{ }B \right)/2\text{ }=\text{ }cos\text{ }\left( A/2\text{ }\text{ }B/2 \right)\text{ }=\text{ }cos\text{ }A/2\text{ }cos\text{ }B/2\text{ }\text{ }sin\text{ }A/2\text{ }sin\text{ }B/2\]
.Substituting the above equations in equation (vi) we get,