Sort:  

In this case I simply copied over the Wikipedia equations and made sure that I cited the source.

In other posts I used the Codecogs latex editor: https://www.codecogs.com/latex/eqneditor.php which works very well.

Thank you for your help.. I would try this.

Let me know how you do. I found it to be a very tricky calculation that why I posted my advice here.