I have the following code to solve the following equations:
Taken from the following paper:
https://dspace.mit.edu/bitstream/handle/1721.1/106948/Roy_A